修改bug不良信息功能

20240109-yw
yuanwei 1 year ago
parent 6957a05f03
commit d9f85b07b0

@ -22,6 +22,7 @@ import com.glxp.api.dto.DictDto;
import com.glxp.api.entity.auth.AuthAdmin;
import com.glxp.api.entity.basic.BasicCorpEntity;
import com.glxp.api.entity.basic.BasicManuYlqxzczhEntity;
import com.glxp.api.entity.basic.BasicUdiProductEntity;
import com.glxp.api.entity.purchase.*;
import com.glxp.api.entity.sup.UserCertEntity;
import com.glxp.api.entity.sup.UserCertSetEntity;
@ -31,15 +32,19 @@ import com.glxp.api.entity.system.SystemPDFTemplateEntity;
import com.glxp.api.exception.JsonException;
import com.glxp.api.req.auth.FilterUserComapanyRequest;
import com.glxp.api.req.basic.BasicManuYlqxzczhRequest;
import com.glxp.api.req.basic.FilterUdiRelRequest;
import com.glxp.api.req.inout.InspectionPDFTemplateRequest;
import com.glxp.api.req.purchase.*;
import com.glxp.api.req.system.DeleteCompanyFileRequest;
import com.glxp.api.req.system.DeleteRequest;
import com.glxp.api.res.PageSimpleResponse;
import com.glxp.api.res.auth.registComPerResponse;
import com.glxp.api.res.basic.BasicUdiRelResponse;
import com.glxp.api.res.purchase.SupProductResponse;
import com.glxp.api.service.auth.AuthAdminService;
import com.glxp.api.service.basic.BasicCorpService;
import com.glxp.api.service.basic.BasicUdiProductService;
import com.glxp.api.service.basic.BasicUdiRelService;
import com.glxp.api.service.purchase.*;
import com.glxp.api.service.sup.UserCertService;
import com.glxp.api.service.sup.UserCertSetService;
@ -88,6 +93,13 @@ public class SupCertController extends BaseController {
@Resource
private SupProductAuthService supProductAuthService;
@Resource
private SupProductService supProductService;
@Resource
private BasicUdiRelService basicUdiRelService;
@Value("${file_path}")
private String filePath;
@ -174,17 +186,45 @@ public class SupCertController extends BaseController {
public BaseResponse filterMyAuth(SupCertEntityRequest request) {
PageSimpleResponse<SupCertEntity> basicUdiRelResponsePageSimpleResponse = new PageSimpleResponse<>();
//判断是否有资质授权
QueryWrapper authWrapper = new QueryWrapper();
authWrapper.eq("productId",request.getProductIdFk());
authWrapper.eq("authCompanyId",getCompanyId());
List<SupProductAuthEntity> authList = supProductAuthService.list(authWrapper);
if(CollectionUtil.isEmpty(authList)){
String productId = "";
if(StringUtils.isNotEmpty(request.getProductIdFk())){
productId = request.getProductIdFk();
QueryWrapper authWrapper = new QueryWrapper();
authWrapper.eq("productId",productId);
authWrapper.eq("authCompanyId",getCompanyId());
List<SupProductAuthEntity> authList = supProductAuthService.list(authWrapper);
if(CollectionUtil.isEmpty(authList)){
return ResultVOUtils.success(basicUdiRelResponsePageSimpleResponse);
}
}else if(StringUtils.isNotEmpty(request.getDetailProductIdFk())){
FilterUdiRelRequest filterUdiRelRequest = new FilterUdiRelRequest();
filterUdiRelRequest.setId(Long.parseLong(request.getDetailProductIdFk()));
List<BasicUdiRelResponse> relList = basicUdiRelService.filtersList(filterUdiRelRequest);
if(CollectionUtil.isEmpty(relList)){
return ResultVOUtils.success(basicUdiRelResponsePageSimpleResponse);
}
BasicUdiRelResponse basicUdiProduct = relList.get(0);
QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.eq(StringUtils.isNotEmpty(basicUdiProduct.getCpmctymc()),"recordProductName",basicUdiProduct.getCpmctymc());
queryWrapper.eq(StringUtils.isNotEmpty(basicUdiProduct.getZczbhhzbapzbh()),"recordCode",basicUdiProduct.getZczbhhzbapzbh());
queryWrapper.eq(StringUtils.isNotEmpty(basicUdiProduct.getYlqxzcrbarmc()),"recordPeopleName",basicUdiProduct.getYlqxzcrbarmc());
queryWrapper.eq(StringUtils.isNotEmpty(basicUdiProduct.getManufactory()),"manufactory",basicUdiProduct.getManufactory());
queryWrapper.eq("customerId",getCompanyId());
List<SupProductEntity> proList = supProductService.list(queryWrapper);
if(CollectionUtil.isEmpty(proList)){
return ResultVOUtils.success(basicUdiRelResponsePageSimpleResponse);
}
productId = proList.get(0).getId()+"";
}
if(StringUtils.isEmpty(productId)){
return ResultVOUtils.success(basicUdiRelResponsePageSimpleResponse);
}
QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.eq("productIdFk",request.getProductIdFk());
queryWrapper.eq("productIdFk",productId);
queryWrapper.isNull("relationCertId");
int offset = (request.getPage() - 1) * request.getLimit();
Page<SupCertEntity> pages = PageHelper.offsetPage(offset, request.getLimit());
@ -476,8 +516,7 @@ public class SupCertController extends BaseController {
SupCompanyService supCompanyService;
@Resource
SupManufacturerService supManufacturerService;
@Resource
SupProductService supProductService;
// @AuthRuleAnnotation("")
// @PostMapping("/sup/info/updateCompanyCert")

@ -16,6 +16,10 @@ public class SupCertEntityRequest extends ListPageRequest {
@ApiModelProperty(value = "产品ID")
private String productIdFk;
@ApiModelProperty(value = "详细产品ID")
private String detailProductIdFk;
/**
*
*/

Loading…
Cancel
Save