master
xhj 5 months ago
parent be5223c9c0
commit bb3f065f24

@ -45,13 +45,13 @@ import java.util.stream.Collectors;
* </p> * </p>
* *
* @author xn * @author xn
* @since 2023-11-13 * @since 1823-11-13
*/ */
@RestController @RestController
@RequestMapping("/pgdSljh") @RequestMapping("/pgdSljh")
public class PgdSljhController { public class PgdSljhController {
@Autowired @Autowired
PgdSljhService pgdSljhService; PgdSljhService pgdSljhService;
@ -115,6 +115,26 @@ public class PgdSljhController {
ydjh.setSldrry((String) req.getAttribute("yhms")); ydjh.setSldrry((String) req.getAttribute("yhms"));
ydupList.add(ydjh); ydupList.add(ydjh);
} }
if(StringUtils.isBlank(slKc.getDCTH())){
DmYdjh ydjh =new DmYdjh();
ydjh.setId(IdWorker.get32UUID());
ydjh.setSlkcdw(slKc.getKWH());
ydjh.setSlcs(slKc.getCFCS1());
ydjh.setSlxhth(slKc.getGCDDH());
ydjh.setSlhth(slKc.getDcFd());
ydjh.setNbsbm(slKc.getNBSBM());
ydjh.setSllph(slKc.getLPH());
ydjh.setSlwlh(slKc.getWPH());
ydjh.setKcch(slKc.getDCCH());
ydjh.setDcCh(slKc.getZYCH());
ydjh.setDcPl(slKc.getZYPL());
ydjh.setZt("11");
ydjh.setJhlx("99");
ydjh.setSllsh(id);
ydjh.setSldrrq(DateUtil.format(DateUtil.date(), "yyyy/MM/dd HH:mm"));
ydjh.setSldrry((String) req.getAttribute("yhms"));
dmYdjhService.save(ydjh);
}
} }
dmYdjhService.updateBatchById(ydupList); dmYdjhService.updateBatchById(ydupList);
@ -141,18 +161,18 @@ public class PgdSljhController {
slKc.setWPZT(wpztMap.get(slKc.getWPZT())); slKc.setWPZT(wpztMap.get(slKc.getWPZT()));
} }
int ceil = (int) (Math.ceil((double) list.size() / 20)); int ceil = (int) (Math.ceil((double) list.size() / 18));
List<SlKc> slKcList= new ArrayList<>(); List<SlKc> slKcList= new ArrayList<>();
if(ceil>1){ if(ceil>1){
for(int i=0;i<ceil;i++){ for(int i=0;i<ceil;i++){
SlKc slKc =new SlKc(); SlKc slKc =new SlKc();
slKc.setDyrq(DateUtil.format(DateUtil.date(), "yyyy/MM/dd")); slKc.setDyrq(DateUtil.format(DateUtil.date(), "yyyy/MM/dd"));
if (ceil - i == 1){ if (ceil - i == 1){
slKc.setList(list.subList(i*20,list.size())); slKc.setList(list.subList(i*18,list.size()));
}else{ }else{
int num =i*20+20; int num =i*18+18;
slKc.setList(list.subList(i*20,num)); slKc.setList(list.subList(i*18,num));
} }
slKcList.add(slKc); slKcList.add(slKc);
} }
@ -222,18 +242,18 @@ public class PgdSljhController {
slKc.setWPZT(wpztMap.get(slKc.getWPZT())); slKc.setWPZT(wpztMap.get(slKc.getWPZT()));
} }
int ceil = (int) (Math.ceil((double) list.size() / 20)); int ceil = (int) (Math.ceil((double) list.size() / 18));
List<SlKc> slKcList= new ArrayList<>(); List<SlKc> slKcList= new ArrayList<>();
if(ceil>1){ if(ceil>1){
for(int i=0;i<ceil;i++){ for(int i=0;i<ceil;i++){
SlKc slKc =new SlKc(); SlKc slKc =new SlKc();
slKc.setDyrq(DateUtil.format(DateUtil.date(), "yyyy/MM/dd")); slKc.setDyrq(DateUtil.format(DateUtil.date(), "yyyy/MM/dd"));
if (ceil - i == 1){ if (ceil - i == 1){
slKc.setList(list.subList(i*20,list.size())); slKc.setList(list.subList(i*18,list.size()));
}else{ }else{
int num =i*20+20; int num =i*18+18;
slKc.setList(list.subList(i*20,num)); slKc.setList(list.subList(i*18,num));
} }
slKcList.add(slKc); slKcList.add(slKc);
} }
@ -872,24 +892,24 @@ public class PgdSljhController {
} }
public String getwpcz(String wpcz){ public String getwpcz(String wpcz){
if(wpcz.contains("ABS")){ if(wpcz.contains("ABS/CCS")){
return wpcz.replace("ABS","");
}else if (wpcz.contains("ABS/CCS")){
return wpcz.replace("ABS/CCS",""); return wpcz.replace("ABS/CCS","");
}else if (wpcz.contains("ABS")){
return wpcz.replace("ABS","");
}else if (wpcz.contains("BV/CCS")){ }else if (wpcz.contains("BV/CCS")){
return wpcz.replace("BV/CCS",""); return wpcz.replace("BV/CCS","");
}else if (wpcz.contains("CCS")){
return wpcz.replace("CCS","");
}else if (wpcz.contains("DNV")){
return wpcz.replace("DNV","");
}else if (wpcz.contains("DNV/CCS")){ }else if (wpcz.contains("DNV/CCS")){
return wpcz.replace("DNV/CCS",""); return wpcz.replace("DNV/CCS","");
}else if (wpcz.contains("DNV/GL")){ }else if (wpcz.contains("DNV/GL")){
return wpcz.replace("DNV/GL",""); return wpcz.replace("DNV/GL","");
}else if (wpcz.contains("LR")){
return wpcz.replace("LR","");
}else if (wpcz.contains("LR/CCS")){ }else if (wpcz.contains("LR/CCS")){
return wpcz.replace("LR/CCS",""); return wpcz.replace("LR/CCS","");
}else if (wpcz.contains("LR")) {
return wpcz.replace("LR", "");
}else if (wpcz.contains("CCS")){
return wpcz.replace("CCS","");
} else if (wpcz.contains("DNV")){
return wpcz.replace("DNV","");
}else { }else {
return wpcz; return wpcz;
} }
@ -945,6 +965,7 @@ public class PgdSljhController {
continue; continue;
} }
String cjs1=cjs; String cjs1=cjs;
String aaa= getwpcz(slKc.getWPXH());
DmYdjh dmYdjh = ydjhs.stream() DmYdjh dmYdjh = ydjhs.stream()
.filter(fst -> fst.getDcCh().equalsIgnoreCase(slKc.getDCCH()) .filter(fst -> fst.getDcCh().equalsIgnoreCase(slKc.getDCCH())
&&StringUtils.isNotBlank(fst.getWpgg()) &&StringUtils.isNotBlank(fst.getWpgg())

Loading…
Cancel
Save