Commit 091fa49d by jiangxuming

处理编号顺序与orderBy顺序不一致的问题

parent 8ad2988f
......@@ -376,11 +376,13 @@ public class EntrustSampleItemServiceImpl extends BaseServiceImpl<EntrustSampleI
// RestAssert.fail(message);
// }
// }
//提前查询状态,如果状态>40,则取消
List<EntrustSample> sampleList = entrustSampleService.list(Condition.create().eq("entrust_id", entrustId).ge("status", EntrustSampleStatusEnum.REPORT_MAKE));
RestAssert.fail(CollectionUtils.isNotEmpty(sampleList),"当前项目已完成提交,请勿重复提交,耐心等待即可!");
// 提交为报告编制
EntrustSample sample = new EntrustSample().setStatus(EntrustSampleStatusEnum.REPORT_MAKE).setLid(account.getUserId()).setLtime(new Date());
entrustSampleService.update(sample, Condition.create().eq("entrust_id", entrustId));
logger.info("样品编号:{} 更新为报告编制状态",sample.getCode());
logger.info("7数据录入提交阶段耗时: {}", timeWatch.pointTime());
// 委托信息
Entrust entrust = entrustService.getById(entrustId);
......@@ -407,14 +409,14 @@ public class EntrustSampleItemServiceImpl extends BaseServiceImpl<EntrustSampleI
updateComposeJudgeByTestValue(entrustId);
logger.info("11数据录入提交阶段耗时: {}", timeWatch.pointTime());
// 添加委托日志
entrustRecordService.record(new Long[]{entrustId}, "数据录入", "报告编制", 0, account, "提交至报告编制");
entrustRecordService.record(new Long[]{entrustId}, "数据录入", "报告编制", 0, account, "提交至报告编制410");
logger.info("12数据录入提交阶段耗时: {}", timeWatch.pointTime());
// 执行转PDF操作
executor1.execute(() -> changeExcelToPdf(ids, list));
logger.info("13数据录入提交阶段耗时: {}", timeWatch.pointTime());
// 处理原铝是否重取
executor1.execute(() -> updateSampleRetakeByEntrustId(entrustId));
logger.info("13数据录入提交阶段耗时: {}", timeWatch.pointTime());
logger.info("14数据录入提交阶段耗时: {}", timeWatch.pointTime());
return true;
}
......
......@@ -504,6 +504,10 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
List<EntrustSampleItem> saveEntrustSampleItemList = new ArrayList<>();
List<Long> contractSampleIds = new ArrayList<>();
int incNum = 10;
if (isSubmit && CollectionUtils.isNotEmpty(sampleDTOList)) {
//初始化样品编号之前,先进行排序
sampleDTOList = sampleDTOList.stream().sorted(Comparator.comparing(EntrustSampleDTO::getSlotNo, Comparator.nullsFirst(String::compareTo))).collect(Collectors.toList());
}
for (EntrustSampleDTO sampleDTO : sampleDTOList) {
if (null != sampleDTO.getContractSampleId()) {
contractSampleIds.add(sampleDTO.getContractSampleId());
......
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