1 正式供应商和供应商变更审核通过后更新开通账号人员的代码注释 2 项目接口增加业务类型 3 组织接口增加部门负责人字段
This commit is contained in:
parent
69f0e1990f
commit
af58b2564e
|
@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.alibaba.fastjson.util.TypeUtils;
|
import com.alibaba.fastjson.util.TypeUtils;
|
||||||
import kd.bos.context.RequestContext;
|
import kd.bos.context.RequestContext;
|
||||||
import kd.bos.dataentity.OperateOption;
|
|
||||||
import kd.bos.dataentity.entity.DynamicObject;
|
import kd.bos.dataentity.entity.DynamicObject;
|
||||||
import kd.bos.exception.KDException;
|
import kd.bos.exception.KDException;
|
||||||
import kd.bos.id.ID;
|
import kd.bos.id.ID;
|
||||||
|
@ -13,7 +12,6 @@ import kd.bos.logging.LogFactory;
|
||||||
import kd.bos.orm.query.QFilter;
|
import kd.bos.orm.query.QFilter;
|
||||||
import kd.bos.schedule.executor.AbstractTask;
|
import kd.bos.schedule.executor.AbstractTask;
|
||||||
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||||
import kd.bos.servicehelper.operation.OperationServiceHelper;
|
|
||||||
import kd.bos.servicehelper.operation.SaveServiceHelper;
|
import kd.bos.servicehelper.operation.SaveServiceHelper;
|
||||||
import kd.sdk.plugin.Plugin;
|
import kd.sdk.plugin.Plugin;
|
||||||
import shkd.utils.DobeDWUtils;
|
import shkd.utils.DobeDWUtils;
|
||||||
|
@ -210,6 +208,7 @@ public class DobeDWaccountViewTask extends AbstractTask implements Plugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean getAcctSX(String mb,String acctsx){
|
private boolean getAcctSX(String mb,String acctsx){
|
||||||
|
//科目属性
|
||||||
if("cash".equals(mb) && "现金科目".equals(acctsx)){
|
if("cash".equals(mb) && "现金科目".equals(acctsx)){
|
||||||
return true;
|
return true;
|
||||||
}else if("bank".equals(mb) && "银行科目".equals(acctsx)){
|
}else if("bank".equals(mb) && "银行科目".equals(acctsx)){
|
||||||
|
@ -221,6 +220,7 @@ public class DobeDWaccountViewTask extends AbstractTask implements Plugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getSY(String sytype){
|
private String getSY(String sytype){
|
||||||
|
//损益类型
|
||||||
String typevalue = null;
|
String typevalue = null;
|
||||||
switch (sytype){
|
switch (sytype){
|
||||||
case "收入要素":
|
case "收入要素":
|
||||||
|
|
|
@ -5,6 +5,8 @@ import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import kd.bos.context.RequestContext;
|
import kd.bos.context.RequestContext;
|
||||||
import kd.bos.dataentity.entity.DynamicObject;
|
import kd.bos.dataentity.entity.DynamicObject;
|
||||||
|
import kd.bos.db.DB;
|
||||||
|
import kd.bos.db.DBRoute;
|
||||||
import kd.bos.exception.KDException;
|
import kd.bos.exception.KDException;
|
||||||
import kd.bos.logging.Log;
|
import kd.bos.logging.Log;
|
||||||
import kd.bos.logging.LogFactory;
|
import kd.bos.logging.LogFactory;
|
||||||
|
@ -93,6 +95,8 @@ public class DobeDWorgTask extends AbstractTask implements Plugin {
|
||||||
String orgName = null;
|
String orgName = null;
|
||||||
String orgID = null;
|
String orgID = null;
|
||||||
String parentId = null;
|
String parentId = null;
|
||||||
|
String person_charge = null;//部门下的负责人的工号
|
||||||
|
String updateSql = null;
|
||||||
for (int i = 0; i < detailsJson.size(); i++) {
|
for (int i = 0; i < detailsJson.size(); i++) {
|
||||||
json_body = detailsJson.getJSONObject(i);
|
json_body = detailsJson.getJSONObject(i);
|
||||||
orgNumber = json_body.getString("org_code");
|
orgNumber = json_body.getString("org_code");
|
||||||
|
@ -100,6 +104,7 @@ public class DobeDWorgTask extends AbstractTask implements Plugin {
|
||||||
orgID = json_body.getString("org_id");
|
orgID = json_body.getString("org_id");
|
||||||
// String orgLevel = json_body.getString("org_level");//组织层级
|
// String orgLevel = json_body.getString("org_level");//组织层级
|
||||||
parentId = json_body.getString("org_parentid");
|
parentId = json_body.getString("org_parentid");
|
||||||
|
person_charge = json_body.getString("person_chargecode");
|
||||||
if(DobeDWUtils.isEmpty(orgID) || DobeDWUtils.isEmpty(orgNumber) || DobeDWUtils.isEmpty(orgName)
|
if(DobeDWUtils.isEmpty(orgID) || DobeDWUtils.isEmpty(orgNumber) || DobeDWUtils.isEmpty(orgName)
|
||||||
|| DobeDWUtils.isEmpty(parentId)){
|
|| DobeDWUtils.isEmpty(parentId)){
|
||||||
//如果组织ID和组织编码 名称是空的,则跳过此记录
|
//如果组织ID和组织编码 名称是空的,则跳过此记录
|
||||||
|
@ -109,6 +114,13 @@ public class DobeDWorgTask extends AbstractTask implements Plugin {
|
||||||
//根据组织ID查找系统现有数据是否存在,这种写法会抛异常,需要关注原因
|
//根据组织ID查找系统现有数据是否存在,这种写法会抛异常,需要关注原因
|
||||||
currentOrg = QueryServiceHelper.queryOne(entityName,"id,number,name",new QFilter[]{new QFilter("fyzjorgid","=",orgID)});
|
currentOrg = QueryServiceHelper.queryOne(entityName,"id,number,name",new QFilter[]{new QFilter("fyzjorgid","=",orgID)});
|
||||||
if(currentOrg != null){
|
if(currentOrg != null){
|
||||||
|
//根据组织下的负责人id去人员分录表中更新负责人标记,先去除这个部门下人员的负责人标记,再更新
|
||||||
|
if(!DobeDWUtils.isEmpty(person_charge)){
|
||||||
|
updateSql = "UPDATE t_SEC_UserPosition SET fisincharge=? WHERE fdptid in (select fid from t_org_org where fyzjorgid=?);";
|
||||||
|
DB.update(DBRoute.of("sys"), updateSql, new Object[]{0,orgID});
|
||||||
|
updateSql = "UPDATE t_SEC_UserPosition SET fisincharge=? WHERE fdptid in (select fid from t_org_org where fyzjorgid=?) and fid in (select fid from t_sec_user where fnumber=?);";
|
||||||
|
DB.update(DBRoute.of("sys"), updateSql, new Object[]{1,orgID,person_charge});
|
||||||
|
}
|
||||||
//已存在,做更新
|
//已存在,做更新
|
||||||
if(orgNumber.equals(currentOrg.getString("number")) && orgName.equals(currentOrg.getString("name"))){
|
if(orgNumber.equals(currentOrg.getString("number")) && orgName.equals(currentOrg.getString("name"))){
|
||||||
//编号和名称都没有变化,无需更新
|
//编号和名称都没有变化,无需更新
|
||||||
|
@ -159,6 +171,7 @@ public class DobeDWorgTask extends AbstractTask implements Plugin {
|
||||||
if (!param.isSuccess()) {
|
if (!param.isSuccess()) {
|
||||||
log.info(String.format("组织新增异常:%s", param.getMsg()));
|
log.info(String.format("组织新增异常:%s", param.getMsg()));
|
||||||
}
|
}
|
||||||
|
//部门新增时,不用去更新部门下的负责人
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,25 +4,19 @@ import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import kd.bos.dataentity.entity.DynamicObject;
|
import kd.bos.dataentity.entity.DynamicObject;
|
||||||
import kd.bos.dataentity.entity.DynamicObjectCollection;
|
import kd.bos.dataentity.entity.DynamicObjectCollection;
|
||||||
import kd.bos.entity.operate.result.OperateErrorInfo;
|
|
||||||
import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
|
import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
|
||||||
import kd.bos.entity.plugin.args.AfterOperationArgs;
|
import kd.bos.entity.plugin.args.AfterOperationArgs;
|
||||||
import kd.bos.entity.validate.ErrorLevel;
|
|
||||||
import kd.bos.logging.Log;
|
import kd.bos.logging.Log;
|
||||||
import kd.bos.logging.LogFactory;
|
import kd.bos.logging.LogFactory;
|
||||||
import kd.bos.orm.query.QCP;
|
import kd.bos.orm.query.QCP;
|
||||||
import kd.bos.orm.query.QFilter;
|
import kd.bos.orm.query.QFilter;
|
||||||
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||||
import kd.bos.servicehelper.operation.SaveServiceHelper;
|
import kd.bos.servicehelper.operation.SaveServiceHelper;
|
||||||
import kd.bos.util.HttpClientUtils;
|
|
||||||
import kd.bos.util.StringUtils;
|
import kd.bos.util.StringUtils;
|
||||||
import shkd.repc.recon.opplugin.TestOPPlugin;
|
|
||||||
import shkd.utils.OAUtils;
|
import shkd.utils.OAUtils;
|
||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import static shkd.utils.OAUtils.pushOASupplier;
|
import static shkd.utils.OAUtils.pushOASupplier;
|
||||||
|
|
||||||
|
@ -63,7 +57,8 @@ public class PushOASupplierOPPlugin extends AbstractOperationServicePlugIn {
|
||||||
}
|
}
|
||||||
|
|
||||||
//处理联系人分录中的开通账号的人员名称更新到主表字段上面 yxl 20241120
|
//处理联系人分录中的开通账号的人员名称更新到主表字段上面 yxl 20241120
|
||||||
handleContactPerson(supplier);
|
//文本字段的人员工作流中配置人员时选不到,得改成用户字段让经办人自己选择,如下代码注释
|
||||||
|
// handleContactPerson(supplier);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,10 +87,11 @@ public class DobeDWprojectTask extends AbstractTask implements Plugin {
|
||||||
// String fversionnum = null;//版本号
|
// String fversionnum = null;//版本号
|
||||||
// String fisleaf = null;//是否叶子节点
|
// String fisleaf = null;//是否叶子节点
|
||||||
String faddress = null;//项目地址
|
String faddress = null;//项目地址
|
||||||
String project_stage = null;//项目性质--二开字段,用于工作流发起判断
|
String project_stage = null;//业务体系--二开字段,用于工作流发起判断(新拓 成熟)
|
||||||
String forgid = null;//所属组织-行政组织
|
String forgid = null;//所属组织-行政组织
|
||||||
Date project_getdate = null;//项目获取时间
|
Date project_getdate = null;//项目获取时间
|
||||||
String fdwid = null;//数仓项目id
|
String fdwid = null;//数仓项目id--二开字段,唯一标识
|
||||||
|
String ywlx = null;//业务类型--二开字段,仅记录数仓数据
|
||||||
DynamicObject orginfo = null;
|
DynamicObject orginfo = null;
|
||||||
DynamicObject projectinfo = null;
|
DynamicObject projectinfo = null;
|
||||||
// DynamicObject projectstageinfo = null;
|
// DynamicObject projectstageinfo = null;
|
||||||
|
@ -103,6 +104,7 @@ public class DobeDWprojectTask extends AbstractTask implements Plugin {
|
||||||
forgid = json_body.getString("org_code");
|
forgid = json_body.getString("org_code");
|
||||||
project_getdate = json_body.getDate("project_getdate");
|
project_getdate = json_body.getDate("project_getdate");
|
||||||
project_stage = json_body.getString("project_stage");
|
project_stage = json_body.getString("project_stage");
|
||||||
|
ywlx = json_body.getString("project_stage_detail");
|
||||||
fdwid = json_body.getString("project_id");
|
fdwid = json_body.getString("project_id");
|
||||||
if(DobeDWUtils.isEmpty(fbillno) || DobeDWUtils.isEmpty(fbillname) || DobeDWUtils.isEmpty(fdwid)){
|
if(DobeDWUtils.isEmpty(fbillno) || DobeDWUtils.isEmpty(fbillname) || DobeDWUtils.isEmpty(fdwid)){
|
||||||
log.info(String.format("项目接口入参为空异常:%s", json_body.toJSONString()));
|
log.info(String.format("项目接口入参为空异常:%s", json_body.toJSONString()));
|
||||||
|
@ -127,6 +129,7 @@ public class DobeDWprojectTask extends AbstractTask implements Plugin {
|
||||||
// }
|
// }
|
||||||
projectinfo.set("address", faddress);
|
projectinfo.set("address", faddress);
|
||||||
projectinfo.set("acquiredate", project_getdate);
|
projectinfo.set("acquiredate", project_getdate);
|
||||||
|
projectinfo.set("qeug_ywlx", ywlx);
|
||||||
// projectinfo.set("billstatus", "A");//单据状态 A保存 B已提交 C已审核
|
// projectinfo.set("billstatus", "A");//单据状态 A保存 B已提交 C已审核
|
||||||
// projectinfo.set("showflag", true);//是否列表显示
|
// projectinfo.set("showflag", true);//是否列表显示
|
||||||
// projectinfo.set("enable", 1);//是否启用
|
// projectinfo.set("enable", 1);//是否启用
|
||||||
|
@ -179,6 +182,7 @@ public class DobeDWprojectTask extends AbstractTask implements Plugin {
|
||||||
}else if("成熟园区".equals(project_stage)){
|
}else if("成熟园区".equals(project_stage)){
|
||||||
projectinfo.set("qeug_combofield", "chengshu");
|
projectinfo.set("qeug_combofield", "chengshu");
|
||||||
}
|
}
|
||||||
|
projectinfo.set("qeug_ywlx", ywlx);
|
||||||
//保存数据:直接保存入库,不走操作校验
|
//保存数据:直接保存入库,不走操作校验
|
||||||
SaveServiceHelper.save(new DynamicObject[]{projectinfo});
|
SaveServiceHelper.save(new DynamicObject[]{projectinfo});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue