|
@@ -1,21 +1,16 @@
|
|
|
package com.dgtly.system.service.impl;
|
|
package com.dgtly.system.service.impl;
|
|
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
import java.math.BigDecimal;
|
|
|
-import java.util.ArrayList;
|
|
|
|
|
-import java.util.Comparator;
|
|
|
|
|
-import java.util.List;
|
|
|
|
|
-import java.util.Map;
|
|
|
|
|
|
|
+import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
-import com.dgtly.system.domain.DeliverSignVO;
|
|
|
|
|
-import com.dgtly.system.domain.OrderSignVO;
|
|
|
|
|
-import com.dgtly.system.domain.TmsShipmentSignVO;
|
|
|
|
|
|
|
+import com.dgtly.system.domain.*;
|
|
|
|
|
+import com.dgtly.system.mapper.CustomersExtMapper;
|
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
import com.dgtly.system.mapper.MetaHanaDeliverSignMapper;
|
|
import com.dgtly.system.mapper.MetaHanaDeliverSignMapper;
|
|
|
-import com.dgtly.system.domain.MetaHanaDeliverSign;
|
|
|
|
|
import com.dgtly.system.service.IMetaHanaDeliverSignService;
|
|
import com.dgtly.system.service.IMetaHanaDeliverSignService;
|
|
|
import com.dgtly.common.core.text.Convert;
|
|
import com.dgtly.common.core.text.Convert;
|
|
|
|
|
|
|
@@ -32,6 +27,9 @@ public class MetaHanaDeliverSignServiceImpl implements IMetaHanaDeliverSignServi
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private MetaHanaDeliverSignMapper metaHanaDeliverSignMapper;
|
|
private MetaHanaDeliverSignMapper metaHanaDeliverSignMapper;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ CustomersExtMapper customersExtMapper;
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 查询电子单签收状态数量
|
|
* 查询电子单签收状态数量
|
|
|
*
|
|
*
|
|
@@ -255,7 +253,27 @@ public class MetaHanaDeliverSignServiceImpl implements IMetaHanaDeliverSignServi
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public void certificationSync() {
|
|
public void certificationSync() {
|
|
|
- metaHanaDeliverSignMapper.updateCertificationSync();
|
|
|
|
|
|
|
+ List<String> list = metaHanaDeliverSignMapper.selectCertificationSync();
|
|
|
|
|
+ for (String deliverNumber:list){
|
|
|
|
|
+ //判断ext表是否存在数据
|
|
|
|
|
+ CustomersExt customersExt = customersExtMapper.selectCustomersExtById(deliverNumber);
|
|
|
|
|
+ //查询主经销商的注册信息
|
|
|
|
|
+ CustomersExt cust = customersExtMapper.selectCustomersExt(deliverNumber);
|
|
|
|
|
+ if (customersExt !=null){
|
|
|
|
|
+ //如果存在数据直接认证通过
|
|
|
|
|
+ CustomersExt customer = new CustomersExt();
|
|
|
|
|
+ customer.setIsAuthentication("1");
|
|
|
|
|
+ customer.setOrgId(cust.getOrgId());
|
|
|
|
|
+ customer.setCreator(cust.getCreator());
|
|
|
|
|
+ customer.setChainsCode(deliverNumber);
|
|
|
|
|
+ customer.setOrgAttestationTime(new Date());
|
|
|
|
|
+ customer.setCreateTime(new Date());
|
|
|
|
|
+ customersExtMapper.updateCustomersExt(customer);
|
|
|
|
|
+ }else {
|
|
|
|
|
+ cust.setChainsCode(deliverNumber);
|
|
|
|
|
+ customersExtMapper.insertCustomersExt(cust);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|