执行及取消执行;nc推送客户nc编码查询逻辑修改;
This commit is contained in:
+2
@@ -39,6 +39,8 @@ public interface ReconciliationMapper extends BaseMapper<Reconciliation>
|
||||
|
||||
String getCustomerCodeNc(@Param("actualInvoiceCustomerId") String actualInvoiceCustomerId);
|
||||
|
||||
String getCustomerCodeNcJson(@Param("actualInvoiceCustomerId") String actualInvoiceCustomerId);
|
||||
|
||||
String getDocumentPreparerNcCode(@Param("salesmanId") String salesmanId);
|
||||
|
||||
String getSettlementCurrencyNcCode(@Param("settlementCurrency") String settlementCurrency);
|
||||
|
||||
+99
@@ -8,6 +8,8 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.JsonMappingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.linke.finance.domain.approvalDocument.entity.ApprovalDocument;
|
||||
import com.linke.finance.domain.approvalDocument.repository.mapper.ApprovalDocumentMapper;
|
||||
@@ -725,6 +727,26 @@ public class ReconciliationImpl extends ServiceImpl<ReconciliationMapper, Reconc
|
||||
String appointShipper=make.getActualInvoiceCustomerName();
|
||||
String actualInvoiceCustomerId = make.getActualInvoiceCustomerId();
|
||||
String customerCodeNc = reconciliationMapper.getCustomerCodeNc(actualInvoiceCustomerId);
|
||||
String customerCodeNcJson = reconciliationMapper.getCustomerCodeNcJson(actualInvoiceCustomerId);
|
||||
if (customerCodeNcJson != null && !customerCodeNcJson.isEmpty()) {
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
List<Map<String, Object>> list = objectMapper.readValue(
|
||||
customerCodeNcJson,
|
||||
new TypeReference<List<Map<String, Object>>>() {}
|
||||
);
|
||||
if (list != null && list.size() > 0) {
|
||||
Map<String, Object> targetMap = list.stream()
|
||||
.filter(map -> {
|
||||
Object codeObj = map.get("code");
|
||||
return codeObj != null && codeObj.toString().equals(reconciliation.getOrganizationId().toString());
|
||||
})
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
if (targetMap != null) {
|
||||
customerCodeNc = (String) targetMap.get("ncCustomer");
|
||||
}
|
||||
}
|
||||
}
|
||||
String settlementCurrency=order.getSettlementCurrency();
|
||||
String salesmanId = order.getSalesmanId();
|
||||
String customerUserDept = reconciliationMapper.getCustomerUserDept(salesmanId);
|
||||
@@ -952,6 +974,10 @@ public class ReconciliationImpl extends ServiceImpl<ReconciliationMapper, Reconc
|
||||
reconciliation.setSynchronousStatus(2);
|
||||
reconciliationMapper.updateById(reconciliation);
|
||||
e.printStackTrace();
|
||||
} catch (JsonMappingException e) {
|
||||
throw new RuntimeException(e);
|
||||
} catch (JsonProcessingException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -1008,6 +1034,27 @@ public class ReconciliationImpl extends ServiceImpl<ReconciliationMapper, Reconc
|
||||
String appointShipper=make.getActualInvoiceCustomerName();
|
||||
String actualInvoiceCustomerId = make.getActualInvoiceCustomerId();
|
||||
String customerCodeNc = reconciliationMapper.getCustomerCodeNc(actualInvoiceCustomerId);
|
||||
String customerCodeNcJson = reconciliationMapper.getCustomerCodeNcJson(actualInvoiceCustomerId);
|
||||
if (customerCodeNcJson != null && !customerCodeNcJson.isEmpty()) {
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
List<Map<String, Object>> list = objectMapper.readValue(
|
||||
customerCodeNcJson,
|
||||
new TypeReference<List<Map<String, Object>>>() {}
|
||||
);
|
||||
if (list != null && list.size() > 0) {
|
||||
Map<String, Object> targetMap = list.stream()
|
||||
.filter(map -> {
|
||||
Object codeObj = map.get("code");
|
||||
return codeObj != null && codeObj.toString().equals(reconciliation.getOrganizationId().toString());
|
||||
})
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
if (targetMap != null) {
|
||||
customerCodeNc = (String) targetMap.get("ncCustomer");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
String settlementCurrency=order.getSettlementCurrency();
|
||||
String salesmanId = order.getSalesmanId();
|
||||
String customerUserDept = reconciliationMapper.getCustomerUserDept(salesmanId);
|
||||
@@ -1235,6 +1282,10 @@ public class ReconciliationImpl extends ServiceImpl<ReconciliationMapper, Reconc
|
||||
reconciliation.setSynchronousStatus(2);
|
||||
reconciliationMapper.updateById(reconciliation);
|
||||
e.printStackTrace();
|
||||
} catch (JsonMappingException e) {
|
||||
throw new RuntimeException(e);
|
||||
} catch (JsonProcessingException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -1560,6 +1611,26 @@ public class ReconciliationImpl extends ServiceImpl<ReconciliationMapper, Reconc
|
||||
String appointShipper=make.getActualInvoiceCustomerName();
|
||||
String actualInvoiceCustomerId = make.getActualInvoiceCustomerId();
|
||||
String customerCodeNc = reconciliationMapper.getCustomerCodeNc(actualInvoiceCustomerId);
|
||||
String customerCodeNcJson = reconciliationMapper.getCustomerCodeNcJson(actualInvoiceCustomerId);
|
||||
if (customerCodeNcJson != null && !customerCodeNcJson.isEmpty()) {
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
List<Map<String, Object>> listNc = objectMapper.readValue(
|
||||
customerCodeNcJson,
|
||||
new TypeReference<List<Map<String, Object>>>() {}
|
||||
);
|
||||
if (listNc != null && listNc.size() > 0) {
|
||||
Map<String, Object> targetMap = listNc.stream()
|
||||
.filter(map -> {
|
||||
Object codeObj = map.get("code");
|
||||
return codeObj != null && codeObj.toString().equals(reconciliation.getOrganizationId().toString());
|
||||
})
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
if (targetMap != null) {
|
||||
customerCodeNc = (String) targetMap.get("ncCustomer");
|
||||
}
|
||||
}
|
||||
}
|
||||
String documentPreparerNcCode = reconciliationMapper.getDocumentPreparerNcCode(salesmanId);
|
||||
String settlementCurrency=order.getSettlementCurrency();
|
||||
String settlementCurrencyNcCode = settlementCurrency;
|
||||
@@ -1759,6 +1830,10 @@ public class ReconciliationImpl extends ServiceImpl<ReconciliationMapper, Reconc
|
||||
reconciliation.setSynchronousStatus(2);
|
||||
reconciliationMapper.updateById(reconciliation);
|
||||
e.printStackTrace();
|
||||
} catch (JsonMappingException e) {
|
||||
throw new RuntimeException(e);
|
||||
} catch (JsonProcessingException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -1844,6 +1919,26 @@ public class ReconciliationImpl extends ServiceImpl<ReconciliationMapper, Reconc
|
||||
String appointShipper=make.getActualInvoiceCustomerName();
|
||||
String actualInvoiceCustomerId = make.getActualInvoiceCustomerId();
|
||||
String customerCodeNc = reconciliationMapper.getCustomerCodeNc(actualInvoiceCustomerId);
|
||||
String customerCodeNcJson = reconciliationMapper.getCustomerCodeNcJson(actualInvoiceCustomerId);
|
||||
if (customerCodeNcJson != null && !customerCodeNcJson.isEmpty()) {
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
List<Map<String, Object>> listNc = objectMapper.readValue(
|
||||
customerCodeNcJson,
|
||||
new TypeReference<List<Map<String, Object>>>() {}
|
||||
);
|
||||
if (listNc != null && listNc.size() > 0) {
|
||||
Map<String, Object> targetMap = listNc.stream()
|
||||
.filter(map -> {
|
||||
Object codeObj = map.get("code");
|
||||
return codeObj != null && codeObj.toString().equals(reconciliation.getOrganizationId().toString());
|
||||
})
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
if (targetMap != null) {
|
||||
customerCodeNc = (String) targetMap.get("ncCustomer");
|
||||
}
|
||||
}
|
||||
}
|
||||
String documentPreparerNcCode = reconciliationMapper.getDocumentPreparerNcCode(salesmanId);
|
||||
String settlementCurrency=order.getSettlementCurrency();
|
||||
String settlementCurrencyNcCode = settlementCurrency;
|
||||
@@ -2046,6 +2141,10 @@ public class ReconciliationImpl extends ServiceImpl<ReconciliationMapper, Reconc
|
||||
reconciliation.setSynchronousStatus(2);
|
||||
reconciliationMapper.updateById(reconciliation);
|
||||
e.printStackTrace();
|
||||
} catch (JsonMappingException e) {
|
||||
throw new RuntimeException(e);
|
||||
} catch (JsonProcessingException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user