Commit 4c9eaa1f by lijingjing

修改可输入委托下样品编号重复问题;

parent 9a8a6aa0
...@@ -667,12 +667,12 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust> ...@@ -667,12 +667,12 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
if (isSubmit) { if (isSubmit) {
if (StringUtils.isBlank(sample.getCode())) { if (StringUtils.isBlank(sample.getCode())) {
handleSampleCode(entrust, sample); handleSampleCode(entrust, sample);
updateSampleList.add(sample);
} }
if (StringUtils.isNotBlank(sample.getCode())) { if (StringUtils.isNotBlank(sample.getCode())) {
RestAssert.fail(entrustSampleService.isRepeatSampleCode(sample), String.format("样品编号【%s】重复!", sample.getCode())); RestAssert.fail(entrustSampleService.isRepeatSampleCode(sample), String.format("样品编号【%s】重复!", sample.getCode()));
} }
} }
updateSampleList.add(sample);
// if (null != sample.getId()) { // if (null != sample.getId()) {
// handleSampleCode(entrust, sample); // handleSampleCode(entrust, sample);
...@@ -1297,7 +1297,7 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust> ...@@ -1297,7 +1297,7 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
private List<EntrustSampleDTO> listSampleDTOByType(Long entrustId, int type) { private List<EntrustSampleDTO> listSampleDTOByType(Long entrustId, int type) {
List<EntrustSampleDTO> sampleDTOList = baseMapper.listByContractId(entrustId); List<EntrustSampleDTO> sampleDTOList = baseMapper.listByContractId(entrustId);
return sampleDTOList.stream().filter(t -> (null == t.getType() ? 0 : t.getType().intValue()) == type).collect(Collectors.toList()); return sampleDTOList.stream().filter(t -> (null == t.getType() ? 0 : t.getType()) == type).collect(Collectors.toList());
} }
/* 导出检测委托书 */ /* 导出检测委托书 */
......
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