bms1.0推送nc动态组织;
This commit is contained in:
+2
@@ -50,4 +50,6 @@ public interface ReconciliationMapper extends BaseMapper<Reconciliation>
|
||||
String getDeptValue(@Param("dictCode") String dictCode);
|
||||
|
||||
String getDeptName(@Param("dictCode") String dictCode);
|
||||
|
||||
String getOrgCodeNc(@Param("organizationId") Long organizationId);
|
||||
}
|
||||
+118
-25
@@ -422,6 +422,7 @@ public class ReconciliationImpl extends ServiceImpl<ReconciliationMapper, Reconc
|
||||
throw new ServiceException("该记录已同步,不需要再次同步");
|
||||
}
|
||||
try {
|
||||
String orgCodeNc = reconciliationMapper.getOrgCodeNc(reconciliation.getOrganizationId());
|
||||
Date date = reconciliation.getCreateTime();
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy");
|
||||
@@ -519,8 +520,13 @@ public class ReconciliationImpl extends ServiceImpl<ReconciliationMapper, Reconc
|
||||
bodys.setItem(ysitemList);
|
||||
Ysbillhead billhead=new Ysbillhead();
|
||||
billhead.setPk_group("CNK");
|
||||
billhead.setPk_org("NG0401");
|
||||
billhead.setSett_org("NG0401");
|
||||
if (orgCodeNc != null && !orgCodeNc.isEmpty()) {
|
||||
billhead.setPk_org(orgCodeNc);
|
||||
billhead.setSett_org(orgCodeNc);
|
||||
} else {
|
||||
billhead.setPk_org("NG0401");
|
||||
billhead.setSett_org("NG0401");
|
||||
}
|
||||
billhead.setBilldate(dateString);
|
||||
billhead.setCreator(makerCodeNc);
|
||||
billhead.setPk_billtype("F0");
|
||||
@@ -552,8 +558,15 @@ public class ReconciliationImpl extends ServiceImpl<ReconciliationMapper, Reconc
|
||||
ufinterface.setBusinessunitcode("");
|
||||
ufinterface.setFilename("");
|
||||
ufinterface.setIsexchange("Y");
|
||||
ufinterface.setOrgcode("NG0401");
|
||||
ufinterface.setReceiver("NG0401");
|
||||
if (orgCodeNc != null && !orgCodeNc.isEmpty()) {
|
||||
ufinterface.setOrgcode(orgCodeNc);
|
||||
ufinterface.setReceiver(orgCodeNc);
|
||||
} else {
|
||||
ufinterface.setOrgcode("NG0401");
|
||||
ufinterface.setReceiver("NG0401");
|
||||
}
|
||||
// ufinterface.setOrgcode("NG0401");
|
||||
// ufinterface.setReceiver("NG0401");
|
||||
ufinterface.setReplace("Y");
|
||||
ufinterface.setRoottag("");
|
||||
ufinterface.setSender("nqyw");
|
||||
@@ -648,6 +661,9 @@ public class ReconciliationImpl extends ServiceImpl<ReconciliationMapper, Reconc
|
||||
}//南光本部
|
||||
else if(reconciliation.getOrganizationId()==2840){
|
||||
boolean b = synchronousNc_NG(businessDocumentDetaliId);
|
||||
}//其他部门用普货
|
||||
else {
|
||||
boolean b = synchronousNc_TY(businessDocumentDetaliId);
|
||||
}
|
||||
} catch (JAXBException e) {
|
||||
e.printStackTrace();
|
||||
@@ -670,6 +686,7 @@ public class ReconciliationImpl extends ServiceImpl<ReconciliationMapper, Reconc
|
||||
String invoiceId = reconciliation.getInvoiceId();
|
||||
ReconciliationDTO makeQuery=new ReconciliationDTO();
|
||||
makeQuery.setInnerNumber(invoiceId);
|
||||
String orgCodeNc = reconciliationMapper.getOrgCodeNc(reconciliation.getOrganizationId());
|
||||
R<List<TmsMakeOutInvoice>> makeList=wlhyServiceFeign.selectMakeOutInvoiceListByReconciliation(makeQuery);
|
||||
if (makeList.getCode()==200){
|
||||
int count = 0;
|
||||
@@ -791,8 +808,15 @@ public class ReconciliationImpl extends ServiceImpl<ReconciliationMapper, Reconc
|
||||
bodys.setItem(ysitemList);
|
||||
Ysbillhead billhead=new Ysbillhead();
|
||||
billhead.setPk_group("CNK");
|
||||
billhead.setPk_org("NG04");
|
||||
billhead.setSett_org("NG04");
|
||||
// billhead.setPk_org("NG04");
|
||||
// billhead.setSett_org("NG04");
|
||||
if (orgCodeNc != null && !orgCodeNc.isEmpty()) {
|
||||
billhead.setPk_org(orgCodeNc);
|
||||
billhead.setSett_org(orgCodeNc);
|
||||
} else {
|
||||
billhead.setPk_org("NG04");
|
||||
billhead.setSett_org("NG04");
|
||||
}
|
||||
billhead.setCreationtime(dateString);
|
||||
billhead.setCreator(makerCodeNc);
|
||||
billhead.setPk_billtype("F0");
|
||||
@@ -824,8 +848,15 @@ public class ReconciliationImpl extends ServiceImpl<ReconciliationMapper, Reconc
|
||||
ufinterface.setBusinessunitcode("");
|
||||
ufinterface.setFilename("");
|
||||
ufinterface.setIsexchange("Y");
|
||||
ufinterface.setOrgcode("NG04");
|
||||
ufinterface.setReceiver("NG04");
|
||||
// ufinterface.setOrgcode("NG04");
|
||||
// ufinterface.setReceiver("NG04");
|
||||
if (orgCodeNc != null && !orgCodeNc.isEmpty()) {
|
||||
ufinterface.setOrgcode(orgCodeNc);
|
||||
ufinterface.setReceiver(orgCodeNc);
|
||||
} else {
|
||||
ufinterface.setOrgcode("NG04");
|
||||
ufinterface.setReceiver("NG04");
|
||||
}
|
||||
ufinterface.setReplace("Y");
|
||||
ufinterface.setRoottag("");
|
||||
ufinterface.setSender("nqyw");
|
||||
@@ -964,7 +995,7 @@ public class ReconciliationImpl extends ServiceImpl<ReconciliationMapper, Reconc
|
||||
reconciliationMapper.updateById(reconciliation);
|
||||
throw new ServiceException("未找到该组织的推送地址!");
|
||||
}
|
||||
|
||||
String orgCodeNc = reconciliationMapper.getOrgCodeNc(reconciliation.getOrganizationId());
|
||||
String makerCodeNc=order.getMakerCodeNc();
|
||||
String salesmanCodeNc=order.getSalesmanCodeNc();
|
||||
//String customerCodeNc=order.getCustomerCodeNc();
|
||||
@@ -1054,8 +1085,15 @@ public class ReconciliationImpl extends ServiceImpl<ReconciliationMapper, Reconc
|
||||
bodys.setItem(ysitemList);
|
||||
Ysbillhead billhead=new Ysbillhead();
|
||||
billhead.setPk_group("CNK");
|
||||
billhead.setPk_org("NG01");
|
||||
billhead.setSett_org("NG01");
|
||||
// billhead.setPk_org("NG01");
|
||||
// billhead.setSett_org("NG01");
|
||||
if (orgCodeNc != null && !orgCodeNc.isEmpty()) {
|
||||
billhead.setPk_org(orgCodeNc);
|
||||
billhead.setSett_org(orgCodeNc);
|
||||
} else {
|
||||
billhead.setPk_org("NG01");
|
||||
billhead.setSett_org("NG01");
|
||||
}
|
||||
billhead.setCreationtime(dateString);
|
||||
billhead.setCreator(makerCodeNc);
|
||||
billhead.setPk_billtype("F0");
|
||||
@@ -1087,8 +1125,15 @@ public class ReconciliationImpl extends ServiceImpl<ReconciliationMapper, Reconc
|
||||
ufinterface.setBusinessunitcode("");
|
||||
ufinterface.setFilename("");
|
||||
ufinterface.setIsexchange("Y");
|
||||
ufinterface.setOrgcode("NG01");
|
||||
ufinterface.setReceiver("NG01");
|
||||
// ufinterface.setOrgcode("NG01");
|
||||
// ufinterface.setReceiver("NG01");
|
||||
if (orgCodeNc != null && !orgCodeNc.isEmpty()) {
|
||||
ufinterface.setOrgcode(orgCodeNc);
|
||||
ufinterface.setReceiver(orgCodeNc);
|
||||
} else {
|
||||
ufinterface.setOrgcode("NG01");
|
||||
ufinterface.setReceiver("NG01");
|
||||
}
|
||||
ufinterface.setReplace("Y");
|
||||
ufinterface.setRoottag("");
|
||||
ufinterface.setSender("nqyw");
|
||||
@@ -1228,6 +1273,7 @@ public class ReconciliationImpl extends ServiceImpl<ReconciliationMapper, Reconc
|
||||
reconciliationMapper.updateById(reconciliation);
|
||||
throw new ServiceException("未找到该组织的推送地址!");
|
||||
}
|
||||
String orgCodeNc = reconciliationMapper.getOrgCodeNc(reconciliation.getOrganizationId());
|
||||
if(result.getCode()==200){
|
||||
List<TmsOrder> list=result.getData();
|
||||
if(ObjectUtil.isNotNull(list)){
|
||||
@@ -1273,8 +1319,15 @@ public class ReconciliationImpl extends ServiceImpl<ReconciliationMapper, Reconc
|
||||
bodys.setItem(ysitemList);
|
||||
SKbillhead billhead=new SKbillhead();
|
||||
billhead.setPk_group("CNK");
|
||||
billhead.setPk_org("NG0401");
|
||||
billhead.setSett_org("NG0401");
|
||||
// billhead.setPk_org("NG0401");
|
||||
// billhead.setSett_org("NG0401");
|
||||
if (orgCodeNc != null && !orgCodeNc.isEmpty()) {
|
||||
billhead.setPk_org(orgCodeNc);
|
||||
billhead.setSett_org(orgCodeNc);
|
||||
} else {
|
||||
billhead.setPk_org("NG0401");
|
||||
billhead.setSett_org("NG0401");
|
||||
}
|
||||
billhead.setCreationtime(dateString);
|
||||
billhead.setPk_billtype("F2");
|
||||
billhead.setCreator(makerCodeNc);
|
||||
@@ -1303,8 +1356,15 @@ public class ReconciliationImpl extends ServiceImpl<ReconciliationMapper, Reconc
|
||||
ufinterface.setBusinessunitcode("");
|
||||
ufinterface.setFilename("");
|
||||
ufinterface.setIsexchange("Y");
|
||||
ufinterface.setOrgcode("NG0401");
|
||||
ufinterface.setReceiver("NG0401");
|
||||
// ufinterface.setOrgcode("NG0401");
|
||||
// ufinterface.setReceiver("NG0401");
|
||||
if (orgCodeNc != null && !orgCodeNc.isEmpty()) {
|
||||
ufinterface.setOrgcode(orgCodeNc);
|
||||
ufinterface.setReceiver(orgCodeNc);
|
||||
} else {
|
||||
ufinterface.setOrgcode("NG0401");
|
||||
ufinterface.setReceiver("NG0401");
|
||||
}
|
||||
ufinterface.setReplace("Y");
|
||||
ufinterface.setRoottag("");
|
||||
ufinterface.setSender("nqyw");
|
||||
@@ -1396,6 +1456,9 @@ public class ReconciliationImpl extends ServiceImpl<ReconciliationMapper, Reconc
|
||||
}
|
||||
else if(reconciliation.getOrganizationId()==2840){//南光本部
|
||||
boolean b = synchronousNcSK_NG(businessDocumentDetaliId);
|
||||
}//其他部门用普货
|
||||
else {
|
||||
boolean b = synchronousNcSK_TY(businessDocumentDetaliId);
|
||||
}
|
||||
} catch (JAXBException e) {
|
||||
e.printStackTrace();
|
||||
@@ -1417,6 +1480,7 @@ public class ReconciliationImpl extends ServiceImpl<ReconciliationMapper, Reconc
|
||||
String dateString = sdf.format(date);
|
||||
String invoiceId = reconciliation.getInvoiceId();
|
||||
ReconciliationDTO makeQuery=new ReconciliationDTO();
|
||||
String orgCodeNc = reconciliationMapper.getOrgCodeNc(reconciliation.getOrganizationId());
|
||||
makeQuery.setInnerNumber(invoiceId);
|
||||
R<List<TmsMakeOutInvoice>> makeList=wlhyServiceFeign.selectMakeOutInvoiceListByReconciliation(makeQuery);
|
||||
if (makeList.getCode()==200){
|
||||
@@ -1539,8 +1603,15 @@ public class ReconciliationImpl extends ServiceImpl<ReconciliationMapper, Reconc
|
||||
bodys.setItem(ysitemList);
|
||||
SKbillhead billhead=new SKbillhead();
|
||||
billhead.setPk_group("CNK");
|
||||
billhead.setPk_org("NG04");
|
||||
billhead.setSett_org("NG04");
|
||||
if (orgCodeNc != null && !orgCodeNc.isEmpty()) {
|
||||
billhead.setPk_org(orgCodeNc);
|
||||
billhead.setSett_org(orgCodeNc);
|
||||
} else {
|
||||
billhead.setPk_org("NG04");
|
||||
billhead.setSett_org("NG04");
|
||||
}
|
||||
// billhead.setPk_org("NG04");
|
||||
// billhead.setSett_org("NG04");
|
||||
billhead.setCreationtime(dateString);
|
||||
billhead.setPk_billtype("F2");
|
||||
billhead.setCreator(makerCodeNc);
|
||||
@@ -1569,8 +1640,15 @@ public class ReconciliationImpl extends ServiceImpl<ReconciliationMapper, Reconc
|
||||
ufinterface.setBusinessunitcode("");
|
||||
ufinterface.setFilename("");
|
||||
ufinterface.setIsexchange("Y");
|
||||
ufinterface.setOrgcode("NG04");
|
||||
ufinterface.setReceiver("NG04");
|
||||
// ufinterface.setOrgcode("NG04");
|
||||
// ufinterface.setReceiver("NG04");
|
||||
if (orgCodeNc != null && !orgCodeNc.isEmpty()) {
|
||||
ufinterface.setOrgcode(orgCodeNc);
|
||||
ufinterface.setReceiver(orgCodeNc);
|
||||
} else {
|
||||
ufinterface.setOrgcode("NG04");
|
||||
ufinterface.setReceiver("NG04");
|
||||
}
|
||||
ufinterface.setReplace("Y");
|
||||
ufinterface.setRoottag("");
|
||||
ufinterface.setSender("nqyw");
|
||||
@@ -1681,6 +1759,7 @@ public class ReconciliationImpl extends ServiceImpl<ReconciliationMapper, Reconc
|
||||
String invoiceId = reconciliation.getInvoiceId();
|
||||
ReconciliationDTO makeQuery=new ReconciliationDTO();
|
||||
makeQuery.setInnerNumber(invoiceId);
|
||||
String orgCodeNc = reconciliationMapper.getOrgCodeNc(reconciliation.getOrganizationId());
|
||||
R<List<TmsMakeOutInvoice>> makeList=wlhyServiceFeign.selectMakeOutInvoiceListByReconciliation(makeQuery);
|
||||
if (makeList.getCode()==200){
|
||||
int count= 0;
|
||||
@@ -1750,6 +1829,8 @@ public class ReconciliationImpl extends ServiceImpl<ReconciliationMapper, Reconc
|
||||
String documentPreparerNcCode = reconciliationMapper.getDocumentPreparerNcCode(salesmanId);
|
||||
String settlementCurrency=order.getSettlementCurrency();
|
||||
String settlementCurrencyNcCode = settlementCurrency;
|
||||
|
||||
|
||||
makerCodeNc=documentPreparerNcCode;
|
||||
SKitem item=new SKitem();
|
||||
if (deptValue != null && !deptValue.isEmpty()) {
|
||||
@@ -1805,8 +1886,13 @@ public class ReconciliationImpl extends ServiceImpl<ReconciliationMapper, Reconc
|
||||
bodys.setItem(ysitemList);
|
||||
SKbillhead billhead=new SKbillhead();
|
||||
billhead.setPk_group("CNK");
|
||||
billhead.setPk_org("NG01");
|
||||
billhead.setSett_org("NG01");
|
||||
if (orgCodeNc != null && !orgCodeNc.isEmpty()) {
|
||||
billhead.setPk_org(orgCodeNc);
|
||||
billhead.setSett_org(orgCodeNc);
|
||||
} else {
|
||||
billhead.setPk_org("NG01");
|
||||
billhead.setSett_org("NG01");
|
||||
}
|
||||
billhead.setCreationtime(dateString);
|
||||
billhead.setPk_billtype("F2");
|
||||
billhead.setCreator(makerCodeNc);
|
||||
@@ -1835,8 +1921,15 @@ public class ReconciliationImpl extends ServiceImpl<ReconciliationMapper, Reconc
|
||||
ufinterface.setBusinessunitcode("");
|
||||
ufinterface.setFilename("");
|
||||
ufinterface.setIsexchange("Y");
|
||||
ufinterface.setOrgcode("NG01");
|
||||
ufinterface.setReceiver("NG01");
|
||||
if (orgCodeNc != null && !orgCodeNc.isEmpty()) {
|
||||
ufinterface.setOrgcode(orgCodeNc);
|
||||
ufinterface.setReceiver(orgCodeNc);
|
||||
} else {
|
||||
ufinterface.setOrgcode("NG01");
|
||||
ufinterface.setReceiver("NG01");
|
||||
}
|
||||
// ufinterface.setOrgcode("NG01");
|
||||
// ufinterface.setReceiver("NG01");
|
||||
ufinterface.setReplace("Y");
|
||||
ufinterface.setRoottag("");
|
||||
ufinterface.setSender("nqyw");
|
||||
|
||||
Reference in New Issue
Block a user