From 1b50c5b518573f859dcf17736bbb44a99b01e2f7 Mon Sep 17 00:00:00 2001 From: sez Date: Mon, 22 Dec 2025 13:54:19 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=B3=9B=E5=BE=AE=E9=9D=9E=E9=87=87?= =?UTF-8?q?=E8=B4=AD=E4=BE=9B=E5=BA=94=E5=95=86=E6=8E=A5=E5=8F=A3=EF=BC=8C?= =?UTF-8?q?=E9=87=87=E8=B4=AD=E4=BE=9B=E5=BA=94=E5=95=86=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E4=B8=BAfalse=E3=80=81=E6=8E=A7=E5=88=B6=E7=AD=96=E7=95=A5?= =?UTF-8?q?=E4=B8=BA=E8=87=AA=E7=94=B1=E5=88=86=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lc123/cloud/app/api/controller/SupplierControl.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lc123/cloud/app/api/controller/SupplierControl.java b/lc123/cloud/app/api/controller/SupplierControl.java index a86434f..81b3d5e 100644 --- a/lc123/cloud/app/api/controller/SupplierControl.java +++ b/lc123/cloud/app/api/controller/SupplierControl.java @@ -206,6 +206,8 @@ public class SupplierControl implements Serializable { } else { DynamicObject bd_supplier = BusinessDataServiceHelper.newDynamicObject(entityName); bd_supplier.set("number", number); + bd_supplier.set("tqq9_ispur",false);//非采购供应商 + bd_supplier.set("ctrlstrategy","2");//控制策略为自由分配 bd_supplier.set("name", name); bd_supplier.set("simplename", simplename); bd_supplier.set("tqq9_combofield3_jyzt", tqq9_combofield3_jyzt); From 05467ee7721268a7e618af347b2f32baf7152d4e Mon Sep 17 00:00:00 2001 From: pan-houxiang <2663608154@qq.com> Date: Mon, 22 Dec 2025 13:58:57 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E7=82=B9=E5=87=BB=E4=B8=9A=E5=8A=A1?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E4=B8=AD=E6=98=AF=E5=90=A6=E5=8F=AF=E5=81=9A?= =?UTF-8?q?=E6=94=B6=E8=8E=B7=E9=80=9A=E7=9F=A5(PurOrderBillList)=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0"=E5=B7=B2=E5=AE=A1=E6=A0=B8"=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PurOrderBillUpdatasfkzshListPlugin.java | 32 +++++++++++-------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/lc123/cloud/app/plugin/form/pm/PurOrderBillUpdatasfkzshListPlugin.java b/lc123/cloud/app/plugin/form/pm/PurOrderBillUpdatasfkzshListPlugin.java index ab07a71..b31b0f7 100644 --- a/lc123/cloud/app/plugin/form/pm/PurOrderBillUpdatasfkzshListPlugin.java +++ b/lc123/cloud/app/plugin/form/pm/PurOrderBillUpdatasfkzshListPlugin.java @@ -36,24 +36,30 @@ public class PurOrderBillUpdatasfkzshListPlugin extends AbstractListPlugin imple } QFilter f = new QFilter("id", "in", idSet); DynamicObject[] billArr = BusinessDataServiceHelper.load("pm_purorderbill", - "id,billno,tqq9_sfkzsh,billentry,billentry.joinqty,billentry.qty", new QFilter[]{f}); + "id,billno,tqq9_sfkzsh,billentry,billentry.joinqty,billentry.qty,billstatus", new QFilter[]{f}); for (DynamicObject bill : billArr) { - //获取单据分录 - DynamicObjectCollection billEntryCollection = bill.getDynamicObjectCollection("billentry"); - boolean allEqual = true; - for (DynamicObject billEntry : billEntryCollection) { - if (billEntry.getBigDecimal("qty").compareTo( billEntry.getBigDecimal("joinqty")) !=0) { - allEqual = false; - break; + String billstatus = bill.getString("billstatus"); + String billNo = bill.getString("billno"); + if ("C".equals(billstatus)) { + //获取单据分录 + DynamicObjectCollection billEntryCollection = bill.getDynamicObjectCollection("billentry"); + boolean allEqual = true; + for (DynamicObject billEntry : billEntryCollection) { + if (billEntry.getBigDecimal("qty").compareTo(billEntry.getBigDecimal("joinqty")) != 0) { + allEqual = false; + break; + } } - } - if (!allEqual) { - bill.set("tqq9_sfkzsh", "true"); + if (!allEqual) { + bill.set("tqq9_sfkzsh", "true"); + } else { + bill.set("tqq9_sfkzsh", "false"); + } + SaveServiceHelper.save(new DynamicObject[]{bill}); } else { - bill.set("tqq9_sfkzsh", "false"); + this.getView().showTipNotification("单据【"+billNo+"】未审核"); } - SaveServiceHelper.save(new DynamicObject[]{bill}); } } } From d50d9e9503b8e4bb8067a45e798f768c57fc53e8 Mon Sep 17 00:00:00 2001 From: "tanfengling@x-ri.com" <123456> Date: Mon, 22 Dec 2025 15:25:34 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E7=94=9F=E4=BA=A7=E5=95=86=E3=80=81?= =?UTF-8?q?=E9=87=87=E8=B4=AD=E5=90=88=E5=90=8C=E4=BF=9D=E5=AD=98=E6=97=B6?= =?UTF-8?q?=E8=AE=A1=E7=AE=97=E5=89=A9=E4=BD=99=E6=9C=89=E6=95=88=E5=A4=A9?= =?UTF-8?q?=E6=95=B0=20=E5=AE=9A=E6=97=B6=E4=BB=BB=E5=8A=A1=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E6=9C=89=E6=95=88=E5=A4=A9=E6=95=B0=E5=B9=B6=E5=8F=91?= =?UTF-8?q?=E9=82=AE=E4=BB=B6=E6=8F=90=E9=86=92=E5=A2=9E=E5=8A=A0=E7=94=9F?= =?UTF-8?q?=E4=BA=A7=E5=95=86=E3=80=81=E9=87=87=E8=B4=AD=E5=90=88=E5=90=8C?= =?UTF-8?q?=E7=9A=84=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ConmPurcontractDefaultDaysSaveOp.java | 26 +++ .../sys/ProxyAndFactoryDefaultDaysSaveOp.java | 57 +++++++ .../app/plugin/task/DaysRemainingTask.java | 159 +++++++++++++++++- 3 files changed, 238 insertions(+), 4 deletions(-) create mode 100644 lc123/cloud/app/plugin/operate/conm/ConmPurcontractDefaultDaysSaveOp.java create mode 100644 lc123/cloud/app/plugin/operate/sys/ProxyAndFactoryDefaultDaysSaveOp.java diff --git a/lc123/cloud/app/plugin/operate/conm/ConmPurcontractDefaultDaysSaveOp.java b/lc123/cloud/app/plugin/operate/conm/ConmPurcontractDefaultDaysSaveOp.java new file mode 100644 index 0000000..6b5f3a0 --- /dev/null +++ b/lc123/cloud/app/plugin/operate/conm/ConmPurcontractDefaultDaysSaveOp.java @@ -0,0 +1,26 @@ +package tqq9.lc123.cloud.app.plugin.operate.conm; + +import kd.bos.dataentity.entity.DynamicObject; +import kd.bos.entity.plugin.AbstractOperationServicePlugIn; +import kd.bos.entity.plugin.args.BeforeOperationArgs; +import tqq9.lc123.cloud.app.plugin.utils.DateDifferenceCalculator; + +import java.util.Date; + +/** + * 采购合同保存插件 + * 保存时,设置剩余有效天数默认值 + */ +public class ConmPurcontractDefaultDaysSaveOp extends AbstractOperationServicePlugIn { + + @Override + public void beforeExecuteOperationTransaction(BeforeOperationArgs e) { + super.beforeExecuteOperationTransaction(e); + DynamicObject[] dataEntities1 = e.getDataEntities(); + for (DynamicObject purcontract : dataEntities1) { + Date biztimeend = purcontract.getDate("biztimeend");//介质日期 + int tqq9_syyxts = DateDifferenceCalculator.calculateRemainingDays(biztimeend, new Date());//剩余时间 + purcontract.set("tqq9_syyxts", tqq9_syyxts); + } + } +} diff --git a/lc123/cloud/app/plugin/operate/sys/ProxyAndFactoryDefaultDaysSaveOp.java b/lc123/cloud/app/plugin/operate/sys/ProxyAndFactoryDefaultDaysSaveOp.java new file mode 100644 index 0000000..be95fd4 --- /dev/null +++ b/lc123/cloud/app/plugin/operate/sys/ProxyAndFactoryDefaultDaysSaveOp.java @@ -0,0 +1,57 @@ +package tqq9.lc123.cloud.app.plugin.operate.sys; + +import kd.bos.dataentity.entity.DynamicObject; +import kd.bos.dataentity.entity.DynamicObjectCollection; +import kd.bos.entity.plugin.AbstractOperationServicePlugIn; +import kd.bos.entity.plugin.args.BeforeOperationArgs; +import tqq9.lc123.cloud.app.plugin.utils.DateDifferenceCalculator; + +import java.util.Date; + +/** + * 生产商保存插件 + * 保存前默认计算各类型证照的剩余有效天数 + */ +public class ProxyAndFactoryDefaultDaysSaveOp extends AbstractOperationServicePlugIn { + + + @Override + public void beforeExecuteOperationTransaction(BeforeOperationArgs e) { + super.beforeExecuteOperationTransaction(e); + DynamicObject[] dataEntities = e.getDataEntities(); + for (DynamicObject proxyandfactory : dataEntities) { + //营业执照税号 + Date tqq9_taxenddate = proxyandfactory.getDate("tqq9_taxenddate"); + int tqq9_yyzzts = DateDifferenceCalculator.calculateRemainingDays(tqq9_taxenddate, new Date()); + proxyandfactory.set("tqq9_yyzzts", tqq9_yyzzts); + + //医疗器械生产许可证号 + Date tqq9_proenddate = proxyandfactory.getDate("tqq9_proenddate"); + int tqq9_qxscxkzts = DateDifferenceCalculator.calculateRemainingDays(tqq9_proenddate, new Date()); + proxyandfactory.set("tqq9_qxscxkzts", tqq9_qxscxkzts); + + //医疗器械经营许可证号 + Date tqq9_saleenddate = proxyandfactory.getDate("tqq9_saleenddate"); + int tqq9_qxjyxkzts = DateDifferenceCalculator.calculateRemainingDays(tqq9_saleenddate, new Date()); + proxyandfactory.set("tqq9_qxjyxkzts", tqq9_qxjyxkzts); + + //辐射安全许可证号 + Date tqq9_safeenddate = proxyandfactory.getDate("tqq9_safeenddate"); + int tqq9_fsaqxkzts = DateDifferenceCalculator.calculateRemainingDays(tqq9_safeenddate, new Date()); + proxyandfactory.set("tqq9_fsaqxkzts", tqq9_fsaqxkzts); + + //化妆品许可证号 + Date tqq9_beautyenddate = proxyandfactory.getDate("tqq9_beautyenddate"); + int tqq9_hzpxkzts = DateDifferenceCalculator.calculateRemainingDays(tqq9_beautyenddate, new Date()); + proxyandfactory.set("tqq9_hzpxkzts", tqq9_hzpxkzts); + + //消毒产品生产企业卫生许可证号 + DynamicObjectCollection entries = proxyandfactory.getDynamicObjectCollection("tqq9_clnentry"); + for (DynamicObject entry : entries) { + Date tqq9_clnenddate = entry.getDate("tqq9_clnenddate"); + int tqq9_xdpwsxkzts = DateDifferenceCalculator.calculateRemainingDays(tqq9_clnenddate, new Date()); + entry.set("tqq9_xdpwsxkzts", tqq9_xdpwsxkzts); + } + } + } +} diff --git a/lc123/cloud/app/plugin/task/DaysRemainingTask.java b/lc123/cloud/app/plugin/task/DaysRemainingTask.java index 244ba37..84d72ad 100644 --- a/lc123/cloud/app/plugin/task/DaysRemainingTask.java +++ b/lc123/cloud/app/plugin/task/DaysRemainingTask.java @@ -2,6 +2,7 @@ package tqq9.lc123.cloud.app.plugin.task; import kd.bos.context.RequestContext; import kd.bos.dataentity.entity.DynamicObject; +import kd.bos.dataentity.entity.DynamicObjectCollection; import kd.bos.exception.KDException; import kd.bos.logging.Log; import kd.bos.logging.LogFactory; @@ -17,10 +18,12 @@ import tqq9.lc123.cloud.app.plugin.utils.DateDifferenceCalculator; import tqq9.lc123.cloud.app.plugin.utils.EmailUtils; import java.util.Date; +import java.util.HashMap; import java.util.Map; /** * 供应商、注册证证照时间到期时间计算并发送预警邮件 + * 增加生产商、采购合同 */ public class DaysRemainingTask extends AbstractTask implements Plugin { private final static Log logger = LogFactory.getLog(DaysRemainingTask.class); @@ -32,6 +35,8 @@ public class DaysRemainingTask extends AbstractTask implements Plugin { if(StringUtils.isNotBlank(warnDaysStr)){ warnDays = Integer.valueOf(warnDaysStr); } + //key:用户编码,value:邮箱 + Map emailMap = new HashMap<>(); //供应商 QFilter f1 = new QFilter("enable", QCP.equals, "1"); QFilter f2 = new QFilter("status", QCP.equals, "C"); @@ -192,14 +197,24 @@ public class DaysRemainingTask extends AbstractTask implements Plugin { if(StringUtils.isNotBlank(sb.toString())){ DynamicObject creator = supplier.getDynamicObject("creator");//创建人 if(creator != null){ - String emailAddress = creator.getString("email");//创建人邮箱 + String emailAddress = null; + String creatorNumber = creator.getString("number"); + if(emailMap.containsKey(creatorNumber)){ + emailAddress = emailMap.get(creatorNumber); + }else{ + creator = BusinessDataServiceHelper.loadSingle(creator.getPkValue(), + creator.getDynamicObjectType().getName(), "name,email"); + emailAddress = creator.getString("email"); + } if(StringUtils.isNotBlank(emailAddress)){ + emailMap.put(creatorNumber, emailAddress); String warnStr = "供应商【编码:"+number+",名称:"+name+"】证照到期提醒:"+ sb; EmailUtils.sendEmail(emailAddress, warnStr, "供应商证照到期提醒"); } } } } + SaveServiceHelper.save(suppliers); //注册证 DynamicObject[] tqq9_registration = BusinessDataServiceHelper.load("tqq9_registration", @@ -219,14 +234,150 @@ public class DaysRemainingTask extends AbstractTask implements Plugin { String warnStr = "商品注册证【编码:"+number+",名称:"+name+"】证照到期提醒:距离过期时间还剩余 " + remainingDays + " 天。"; DynamicObject creator = dynamicObject.getDynamicObject("creator"); if(creator != null){ - String emailAddress = creator.getString("email"); - EmailUtils.sendEmail(emailAddress, warnStr, "商品注册证到期提醒"); + String emailAddress = null; + String creatorNumber = creator.getString("number"); + if(emailMap.containsKey(creatorNumber)){ + emailAddress = emailMap.get(creatorNumber); + }else{ + creator = BusinessDataServiceHelper.loadSingle(creator.getPkValue(), + creator.getDynamicObjectType().getName(), "name,email"); + emailAddress = creator.getString("email"); + } + if(StringUtils.isNotBlank(emailAddress)){ + emailMap.put(creatorNumber, emailAddress); + EmailUtils.sendEmail(emailAddress, warnStr, "商品注册证到期提醒"); + } } } } } - SaveServiceHelper.save(suppliers); SaveServiceHelper.save(tqq9_registration); + + //生产商 + DynamicObject[] proxyandfactoryArr = BusinessDataServiceHelper.load("tqq9_proxyandfactory", + "id,name,number,creator," + + "tqq9_taxno,tqq9_prolicense,tqq9_saleno,tqq9_safeno,tqq9_beautyno," + + "tqq9_taxenddate,tqq9_proenddate,tqq9_saleenddate,tqq9_safeenddate,tqq9_beautyenddate," + + "tqq9_yyzzts,tqq9_qxscxkzts,tqq9_qxjyxkzts,tqq9_fsaqxkzts,tqq9_hzpxkzts," + + "tqq9_clnentry.tqq9_clnenddate,tqq9_clnentry.tqq9_xdpwsxkzts", + new QFilter[]{f1, f2}); + for (DynamicObject proxyandfactory : proxyandfactoryArr) { + StringBuilder msg = new StringBuilder(); + String name = proxyandfactory.getString("name"); + String number = proxyandfactory.getString("number"); + //营业执照税号 + String tqq9_taxno = proxyandfactory.getString("tqq9_taxno"); + Date tqq9_taxenddate = proxyandfactory.getDate("tqq9_taxenddate"); + int tqq9_yyzzts = DateDifferenceCalculator.calculateRemainingDays(tqq9_taxenddate, currentDate); + proxyandfactory.set("tqq9_yyzzts", tqq9_yyzzts); + if(tqq9_yyzzts <= warnDays){ + msg.append("营业执照税号 ").append(tqq9_taxno).append(" ,距离过期时间还剩余 ").append(tqq9_yyzzts).append(" 天。"); + } + + //医疗器械生产许可证号 + String tqq9_prolicense = proxyandfactory.getString("tqq9_prolicense"); + Date tqq9_proenddate = proxyandfactory.getDate("tqq9_proenddate"); + int tqq9_qxscxkzts = DateDifferenceCalculator.calculateRemainingDays(tqq9_proenddate, currentDate); + proxyandfactory.set("tqq9_qxscxkzts", tqq9_qxscxkzts); + if(tqq9_qxscxkzts <= warnDays){ + msg.append("医疗器械生产许可证号 ").append(tqq9_prolicense).append(" ,距离过期时间还剩余 ").append(tqq9_qxscxkzts).append(" 天。"); + } + + //医疗器械经营许可证号 + String tqq9_saleno = proxyandfactory.getString("tqq9_saleno"); + Date tqq9_saleenddate = proxyandfactory.getDate("tqq9_saleenddate"); + int tqq9_qxjyxkzts = DateDifferenceCalculator.calculateRemainingDays(tqq9_saleenddate, currentDate); + proxyandfactory.set("tqq9_qxjyxkzts", tqq9_qxjyxkzts); + if(tqq9_qxjyxkzts <= warnDays){ + msg.append("医疗器械经营许可证号 ").append(tqq9_saleno).append(" ,距离过期时间还剩余 ").append(tqq9_qxjyxkzts).append(" 天。"); + } + + //辐射安全许可证号 + String tqq9_safeno = proxyandfactory.getString("tqq9_safeno"); + Date tqq9_safeenddate = proxyandfactory.getDate("tqq9_safeenddate"); + int tqq9_fsaqxkzts = DateDifferenceCalculator.calculateRemainingDays(tqq9_safeenddate, currentDate); + proxyandfactory.set("tqq9_fsaqxkzts", tqq9_fsaqxkzts); + if(tqq9_fsaqxkzts <= warnDays){ + msg.append("辐射安全许可证号 ").append(tqq9_safeno).append(" ,距离过期时间还剩余 ").append(tqq9_fsaqxkzts).append(" 天。"); + } + + //化妆品许可证号 + String tqq9_beautyno = proxyandfactory.getString("tqq9_beautyno"); + Date tqq9_beautyenddate = proxyandfactory.getDate("tqq9_beautyenddate"); + int tqq9_hzpxkzts = DateDifferenceCalculator.calculateRemainingDays(tqq9_beautyenddate, currentDate); + proxyandfactory.set("tqq9_hzpxkzts", tqq9_hzpxkzts); + if(tqq9_hzpxkzts <= warnDays){ + msg.append("化妆品许可证号 ").append(tqq9_beautyno).append(" ,距离过期时间还剩余 ").append(tqq9_hzpxkzts).append(" 天。"); + } + + //消毒产品生产企业卫生许可证号 + DynamicObjectCollection entries = proxyandfactory.getDynamicObjectCollection("tqq9_clnentry"); + for (DynamicObject entry : entries) { + String tqq9_clnno = entry.getString("tqq9_clnno"); + Date tqq9_clnenddate = entry.getDate("tqq9_clnenddate"); + int tqq9_xdpwsxkzts = DateDifferenceCalculator.calculateRemainingDays(tqq9_clnenddate, currentDate); + entry.set("tqq9_xdpwsxkzts", tqq9_xdpwsxkzts); + if(tqq9_xdpwsxkzts <= warnDays){ + msg.append("消毒产品生产企业卫生许可证号 ").append(tqq9_clnno).append(" ,距离过期时间还剩余 ").append(tqq9_xdpwsxkzts).append(" 天。"); + } + } + + if(msg != null && msg.toString().length() > 0){ + DynamicObject creator = proxyandfactory.getDynamicObject("creator"); + if(creator != null){ + String emailAddress = null; + String creatorNumber = creator.getString("number"); + if(emailMap.containsKey(creatorNumber)){ + emailAddress = emailMap.get(creatorNumber); + }else{ + creator = BusinessDataServiceHelper.loadSingle(creator.getPkValue(), + creator.getDynamicObjectType().getName(), "name,email"); + emailAddress = creator.getString("email"); + } + if(StringUtils.isNotBlank(emailAddress)){ + String warnStr = "生产商【编码:"+number+",名称:"+name+"】证照到期提醒:" + msg; + emailMap.put(creatorNumber, emailAddress); + EmailUtils.sendEmail(emailAddress, warnStr, "生产商到期提醒"); + } + } + } + } + SaveServiceHelper.save(proxyandfactoryArr); + + //采购合同 + DynamicObject[] purcontractArr = BusinessDataServiceHelper.load("conm_purcontract", + "id,name,number,creator,biztimeend,tqq9_syyxts", + new QFilter[]{f1, f2}); + for (DynamicObject purcontract : purcontractArr) { + String name = purcontract.getString("name"); + String number = purcontract.getString("number"); + Date biztimeend = purcontract.getDate("biztimeend"); + int tqq9_syyxts = DateDifferenceCalculator.calculateRemainingDays(biztimeend, currentDate); + purcontract.set("tqq9_syyxts", tqq9_syyxts); + + if(tqq9_syyxts <= warnDays){ + DynamicObject creator = purcontract.getDynamicObject("creator"); + if(creator != null){ + String emailAddress = null; + String creatorNumber = creator.getString("number"); + if(emailMap.containsKey(creatorNumber)){ + emailAddress = emailMap.get(creatorNumber); + }else{ + creator = BusinessDataServiceHelper.loadSingle(creator.getPkValue(), + creator.getDynamicObjectType().getName(), "name,email"); + emailAddress = creator.getString("email"); + } + if(StringUtils.isNotBlank(emailAddress)){ + StringBuilder warnStr = new StringBuilder(); + warnStr.append("采购合同【编码:"+number+",名称:"+name+"】证照到期提醒:").append("距离过期时间还剩余 ").append(tqq9_syyxts).append(" 天。"); + emailMap.put(creatorNumber, emailAddress); + EmailUtils.sendEmail(emailAddress, warnStr.toString(), "采购合同提醒"); + } + } + } + } + SaveServiceHelper.save(purcontractArr); + } } \ No newline at end of file From e10068528a03e02f122b6cf77fb3a902346ec9ab Mon Sep 17 00:00:00 2001 From: pan-houxiang <2663608154@qq.com> Date: Mon, 22 Dec 2025 15:26:15 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E7=82=B9=E5=87=BB=E4=B8=9A=E5=8A=A1?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E4=B8=AD=E6=98=AF=E5=90=A6=E5=8F=AF=E5=81=9A?= =?UTF-8?q?=E6=94=B6=E8=8E=B7=E9=80=9A=E7=9F=A5(PurOrderBillList)=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0"=E5=B7=B2=E5=AE=A1=E6=A0=B8"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../form/pm/PurOrderBillUpdatasfkzshListPlugin.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lc123/cloud/app/plugin/form/pm/PurOrderBillUpdatasfkzshListPlugin.java b/lc123/cloud/app/plugin/form/pm/PurOrderBillUpdatasfkzshListPlugin.java index b31b0f7..5e8bf6f 100644 --- a/lc123/cloud/app/plugin/form/pm/PurOrderBillUpdatasfkzshListPlugin.java +++ b/lc123/cloud/app/plugin/form/pm/PurOrderBillUpdatasfkzshListPlugin.java @@ -21,11 +21,13 @@ import java.util.Set; * 获取选中行单据分录,遍历对比分录每条数据的 "数量" 和 "关联数量" 字段,如果每一条都相等,则将是否可做收货通知 置为 false */ public class PurOrderBillUpdatasfkzshListPlugin extends AbstractListPlugin implements Plugin { + @Override public void itemClick(ItemClickEvent evt) { super.itemClick(evt); String itemKey = evt.getItemKey(); if ("biz_sfkzsh".equals(itemKey)) { + StringBuilder msg = new StringBuilder(); BillList billList = this.getView().getControl("billlistap"); // 获取选中行集合 ListSelectedRowCollection selectedRows = billList.getSelectedRows(); @@ -58,9 +60,14 @@ public class PurOrderBillUpdatasfkzshListPlugin extends AbstractListPlugin imple SaveServiceHelper.save(new DynamicObject[]{bill}); } else { - this.getView().showTipNotification("单据【"+billNo+"】未审核"); + msg.append(billNo).append(","); } } + if (msg.length() > 0) { + msg.deleteCharAt(msg.length() - 1); + this.getView().showTipNotification("单据【"+msg+"】未审核,不能更新【是否可做收获通知】"); + } + } } } \ No newline at end of file