优化null传参
This commit is contained in:
		| @@ -45,9 +45,9 @@ public class QcItemServiceImpl implements QcItemService { | ||||
|         QcItemEntity entity = new QcItemEntity(); | ||||
|         entity.setCreateTime(LocalDateUtils.getCurrentSecond()); | ||||
|         entity.setUpdateTime(""); | ||||
|         entity.setNo(no); | ||||
|         entity.setName(name); | ||||
|         entity.setType(type); | ||||
|         entity.setNo(LocalStringUtils.formatEmptyValue(no)); | ||||
|         entity.setName(LocalStringUtils.formatEmptyValue(name)); | ||||
|         entity.setType(LocalStringUtils.formatEmptyValue(type)); | ||||
|         qcItemDao.save(entity); | ||||
|  | ||||
|         return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "添加成功!", locale); | ||||
| @@ -68,7 +68,7 @@ public class QcItemServiceImpl implements QcItemService { | ||||
|             return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "不存在该检验项目,请先添加检验项目!", locale); | ||||
|         } | ||||
|  | ||||
|         qcItemDao.updateNameById(id, LocalDateUtils.getCurrentSecond(), name); | ||||
|         qcItemDao.updateNameById(id, LocalDateUtils.getCurrentSecond(), LocalStringUtils.formatEmptyValue(name)); | ||||
|  | ||||
|         return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "修改成功!", locale); | ||||
|     } | ||||
|   | ||||
| @@ -40,13 +40,13 @@ public class QcSourceServiceImpl implements QcSourceService { | ||||
|  | ||||
|         QcSourceEntity entity = new QcSourceEntity(); | ||||
|         entity.setCreateTime(LocalDateUtils.getCurrentSecond()); | ||||
|         entity.setBatchNo(batchNo); | ||||
|         entity.setMachineNo(machineNo); | ||||
|         entity.setMaterialNo(materialNo); | ||||
|         entity.setMouldNo(mouldNo); | ||||
|         entity.setVarietyNo(varietyNo); | ||||
|         entity.setQcItemNo(qcItemNo); | ||||
|         entity.setQcValue(qcValue); | ||||
|         entity.setBatchNo(LocalStringUtils.formatEmptyValue(batchNo)); | ||||
|         entity.setMachineNo(LocalStringUtils.formatEmptyValue(machineNo)); | ||||
|         entity.setMaterialNo(LocalStringUtils.formatEmptyValue(materialNo)); | ||||
|         entity.setMouldNo(LocalStringUtils.formatEmptyValue(mouldNo)); | ||||
|         entity.setVarietyNo(LocalStringUtils.formatEmptyValue(varietyNo)); | ||||
|         entity.setQcItemNo(LocalStringUtils.formatEmptyValue(qcItemNo)); | ||||
|         entity.setQcValue(LocalStringUtils.formatEmptyValue(qcValue)); | ||||
|         qcSourceDao.save(entity); | ||||
|  | ||||
|         return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "添加成功!", locale); | ||||
|   | ||||
| @@ -59,8 +59,8 @@ public class QcSpecServiceImpl implements QcSpecService { | ||||
|         QcSpecEntity entity = new QcSpecEntity(); | ||||
|         entity.setCreateTime(LocalDateUtils.getCurrentSecond()); | ||||
|         entity.setUpdateTime(""); | ||||
|         entity.setVarietyNo(varietyNo); | ||||
|         entity.setQcItemNo(qcItemNo); | ||||
|         entity.setVarietyNo(LocalStringUtils.formatEmptyValue(varietyNo)); | ||||
|         entity.setQcItemNo(LocalStringUtils.formatEmptyValue(qcItemNo)); | ||||
|         entity.setMax(LocalStringUtils.formatEmptyValue(max)); | ||||
|         entity.setMean(LocalStringUtils.formatEmptyValue(mean)); | ||||
|         entity.setMin(LocalStringUtils.formatEmptyValue(min)); | ||||
| @@ -93,15 +93,7 @@ public class QcSpecServiceImpl implements QcSpecService { | ||||
|             return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "不存在该检验规格,请先添加检验规格!", locale); | ||||
|         } | ||||
|  | ||||
|         qcSpecDao.updateQcSpecById(id, | ||||
|                 LocalDateUtils.getCurrentSecond(), | ||||
|                 LocalStringUtils.formatEmptyValue(max), | ||||
|                 LocalStringUtils.formatEmptyValue(mean), | ||||
|                 LocalStringUtils.formatEmptyValue(min), | ||||
|                 LocalStringUtils.formatEmptyValue(unit), | ||||
|                 LocalStringUtils.formatEmptyValue(method), | ||||
|                 LocalStringUtils.formatEmptyValue(standard), | ||||
|                 LocalStringUtils.formatEmptyValue(remark)); | ||||
|         qcSpecDao.updateQcSpecById(id, LocalDateUtils.getCurrentSecond(), LocalStringUtils.formatEmptyValue(max), LocalStringUtils.formatEmptyValue(mean), LocalStringUtils.formatEmptyValue(min), LocalStringUtils.formatEmptyValue(unit), LocalStringUtils.formatEmptyValue(method), LocalStringUtils.formatEmptyValue(standard), LocalStringUtils.formatEmptyValue(remark)); | ||||
|  | ||||
|         return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "修改成功!", locale); | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user