成本科目和项目数仓接口联调1109
This commit is contained in:
parent
4211d5a7ef
commit
cf89760709
|
@ -120,7 +120,7 @@ public class DobeDWaccountTask extends AbstractTask implements Plugin {
|
||||||
// taxrate = json_body.getString("taxrate");//税率
|
// taxrate = json_body.getString("taxrate");//税率
|
||||||
// isleaf = json_body.getString("isleaf");//是否叶子节点
|
// isleaf = json_body.getString("isleaf");//是否叶子节点
|
||||||
// level = json_body.getString("level");//科目级次
|
// level = json_body.getString("level");//科目级次
|
||||||
parentid = json_body.getString("costsubject_pid");//科目父级id
|
parentid = json_body.getString("costsubject_pcode");//科目父级code
|
||||||
if(DobeDWUtils.isEmpty(number) || DobeDWUtils.isEmpty(name) || DobeDWUtils.isEmpty(acctid)){
|
if(DobeDWUtils.isEmpty(number) || DobeDWUtils.isEmpty(name) || DobeDWUtils.isEmpty(acctid)){
|
||||||
//如果组织ID和组织编码 名称是空的,则跳过此记录
|
//如果组织ID和组织编码 名称是空的,则跳过此记录
|
||||||
log.info(String.format("成本科目入参为空异常:%s", json_body.toJSONString()));
|
log.info(String.format("成本科目入参为空异常:%s", json_body.toJSONString()));
|
||||||
|
@ -143,7 +143,7 @@ public class DobeDWaccountTask extends AbstractTask implements Plugin {
|
||||||
acctinfo.set("caentry_longnumber", number);//科目长编号
|
acctinfo.set("caentry_longnumber", number);//科目长编号
|
||||||
acctinfo.set("caentry_fullname", name);//科目长名称
|
acctinfo.set("caentry_fullname", name);//科目长名称
|
||||||
//将此次新增的科目放到现有科目集合中,方便后续科目能获取到父级科目
|
//将此次新增的科目放到现有科目集合中,方便后续科目能获取到父级科目
|
||||||
parentAccts.put(acctid,acctinfo);
|
parentAccts.put(number,acctinfo);
|
||||||
}
|
}
|
||||||
//已存在,做更新 编号、名称、长编号、名称、科目类别等
|
//已存在,做更新 编号、名称、长编号、名称、科目类别等
|
||||||
acctinfo.set("caentry_number", number);
|
acctinfo.set("caentry_number", number);
|
||||||
|
@ -187,7 +187,7 @@ public class DobeDWaccountTask extends AbstractTask implements Plugin {
|
||||||
acctViewinfo = QueryServiceHelper.queryOne(acctViewEntity,"id,number,longnumber",new QFilter[]{new QFilter("longnumber","=",kjkm_num)});
|
acctViewinfo = QueryServiceHelper.queryOne(acctViewEntity,"id,number,longnumber",new QFilter[]{new QFilter("longnumber","=",kjkm_num)});
|
||||||
}
|
}
|
||||||
if(acctViewinfo == null){
|
if(acctViewinfo == null){
|
||||||
DobeDWUtils.saveLog(acctinfo.getString("caentry_longnumber"),"数仓项目同步",json_body.toString(),"会计科目在金蝶中找不到:"+kjkm_num,false,"定时任务");
|
DobeDWUtils.saveLog(acctinfo.getString("caentry_longnumber"),"数仓项目同步",json_body.toString(),"会计科目在金蝶中找不到:"+kjkm_num+kjkm_name,false,"定时任务");
|
||||||
}else{
|
}else{
|
||||||
acctViewMap.put(kjkm_num,acctViewinfo);
|
acctViewMap.put(kjkm_num,acctViewinfo);
|
||||||
// mapAcctinfo.set("amentry_account",acctViewinfo.getLong("id"));
|
// mapAcctinfo.set("amentry_account",acctViewinfo.getLong("id"));
|
||||||
|
|
|
@ -152,7 +152,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);
|
||||||
orginfo = QueryServiceHelper.queryOne("bos_org","id,number,name",new QFilter[]{new QFilter("fyzjorgid","=",forgid)});
|
orginfo = QueryServiceHelper.queryOne("bos_org","id,number,name",new QFilter[]{new QFilter("number","=",forgid)});
|
||||||
if(orginfo != null){
|
if(orginfo != null){
|
||||||
projectinfo.set("org", orginfo.getLong("id"));//项目所属组织
|
projectinfo.set("org", orginfo.getLong("id"));//项目所属组织
|
||||||
projectinfo.set("purchaseorg", orginfo.getLong("id"));//项目采购组织同所属组织
|
projectinfo.set("purchaseorg", orginfo.getLong("id"));//项目采购组织同所属组织
|
||||||
|
|
|
@ -86,6 +86,13 @@ public class DobeDWUtils {
|
||||||
return targetFormat.format(billDate);
|
return targetFormat.format(billDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String getCurrentDateString(){
|
||||||
|
//创建一个SimpleDateFormat对象,定义目标日期格式
|
||||||
|
SimpleDateFormat targetFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
//格式化Date对象为新的字符串格式
|
||||||
|
return targetFormat.format(new Date());
|
||||||
|
}
|
||||||
|
|
||||||
public static int getQueryCount(int totalNum){
|
public static int getQueryCount(int totalNum){
|
||||||
//根据入参 计算总查询次数
|
//根据入参 计算总查询次数
|
||||||
//先判断大小,如果小于固定条数300,则返回1
|
//先判断大小,如果小于固定条数300,则返回1
|
||||||
|
@ -143,7 +150,7 @@ public class DobeDWUtils {
|
||||||
|
|
||||||
psjson = new JSONObject();
|
psjson = new JSONObject();
|
||||||
psjson.put("name","e_time");
|
psjson.put("name","e_time");
|
||||||
psjson.put("value","");
|
psjson.put("value",getDateString(null));
|
||||||
ps.add(psjson);
|
ps.add(psjson);
|
||||||
json_body.put("params",ps);
|
json_body.put("params",ps);
|
||||||
}else{
|
}else{
|
||||||
|
|
Loading…
Reference in New Issue