|
@@ -53,6 +53,7 @@ import org.dromara.customer.domain.bo.SupplierInfoBo;
|
|
|
import org.dromara.customer.domain.vo.SupplierInfoVo;
|
|
import org.dromara.customer.domain.vo.SupplierInfoVo;
|
|
|
import org.dromara.customer.domain.SupplierInfo;
|
|
import org.dromara.customer.domain.SupplierInfo;
|
|
|
import org.dromara.customer.mapper.SupplierInfoMapper;
|
|
import org.dromara.customer.mapper.SupplierInfoMapper;
|
|
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
|
|
import java.util.*;
|
|
import java.util.*;
|
|
@@ -352,15 +353,23 @@ public class SupplierInfoServiceImpl extends ServiceImpl<SupplierInfoMapper, Su
|
|
|
return baseMapper.updateById(update) > 0;
|
|
return baseMapper.updateById(update) > 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- @Override
|
|
|
|
|
|
|
+ /*@Override
|
|
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
public boolean srmUpdateByBo(SupplierInfoBo bo) throws JsonProcessingException {
|
|
public boolean srmUpdateByBo(SupplierInfoBo bo) throws JsonProcessingException {
|
|
|
Long id = bo.getId();
|
|
Long id = bo.getId();
|
|
|
SupplierInfo supplierInfo = baseMapper.selectById(id);
|
|
SupplierInfo supplierInfo = baseMapper.selectById(id);
|
|
|
//如果是待审核和审核不通过 随便改
|
|
//如果是待审核和审核不通过 随便改
|
|
|
- if (bo.getSupplyStatus() == SupplierStatusEnum.PENDING_REVIEW.getCode() || bo.getSupplyStatus() == SupplierStatusEnum.REVIEW_FAILED.getCode()){
|
|
|
|
|
|
|
+ if (supplierInfo.getSupplyStatus() == SupplierStatusEnum.PENDING_REVIEW.getCode()){
|
|
|
SupplierInfo update = MapstructUtils.convert(bo, SupplierInfo.class);
|
|
SupplierInfo update = MapstructUtils.convert(bo, SupplierInfo.class);
|
|
|
return baseMapper.updateById(update) > 0;
|
|
return baseMapper.updateById(update) > 0;
|
|
|
}
|
|
}
|
|
|
|
|
+ //如果是待审核和审核不通过 随便改
|
|
|
|
|
+ if (supplierInfo.getSupplyStatus() == SupplierStatusEnum.REVIEW_FAILED.getCode()){
|
|
|
|
|
+ SupplierInfo update = MapstructUtils.convert(bo, SupplierInfo.class);
|
|
|
|
|
+ update.setSupplyStatus(SupplierStatusEnum.PENDING_REVIEW.getCode());
|
|
|
|
|
+ return baseMapper.updateById(update) > 0;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
//如果是启用状态,就变成待修改审核状态
|
|
//如果是启用状态,就变成待修改审核状态
|
|
|
if (supplierInfo.getSupplyStatus() == SupplierStatusEnum.OFFICIAL_SUPPLIER.getCode()){
|
|
if (supplierInfo.getSupplyStatus() == SupplierStatusEnum.OFFICIAL_SUPPLIER.getCode()){
|
|
|
SupplierInfoTemporary supplierInfoTemporary = supplierInfoTemporaryService.querBySupplierId(id);
|
|
SupplierInfoTemporary supplierInfoTemporary = supplierInfoTemporaryService.querBySupplierId(id);
|
|
@@ -379,32 +388,84 @@ public class SupplierInfoServiceImpl extends ServiceImpl<SupplierInfoMapper, Su
|
|
|
supplierInfoTemporary.setSupplyStatus(SupplierStatusEnum.REVIEW_UPDATED.getCode());
|
|
supplierInfoTemporary.setSupplyStatus(SupplierStatusEnum.REVIEW_UPDATED.getCode());
|
|
|
boolean save = supplierInfoTemporaryService.save(supplierInfoTemporary);
|
|
boolean save = supplierInfoTemporaryService.save(supplierInfoTemporary);
|
|
|
if (save == false){
|
|
if (save == false){
|
|
|
- throw new RuntimeException("保存供应商待审核数据失败");
|
|
|
|
|
|
|
+ throw new ServiceException("保存供应商待审核数据失败");
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
//一共三个地方
|
|
//一共三个地方
|
|
|
boolean flag =false;
|
|
boolean flag =false;
|
|
|
//1.简称
|
|
//1.简称
|
|
|
if (bo.getShortName() != null && StringUtils.isNotBlank(bo.getShortName())){
|
|
if (bo.getShortName() != null && StringUtils.isNotBlank(bo.getShortName())){
|
|
|
supplierInfoTemporary.setShortName(bo.getShortName());
|
|
supplierInfoTemporary.setShortName(bo.getShortName());
|
|
|
- flag = supplierInfoTemporaryService.updateById(supplierInfoTemporary);
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+ //工商地址
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(bo.getBusinessName())){
|
|
|
|
|
+ supplierInfoTemporary.setBusinessName(bo.getBusinessName());
|
|
|
|
|
+ }
|
|
|
|
|
+ //企业规模
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(bo.getMembershipSize())){
|
|
|
|
|
+ supplierInfoTemporary.setMembershipSize(bo.getMembershipSize());
|
|
|
|
|
+ }
|
|
|
|
|
+ //固定电话
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(bo.getFixedPhone())){
|
|
|
|
|
+ supplierInfoTemporary.setFixedPhone(bo.getFixedPhone());
|
|
|
|
|
+ }
|
|
|
|
|
+ //传真
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(bo.getFax())){
|
|
|
|
|
+ supplierInfoTemporary.setFax(bo.getFax());
|
|
|
|
|
+ }
|
|
|
|
|
+ //企业邮箱
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(bo.getMailbox())){
|
|
|
|
|
+ supplierInfoTemporary.setMailbox(bo.getMailbox());
|
|
|
|
|
+ }
|
|
|
|
|
+ //邮政编码
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(bo.getPostCode())){
|
|
|
|
|
+ supplierInfoTemporary.setPostCode(bo.getPostCode());
|
|
|
|
|
+ }
|
|
|
|
|
+ //网址
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(bo.getUrl())){
|
|
|
|
|
+ supplierInfoTemporary.setUrl(bo.getUrl());
|
|
|
|
|
+ }
|
|
|
|
|
+ //详细地址
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(bo.getOfficeProvince())){
|
|
|
|
|
+ supplierInfoTemporary.setOfficeProvince(bo.getOfficeProvince());
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(bo.getOfficeCity())){
|
|
|
|
|
+ supplierInfoTemporary.setOfficeCity(bo.getOfficeCity());
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(bo.getOfficeCounty())){
|
|
|
|
|
+ supplierInfoTemporary.setOfficeCounty(bo.getOfficeCounty());
|
|
|
|
|
+ }
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(bo.getOfficeAddress())){
|
|
|
|
|
+ supplierInfoTemporary.setOfficeAddress(bo.getOfficeAddress());
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //营业执照
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(bo.getBusinessLicense())){
|
|
|
|
|
+ supplierInfoTemporary.setBusinessLicense(bo.getBusinessLicense());
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //法人身份证
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(bo.getPersonImage())){
|
|
|
|
|
+ supplierInfoTemporary.setPersonImage(bo.getPersonImage());
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
//2.供货品牌
|
|
//2.供货品牌
|
|
|
if (bo.getOperatingBrand() != null && StringUtils.isNotBlank(bo.getOperatingBrand())){
|
|
if (bo.getOperatingBrand() != null && StringUtils.isNotBlank(bo.getOperatingBrand())){
|
|
|
supplierInfoTemporary.setOperatingBrand(bo.getOperatingBrand());
|
|
supplierInfoTemporary.setOperatingBrand(bo.getOperatingBrand());
|
|
|
- flag = supplierInfoTemporaryService.updateById(supplierInfoTemporary);
|
|
|
|
|
}
|
|
}
|
|
|
//3.供货类目
|
|
//3.供货类目
|
|
|
if (bo.getOperatingCategory() != null && StringUtils.isNotBlank(bo.getOperatingCategory())){
|
|
if (bo.getOperatingCategory() != null && StringUtils.isNotBlank(bo.getOperatingCategory())){
|
|
|
supplierInfoTemporary.setOperatingCategory(bo.getOperatingCategory());
|
|
supplierInfoTemporary.setOperatingCategory(bo.getOperatingCategory());
|
|
|
- flag = supplierInfoTemporaryService.updateById(supplierInfoTemporary);
|
|
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+ flag = supplierInfoTemporaryService.updateById(supplierInfoTemporary);
|
|
|
supplierInfo.setSupplyStatus(SupplierStatusEnum.REVIEW_UPDATED.getCode());
|
|
supplierInfo.setSupplyStatus(SupplierStatusEnum.REVIEW_UPDATED.getCode());
|
|
|
boolean update =baseMapper.updateById(supplierInfo) > 0;
|
|
boolean update =baseMapper.updateById(supplierInfo) > 0;
|
|
|
return update && flag;
|
|
return update && flag;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
//如果是待审核状态,依旧是待修改审核状态
|
|
//如果是待审核状态,依旧是待修改审核状态
|
|
|
if (supplierInfo.getSupplyStatus() == SupplierStatusEnum.REVIEW_UPDATED.getCode()){
|
|
if (supplierInfo.getSupplyStatus() == SupplierStatusEnum.REVIEW_UPDATED.getCode()){
|
|
|
SupplierInfoTemporary supplierInfoTemporary = supplierInfoTemporaryService.querBySupplierId(id);
|
|
SupplierInfoTemporary supplierInfoTemporary = supplierInfoTemporaryService.querBySupplierId(id);
|
|
@@ -413,25 +474,218 @@ public class SupplierInfoServiceImpl extends ServiceImpl<SupplierInfoMapper, Su
|
|
|
//1.简称
|
|
//1.简称
|
|
|
if (bo.getShortName() != null && StringUtils.isNotBlank(bo.getShortName())){
|
|
if (bo.getShortName() != null && StringUtils.isNotBlank(bo.getShortName())){
|
|
|
supplierInfoTemporary.setShortName(bo.getShortName());
|
|
supplierInfoTemporary.setShortName(bo.getShortName());
|
|
|
- flag = supplierInfoTemporaryService.updateById(supplierInfoTemporary);
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //工商地址
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(bo.getBusinessName())){
|
|
|
|
|
+ supplierInfoTemporary.setBusinessName(bo.getBusinessName());
|
|
|
|
|
+ }
|
|
|
|
|
+ //企业规模
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(bo.getMembershipSize())){
|
|
|
|
|
+ supplierInfoTemporary.setMembershipSize(bo.getMembershipSize());
|
|
|
|
|
+ }
|
|
|
|
|
+ //固定电话
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(bo.getFixedPhone())){
|
|
|
|
|
+ supplierInfoTemporary.setFixedPhone(bo.getFixedPhone());
|
|
|
|
|
+ }
|
|
|
|
|
+ //传真
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(bo.getFax())){
|
|
|
|
|
+ supplierInfoTemporary.setFax(bo.getFax());
|
|
|
|
|
+ }
|
|
|
|
|
+ //企业邮箱
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(bo.getMailbox())){
|
|
|
|
|
+ supplierInfoTemporary.setMailbox(bo.getMailbox());
|
|
|
|
|
+ }
|
|
|
|
|
+ //邮政编码
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(bo.getPostCode())){
|
|
|
|
|
+ supplierInfoTemporary.setPostCode(bo.getPostCode());
|
|
|
|
|
+ }
|
|
|
|
|
+ //网址
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(bo.getUrl())){
|
|
|
|
|
+ supplierInfoTemporary.setUrl(bo.getUrl());
|
|
|
|
|
+ }
|
|
|
|
|
+ //详细地址
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(bo.getOfficeProvince())){
|
|
|
|
|
+ supplierInfoTemporary.setOfficeProvince(bo.getOfficeProvince());
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(bo.getOfficeCity())){
|
|
|
|
|
+ supplierInfoTemporary.setOfficeCity(bo.getOfficeCity());
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(bo.getOfficeCounty())){
|
|
|
|
|
+ supplierInfoTemporary.setOfficeCounty(bo.getOfficeCounty());
|
|
|
|
|
+ }
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(bo.getOfficeAddress())){
|
|
|
|
|
+ supplierInfoTemporary.setOfficeAddress(bo.getOfficeAddress());
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //营业执照
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(bo.getBusinessLicense())){
|
|
|
|
|
+ supplierInfoTemporary.setBusinessLicense(bo.getBusinessLicense());
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //法人身份证
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(bo.getPersonImage())){
|
|
|
|
|
+ supplierInfoTemporary.setPersonImage(bo.getPersonImage());
|
|
|
}
|
|
}
|
|
|
//2.供货品牌
|
|
//2.供货品牌
|
|
|
if (bo.getOperatingBrand() != null && StringUtils.isNotBlank(bo.getOperatingBrand())){
|
|
if (bo.getOperatingBrand() != null && StringUtils.isNotBlank(bo.getOperatingBrand())){
|
|
|
supplierInfoTemporary.setOperatingBrand(bo.getOperatingBrand());
|
|
supplierInfoTemporary.setOperatingBrand(bo.getOperatingBrand());
|
|
|
- flag = supplierInfoTemporaryService.updateById(supplierInfoTemporary);
|
|
|
|
|
}
|
|
}
|
|
|
//3.供货类目
|
|
//3.供货类目
|
|
|
if (bo.getOperatingCategory() != null && StringUtils.isNotBlank(bo.getOperatingCategory())){
|
|
if (bo.getOperatingCategory() != null && StringUtils.isNotBlank(bo.getOperatingCategory())){
|
|
|
supplierInfoTemporary.setOperatingCategory(bo.getOperatingCategory());
|
|
supplierInfoTemporary.setOperatingCategory(bo.getOperatingCategory());
|
|
|
- flag = supplierInfoTemporaryService.updateById(supplierInfoTemporary);
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+ flag = supplierInfoTemporaryService.updateById(supplierInfoTemporary);
|
|
|
return flag;
|
|
return flag;
|
|
|
}
|
|
}
|
|
|
// 停用呢 不能修改了
|
|
// 停用呢 不能修改了
|
|
|
if (supplierInfo.getSupplyStatus() == SupplierStatusEnum.DISABLED.getCode()){
|
|
if (supplierInfo.getSupplyStatus() == SupplierStatusEnum.DISABLED.getCode()){
|
|
|
- throw new RuntimeException("供应商已停用,不能修改");
|
|
|
|
|
|
|
+ throw new ServiceException("供应商已停用,不能修改");
|
|
|
}
|
|
}
|
|
|
return false;
|
|
return false;
|
|
|
|
|
+ }*/
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
|
|
+ public boolean srmUpdateByBo(SupplierInfoBo bo) throws JsonProcessingException {
|
|
|
|
|
+
|
|
|
|
|
+ SupplierInfo supplier = baseMapper.selectById(bo.getId());
|
|
|
|
|
+ SupplierStatusEnum status = SupplierStatusEnum.getByCode(supplier.getSupplyStatus());
|
|
|
|
|
+
|
|
|
|
|
+ switch (status) {
|
|
|
|
|
+
|
|
|
|
|
+ // 待审核
|
|
|
|
|
+ case PENDING_REVIEW:
|
|
|
|
|
+ return updateSupplier(bo);
|
|
|
|
|
+
|
|
|
|
|
+ // 审核失败 -> 重新待审核
|
|
|
|
|
+ case REVIEW_FAILED:
|
|
|
|
|
+ SupplierInfo update = MapstructUtils.convert(bo, SupplierInfo.class);
|
|
|
|
|
+ update.setSupplyStatus(SupplierStatusEnum.PENDING_REVIEW.getCode());
|
|
|
|
|
+ return baseMapper.updateById(update) > 0;
|
|
|
|
|
+
|
|
|
|
|
+ // 正式供应商 -> 进入修改审核
|
|
|
|
|
+ case OFFICIAL_SUPPLIER:
|
|
|
|
|
+ return handleOfficialSupplierUpdate(bo, supplier);
|
|
|
|
|
+
|
|
|
|
|
+ // 修改审核中
|
|
|
|
|
+ case REVIEW_UPDATED:
|
|
|
|
|
+ SupplierInfoTemporary temp = supplierInfoTemporaryService.querBySupplierId(bo.getId());
|
|
|
|
|
+ updateTemporaryFields(temp, bo);
|
|
|
|
|
+ return supplierInfoTemporaryService.updateById(temp);
|
|
|
|
|
+
|
|
|
|
|
+ // 停用
|
|
|
|
|
+ case DISABLED:
|
|
|
|
|
+ throw new ServiceException("供应商已停用,不能修改");
|
|
|
|
|
+
|
|
|
|
|
+ default:
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ private boolean updateSupplier(SupplierInfoBo bo) {
|
|
|
|
|
+ SupplierInfo update = MapstructUtils.convert(bo, SupplierInfo.class);
|
|
|
|
|
+ return baseMapper.updateById(update) > 0;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ private boolean handleOfficialSupplierUpdate(SupplierInfoBo bo, SupplierInfo supplier) throws JsonProcessingException {
|
|
|
|
|
+
|
|
|
|
|
+ Long supplierId = supplier.getId();
|
|
|
|
|
+ SupplierInfoTemporary temp = supplierInfoTemporaryService.querBySupplierId(supplierId);
|
|
|
|
|
+
|
|
|
|
|
+ // 如果临时表不存在则创建
|
|
|
|
|
+ if (temp == null) {
|
|
|
|
|
+ temp = buildTemporarySupplier(supplier, bo);
|
|
|
|
|
+ supplierInfoTemporaryService.save(temp);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 更新字段
|
|
|
|
|
+ updateTemporaryFields(temp, bo);
|
|
|
|
|
+
|
|
|
|
|
+ boolean tempUpdate = supplierInfoTemporaryService.updateById(temp);
|
|
|
|
|
+
|
|
|
|
|
+ // 修改主表状态
|
|
|
|
|
+ supplier.setSupplyStatus(SupplierStatusEnum.REVIEW_UPDATED.getCode());
|
|
|
|
|
+ boolean mainUpdate = baseMapper.updateById(supplier) > 0;
|
|
|
|
|
+
|
|
|
|
|
+ return tempUpdate && mainUpdate;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ private SupplierInfoTemporary buildTemporarySupplier(SupplierInfo supplier, SupplierInfoBo bo)
|
|
|
|
|
+ throws JsonProcessingException {
|
|
|
|
|
+
|
|
|
|
|
+ SupplierInfoTemporary temp = new SupplierInfoTemporary();
|
|
|
|
|
+
|
|
|
|
|
+ BeanUtils.copyProperties(supplier, temp, "id");
|
|
|
|
|
+
|
|
|
|
|
+ temp.setSupplierId(supplier.getId());
|
|
|
|
|
+ temp.setSupplyStatus(SupplierStatusEnum.REVIEW_UPDATED.getCode());
|
|
|
|
|
+
|
|
|
|
|
+ // 查询供应区域
|
|
|
|
|
+ SupplyAreaBo areaBo = new SupplyAreaBo();
|
|
|
|
|
+ areaBo.setSupplierId(bo.getId());
|
|
|
|
|
+
|
|
|
|
|
+ TableDataInfo<SupplyAreaVo> table =
|
|
|
|
|
+ supplyAreaService.queryPageList(areaBo, new PageQuery());
|
|
|
|
|
+
|
|
|
|
|
+ String areaListJson = objectMapper.writeValueAsString(table);
|
|
|
|
|
+ temp.setAreaListJson(areaListJson);
|
|
|
|
|
+
|
|
|
|
|
+ return temp;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ private void updateTemporaryFields(SupplierInfoTemporary temp, SupplierInfoBo bo) {
|
|
|
|
|
+
|
|
|
|
|
+ if (StringUtils.isNotBlank(bo.getShortName()))
|
|
|
|
|
+ temp.setShortName(bo.getShortName());
|
|
|
|
|
+
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(bo.getBusinessName()))
|
|
|
|
|
+ temp.setBusinessName(bo.getBusinessName());
|
|
|
|
|
+
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(bo.getMembershipSize()))
|
|
|
|
|
+ temp.setMembershipSize(bo.getMembershipSize());
|
|
|
|
|
+
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(bo.getFixedPhone()))
|
|
|
|
|
+ temp.setFixedPhone(bo.getFixedPhone());
|
|
|
|
|
+
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(bo.getFax()))
|
|
|
|
|
+ temp.setFax(bo.getFax());
|
|
|
|
|
+
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(bo.getMailbox()))
|
|
|
|
|
+ temp.setMailbox(bo.getMailbox());
|
|
|
|
|
+
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(bo.getPostCode()))
|
|
|
|
|
+ temp.setPostCode(bo.getPostCode());
|
|
|
|
|
+
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(bo.getUrl()))
|
|
|
|
|
+ temp.setUrl(bo.getUrl());
|
|
|
|
|
+
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(bo.getOfficeProvince()))
|
|
|
|
|
+ temp.setOfficeProvince(bo.getOfficeProvince());
|
|
|
|
|
+
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(bo.getOfficeCity()))
|
|
|
|
|
+ temp.setOfficeCity(bo.getOfficeCity());
|
|
|
|
|
+
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(bo.getOfficeCounty()))
|
|
|
|
|
+ temp.setOfficeCounty(bo.getOfficeCounty());
|
|
|
|
|
+
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(bo.getOfficeAddress()))
|
|
|
|
|
+ temp.setOfficeAddress(bo.getOfficeAddress());
|
|
|
|
|
+
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(bo.getBusinessLicense()))
|
|
|
|
|
+ temp.setBusinessLicense(bo.getBusinessLicense());
|
|
|
|
|
+
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(bo.getPersonImage()))
|
|
|
|
|
+ temp.setPersonImage(bo.getPersonImage());
|
|
|
|
|
+
|
|
|
|
|
+ if (StringUtils.isNotBlank(bo.getOperatingBrand()))
|
|
|
|
|
+ temp.setOperatingBrand(bo.getOperatingBrand());
|
|
|
|
|
+
|
|
|
|
|
+ if (StringUtils.isNotBlank(bo.getOperatingCategory()))
|
|
|
|
|
+ temp.setOperatingCategory(bo.getOperatingCategory());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -474,7 +728,6 @@ public class SupplierInfoServiceImpl extends ServiceImpl<SupplierInfoMapper, Su
|
|
|
// 将工商信息复制到供应商信息对象中
|
|
// 将工商信息复制到供应商信息对象中
|
|
|
copyBusinessInfoToSupplierInfoVo(supplierBusinessInfoVo, supplierInformationVo);
|
|
copyBusinessInfoToSupplierInfoVo(supplierBusinessInfoVo, supplierInformationVo);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
return supplierInformationVo;
|
|
return supplierInformationVo;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -874,7 +1127,6 @@ public class SupplierInfoServiceImpl extends ServiceImpl<SupplierInfoMapper, Su
|
|
|
@Override
|
|
@Override
|
|
|
public SupplierInfoVo querySrmById(Long id) {
|
|
public SupplierInfoVo querySrmById(Long id) {
|
|
|
SupplierInfoVo supplierInfoVo = baseMapper.selectVoById(id);
|
|
SupplierInfoVo supplierInfoVo = baseMapper.selectVoById(id);
|
|
|
-
|
|
|
|
|
SupplierInfoVo supplierInformationVo = handleProcurementInfo(supplierInfoVo);
|
|
SupplierInfoVo supplierInformationVo = handleProcurementInfo(supplierInfoVo);
|
|
|
//返回工商信息
|
|
//返回工商信息
|
|
|
SupplierBusinessInfoVo supplierBusinessInfoVo = supplierBusinessInfoMapper
|
|
SupplierBusinessInfoVo supplierBusinessInfoVo = supplierBusinessInfoMapper
|
|
@@ -1423,7 +1675,6 @@ public class SupplierInfoServiceImpl extends ServiceImpl<SupplierInfoMapper, Su
|
|
|
|
|
|
|
|
|
|
|
|
|
private SupplierInfoVo handleProcurementInfo(SupplierInfoVo records) {
|
|
private SupplierInfoVo handleProcurementInfo(SupplierInfoVo records) {
|
|
|
-
|
|
|
|
|
// 查询管理人员和采购人员
|
|
// 查询管理人员和采购人员
|
|
|
Long id = records.getId();
|
|
Long id = records.getId();
|
|
|
//查询供应地区
|
|
//查询供应地区
|