完善日志信息

This commit is contained in:
liuchengqian 2022-04-26 13:54:22 +08:00
parent c49ed5cea5
commit 36c9e0d386

View File

@ -82,6 +82,7 @@ public class QcSourceServiceImpl implements QcSourceService {
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "不存在该检验项目,请先添加检验项目!", locale);
}
if (Constant.QC_ITEM_TYPE_STRING.equals(qcItemByNo.get().getQcItemType())) {
System.out.println("添加检验数据(文本类型)" + insertQo.toString());
QcSourceEntity entity = new QcSourceEntity();
entity.setCreateTime(LocalDateUtils.getCurrentSecond());
entity.setBatchNo(LocalStringUtils.formatEmptyValue(batchNo));
@ -96,6 +97,7 @@ public class QcSourceServiceImpl implements QcSourceService {
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "添加成功!", locale);
}
if (Constant.QC_ITEM_TYPE_PICTURE.equals(qcItemByNo.get().getQcItemType())) {
System.out.println("添加检验数据(图片类型)" + insertQo.toString());
if (picture == null) {
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "上传图片不能为空!", locale);
}
@ -119,6 +121,7 @@ public class QcSourceServiceImpl implements QcSourceService {
qcSourceDao.save(entity);
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "添加成功!", locale);
}
System.out.println("添加检验数据(未知类型)" + insertQo.toString());
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "添加失败!", locale);
}
@ -185,9 +188,6 @@ public class QcSourceServiceImpl implements QcSourceService {
String craftItemNo = (String) source.getOrDefault("craftItemNo", "");
String qcItemNo = (String) source.getOrDefault("qcItemNo", "");
String qcValue = (String) source.getOrDefault("qcValue", "");
if (TextUtils.isEmpty(qcItemNo) || TextUtils.isEmpty(qcValue)) {
continue;
}
String formatValue = getFormatValue(varietyNo, craftItemNo, qcItemNo, qcValue);
Map<String, Object> emptyRoom = findEmptyRoom(resultList, qcItemNo, batchNo, machineNo, materialNo, mouldNo, varietyNo, craftItemNo);
if (emptyRoom == null) {
@ -235,9 +235,10 @@ public class QcSourceServiceImpl implements QcSourceService {
try {
return Double.parseDouble(stringValue);
} catch (Exception e) {
e.printStackTrace();
return -100_000D;
// e.printStackTrace();
// return -100_000D;
}
return -100_000D;
}
/**