Merge remote-tracking branch 'origin/main'

This commit is contained in:
zengweihai 2024-11-18 16:33:11 +08:00
commit 98c30768ed
2 changed files with 19 additions and 14 deletions

View File

@ -98,8 +98,9 @@ public class ContractListDateFilterPlugin extends AbstractBillPlugIn implements
for (DynamicObject deleteEntry : deleteEntries) { for (DynamicObject deleteEntry : deleteEntries) {
contractEntries.remove(deleteEntry); contractEntries.remove(deleteEntry);
} }
this.getView().updateView("contract_entry");
} }
this.getView().updateView("contract_entry");
} }
if (contractEntries.isEmpty()) { if (contractEntries.isEmpty()) {

View File

@ -22,7 +22,7 @@ import java.io.IOException;
import java.util.Map; import java.util.Map;
/** /**
* 后台任务插件 * 行政组织和财务组织对应关系后台任务插件
*/ */
public class DobeDWorgRelationTask extends AbstractTask implements Plugin { 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++) { for (int i = 0; i < detailsJson.size(); i++) {
json_body = detailsJson.getJSONObject(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组织名称 orgName = json_body.getString("oaorg_name");//oa组织名称
companyNumber = json_body.getString("corp_code");//财务公司编号 companyNumber = json_body.getString("corp_code");//财务公司编号
companyName = json_body.getString("corp_name");//财务公司名称 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", //根据组织编号查找系统现有数据是否存在 "id,number,name,qeug_companynumber,qeug_companyname,qeug_deptnumber,qeug_deptname",
orginfo = BusinessDataServiceHelper.loadSingle(entityName,new QFilter[]{new QFilter("number","=",orgNumber)}); 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 此对象不能在后续代码中进行修改和更新 //QueryServiceHelper.queryOne查出来的对象不是DynamicObject 而是平铺对象plainobject 此对象不能在后续代码中进行修改和更新
orginfo.set("name", orgName); if(isNeedUpdate(orginfo,companyNumber,deptNumber,paynumber,taxno)){
orginfo.set("qeug_companynumber", companyNumber); orginfo.set("name", orgName);
orginfo.set("qeug_companyname", companyName); orginfo.set("qeug_companynumber", companyNumber);
orginfo.set("qeug_deptnumber", deptNumber); orginfo.set("qeug_companyname", companyName);
orginfo.set("qeug_deptname", deptName); orginfo.set("qeug_deptnumber", deptNumber);
orginfo.set("qeug_paybank", paybank); orginfo.set("qeug_deptname", deptName);
orginfo.set("qeug_paynumber", paynumber); orginfo.set("qeug_paybank", paybank);
orginfo.set("qeug_taxno", taxno); orginfo.set("qeug_paynumber", paynumber);
SaveServiceHelper.update(orginfo); orginfo.set("qeug_taxno", taxno);
SaveServiceHelper.update(orginfo);
}
}else{ }else{
//不存在做新增 根据实体名称创建动态对象 //不存在做新增 根据实体名称创建动态对象
orginfo = BusinessDataServiceHelper.newDynamicObject(entityName); orginfo = BusinessDataServiceHelper.newDynamicObject(entityName);
@ -135,13 +137,15 @@ public class DobeDWorgRelationTask extends AbstractTask implements Plugin {
orginfo.set("qeug_paynumber", paynumber); orginfo.set("qeug_paynumber", paynumber);
orginfo.set("qeug_taxno", taxno); orginfo.set("qeug_taxno", taxno);
orginfo.set("enable", 1); orginfo.set("enable", 1);
orginfo.set("status", "A");//单据状态 A保存 B已提交 C已审核
orginfo.set("creator", 43007523L);//创建人默认指定为金小蝶 orginfo.set("creator", 43007523L);//创建人默认指定为金小蝶
//保存数据直接保存入库不走操作校验 //保存数据直接保存入库不走操作校验
SaveServiceHelper.save(new DynamicObject[]{orginfo}); SaveServiceHelper.save(new DynamicObject[]{orginfo});
} }
//根据行政组织编号找到星瀚上的业务单元对象 //根据行政组织编号找到星瀚上的业务单元对象
yworginfo = BusinessDataServiceHelper.loadSingle(orgEntityName,new QFilter[]{new QFilter("number","=",orgNumber)}); 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("ffirmname", companyName);//业务单元-公司名称
yworginfo.set("depositbank", paybank);//业务单元-开户行 yworginfo.set("depositbank", paybank);//业务单元-开户行
yworginfo.set("bankaccount", paynumber);//业务单元-银行账户 yworginfo.set("bankaccount", paynumber);//业务单元-银行账户