Commit 0981a926 by lijingjing

添加日志及编号调整;

parent 0c0291e2
......@@ -1543,6 +1543,7 @@ public class EntrustSampleItemServiceImpl extends BaseServiceImpl<EntrustSampleI
// == search data loop
boolean finalCpSample = cpSample;
dataList.forEach(t -> {
logger.error("INIT ITEM DATA: {}", t);
// 根据有无ID判断是属于哪一种数据来源
Object oid = t.get("id"), obrand = t.get("brand");
logger.error("循环处理牌号:样品id:{},牌号:{}", oid, obrand);
......@@ -1555,8 +1556,9 @@ public class EntrustSampleItemServiceImpl extends BaseServiceImpl<EntrustSampleI
if (Objects.nonNull(retakeSampleId)) {
sampleId = retakeSampleId;
}
String brand = "";
if (StringUtils.isNotBlank(brand = sampleBrandMap.get(sampleId))) {
String brand = sampleBrandMap.get(sampleId);
logger.error("perhaps filled brand: {}", brand);
if (StringUtils.isNotBlank(brand)) {
t.put("brand", brand);
}
t.remove("id");
......@@ -1566,7 +1568,7 @@ public class EntrustSampleItemServiceImpl extends BaseServiceImpl<EntrustSampleI
String testTimeStr = t.get("test_time").toString();
t.put("shift", DateKit.getShiftByDate(DateUtils.dateStringtoDate(testTimeStr, DateKit.FORMAT_DEFAULT)));
}
logger.error("DATA_ITEM: {}", t);
logger.error("HANDLE ITEM DATA: {}", t);
});
try {
logger.info("==== EntrustSampleItemServiceImpl ==== sendTestDataToErp ====> 开始准备发送ERP数据!");
......
......@@ -357,7 +357,7 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
logger.info("==== EntrustServiceImpl ==== initSampleCode ====> [timestamp]: {}", timestamp);
String randomStr = RandomUtils.getRandomStr(4);
// 保证二级加密编码不重复
secondCode = abbr + sn + timestamp + randomStr;
secondCode = abbr + timestamp + sn + randomStr;
logger.info("==== EntrustServiceImpl ==== initSampleCode ====> [secondCode]: {}", secondCode);
}
......
......@@ -121,7 +121,7 @@
es.slot_no, es.sample_grading, esi.period, esii.name ,esii.test_value,
substr(es.code, 0,strpos(es.code,'C')) "cs_code"
from entrust_sample_item_index esii
join entrust_sample_item esi on esi.id = esii.entrust_sample_item_id and esi.deleted = 0
join entrust_sample_item esi on esi.id = esii.entrust_sample_item_id and esi.deleted = 0
join entrust_sample es on es.id = esi.entrust_sample_id and es.deleted = 0
where esii.deleted = 0 and es.name = '原铝重取'
order by esii.ctime desc
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment