|
|
@ -39,7 +39,7 @@ public class OtherReceivableBillService extends FinKingDeeService { |
|
|
|
} |
|
|
|
map_fEntityModel_.put("FDATE", otherReceivable.getBussDate()); |
|
|
|
//到期日期
|
|
|
|
map_fEntityModel_.put("FENDDATE_H",otherReceivable.getBussDate()); |
|
|
|
map_fEntityModel_.put("FENDDATE_H", otherReceivable.getBussDate()); |
|
|
|
//客户
|
|
|
|
if (otherReceivable.getCommUnit() == null) { |
|
|
|
return rb.setMsg("客户编码不能为空"); |
|
|
@ -53,11 +53,11 @@ public class OtherReceivableBillService extends FinKingDeeService { |
|
|
|
//收款组织
|
|
|
|
map_fEntityModel_.put("FSETTLEORGID", otherReceivable.getCollectionOrg()); |
|
|
|
//销售组织
|
|
|
|
map_fEntityModel_.put("FSALEORGID",otherReceivable.getCollectionOrg()); |
|
|
|
map_fEntityModel_.put("FSALEORGID", otherReceivable.getCollectionOrg()); |
|
|
|
//销售部门
|
|
|
|
map_fEntityModel_.put("FSALEDEPTID",otherReceivable.getCollectionDetails().get(0).getDearDept()); |
|
|
|
map_fEntityModel_.put("FSALEDEPTID", otherReceivable.getCollectionDetails().get(0).getDearDept()); |
|
|
|
//申请部门
|
|
|
|
map_fEntityModel_.put("FDEPARTMENTID",otherReceivable.getCollectionDetails().get(0).getDearDept()); |
|
|
|
map_fEntityModel_.put("FDEPARTMENTID", otherReceivable.getCollectionDetails().get(0).getDearDept()); |
|
|
|
List<OtherReceivable.CollectionDetailDto> collectionDetails = otherReceivable.getCollectionDetails() == null ? new ArrayList<>() : otherReceivable.getCollectionDetails(); |
|
|
|
//准备 物料列表的数据
|
|
|
|
ResultBean<List<Map<String, String>>> vehicleListMap = createVehicleListsForReceivableBill(collectionDetails); |
|
|
@ -67,14 +67,14 @@ public class OtherReceivableBillService extends FinKingDeeService { |
|
|
|
String kingDeeData = OtherReceivableBillCastToKingDeeBillFields.getKingDeeData(map_fEntityModel_, vehicleListMap.getData()); |
|
|
|
try { |
|
|
|
ResultBean<String> resultBean1 = accessKingDeeInterface(KingDeeBillId.AR_OTHERRECEIVABLE.getID(), kingDeeData, KingDeeBillUrl.DRAFT_URL.getURL()); |
|
|
|
if(!resultBean1.getSuccess()){ |
|
|
|
if (!resultBean1.getSuccess()) { |
|
|
|
log.info("其他应收单保存失败!"); |
|
|
|
return rb.setMsg("其他应收单保存失败!"); |
|
|
|
} |
|
|
|
log.info("其他应收单保存成功!"); |
|
|
|
String submitKD = getSubmitKD(resultBean1.getData(),KingDeeBillId.AR_OTHERRECEIVABLE.getID()); |
|
|
|
String submitKD = getSubmitKD(resultBean1.getData(), KingDeeBillId.AR_OTHERRECEIVABLE.getID()); |
|
|
|
ResultBean<String> resultBean2 = accessKingDeeInterface(KingDeeBillId.AR_OTHERRECEIVABLE.getID(), submitKD, KingDeeBillUrl.SUBMIT_URL.getURL()); |
|
|
|
if(!resultBean2.getSuccess()){ |
|
|
|
if (!resultBean2.getSuccess()) { |
|
|
|
log.info("其他应收单提交失败!"); |
|
|
|
return rb.setMsg("其他应收单提交失败!"); |
|
|
|
} |
|
|
@ -99,7 +99,8 @@ public class OtherReceivableBillService extends FinKingDeeService { |
|
|
|
} |
|
|
|
m.put("FCOSTDEPARTMENTID", c.getDearDept()); |
|
|
|
m.put("FNOTAXAMOUNTFOR", c.getExTaxMoney()); |
|
|
|
m.put("F_PAEZ_Assistant1",c.getUseTo()); |
|
|
|
m.put("F_PAEZ_Assistant1", c.getUseTo()); |
|
|
|
m.put("F_PMZC_Base1", c.getMaterialNo()); |
|
|
|
collectionDetailMap.add(m); |
|
|
|
} |
|
|
|
return rb.success().setData(collectionDetailMap); |
|
|
|