From 34bed76a84892b0d54c2bdd72616481fbb49e8e7 Mon Sep 17 00:00:00 2001 From: ggxl <194689125@qq.com> Date: Mon, 18 Nov 2024 14:35:21 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=B7=E6=96=B0?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../repc/resm/formplugin/ContractListDateFilterPlugin.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main/java/shkd/repc/resm/formplugin/ContractListDateFilterPlugin.java b/main/java/shkd/repc/resm/formplugin/ContractListDateFilterPlugin.java index dcc1a5b..4628bc1 100644 --- a/main/java/shkd/repc/resm/formplugin/ContractListDateFilterPlugin.java +++ b/main/java/shkd/repc/resm/formplugin/ContractListDateFilterPlugin.java @@ -98,8 +98,9 @@ public class ContractListDateFilterPlugin extends AbstractBillPlugIn implements for (DynamicObject deleteEntry : deleteEntries) { contractEntries.remove(deleteEntry); } - this.getView().updateView("contract_entry"); } + + this.getView().updateView("contract_entry"); } if (contractEntries.isEmpty()) { From a9bb611d9a2bc550fad82259f557496f198d0f6e Mon Sep 17 00:00:00 2001 From: yuxueliang0813 <407010292@qq.com> Date: Mon, 18 Nov 2024 15:46:32 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E8=A1=8C=E6=94=BF=E7=BB=84=E7=BB=87?= =?UTF-8?q?=E8=B4=A2=E5=8A=A1=E7=BB=84=E7=BB=87=E5=AF=B9=E5=BA=94=E5=85=B3?= =?UTF-8?q?=E7=B3=BB=E6=8E=A5=E5=8F=A3=E8=81=94=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shkd/repc/task/DobeDWorgRelationTask.java | 29 ++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/main/java/shkd/repc/task/DobeDWorgRelationTask.java b/main/java/shkd/repc/task/DobeDWorgRelationTask.java index 35c81b1..88860e0 100644 --- a/main/java/shkd/repc/task/DobeDWorgRelationTask.java +++ b/main/java/shkd/repc/task/DobeDWorgRelationTask.java @@ -22,7 +22,7 @@ import java.io.IOException; import java.util.Map; /** - * 后台任务插件 + * 行政组织和财务组织对应关系后台任务插件 */ public class DobeDWorgRelationTask extends AbstractTask implements Plugin { @@ -96,7 +96,7 @@ public class DobeDWorgRelationTask extends AbstractTask implements Plugin { for (int i = 0; i < detailsJson.size(); i++) { json_body = detailsJson.getJSONObject(i); - orgNumber = json_body.getString("oaorg_code");//oa组织code + orgNumber = json_body.getString("oaorg_code");//oa组织code oa组织id是oaorg_id orgName = json_body.getString("oaorg_name");//oa组织名称 companyNumber = json_body.getString("corp_code");//财务公司编号 companyName = json_body.getString("corp_name");//财务公司名称 @@ -111,17 +111,19 @@ public class DobeDWorgRelationTask extends AbstractTask implements Plugin { } //根据组织编号查找系统现有数据是否存在 "id,number,name,qeug_companynumber,qeug_companyname,qeug_deptnumber,qeug_deptname", orginfo = BusinessDataServiceHelper.loadSingle(entityName,new QFilter[]{new QFilter("number","=",orgNumber)}); - if(orginfo != null && isNeedUpdate(orginfo,companyNumber,deptNumber,paynumber,taxno)){ + if(orginfo != null){ //QueryServiceHelper.queryOne查出来的对象不是DynamicObject 而是平铺对象plainobject 此对象不能在后续代码中进行修改和更新; - orginfo.set("name", orgName); - orginfo.set("qeug_companynumber", companyNumber); - orginfo.set("qeug_companyname", companyName); - orginfo.set("qeug_deptnumber", deptNumber); - orginfo.set("qeug_deptname", deptName); - orginfo.set("qeug_paybank", paybank); - orginfo.set("qeug_paynumber", paynumber); - orginfo.set("qeug_taxno", taxno); - SaveServiceHelper.update(orginfo); + if(isNeedUpdate(orginfo,companyNumber,deptNumber,paynumber,taxno)){ + orginfo.set("name", orgName); + orginfo.set("qeug_companynumber", companyNumber); + orginfo.set("qeug_companyname", companyName); + orginfo.set("qeug_deptnumber", deptNumber); + orginfo.set("qeug_deptname", deptName); + orginfo.set("qeug_paybank", paybank); + orginfo.set("qeug_paynumber", paynumber); + orginfo.set("qeug_taxno", taxno); + SaveServiceHelper.update(orginfo); + } }else{ //不存在,做新增 根据实体名称创建动态对象 orginfo = BusinessDataServiceHelper.newDynamicObject(entityName); @@ -135,13 +137,14 @@ public class DobeDWorgRelationTask extends AbstractTask implements Plugin { orginfo.set("qeug_paynumber", paynumber); orginfo.set("qeug_taxno", taxno); orginfo.set("enable", 1); + orginfo.set("status", "A");//单据状态 A保存 B已提交 C已审核 orginfo.set("creator", 43007523L);//创建人默认指定为金小蝶 //保存数据:直接保存入库,不走操作校验 SaveServiceHelper.save(new DynamicObject[]{orginfo}); } //根据行政组织编号找到星瀚上的业务单元对象 yworginfo = BusinessDataServiceHelper.loadSingle(orgEntityName,new QFilter[]{new QFilter("number","=",orgNumber)}); - if(yworginfo != null){ + if(yworginfo != null && !companyName.equals(yworginfo.getString("ffirmname"))){ yworginfo.set("ffirmname", companyName);//业务单元-公司名称 yworginfo.set("depositbank", paybank);//业务单元-开户行 yworginfo.set("bankaccount", paynumber);//业务单元-银行账户 From 04f6900bd0f15d3f2e376fc5802625a1ed8d6a83 Mon Sep 17 00:00:00 2001 From: yuxueliang0813 <407010292@qq.com> Date: Mon, 18 Nov 2024 15:47:27 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=A1=8C=E6=94=BF=E7=BB=84=E7=BB=87?= =?UTF-8?q?=E8=B4=A2=E5=8A=A1=E7=BB=84=E7=BB=87=E5=AF=B9=E5=BA=94=E5=85=B3?= =?UTF-8?q?=E7=B3=BB=E6=8E=A5=E5=8F=A3=E8=81=94=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/java/shkd/repc/task/DobeDWorgRelationTask.java | 1 + 1 file changed, 1 insertion(+) diff --git a/main/java/shkd/repc/task/DobeDWorgRelationTask.java b/main/java/shkd/repc/task/DobeDWorgRelationTask.java index 88860e0..141ab3b 100644 --- a/main/java/shkd/repc/task/DobeDWorgRelationTask.java +++ b/main/java/shkd/repc/task/DobeDWorgRelationTask.java @@ -142,6 +142,7 @@ public class DobeDWorgRelationTask extends AbstractTask implements Plugin { //保存数据:直接保存入库,不走操作校验 SaveServiceHelper.save(new DynamicObject[]{orginfo}); } + //根据行政组织编号找到星瀚上的业务单元对象 yworginfo = BusinessDataServiceHelper.loadSingle(orgEntityName,new QFilter[]{new QFilter("number","=",orgNumber)}); if(yworginfo != null && !companyName.equals(yworginfo.getString("ffirmname"))){