1.其他出库申请填写批号带出注册证等维度调整清空数据逻辑

This commit is contained in:
龚豆豆 2025-12-17 11:32:12 +08:00
parent b09df79366
commit b98eb948ac
1 changed files with 48 additions and 20 deletions

View File

@ -149,7 +149,7 @@ public class OtherOutApplyBillPlugin extends AbstractBillPlugIn implements Befor
DynamicObject[] objects = BusinessDataServiceHelper.load("im_inv_realbalance",
"id,keycol,material,lotnum,producedate,expirydate,tqq9_goods,tqq9_registration,qty"
, new QFilter[]{materielF.and(warehouseF).and(lotNumberF).and(qtyF)});
if (null != objects && objects.length > 0) {
if (null != objects) {
if (objects.length == 1) {
DynamicObject object = objects[0];
Date producedate = object.getDate("producedate");//生产日期
@ -187,7 +187,16 @@ public class OtherOutApplyBillPlugin extends AbstractBillPlugIn implements Befor
this.getModel().setValue("tqq9_cs", tqq9_cs.toString(), rowIndex);
this.getModel().setValue("tqq9_licenseno", tqq9_licenseno.toString(), rowIndex);
this.getModel().setValue("tqq9_zczh", tqq9_registration, rowIndex);
}else{
} else if (objects.length == 0 && StringUtils.equals("tqq9_dcck", name)) {
this.getModel().setValue("tqq9_lotnumber", null, rowIndex);
this.getModel().setValue("tqq9_materiel", null, rowIndex);
this.getModel().setValue("tqq9_producedate", null, rowIndex);
this.getModel().setValue("tqq9_goods", null, rowIndex);
this.getModel().setValue("tqq9_expirydate", null, rowIndex);
this.getModel().setValue("tqq9_cs", null, rowIndex);
this.getModel().setValue("tqq9_licenseno", null, rowIndex);
this.getModel().setValue("tqq9_zczh", null, rowIndex);
} else if (objects.length == 0 && StringUtils.equals("tqq9_lotnumber", name)) {
this.getModel().setValue("tqq9_producedate", null, rowIndex);
this.getModel().setValue("tqq9_goods", null, rowIndex);
this.getModel().setValue("tqq9_expirydate", null, rowIndex);
@ -196,8 +205,6 @@ public class OtherOutApplyBillPlugin extends AbstractBillPlugIn implements Befor
this.getModel().setValue("tqq9_zczh", null, rowIndex);
}
}
String sql = "/*dialect*/SELECT \n" +
" t1.fmaterialid, \n" +
" t1.fwarehouseid,\n" +
@ -254,9 +261,30 @@ public class OtherOutApplyBillPlugin extends AbstractBillPlugIn implements Befor
BigDecimal total_qty = dynamicObjects.get(0).getBigDecimal("qty_difference");
this.getModel().setValue("tqq9_pckyamount", total_qty, rowIndex);
}
this.getModel().setValue("tqq9_producedate", null, rowIndex);
this.getModel().setValue("tqq9_goods", null, rowIndex);
this.getModel().setValue("tqq9_expirydate", null, rowIndex);
this.getModel().setValue("tqq9_cs", null, rowIndex);
this.getModel().setValue("tqq9_licenseno", null, rowIndex);
this.getModel().setValue("tqq9_zczh", null, rowIndex);
}else if(dcck == null && StringUtils.equals("tqq9_dcck",name)){
this.getModel().setValue("tqq9_lotnumber", null, rowIndex);
this.getModel().setValue("tqq9_materiel", null, rowIndex);
this.getModel().setValue("tqq9_producedate", null, rowIndex);
this.getModel().setValue("tqq9_goods", null, rowIndex);
this.getModel().setValue("tqq9_expirydate", null, rowIndex);
this.getModel().setValue("tqq9_cs", null, rowIndex);
this.getModel().setValue("tqq9_licenseno", null, rowIndex);
this.getModel().setValue("tqq9_zczh", null, rowIndex);
}else if(tqq9_materiel == null && StringUtils.equals("tqq9_materiel",name)){
this.getModel().setValue("tqq9_lotnumber", null, rowIndex);
this.getModel().setValue("tqq9_producedate", null, rowIndex);
this.getModel().setValue("tqq9_goods", null, rowIndex);
this.getModel().setValue("tqq9_expirydate", null, rowIndex);
this.getModel().setValue("tqq9_cs", null, rowIndex);
this.getModel().setValue("tqq9_licenseno", null, rowIndex);
this.getModel().setValue("tqq9_zczh", null, rowIndex);
}
}
}
}