|
@@ -8,10 +8,7 @@ import com.yh.saas.common.support.util.IdGenerator;
|
|
import com.yh.saas.plugin.base.service.ICommonBillOperateHisService;
|
|
import com.yh.saas.plugin.base.service.ICommonBillOperateHisService;
|
|
import com.yh.saas.plugin.yiliangyiyun.constant.NumberConstant;
|
|
import com.yh.saas.plugin.yiliangyiyun.constant.NumberConstant;
|
|
import com.yh.saas.plugin.yiliangyiyun.constant.StatusEnum;
|
|
import com.yh.saas.plugin.yiliangyiyun.constant.StatusEnum;
|
|
-import com.yh.saas.plugin.yiliangyiyun.entity.CommonCompanyIdentity;
|
|
|
|
-import com.yh.saas.plugin.yiliangyiyun.entity.DriverViewInfo;
|
|
|
|
-import com.yh.saas.plugin.yiliangyiyun.entity.IdentityAuthenticationInfo;
|
|
|
|
-import com.yh.saas.plugin.yiliangyiyun.entity.InOutWarehouseTask;
|
|
|
|
|
|
+import com.yh.saas.plugin.yiliangyiyun.entity.*;
|
|
import com.yh.saas.plugin.yiliangyiyun.exception.*;
|
|
import com.yh.saas.plugin.yiliangyiyun.exception.*;
|
|
import com.yh.saas.plugin.yiliangyiyun.mapper.CommonCompanyIdentityMapper;
|
|
import com.yh.saas.plugin.yiliangyiyun.mapper.CommonCompanyIdentityMapper;
|
|
import com.yh.saas.plugin.yiliangyiyun.mapper.CommonUserMapper;
|
|
import com.yh.saas.plugin.yiliangyiyun.mapper.CommonUserMapper;
|
|
@@ -44,6 +41,8 @@ public class IdentityAuthenticationInfoServiceImpl extends ServiceImpl<IdentityA
|
|
private ICommonBillOperateHisService billOperateHisService;
|
|
private ICommonBillOperateHisService billOperateHisService;
|
|
@Autowired
|
|
@Autowired
|
|
private ICommonCompanyIdentityService iCommonCompanyIdentityService;
|
|
private ICommonCompanyIdentityService iCommonCompanyIdentityService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private ICustomerInfoService customerInfoService;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 粮商认证列表
|
|
* 粮商认证列表
|
|
@@ -83,6 +82,15 @@ public class IdentityAuthenticationInfoServiceImpl extends ServiceImpl<IdentityA
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
public String modifyIdentityPhone(IdentityAuthenticationInfo identityAuthenticationInfo) {
|
|
public String modifyIdentityPhone(IdentityAuthenticationInfo identityAuthenticationInfo) {
|
|
IdentityAuthenticationInfo identityAuthenticationInfo2 = this.selectById(identityAuthenticationInfo.getId());
|
|
IdentityAuthenticationInfo identityAuthenticationInfo2 = this.selectById(identityAuthenticationInfo.getId());
|
|
|
|
+ //根据原来的手机号查到客户表
|
|
|
|
+ CustomerInfo customerInfo=customerInfoService.selectOne(new EntityWrapper<CustomerInfo>()
|
|
|
|
+ .eq("customer_phone", identityAuthenticationInfo2.getCustomerPhone())
|
|
|
|
+ .eq("delete_flag", "0"));
|
|
|
|
+ if(customerInfo!=null){
|
|
|
|
+ customerInfo.setCustomerPhone(identityAuthenticationInfo.getCustomerPhone());
|
|
|
|
+ //更新客户表
|
|
|
|
+ customerInfoService.updateById(customerInfo);
|
|
|
|
+ }
|
|
//已覆盖的粮商解除覆盖状态
|
|
//已覆盖的粮商解除覆盖状态
|
|
if ("1".equals(identityAuthenticationInfo2.getCover())) {
|
|
if ("1".equals(identityAuthenticationInfo2.getCover())) {
|
|
identityAuthenticationInfo2.setCover("0");
|
|
identityAuthenticationInfo2.setCover("0");
|
|
@@ -401,9 +409,10 @@ public class IdentityAuthenticationInfoServiceImpl extends ServiceImpl<IdentityA
|
|
@Override
|
|
@Override
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
public String saveCompanyIdentity(IdentityAuthenticationInfo identityAuthenticationInfo) {
|
|
public String saveCompanyIdentity(IdentityAuthenticationInfo identityAuthenticationInfo) {
|
|
|
|
+ IdentityAuthenticationInfo identityAuthenticationInfo1=this.selectById(identityAuthenticationInfo.getId());
|
|
CommonCompanyIdentity commonCompanyIdentity = new CommonCompanyIdentity();
|
|
CommonCompanyIdentity commonCompanyIdentity = new CommonCompanyIdentity();
|
|
- commonCompanyIdentity.setIdentityId(identityAuthenticationInfo.getId());
|
|
|
|
- commonCompanyIdentity.setComId(identityAuthenticationInfo.getCompId());
|
|
|
|
|
|
+ commonCompanyIdentity.setIdentityId(identityAuthenticationInfo1.getId());
|
|
|
|
+ commonCompanyIdentity.setComId(identityAuthenticationInfo1.getCompId());
|
|
|
|
|
|
Boolean one = iCommonCompanyIdentityService.insert(commonCompanyIdentity);
|
|
Boolean one = iCommonCompanyIdentityService.insert(commonCompanyIdentity);
|
|
//成功返回ok
|
|
//成功返回ok
|
|
@@ -419,8 +428,9 @@ public class IdentityAuthenticationInfoServiceImpl extends ServiceImpl<IdentityA
|
|
public void deleteCompanyIdentity(IdentityAuthenticationInfo identityAuthenticationInfo) {
|
|
public void deleteCompanyIdentity(IdentityAuthenticationInfo identityAuthenticationInfo) {
|
|
List<CommonCompanyIdentity> list = this.iCommonCompanyIdentityService.selectList(new EntityWrapper<CommonCompanyIdentity>()
|
|
List<CommonCompanyIdentity> list = this.iCommonCompanyIdentityService.selectList(new EntityWrapper<CommonCompanyIdentity>()
|
|
.eq("com_id", identityAuthenticationInfo.getCompId()).eq("identity_id", identityAuthenticationInfo.getId()));
|
|
.eq("com_id", identityAuthenticationInfo.getCompId()).eq("identity_id", identityAuthenticationInfo.getId()));
|
|
- for (CommonCompanyIdentity commonCompanyIdentity : list) {
|
|
|
|
- this.iCommonCompanyIdentityService.deleteById(commonCompanyIdentity);
|
|
|
|
|
|
+ if (!CollectionUtils.isEmpty(list)){
|
|
|
|
+ this.iCommonCompanyIdentityService.delete(new EntityWrapper<CommonCompanyIdentity>()
|
|
|
|
+ .eq("com_id", identityAuthenticationInfo.getCompId()).eq("identity_id", identityAuthenticationInfo.getId()));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|