|
|
@ -10,14 +10,16 @@ import com.glxp.sale.admin.entity.basic.BasicThirdSysEntity;
|
|
|
|
import com.glxp.sale.admin.entity.basic.UdiInfoEntity;
|
|
|
|
import com.glxp.sale.admin.entity.basic.UdiInfoEntity;
|
|
|
|
import com.glxp.sale.admin.entity.basic.UdiRelevanceEntity;
|
|
|
|
import com.glxp.sale.admin.entity.basic.UdiRelevanceEntity;
|
|
|
|
import com.glxp.sale.admin.entity.info.CompanyProductRelevanceEntity;
|
|
|
|
import com.glxp.sale.admin.entity.info.CompanyProductRelevanceEntity;
|
|
|
|
import com.glxp.sale.admin.entity.purchase.SupCertEntity;
|
|
|
|
import com.glxp.sale.admin.entity.purchase.*;
|
|
|
|
import com.glxp.sale.admin.entity.purchase.SupProductEntity;
|
|
|
|
|
|
|
|
import com.glxp.sale.admin.entity.thrsys.ThrProductsEntity;
|
|
|
|
import com.glxp.sale.admin.entity.thrsys.ThrProductsEntity;
|
|
|
|
import com.glxp.sale.admin.exception.JsonException;
|
|
|
|
import com.glxp.sale.admin.exception.JsonException;
|
|
|
|
import com.glxp.sale.admin.req.info.DeleteCompanyFileRequest;
|
|
|
|
import com.glxp.sale.admin.req.info.DeleteCompanyFileRequest;
|
|
|
|
|
|
|
|
import com.glxp.sale.admin.req.purchase.FilterCertSetsRequest;
|
|
|
|
import com.glxp.sale.admin.req.purchase.FilterPoductRequest;
|
|
|
|
import com.glxp.sale.admin.req.purchase.FilterPoductRequest;
|
|
|
|
import com.glxp.sale.admin.req.purchase.FilterSupCertRequest;
|
|
|
|
import com.glxp.sale.admin.req.purchase.FilterSupCertRequest;
|
|
|
|
|
|
|
|
import com.glxp.sale.admin.req.purchase.SelectProductBindRequest;
|
|
|
|
import com.glxp.sale.admin.res.PageSimpleResponse;
|
|
|
|
import com.glxp.sale.admin.res.PageSimpleResponse;
|
|
|
|
|
|
|
|
import com.glxp.sale.admin.res.basic.UdiRelevanceResponse;
|
|
|
|
import com.glxp.sale.admin.res.purchase.SupProductResponse;
|
|
|
|
import com.glxp.sale.admin.res.purchase.SupProductResponse;
|
|
|
|
import com.glxp.sale.admin.service.auth.AuthAdminService;
|
|
|
|
import com.glxp.sale.admin.service.auth.AuthAdminService;
|
|
|
|
import com.glxp.sale.admin.service.basic.BasicThirdSysService;
|
|
|
|
import com.glxp.sale.admin.service.basic.BasicThirdSysService;
|
|
|
@ -25,6 +27,8 @@ import com.glxp.sale.admin.service.basic.UdiInfoService;
|
|
|
|
import com.glxp.sale.admin.service.basic.UdiRelevanceService;
|
|
|
|
import com.glxp.sale.admin.service.basic.UdiRelevanceService;
|
|
|
|
import com.glxp.sale.admin.service.info.CompanyProductRelevanceService;
|
|
|
|
import com.glxp.sale.admin.service.info.CompanyProductRelevanceService;
|
|
|
|
import com.glxp.sale.admin.service.purchase.SupCertService;
|
|
|
|
import com.glxp.sale.admin.service.purchase.SupCertService;
|
|
|
|
|
|
|
|
import com.glxp.sale.admin.service.purchase.SupCertSetService;
|
|
|
|
|
|
|
|
import com.glxp.sale.admin.service.purchase.SupManufacturerService;
|
|
|
|
import com.glxp.sale.admin.service.purchase.SupProductService;
|
|
|
|
import com.glxp.sale.admin.service.purchase.SupProductService;
|
|
|
|
import com.glxp.sale.admin.service.thrsys.ThrProductsService;
|
|
|
|
import com.glxp.sale.admin.service.thrsys.ThrProductsService;
|
|
|
|
import com.glxp.sale.admin.util.CustomUtil;
|
|
|
|
import com.glxp.sale.admin.util.CustomUtil;
|
|
|
@ -34,6 +38,7 @@ import com.glxp.sale.admin.util.UdiInfoUtil;
|
|
|
|
import com.glxp.sale.common.enums.ResultEnum;
|
|
|
|
import com.glxp.sale.common.enums.ResultEnum;
|
|
|
|
import com.glxp.sale.common.res.BaseResponse;
|
|
|
|
import com.glxp.sale.common.res.BaseResponse;
|
|
|
|
import com.glxp.sale.common.util.ResultVOUtils;
|
|
|
|
import com.glxp.sale.common.util.ResultVOUtils;
|
|
|
|
|
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
@ -45,6 +50,7 @@ import javax.annotation.Resource;
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
import java.util.Date;
|
|
|
|
import java.util.Date;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
import java.util.ListIterator;
|
|
|
|
|
|
|
|
|
|
|
|
@RestController
|
|
|
|
@RestController
|
|
|
|
public class SupProductController {
|
|
|
|
public class SupProductController {
|
|
|
@ -101,6 +107,46 @@ public class SupProductController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@AuthRuleAnnotation("")
|
|
|
|
|
|
|
|
@PostMapping("/sup/product/selectBind")
|
|
|
|
|
|
|
|
public BaseResponse selectBind(@RequestBody SelectProductBindRequest selectProductBindRequest) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UdiRelevanceResponse udiRelevanceResponse = udiRelevanceService.selectGroupById(selectProductBindRequest.getRelIdFk());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SupProductEntity supProductEntity = new SupProductEntity();
|
|
|
|
|
|
|
|
BeanUtils.copyProperties(udiRelevanceResponse, supProductEntity);
|
|
|
|
|
|
|
|
supProductEntity.setProductId(selectProductBindRequest.getProductId());
|
|
|
|
|
|
|
|
supProductEntity.setRecordCode(udiRelevanceResponse.getZczbhhzbapzbh());
|
|
|
|
|
|
|
|
supProductEntity.setRelIdFk(selectProductBindRequest.getRelIdFk());
|
|
|
|
|
|
|
|
supProductEntity.setRecordProductName(udiRelevanceResponse.getCpmctymc());
|
|
|
|
|
|
|
|
supProductEntity.setProductType(udiRelevanceResponse.getQxlb());
|
|
|
|
|
|
|
|
supProductEntity.setProductDirectoryCode(udiRelevanceResponse.getFlbm());
|
|
|
|
|
|
|
|
supProductEntity.setRecordPeopleName(udiRelevanceResponse.getYlqxzcrbarmc());
|
|
|
|
|
|
|
|
supProductEntity.setSpecification(udiRelevanceResponse.getGgxh());
|
|
|
|
|
|
|
|
supProductEntity.setCreate_date(new Date());
|
|
|
|
|
|
|
|
supProductEntity.setUpdate_date(new Date());
|
|
|
|
|
|
|
|
supProductEntity.setManufacturerIdFk(selectProductBindRequest.getManufacturerId());
|
|
|
|
|
|
|
|
supProductEntity.setCustomerId(selectProductBindRequest.getCustomerId());
|
|
|
|
|
|
|
|
supProductEntity.setHchzsb(udiRelevanceResponse.getCplb());
|
|
|
|
|
|
|
|
supProductEntity.setAuditStatus(selectProductBindRequest.getAuditStatus());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return ResultVOUtils.success(supProductEntity);
|
|
|
|
|
|
|
|
// boolean b = supProductService.insertRegistration(supProductEntity);
|
|
|
|
|
|
|
|
// if (b) {
|
|
|
|
|
|
|
|
// return ResultVOUtils.success(supProductEntity);
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
SupManufacturerService supManufacturerService;
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
SupCertSetService supCertSetService;
|
|
|
|
|
|
|
|
|
|
|
|
@AuthRuleAnnotation("")
|
|
|
|
@AuthRuleAnnotation("")
|
|
|
|
@PostMapping("/sup/product/modifyRegistration")
|
|
|
|
@PostMapping("/sup/product/modifyRegistration")
|
|
|
|
public BaseResponse modifyRegistration(@RequestBody SupProductEntity supProductEntity) {
|
|
|
|
public BaseResponse modifyRegistration(@RequestBody SupProductEntity supProductEntity) {
|
|
|
@ -108,8 +154,71 @@ public class SupProductController {
|
|
|
|
if (StrUtil.isEmpty(supProductEntity.getProductId()) || StrUtil.isEmpty(supProductEntity.getManufacturerIdFk()) || StrUtil.isEmpty(supProductEntity.getCustomerId())) {
|
|
|
|
if (StrUtil.isEmpty(supProductEntity.getProductId()) || StrUtil.isEmpty(supProductEntity.getManufacturerIdFk()) || StrUtil.isEmpty(supProductEntity.getCustomerId())) {
|
|
|
|
return ResultVOUtils.error(500, "参数错误!");
|
|
|
|
return ResultVOUtils.error(500, "参数错误!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//提交审核
|
|
|
|
|
|
|
|
if (supProductEntity.getAuditStatus() == ConstantStatus.AUDIT_UN) {
|
|
|
|
|
|
|
|
//判断是否上级供应商是否审核通过
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SupManufacturerEntity supManufacturerEntity = supManufacturerService.findManufacturer(supProductEntity.getManufacturerIdFk());
|
|
|
|
|
|
|
|
if (supManufacturerEntity.getAuditStatus() == ConstantStatus.AUDIT_UN
|
|
|
|
|
|
|
|
|| supManufacturerEntity.getAuditStatus() == ConstantStatus.AUDIT_DRAFT) {
|
|
|
|
|
|
|
|
return ResultVOUtils.error(500, "所属生产企业资质未通过审核,暂时无法提交!");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//验证证书是否齐全
|
|
|
|
|
|
|
|
FilterCertSetsRequest filterCertSetsRequest = new FilterCertSetsRequest();
|
|
|
|
|
|
|
|
filterCertSetsRequest.setType(ConstantStatus.CERT_PRODUCT);
|
|
|
|
|
|
|
|
List<SupCertSetEntity> supCertSetEntities = supCertSetService.filterCertSets(filterCertSetsRequest);
|
|
|
|
|
|
|
|
List<SupCertEntity> supCertEntityList = supCertService.findAll(supProductEntity.getCustomerId(), supProductEntity.getManufacturerIdFk(), supProductEntity.getProductId());
|
|
|
|
|
|
|
|
ListIterator<SupCertSetEntity> iterable = supCertSetEntities.listIterator();
|
|
|
|
|
|
|
|
while (iterable.hasNext()) {
|
|
|
|
|
|
|
|
SupCertSetEntity supCertSetEntity = iterable.next();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (supCertSetEntity.isNeed()
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
(!supCertSetEntity.isNeed() &&
|
|
|
|
|
|
|
|
supCertSetEntity.getImports() != null && supCertSetEntity.getImports() == 2
|
|
|
|
|
|
|
|
&& StrUtil.trimToEmpty(supProductEntity.getRecordCode()).contains("进")
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
(!supCertSetEntity.isNeed() &&
|
|
|
|
|
|
|
|
supCertSetEntity.getImports() != null && supCertSetEntity.getImports() == 3
|
|
|
|
|
|
|
|
&& !StrUtil.trimToEmpty(supProductEntity.getRecordCode()).contains("进")
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
(!supCertSetEntity.isNeed() &&
|
|
|
|
|
|
|
|
!StrUtil.trimToEmpty(supProductEntity.getProductType()).equals(supCertSetEntity.getCplx())
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
||
|
|
|
|
|
|
|
|
(!supCertSetEntity.isNeed() &&
|
|
|
|
|
|
|
|
!StrUtil.trimToEmpty(supProductEntity.getHchzsb()).equals(supCertSetEntity.getHchzsb())
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
) {
|
|
|
|
|
|
|
|
for (SupCertEntity supCertEntity : supCertEntityList) {
|
|
|
|
|
|
|
|
if (supCertEntity.getName().equals(supCertSetEntity.getName())) {
|
|
|
|
|
|
|
|
if (StrUtil.isNotEmpty(supCertEntity.getFilePath())) {
|
|
|
|
|
|
|
|
iterable.remove();
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
iterable.remove();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
String errMsg = "";
|
|
|
|
|
|
|
|
if (supCertSetEntities.size() > 0) {
|
|
|
|
|
|
|
|
for (SupCertSetEntity supCertSetEntity : supCertSetEntities) {
|
|
|
|
|
|
|
|
errMsg = errMsg + "," + supCertSetEntity.getName();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return ResultVOUtils.error(500, errMsg.substring(1) + "等证书未上传,无法提交审核!");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
supProductEntity.setUpdate_date(new Date());
|
|
|
|
supProductEntity.setUpdate_date(new Date());
|
|
|
|
SupProductEntity originEntity = supProductService.findRegistration(supProductEntity.getId());
|
|
|
|
SupProductResponse originEntity = supProductService.findByProductId(supProductEntity.getProductId());
|
|
|
|
supCertService.updateProductId(originEntity.getCustomerId(), supProductEntity.getCustomerId(), originEntity.getManufacturerIdFk(),
|
|
|
|
supCertService.updateProductId(originEntity.getCustomerId(), supProductEntity.getCustomerId(), originEntity.getManufacturerIdFk(),
|
|
|
|
supProductEntity.getManufacturerIdFk(), originEntity.getProductId(), supProductEntity.getProductId());
|
|
|
|
supProductEntity.getManufacturerIdFk(), originEntity.getProductId(), supProductEntity.getProductId());
|
|
|
|
boolean b = supProductService.modifyRegistration(supProductEntity);
|
|
|
|
boolean b = supProductService.modifyRegistration(supProductEntity);
|
|
|
@ -141,7 +250,14 @@ public class SupProductController {
|
|
|
|
filterSupCertRequest.setType(ConstantStatus.CERT_PRODUCT);
|
|
|
|
filterSupCertRequest.setType(ConstantStatus.CERT_PRODUCT);
|
|
|
|
List<SupCertEntity> supCertEntityList = supCertService.filterCompanyCert(filterSupCertRequest);
|
|
|
|
List<SupCertEntity> supCertEntityList = supCertService.filterCompanyCert(filterSupCertRequest);
|
|
|
|
if (CollUtil.isNotEmpty(supCertEntityList)) {
|
|
|
|
if (CollUtil.isNotEmpty(supCertEntityList)) {
|
|
|
|
return ResultVOUtils.error(500, "审核失败,剩余" + supCertEntityList.size() + "个证书还未审核或审核未通过!");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (SupCertEntity supCertEntity : supCertEntityList) {
|
|
|
|
|
|
|
|
supCertEntity.setAuditStatus(ConstantStatus.AUDIT_PASS);
|
|
|
|
|
|
|
|
supCertService.updateCompanyCert(supCertEntity);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// return ResultVOUtils.error(500, "审核失败,剩余" + supCertEntityList.size() + "个证书还未审核或审核未通过!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -149,73 +265,73 @@ public class SupProductController {
|
|
|
|
supProductEntity.setUpdate_date(new Date());
|
|
|
|
supProductEntity.setUpdate_date(new Date());
|
|
|
|
boolean b = supProductService.modifyRegistration(supProductEntity);
|
|
|
|
boolean b = supProductService.modifyRegistration(supProductEntity);
|
|
|
|
|
|
|
|
|
|
|
|
if (supProductEntity.getAuditStatus() == ConstantStatus.AUDIT_PASS) {
|
|
|
|
// if (supProductEntity.getAuditStatus() == ConstantStatus.AUDIT_PASS) {
|
|
|
|
SupProductResponse supProductResponse = supProductService.findJoinRegistration(supProductEntity.getId());
|
|
|
|
// SupProductResponse supProductResponse = supProductService.findJoinRegistration(supProductEntity.getId());
|
|
|
|
|
|
|
|
//
|
|
|
|
//步骤1:先添加到主系统第三方产品信息;
|
|
|
|
// //步骤1:先添加到主系统第三方产品信息;
|
|
|
|
BasicThirdSysEntity basicThirdSysEntity = basicThirdSysService.selectMainThrSys();
|
|
|
|
// BasicThirdSysEntity basicThirdSysEntity = basicThirdSysService.selectMainThrSys();
|
|
|
|
ThrProductsEntity thrProductsEntity = new ThrProductsEntity();
|
|
|
|
// ThrProductsEntity thrProductsEntity = new ThrProductsEntity();
|
|
|
|
thrProductsEntity.setCode(gennerOrderUtils.getRelId() + "");
|
|
|
|
// thrProductsEntity.setCode(gennerOrderUtils.getRelId() + "");
|
|
|
|
thrProductsEntity.setThirdSysFk(basicThirdSysEntity.getThirdId());
|
|
|
|
// thrProductsEntity.setThirdSysFk(basicThirdSysEntity.getThirdId());
|
|
|
|
thrProductsEntity.setName(supProductEntity.getRecordProductName());
|
|
|
|
// thrProductsEntity.setName(supProductEntity.getRecordProductName());
|
|
|
|
thrProductsEntity.setSpec(supProductEntity.getSpecification());
|
|
|
|
// thrProductsEntity.setSpec(supProductEntity.getSpecification());
|
|
|
|
thrProductsEntity.setStandard(supProductEntity.getSpecification());
|
|
|
|
// thrProductsEntity.setStandard(supProductEntity.getSpecification());
|
|
|
|
thrProductsEntity.setManufactory(supProductResponse.getManufacturerName());
|
|
|
|
// thrProductsEntity.setManufactory(supProductResponse.getManufacturerName());
|
|
|
|
thrProductsService.insertThrProducts(thrProductsEntity);
|
|
|
|
// thrProductsService.insertThrProducts(thrProductsEntity);
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
//
|
|
|
|
//步骤2:添加到关联表
|
|
|
|
// //步骤2:添加到关联表
|
|
|
|
String uuid = CustomUtil.getUUId();
|
|
|
|
// String uuid = CustomUtil.getUUId();
|
|
|
|
UdiRelevanceEntity udiRelevanceEntity = new UdiRelevanceEntity();
|
|
|
|
// UdiRelevanceEntity udiRelevanceEntity = new UdiRelevanceEntity();
|
|
|
|
udiRelevanceEntity.setThirdId(thrProductsEntity.getCode());
|
|
|
|
// udiRelevanceEntity.setThirdId(thrProductsEntity.getCode());
|
|
|
|
udiRelevanceEntity.setThirdName(thrProductsEntity.getName());
|
|
|
|
// udiRelevanceEntity.setThirdName(thrProductsEntity.getName());
|
|
|
|
udiRelevanceEntity.setMainId(thrProductsEntity.getCode());
|
|
|
|
// udiRelevanceEntity.setMainId(thrProductsEntity.getCode());
|
|
|
|
udiRelevanceEntity.setMainName(thrProductsEntity.getName());
|
|
|
|
// udiRelevanceEntity.setMainName(thrProductsEntity.getName());
|
|
|
|
udiRelevanceEntity.setMeasname(thrProductsEntity.getMeasname());
|
|
|
|
// udiRelevanceEntity.setMeasname(thrProductsEntity.getMeasname());
|
|
|
|
String time = DateUtil.getDateTime();
|
|
|
|
// String time = DateUtil.getDateTime();
|
|
|
|
udiRelevanceEntity.setUpdateTime(time);
|
|
|
|
// udiRelevanceEntity.setUpdateTime(time);
|
|
|
|
udiRelevanceEntity.setModifyTime(time);
|
|
|
|
// udiRelevanceEntity.setModifyTime(time);
|
|
|
|
udiRelevanceEntity.setUuid(uuid);
|
|
|
|
// udiRelevanceEntity.setUuid(uuid);
|
|
|
|
udiRelevanceEntity.setManufactory(supProductResponse.getManufacturerName());
|
|
|
|
// udiRelevanceEntity.setManufactory(supProductResponse.getManufacturerName());
|
|
|
|
udiRelevanceEntity.setSupName(supProductResponse.getSupName());
|
|
|
|
// udiRelevanceEntity.setSupName(supProductResponse.getSupName());
|
|
|
|
udiRelevanceEntity.setId(gennerOrderUtils.getRelId() + "");
|
|
|
|
// udiRelevanceEntity.setId(gennerOrderUtils.getRelId() + "");
|
|
|
|
udiRelevanceService.insertUdiRelevance(udiRelevanceEntity);
|
|
|
|
// udiRelevanceService.insertUdiRelevance(udiRelevanceEntity);
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
//
|
|
|
|
//步骤3:添加基础信息表
|
|
|
|
// //步骤3:添加基础信息表
|
|
|
|
UdiInfoEntity udiInfoEntity = new UdiInfoEntity();
|
|
|
|
// UdiInfoEntity udiInfoEntity = new UdiInfoEntity();
|
|
|
|
udiInfoEntity.setNameCode(thrProductsEntity.getCode());
|
|
|
|
// udiInfoEntity.setNameCode(thrProductsEntity.getCode());
|
|
|
|
udiInfoEntity.setCpmctymc(thrProductsEntity.getName());
|
|
|
|
// udiInfoEntity.setCpmctymc(thrProductsEntity.getName());
|
|
|
|
udiInfoEntity.setManufactory(thrProductsEntity.getManufactory());
|
|
|
|
// udiInfoEntity.setManufactory(thrProductsEntity.getManufactory());
|
|
|
|
udiInfoEntity.setYlqxzcrbarmc(supProductEntity.getRecordPeopleName());
|
|
|
|
// udiInfoEntity.setYlqxzcrbarmc(supProductEntity.getRecordPeopleName());
|
|
|
|
udiInfoEntity.setGgxh(thrProductsEntity.getSpec());
|
|
|
|
// udiInfoEntity.setGgxh(thrProductsEntity.getSpec());
|
|
|
|
udiInfoEntity.setZczbhhzbapzbh(supProductEntity.getRecordCode());
|
|
|
|
// udiInfoEntity.setZczbhhzbapzbh(supProductEntity.getRecordCode());
|
|
|
|
udiInfoEntity.setUuid(udiRelevanceEntity.getUuid());
|
|
|
|
// udiInfoEntity.setUuid(udiRelevanceEntity.getUuid());
|
|
|
|
udiInfoEntity.setProductType(ConstantStatus.PRODUCT_TYPE_THIRD);
|
|
|
|
// udiInfoEntity.setProductType(ConstantStatus.PRODUCT_TYPE_THIRD);
|
|
|
|
udiInfoEntity.setDiType(1);
|
|
|
|
// udiInfoEntity.setDiType(1);
|
|
|
|
udiInfoEntity.setScbssfbhph("是");
|
|
|
|
// udiInfoEntity.setScbssfbhph("是");
|
|
|
|
udiInfoEntity.setScbssfbhscrq("是");
|
|
|
|
// udiInfoEntity.setScbssfbhscrq("是");
|
|
|
|
udiInfoEntity.setScbssfbhsxrq("是");
|
|
|
|
// udiInfoEntity.setScbssfbhsxrq("是");
|
|
|
|
udiInfoEntity.setScbssfbhxlh("否");
|
|
|
|
// udiInfoEntity.setScbssfbhxlh("否");
|
|
|
|
udiInfoEntity = UdiInfoUtil.initUdiInfoEntity(udiInfoEntity);
|
|
|
|
// udiInfoEntity = UdiInfoUtil.initUdiInfoEntity(udiInfoEntity);
|
|
|
|
udiInfoService.insertUdiInfo(udiInfoEntity);
|
|
|
|
// udiInfoService.insertUdiInfo(udiInfoEntity);
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
//
|
|
|
|
//步骤4:添加供应商关联表
|
|
|
|
// //步骤4:添加供应商关联表
|
|
|
|
CompanyProductRelevanceEntity companyProductRelevanceEntity = new CompanyProductRelevanceEntity();
|
|
|
|
// CompanyProductRelevanceEntity companyProductRelevanceEntity = new CompanyProductRelevanceEntity();
|
|
|
|
companyProductRelevanceEntity.setCreate_time(new Date());
|
|
|
|
// companyProductRelevanceEntity.setCreate_time(new Date());
|
|
|
|
companyProductRelevanceEntity.setUpdate_time(new Date());
|
|
|
|
// companyProductRelevanceEntity.setUpdate_time(new Date());
|
|
|
|
companyProductRelevanceEntity.setAuditStatus("3");
|
|
|
|
// companyProductRelevanceEntity.setAuditStatus("3");
|
|
|
|
companyProductRelevanceEntity.setUnitFk(supProductResponse.getCustomerId());
|
|
|
|
// companyProductRelevanceEntity.setUnitFk(supProductResponse.getCustomerId());
|
|
|
|
companyProductRelevanceEntity.setUdiRlIdFk(udiRelevanceEntity.getId());
|
|
|
|
// companyProductRelevanceEntity.setUdiRlIdFk(udiRelevanceEntity.getId());
|
|
|
|
companyProductRelevanceEntity.setCustomerId(supProductResponse.getCustomerId());
|
|
|
|
// companyProductRelevanceEntity.setCustomerId(supProductResponse.getCustomerId());
|
|
|
|
companyProductRelevanceEntity.setProductId(supProductEntity.getProductId());
|
|
|
|
// companyProductRelevanceEntity.setProductId(supProductEntity.getProductId());
|
|
|
|
companyProductRelevanceEntity.setRegistrationId(supProductEntity.getProductId());
|
|
|
|
// companyProductRelevanceEntity.setRegistrationId(supProductEntity.getProductId());
|
|
|
|
companyProductRelevanceEntity.setEnterpriseId(supProductEntity.getManufacturerIdFk());
|
|
|
|
// companyProductRelevanceEntity.setEnterpriseId(supProductEntity.getManufacturerIdFk());
|
|
|
|
companyProductRelevanceService.insertCompanyProductRelevance(companyProductRelevanceEntity);
|
|
|
|
// companyProductRelevanceService.insertCompanyProductRelevance(companyProductRelevanceEntity);
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
//
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
if (b) {
|
|
|
|
if (b) {
|
|
|
|
return ResultVOUtils.success("审核通过!");
|
|
|
|
return ResultVOUtils.success("审核通过!");
|
|
|
|