项目接口增加成熟园区;费用登记增加会计科目推送bip
This commit is contained in:
parent
8092658998
commit
deee720684
|
@ -331,13 +331,19 @@ public class YongyouBIPOperation extends AbstractOperationServicePlugIn implemen
|
||||||
items.put("pu_org",companyDept[0]);//业务组织编码 同表头公司编码
|
items.put("pu_org",companyDept[0]);//业务组织编码 同表头公司编码
|
||||||
// items.put("pu_deptid",companyDept[1]);//业务部门编码 费用承担部门编码,转换成财务组织编码
|
// items.put("pu_deptid",companyDept[1]);//业务部门编码 费用承担部门编码,转换成财务组织编码
|
||||||
//外部公司:22020104\应付账款\往来单位\外部单位(工程类)
|
//外部公司:22020104\应付账款\往来单位\外部单位(工程类)
|
||||||
//内部关联公司:22020105\应付账款\往来单位\内部单位(关联方)
|
//集团内部关联公司:22020105\应付账款\往来单位\内部单位(关联方)
|
||||||
|
//如果费用登记中用户选择了会计科目,则使用该字段编号,否则还使用集团内外 yxl 20241116
|
||||||
|
if(isnotext && payrequestinfo.getDynamicObject("qeug_accountview")!=null){
|
||||||
|
items.put("pk_subjcode",payrequestinfo.getDynamicObject("qeug_accountview").getString("number"));
|
||||||
|
}else{
|
||||||
String suptype = getSupplierType(supplierid);
|
String suptype = getSupplierType(supplierid);
|
||||||
if("DB01".equals(suptype)){
|
if("DB01".equals(suptype)){
|
||||||
items.put("pk_subjcode","22020105");//集团内
|
items.put("pk_subjcode","22020105");//集团内
|
||||||
}else{
|
}else{
|
||||||
items.put("pk_subjcode","22020104");//收支项目编码 费用项目,例:660224-管理费用-服务费 会计科目(一个)
|
items.put("pk_subjcode","22020104");//收支项目编码 费用项目,例:660224-管理费用-服务费 会计科目(一个)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
items.put("ap_payaccount",ap_payaccount);//付款银行账户编码 同表头
|
items.put("ap_payaccount",ap_payaccount);//付款银行账户编码 同表头
|
||||||
items.put("ap_recaccount",ap_recaccount);//收款银行账户编码
|
items.put("ap_recaccount",ap_recaccount);//收款银行账户编码
|
||||||
items.put("pk_balatype","07");//结算方式编码,传编码例:07-网银
|
items.put("pk_balatype","07");//结算方式编码,传编码例:07-网银
|
||||||
|
|
|
@ -28,6 +28,7 @@ public class DobeDWorgRelationTask extends AbstractTask implements Plugin {
|
||||||
|
|
||||||
private static Log log = LogFactory.getLog(DobeDWorgRelationTask.class);
|
private static Log log = LogFactory.getLog(DobeDWorgRelationTask.class);
|
||||||
private static final String entityName = "qeug_recon_orgrelation";//供应链库 表名 tk_qeug_recon_orgrelation
|
private static final String entityName = "qeug_recon_orgrelation";//供应链库 表名 tk_qeug_recon_orgrelation
|
||||||
|
private static final String orgEntityName = "bos_org";//系统库 表名 t_ORG_ORG
|
||||||
private static final String dw_menthod = "mdm_orgcorp";
|
private static final String dw_menthod = "mdm_orgcorp";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -91,6 +92,7 @@ public class DobeDWorgRelationTask extends AbstractTask implements Plugin {
|
||||||
String paybank = null;
|
String paybank = null;
|
||||||
String paynumber = null;
|
String paynumber = null;
|
||||||
String taxno = null;
|
String taxno = null;
|
||||||
|
DynamicObject yworginfo = 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);
|
||||||
|
@ -137,6 +139,15 @@ public class DobeDWorgRelationTask extends AbstractTask implements Plugin {
|
||||||
//保存数据:直接保存入库,不走操作校验
|
//保存数据:直接保存入库,不走操作校验
|
||||||
SaveServiceHelper.save(new DynamicObject[]{orginfo});
|
SaveServiceHelper.save(new DynamicObject[]{orginfo});
|
||||||
}
|
}
|
||||||
|
//根据行政组织编号找到星瀚上的业务单元对象
|
||||||
|
yworginfo = BusinessDataServiceHelper.loadSingle(orgEntityName,new QFilter[]{new QFilter("number","=",orgNumber)});
|
||||||
|
if(yworginfo != null){
|
||||||
|
yworginfo.set("ffirmname", companyName);//业务单元-公司名称
|
||||||
|
yworginfo.set("depositbank", paybank);//业务单元-开户行
|
||||||
|
yworginfo.set("bankaccount", paynumber);//业务单元-银行账户
|
||||||
|
yworginfo.set("uniformsocialcreditcode", taxno);//业务单元-统一社会信用代码
|
||||||
|
SaveServiceHelper.update(yworginfo);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -83,16 +83,17 @@ public class DobeDWprojectTask extends AbstractTask implements Plugin {
|
||||||
|
|
||||||
String fbillno = null;//项目编号
|
String fbillno = null;//项目编号
|
||||||
String fbillname = null;//项目名称
|
String fbillname = null;//项目名称
|
||||||
String fprojectstageid = null;//项目阶段 repmd_projectstages t_repmd_projectstage
|
// String fprojectstageid = null;//项目阶段 repmd_projectstages t_repmd_projectstage 用户自行在界面上选择
|
||||||
// String fversionnum = null;//版本号
|
// String fversionnum = null;//版本号
|
||||||
// String fisleaf = null;//是否叶子节点
|
// String fisleaf = null;//是否叶子节点
|
||||||
String faddress = null;//项目地址
|
String faddress = 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
|
||||||
DynamicObject orginfo = null;
|
DynamicObject orginfo = null;
|
||||||
DynamicObject projectinfo = null;
|
DynamicObject projectinfo = null;
|
||||||
DynamicObject projectstageinfo = null;
|
// DynamicObject projectstageinfo = 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);
|
||||||
fbillno = json_body.getString("project_code");
|
fbillno = json_body.getString("project_code");
|
||||||
|
@ -101,7 +102,7 @@ public class DobeDWprojectTask extends AbstractTask implements Plugin {
|
||||||
// fisleaf = json_body.getString("fisleaf");
|
// fisleaf = json_body.getString("fisleaf");
|
||||||
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");
|
||||||
fprojectstageid = json_body.getString("project_stage");
|
project_stage = json_body.getString("project_stage");
|
||||||
fdwid = json_body.getString("project_id");
|
fdwid = json_body.getString("project_id");
|
||||||
if(DobeDWUtils.isEmpty(fbillno) || DobeDWUtils.isEmpty(fbillname) || DobeDWUtils.isEmpty(forgid) || DobeDWUtils.isEmpty(fdwid)){
|
if(DobeDWUtils.isEmpty(fbillno) || DobeDWUtils.isEmpty(fbillname) || DobeDWUtils.isEmpty(forgid) || DobeDWUtils.isEmpty(fdwid)){
|
||||||
log.info(String.format("项目接口入参为空异常:%s", json_body.toJSONString()));
|
log.info(String.format("项目接口入参为空异常:%s", json_body.toJSONString()));
|
||||||
|
@ -110,7 +111,7 @@ public class DobeDWprojectTask extends AbstractTask implements Plugin {
|
||||||
//根据数仓id查找项目是否已存在
|
//根据数仓id查找项目是否已存在
|
||||||
projectinfo = BusinessDataServiceHelper.loadSingle(entityName,new QFilter[]{new QFilter("qeug_dwid","=",fdwid)});
|
projectinfo = BusinessDataServiceHelper.loadSingle(entityName,new QFilter[]{new QFilter("qeug_dwid","=",fdwid)});
|
||||||
//项目阶段表名:t_repmd_projectstage
|
//项目阶段表名:t_repmd_projectstage
|
||||||
projectstageinfo = QueryServiceHelper.queryOne("repmd_projectstages","id,number",new QFilter[]{new QFilter("number","=",fprojectstageid)});
|
// projectstageinfo = QueryServiceHelper.queryOne("repmd_projectstages","id,number",new QFilter[]{new QFilter("number","=",fprojectstageid)});
|
||||||
if(projectinfo != null){
|
if(projectinfo != null){
|
||||||
if("C".equals(projectinfo.getString("billstatus"))){
|
if("C".equals(projectinfo.getString("billstatus"))){
|
||||||
//如果项目已审核,则不进行修改
|
//如果项目已审核,则不进行修改
|
||||||
|
@ -119,9 +120,9 @@ public class DobeDWprojectTask extends AbstractTask implements Plugin {
|
||||||
//已存在,做更新 名称 阶段 版本号等信息;组织、编号、是否叶子节点不能更新;需要前台操作
|
//已存在,做更新 名称 阶段 版本号等信息;组织、编号、是否叶子节点不能更新;需要前台操作
|
||||||
projectinfo.set("billname", fbillname);
|
projectinfo.set("billname", fbillname);
|
||||||
projectinfo.set("fullname", fbillname);//项目全称
|
projectinfo.set("fullname", fbillname);//项目全称
|
||||||
if(projectstageinfo != null){
|
// if(projectstageinfo != null){
|
||||||
projectinfo.set("projectstage", projectstageinfo.getLong("id"));//项目阶段
|
// projectinfo.set("projectstage", projectstageinfo.getLong("id"));//项目阶段
|
||||||
}
|
// }
|
||||||
projectinfo.set("address", faddress);
|
projectinfo.set("address", faddress);
|
||||||
projectinfo.set("acquiredate", project_getdate);
|
projectinfo.set("acquiredate", project_getdate);
|
||||||
// projectinfo.set("billstatus", "A");//单据状态 A保存 B已提交 C已审核
|
// projectinfo.set("billstatus", "A");//单据状态 A保存 B已提交 C已审核
|
||||||
|
@ -129,6 +130,11 @@ public class DobeDWprojectTask extends AbstractTask implements Plugin {
|
||||||
projectinfo.set("enable", 1);//是否启用
|
projectinfo.set("enable", 1);//是否启用
|
||||||
projectinfo.set("islatestversion", true);//是否最新版
|
projectinfo.set("islatestversion", true);//是否最新版
|
||||||
projectinfo.set("mainprojectid", projectinfo.getLong("id"));//主项目ID
|
projectinfo.set("mainprojectid", projectinfo.getLong("id"));//主项目ID
|
||||||
|
if("新拓园区".equals(project_stage)){
|
||||||
|
projectinfo.set("qeug_combofield", "xintuo");
|
||||||
|
}else if("成熟园区".equals(project_stage)){
|
||||||
|
projectinfo.set("qeug_combofield", "chengshu");
|
||||||
|
}
|
||||||
// projectinfo.set("billno", fbillno);
|
// projectinfo.set("billno", fbillno);
|
||||||
// projectinfo.set("org", );
|
// projectinfo.set("org", );
|
||||||
// projectinfo.set("isleaf", fisleaf);
|
// projectinfo.set("isleaf", fisleaf);
|
||||||
|
@ -147,9 +153,9 @@ public class DobeDWprojectTask extends AbstractTask implements Plugin {
|
||||||
// }
|
// }
|
||||||
projectinfo.set("bizdate", new Date());//业务日期
|
projectinfo.set("bizdate", new Date());//业务日期
|
||||||
projectinfo.set("showflag", true);//是否列表显示
|
projectinfo.set("showflag", true);//是否列表显示
|
||||||
if(projectstageinfo != null){
|
// if(projectstageinfo != null){
|
||||||
projectinfo.set("projectstage", projectstageinfo.getLong("id"));//项目阶段
|
// projectinfo.set("projectstage", projectstageinfo.getLong("id"));//项目阶段
|
||||||
}
|
// }
|
||||||
projectinfo.set("address", faddress);
|
projectinfo.set("address", faddress);
|
||||||
projectinfo.set("acquiredate", project_getdate);
|
projectinfo.set("acquiredate", project_getdate);
|
||||||
orginfo = QueryServiceHelper.queryOne("bos_org","id,number,name",new QFilter[]{new QFilter("number","=",forgid)});
|
orginfo = QueryServiceHelper.queryOne("bos_org","id,number,name",new QFilter[]{new QFilter("number","=",forgid)});
|
||||||
|
@ -164,6 +170,11 @@ public class DobeDWprojectTask extends AbstractTask implements Plugin {
|
||||||
projectinfo.set("enable", 1);//是否启用
|
projectinfo.set("enable", 1);//是否启用
|
||||||
projectinfo.set("billstatus", "A");//单据状态 A保存 B已提交 C已审核
|
projectinfo.set("billstatus", "A");//单据状态 A保存 B已提交 C已审核
|
||||||
projectinfo.set("creator", 43007523L);//创建人默认指定为金小蝶
|
projectinfo.set("creator", 43007523L);//创建人默认指定为金小蝶
|
||||||
|
if("新拓园区".equals(project_stage)){
|
||||||
|
projectinfo.set("qeug_combofield", "xintuo");
|
||||||
|
}else if("成熟园区".equals(project_stage)){
|
||||||
|
projectinfo.set("qeug_combofield", "chengshu");
|
||||||
|
}
|
||||||
//保存数据:直接保存入库,不走操作校验
|
//保存数据:直接保存入库,不走操作校验
|
||||||
SaveServiceHelper.save(new DynamicObject[]{projectinfo});
|
SaveServiceHelper.save(new DynamicObject[]{projectinfo});
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,14 +24,14 @@ public class DobeDWUtils {
|
||||||
|
|
||||||
//授权模式,客户端模式为client,密码模式为:password
|
//授权模式,客户端模式为client,密码模式为:password
|
||||||
// public static final String granttype = "client_credentials";
|
// public static final String granttype = "client_credentials";
|
||||||
//第三方应用id,对应系统中的app_id
|
//BIP第三方应用id,对应系统中的app_id
|
||||||
public static final String clientid = "ISC";
|
public static final String clientid = "ISC";
|
||||||
// 第三方应用秘钥,对请求加签使用
|
//BIP 第三方应用秘钥,对请求加签使用
|
||||||
public static final String clientsecret = "72135b74ab7046dbab06";
|
public static final String clientsecret = "cb729cf706934e97aa84";
|
||||||
//访问的BIP系统的账套code
|
//访问的BIP系统的账套code
|
||||||
public static final String bizcenter = "01";
|
public static final String bizcenter = "01";
|
||||||
//公钥,加解密使用
|
//BIP公钥,加解密使用
|
||||||
public static final String pubKey = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtifU2Nm6/lwYybVGNMzmn/UvOmtjqs9tuesdchx0pK6HsiubCRiFKr/TFGLHhBKJ3TXtH4gwJLkGrMJRdTicWHOCAwcU9hmM+XsHCF4FQ4UWcWA73Ha9qR3SC1tSxwDw8n2/uHUKtKzlOGuJQnzL5hBN7DnDU4M7FqEZ+ctG71ufkjytY1TKVoHfThRTAP1ouSNo3gM/pMwjISTkFH5vY7twdu9IW09+S5/uo8C+pw7BahDpOv5z7F1yWDEnw1sdwNdqPFV2DsB1JS3GfLe9P3ZACeR+lcD3KrwBsQky3oZsg3y6NsDqOpzoLk9pToFzmci1GMfCKoc4MzVF9fq7XQIDAQAB";
|
public static final String pubKey = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA8cLD7SZ8W15DF+XZ5+WURaxFP6TBvUG6fabTEh5oV2NFdsowuS88fFUx3rh0KqWQ3VtRRCVjHgGBuPIDakEZ8rn+kDq3BV10+ihJunuqqP/LBSr4Y2JYHj6vqwYw6K3raH4li/sAR02rQdoR922OU2bPxc3BlLTA0yLFqjo/3/Bf8DvYIo/yZ+enK1glK6SYVX7+dLv2a8sWb2MtUDm7JXW14rqwuO9dwlTTBTbrZ3AKubvaE7qXXqbJdYDLGTiLSD2mXJa7vwO+6ZTQJDN4sJUCeFchNMeB2xIjzbV3ZpL75xKPbbRnhANpswiaRN5OhtQcUKK3Y0+TRiihfIc3RQIDAQAB";
|
||||||
//用友接口IP地址
|
//用友接口IP地址
|
||||||
public static final String yyip = "106.14.25.83";
|
public static final String yyip = "106.14.25.83";
|
||||||
//用友接口端口
|
//用友接口端口
|
||||||
|
|
Loading…
Reference in New Issue