|
@@ -65,6 +65,9 @@ public class SysUserOrderAuthorServiceImpl implements ISysUserOrderAuthorService
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private SysBatchSignForMapper sysBatchSignForMapper;
|
|
private SysBatchSignForMapper sysBatchSignForMapper;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private SysDictDataMapper sysDictDataMapper;
|
|
|
|
|
+
|
|
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private CustomerMapper customersMapper;
|
|
private CustomerMapper customersMapper;
|
|
@@ -873,7 +876,19 @@ public class SysUserOrderAuthorServiceImpl implements ISysUserOrderAuthorService
|
|
|
*/
|
|
*/
|
|
|
@Override
|
|
@Override
|
|
|
public void customersStart() {
|
|
public void customersStart() {
|
|
|
- List<DataMasterCustomerVO> customerVOS = customersMapper.selectCustomerCodeByNotStart();
|
|
|
|
|
|
|
+ List<DataMasterCustomerVO> customerVOSOld = customersMapper.selectCustomerCodeByNotStart();
|
|
|
|
|
+ //AND (CustomerTypeCode5 = 'SSB'
|
|
|
|
|
+ // or (CustomerTypeCode1='D01' and IsBMDCustomer='否')
|
|
|
|
|
+ // or (CustomerTypeCode1='D06'))
|
|
|
|
|
+ List<DataMasterCustomerVO> customerVOS = new ArrayList<>();
|
|
|
|
|
+ List<SysDictData> sysDictData = sysDictDataMapper.selectDictDataByType("sys_system_bmd_name");
|
|
|
|
|
+ log.info("获取非bmd的机构数量:{}", sysDictData.size());
|
|
|
|
|
+ List<String> subOfficeName = sysDictData.stream().map(SysDictData::getDictLabel).collect(Collectors.toList());
|
|
|
|
|
+ for (DataMasterCustomerVO customerVO : customerVOSOld){
|
|
|
|
|
+ if (subOfficeName.contains(customerVO.getSalesGroupName()) || "SSB".equals(customerVO.getCustomerTypeCode5()) || ("D01".equals(customerVO.getCustomerTypeCode1()) && "否".equals(customerVO.getIsBMDCustomer())) || "D01".equals(customerVO.getCustomerTypeCode1())){
|
|
|
|
|
+ customerVOS.add(customerVO);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
if(customerVOS !=null && customerVOS.size()>0){
|
|
if(customerVOS !=null && customerVOS.size()>0){
|
|
|
log.info("开始执行经销商自动上线");
|
|
log.info("开始执行经销商自动上线");
|
|
|
log.info("待上线经销商:{}", JSON.toJSON(customerVOS));
|
|
log.info("待上线经销商:{}", JSON.toJSON(customerVOS));
|
|
@@ -899,6 +914,11 @@ public class SysUserOrderAuthorServiceImpl implements ISysUserOrderAuthorService
|
|
|
return deliverQuantityConfirmMapper.insertCus( customer);
|
|
return deliverQuantityConfirmMapper.insertCus( customer);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public int selectCus(String customer) {
|
|
|
|
|
+ return deliverQuantityConfirmMapper.selectCus( customer);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
public Set<String> getConfigValueSet(String dictType){
|
|
public Set<String> getConfigValueSet(String dictType){
|
|
|
Set<String> res = new HashSet<>();
|
|
Set<String> res = new HashSet<>();
|
|
|
List<SysDictData> dictDatas = sysDictDataService.selectSimpleDictDataByType(dictType);
|
|
List<SysDictData> dictDatas = sysDictDataService.selectSimpleDictDataByType(dictType);
|