1.材质证件跟踪增加修正功能,防止未导入零件配套表时报工导致材质证件缺失问题

2.调整切割报工零件生成逻辑兼容后续零件作业报工状态,防止直接删除导致报工信息丢失
master
董哲奇 1 month ago
parent a4f400159e
commit 935c2d39e9

@ -345,6 +345,8 @@ public class DmYdjhLj implements Serializable {
private String ypph;
@TableField(exist = false)
private String yzkw;
@TableField(exist = false)
private String sllph;
public boolean checkZt(){
return !"03".equals(this.pkZt)||!"03".equals(this.qjgZt)||!"03".equals(this.dmZt);
@ -367,6 +369,7 @@ public class DmYdjhLj implements Serializable {
return lj.getCzbh().equals(this.czbh)
&&lj.getPl().equals(this.pl)
&&lj.getTlth().equals(this.tlth)
&&lj.getLjbh()!=null
&&lj.getLjbh().equals(this.ljbh);
}

@ -302,8 +302,16 @@ public class ZyjhController {
private void zlgzCreate(DmYdjh item,ArrayList<MpDhsj> mpDhsjSaveList){
List<DmYdjhLj> ljList = zyjhService.createLj(item.getDcCh(), item.getDcPl(), item.getTzbh());
Map<String, Object> mpsycljljbp = zyjhService.getMPSYCLJLJBP(item.getDcCh(), item.getTzbh());
//兼容手动处理没有上料炉批号的问题
if (StrUtil.isEmpty(item.getSllph())&&!ljList.isEmpty()){
item.setSllph(ljList.get(0).getSllph());
}
mpDhsjServcie.remove(Wrappers.<MpDhsj>lambdaQuery()
.eq(MpDhsj::getDcCh,item.getDcCh())
.eq(MpDhsj::getDcPl,item.getDcPl())
.eq(MpDhsj::getDcTh,item.getTzbh())
);
//质量跟踪数据
List<MpDhsj> collect = new ArrayList<>();
String date = DateUtil.date().toString("yyyy/MM/dd");
String mpDhsjDhh = zyjhService.getMpDhsjDhh();
for (int j = 0; j < ljList.size(); j++) {
@ -315,7 +323,6 @@ public class ZyjhController {
if (ObjUtil.isNotEmpty(mpsycljljbp)) {
mpDhsj.setGysbh("BZGY-"+mpsycljljbp.get("gzzx3"));
}
collect.add(mpDhsj);
mpDhsjSaveList.add(mpDhsj);
}
}

@ -182,6 +182,11 @@ public class ZyjhService extends ServiceImpl<DmYdjhMapper,DmYdjh> {
);
if (!list.isEmpty()){
list.forEach(item->{
//清理错误数据
if (StrUtil.isEmpty(item.getLjbh())){
ljService.removeById(item);
return;
}
ljInfo.forEach(lj->{
if (lj.tmpEq(item)){
//修正零件状态信息

@ -902,6 +902,7 @@
REPLACE(CAST(CAST(NEWID()AS BINARY(10)) + CAST(GETDATE() AS BINARY(6)) AS UNIQUEIDENTIFIER),'-','') as id,
dm_ydjh.dc_ch as czbh,
dm_ydjh.dc_pl as pl,
dm_ydjh.sllph as sllph,
dm_bom.fd as fd,
dm_ydjh.kw as kw,
dm_bom.zl as zl,

Loading…
Cancel
Save