From 2f5cd7d8d1371e35e274724a7cefe55ab69d8e57 Mon Sep 17 00:00:00 2001 From: yuxueliang0813 <407010292@qq.com> Date: Fri, 20 Dec 2024 18:01:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=BA=E5=91=98=E4=B8=AD=E5=A4=84=E7=90=86?= =?UTF-8?q?=E5=90=8C=E6=AD=A5=E4=B8=93=E5=AE=B6=E5=BA=93=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shkd/bamp/base/task/DobeDWpersonTask.java | 38 ++++++++++--------- .../base/task/DobeDWpersonUpdateTask.java | 2 +- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/main/java/shkd/bamp/base/task/DobeDWpersonTask.java b/main/java/shkd/bamp/base/task/DobeDWpersonTask.java index 570e1cf..2fd7110 100644 --- a/main/java/shkd/bamp/base/task/DobeDWpersonTask.java +++ b/main/java/shkd/bamp/base/task/DobeDWpersonTask.java @@ -191,24 +191,26 @@ public class DobeDWpersonTask extends AbstractTask implements Plugin { } } //处理新增 评标专家库 - proficientInfo = BusinessDataServiceHelper.newDynamicObject(proficientName); - proficientInfo.set("billno",number);//专家编号 - proficientInfo.set("name",name);//专家姓名 - proficientInfo.set("type","internalExperts");//专家来源--默认内部专家 - proficientInfo.set("telephone",phone);//手机号 - ptcoll = proficientInfo.getDynamicObjectCollection("majortype"); - DynamicObject newptinfo = new DynamicObject(ptcoll.getDynamicObjectType()); - newptinfo.set("fbasedataId", ptinfo); - ptcoll.add(newptinfo); - proficientInfo.set("majortype",ptcoll);//专业分类 - proficientInfo.set("org",deptOrg.getLong("id"));//采购组织 - proficientInfo.set("userdstatus","Enable"); //使用状态--默认可用 - proficientInfo.set("billstatus","C"); //使用状态--默认已审核 - proficientInfo.set("politicalstatus","other"); //政治面貌--默认其他 - proficientInfo.set("majortypenames",ptinfo.getString("name")); //专业分类名称字符串 - proficientInfo.set("entitytypeid",proficientName); //实体类型ID - //保存数据:直接保存入库,不走操作校验 - SaveServiceHelper.save(new DynamicObject[]{proficientInfo}); + if(deptOrg != null){ + proficientInfo = BusinessDataServiceHelper.newDynamicObject(proficientName); + proficientInfo.set("billno",number);//专家编号 + proficientInfo.set("name",name);//专家姓名 + proficientInfo.set("type","internalExperts");//专家来源--默认内部专家 + proficientInfo.set("telephone",phone);//手机号 + ptcoll = proficientInfo.getDynamicObjectCollection("majortype"); + DynamicObject newptinfo = new DynamicObject(ptcoll.getDynamicObjectType()); + newptinfo.set("fbasedataId", ptinfo); + ptcoll.add(newptinfo); + proficientInfo.set("majortype",ptcoll);//专业分类 + proficientInfo.set("org",deptOrg.getLong("id"));//采购组织 + proficientInfo.set("userdstatus","Enable"); //使用状态--默认可用 + proficientInfo.set("billstatus","C"); //使用状态--默认已审核 + proficientInfo.set("politicalstatus","other"); //政治面貌--默认其他 + proficientInfo.set("majortypenames",ptinfo.getString("name")); //专业分类名称字符串 + proficientInfo.set("entitytypeid",proficientName); //实体类型ID + //保存数据:直接保存入库,不走操作校验 + SaveServiceHelper.save(new DynamicObject[]{proficientInfo}); + } //处理新增人员收款银行账户 if(DobeDWUtils.isEmpty(bank_account)){ diff --git a/main/java/shkd/bamp/base/task/DobeDWpersonUpdateTask.java b/main/java/shkd/bamp/base/task/DobeDWpersonUpdateTask.java index 93abd08..2671640 100644 --- a/main/java/shkd/bamp/base/task/DobeDWpersonUpdateTask.java +++ b/main/java/shkd/bamp/base/task/DobeDWpersonUpdateTask.java @@ -171,7 +171,7 @@ public class DobeDWpersonUpdateTask extends AbstractTask implements Plugin { } //处理新增 评标专家库 proficientInfo = BusinessDataServiceHelper.loadSingle(proficientName,new QFilter[]{new QFilter("billno","=",number)}); - if(proficientInfo == null){ + if(proficientInfo == null && deptOrg != null){ proficientInfo = BusinessDataServiceHelper.newDynamicObject(proficientName); proficientInfo.set("billno",number);//专家编号 proficientInfo.set("name",name);//专家姓名