|
|
@ -246,6 +246,14 @@ public class DmYdjhServiceImpl extends ServiceImpl<DmYdjhMapper, DmYdjh> impleme
|
|
|
|
String bzrq= DateUtil.format(DateUtil.date(), "yyyy/MM/dd");
|
|
|
|
String bzrq= DateUtil.format(DateUtil.date(), "yyyy/MM/dd");
|
|
|
|
|
|
|
|
|
|
|
|
String gxsj=DateUtil.date().toString("yyyy/MM/dd HH:mm:ss");
|
|
|
|
String gxsj=DateUtil.date().toString("yyyy/MM/dd HH:mm:ss");
|
|
|
|
|
|
|
|
Map<String, List<DmYdjh>> collect = ydjhList.stream().collect(Collectors.groupingBy(item -> item.getDcCh() + "_" + item.getDcPl()));
|
|
|
|
|
|
|
|
collect.forEach((key,val)->{
|
|
|
|
|
|
|
|
String plXh = this.getPlGdh();
|
|
|
|
|
|
|
|
val.forEach(item->{
|
|
|
|
|
|
|
|
item.setPlxh(plXh);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
//工单号
|
|
|
|
//工单号
|
|
|
|
List<DmYdjh> updateList = ydjhList.stream()
|
|
|
|
List<DmYdjh> updateList = ydjhList.stream()
|
|
|
|
.filter(item->StrUtil.isNotEmpty(item.getSljhrq()))
|
|
|
|
.filter(item->StrUtil.isNotEmpty(item.getSljhrq()))
|
|
|
@ -314,6 +322,7 @@ public class DmYdjhServiceImpl extends ServiceImpl<DmYdjhMapper, DmYdjh> impleme
|
|
|
|
perfix=perfix.substring(2);
|
|
|
|
perfix=perfix.substring(2);
|
|
|
|
dmYdjh.setDjh(StrUtil.format("{}{}",perfix, String.format("%03d",djh)));
|
|
|
|
dmYdjh.setDjh(StrUtil.format("{}{}",perfix, String.format("%03d",djh)));
|
|
|
|
dmYdjh.setGxsj(gxsj);
|
|
|
|
dmYdjh.setGxsj(gxsj);
|
|
|
|
|
|
|
|
dmYdjh.setPlxh(item.getPlxh());
|
|
|
|
return dmYdjh;
|
|
|
|
return dmYdjh;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -326,4 +335,15 @@ public class DmYdjhServiceImpl extends ServiceImpl<DmYdjhMapper, DmYdjh> impleme
|
|
|
|
return redisTemplate.opsForHash().increment(key, item.getSljhrq(), 1);
|
|
|
|
return redisTemplate.opsForHash().increment(key, item.getSljhrq(), 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private String getPlGdh(){
|
|
|
|
|
|
|
|
String date=DateUtil.date().toString("yyyyMMdd");
|
|
|
|
|
|
|
|
String key="ZYJH_PLGDH::";
|
|
|
|
|
|
|
|
Object o = redisTemplate.opsForHash().get(key, date);
|
|
|
|
|
|
|
|
if (ObjUtil.isEmpty(o)) {
|
|
|
|
|
|
|
|
redisTemplate.opsForHash().put(key, date,100);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
Long xh=redisTemplate.opsForHash().increment(key, date, 1);
|
|
|
|
|
|
|
|
return StrUtil.format("{}{}",date, String.format("%03d",xh));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|