|
@@ -379,6 +379,7 @@ public class CheckStandardServiceImpl extends BaseServiceImpl<CheckStandardMappe
|
|
|
List<CheckStandardVO> addList = new ArrayList<CheckStandardVO>();
|
|
|
|
|
|
// 复制保养内容,刨除已经存在的:根据名称判断
|
|
|
+ int i = 1;
|
|
|
for(CheckStandardVO copyCheckStandardVO:copyList){
|
|
|
boolean find = false;
|
|
|
for(CheckStandardVO checkStandardVO:list){
|
|
@@ -391,6 +392,19 @@ public class CheckStandardServiceImpl extends BaseServiceImpl<CheckStandardMappe
|
|
|
CheckStandardVO checkStandardVO = copyCheckStandardVO;
|
|
|
checkStandardVO.setId(IdGeneratorUtils.getObjectId());
|
|
|
checkStandardVO.setSbId(model.getSbId());
|
|
|
+ // 重新设置编码
|
|
|
+ // 设置编码
|
|
|
+ Weekend<CheckStandard> weekend = new Weekend<>(CheckStandard.class);
|
|
|
+ weekend.weekendCriteria().andIsNotNull(CheckStandard::getId);
|
|
|
+ String selectMaxNo = mapper.selectMaxNo();
|
|
|
+ if(StringUtils.isBlank(selectMaxNo)){
|
|
|
+ checkStandardVO.setNo("00001");
|
|
|
+ }else{
|
|
|
+ String newStr = selectMaxNo.replaceFirst("^0*", "");
|
|
|
+ int count = Integer.valueOf(newStr) + i++;
|
|
|
+ String str1 = String.format("%05d", count);
|
|
|
+ checkStandardVO.setNo(str1);
|
|
|
+ }
|
|
|
addList.add(checkStandardVO);
|
|
|
}
|
|
|
}
|