| | |
| | | */ |
| | | public String saveMaterialType(FieldSetEntity fse) { |
| | | if (BaseUtil.strIsNull(fse.getUUID())) { |
| | | FieldSetEntity fseMaxValue = baseDao.getFieldSetEntityBySQL("SELECT (MAX(material_type_value) + 1) material_type_value FROM product_project_base_material_type", new Object[] {}, false); |
| | | FieldSetEntity fseMaxValue = baseDao.getFieldSetEntityBySQL("SELECT IFNULL((MAX(material_type_value) + 1),0) material_type_value FROM product_project_base_material_type", new Object[] {}, false); |
| | | fse.setValue(CmnConst.MATERIAL_TYPE_VALUE, fseMaxValue.getString(CmnConst.MATERIAL_TYPE_VALUE)); |
| | | } else { |
| | | if ("0".equals(fse.getString(CmnConst.IS_USED))) { |