parent
8182879277
commit
ebab00177d
|
|
@ -145,6 +145,21 @@ public class PushTaskPlugin extends AbstractTask implements Plugin {
|
|||
* 收款 → 先有流水 后有单据
|
||||
*/
|
||||
case "bei_transdetail_cas":
|
||||
DynamicObject[] shkdApimappings = BusinessDataServiceHelper.load("shkd_apimapping", "id,billno," +
|
||||
"shkd_name,shkd_sourcenumber,shkd_domainname,shkd_appkey,shkd_appsecret,shkd_token,shkd_url,shkd_bodytype," +
|
||||
"shkd_sourcebill,shkd_targetsystem,entryentity,entryentity.shkd_tarfield,entryentity.shkd_tartier," +
|
||||
"entryentity.shkd_tartype,entryentity.shkd_parentfield,entryentity.shkd_soufield,entryentity.shkd_defaultdata," +
|
||||
"entryentity.shkd_required,entryentity.shkd_remarks,shkd_submiturl,shkd_banktype,shkd_startdate,shkd_orgs",
|
||||
new QFilter("shkd_sourcebill", QCP.equals, "bei_transdetail_cas").and(
|
||||
new QFilter("shkd_targetsystem", QCP.equals, "BIP")).toArray());
|
||||
|
||||
// 获取多选基础资料业务单元(推送组织)
|
||||
ArrayList<Long> companyIds = new ArrayList<>();
|
||||
DynamicObjectCollection shkdOrgs = shkdApimappings[0].getDynamicObjectCollection("shkd_orgs");
|
||||
for (DynamicObject orgData : shkdOrgs) {
|
||||
companyIds.add(orgData.getLong("fbasedataid_Id"));
|
||||
}
|
||||
|
||||
DynamicObject[] objects3 = BusinessDataServiceHelper.load("bei_transdetail_cas",
|
||||
"id,bizdate,billno,detailid,oppbank,oppunit,accountbank,description,company," +
|
||||
"oppbanknumber,bankdetailno,transbalance,description,debitamount,creditamount," +
|
||||
|
|
@ -152,16 +167,11 @@ public class PushTaskPlugin extends AbstractTask implements Plugin {
|
|||
"recedbillentry,receiptno,recedbillentry.e_recedbilltype,recedbillentry.e_recedbillnumber," +
|
||||
"recedbillentry.e_recedbillid,bankcheckflag"
|
||||
, new QFilter("bizdate", QCP.large_equals, getAdjustedFirstDayOfCurrentMonth())
|
||||
.and("shkd_pushstatus", QCP.not_equals, "已推送").toArray());
|
||||
.and("shkd_pushstatus", QCP.not_equals, "已推送")
|
||||
.and("company", QCP.in, companyIds).toArray());
|
||||
|
||||
Arrays.stream(objects3).forEach(dynamicObject -> {
|
||||
DynamicObject companys = dynamicObject.getDynamicObject("company");
|
||||
if (("SIG1040100、SIG1040901、SIG1040201、SIG1090000、SIG1040700、SIG000101135、SIG1040600、SIG1040300、" +
|
||||
"SIG000100079、SIG000003001、SIG1041000、SIG1040802、SIG000101558、SIG1040808、SIG1040804、" +
|
||||
"SIG1040803、SIG1040801、SIG1040400、SIG104010101、SIG104010102、SIG1040202、SIG1040203、" +
|
||||
"SIG1040204、SIG1040902、SIG000101822、SIG000101799").contains(companys.getString("number"))) {
|
||||
ApiService.paymentSlipsJson(dynamicObject, "BIP", dynamicObjectList, null);
|
||||
}
|
||||
});
|
||||
SaveServiceHelper.save(dynamicObjectList.toArray(new DynamicObject[0]));
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in New Issue