资质代码同步

master
郑明梁 2 years ago
parent e4e94c3118
commit b0543b862a

@ -510,5 +510,13 @@ public class BasicCorpController {
return ResultVOUtils.success(rMap); return ResultVOUtils.success(rMap);
} }
@AuthRuleAnnotation("")
@PostMapping("/udiwms/basic/unit/maintain/getCorpList")
public BaseResponse getCorpList() {
List<BasicCorpEntity> getCorpList=basicUnitMaintainService.getCorpList();
return ResultVOUtils.success(getCorpList);
}
} }

@ -695,4 +695,18 @@ public class UdiRelevanceController extends BaseController {
return ResultVOUtils.success(ggxhList); return ResultVOUtils.success(ggxhList);
} }
//资质证书选入产品列表 产品名称,生产企业过滤
@AuthRuleAnnotation("")
@GetMapping("/udi/cert/filterUdi")
public BaseResponse filterCertUdi(FilterUdiRelRequest filterUdiRelRequest) {
List<UdiRelevanceResponse> udiRelevanceResponses = udiRelevanceService.filterCertUdi(filterUdiRelRequest);
PageInfo<UdiRelevanceResponse> pageInfo;
pageInfo = new PageInfo<>(udiRelevanceResponses);
PageSimpleResponse<UdiRelevanceResponse> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal());
pageSimpleResponse.setList(udiRelevanceResponses);
return ResultVOUtils.success(pageSimpleResponse);
}
} }

@ -5,20 +5,20 @@ import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.glxp.api.annotation.AuthRuleAnnotation; import com.glxp.api.annotation.AuthRuleAnnotation;
import com.glxp.api.annotation.Log;
import com.glxp.api.common.enums.ResultEnum; import com.glxp.api.common.enums.ResultEnum;
import com.glxp.api.common.res.BaseResponse; import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils; import com.glxp.api.common.util.ResultVOUtils;
import com.glxp.api.constant.BusinessType;
import com.glxp.api.constant.ConstantStatus; import com.glxp.api.constant.ConstantStatus;
import com.glxp.api.entity.auth.AuthAdmin; import com.glxp.api.entity.auth.AuthAdmin;
import com.glxp.api.entity.purchase.*; import com.glxp.api.entity.purchase.*;
import com.glxp.api.entity.system.SystemPDFModuleEntity; import com.glxp.api.entity.system.SysPdfTemplateRelevanceStatemenEntity;
import com.glxp.api.entity.system.SystemPDFTemplateEntity; import com.glxp.api.entity.system.SystemPDFTemplateEntity;
import com.glxp.api.exception.JsonException; import com.glxp.api.exception.JsonException;
import com.glxp.api.req.inout.InspectionPDFTemplateRequest; import com.glxp.api.req.inout.InspectionPDFTemplateRequest;
import com.glxp.api.req.inout.SystemPDFModuleRequest;
import com.glxp.api.req.purchase.*; import com.glxp.api.req.purchase.*;
import com.glxp.api.req.system.DeleteCompanyFileRequest; import com.glxp.api.req.system.DeleteCompanyFileRequest;
import com.glxp.api.req.system.FilterPdfModuleRequest;
import com.glxp.api.res.PageSimpleResponse; import com.glxp.api.res.PageSimpleResponse;
import com.glxp.api.res.purchase.SupProductResponse; import com.glxp.api.res.purchase.SupProductResponse;
import com.glxp.api.service.auth.AuthAdminService; import com.glxp.api.service.auth.AuthAdminService;
@ -83,6 +83,7 @@ public class SupCertController {
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@PostMapping("/sup/info/selectAllCert") @PostMapping("/sup/info/selectAllCert")
@Log(title = "资质证书", businessType = BusinessType.INSERT)
public BaseResponse selectAllCert(@RequestBody PostSelCertRequest postSelCertRequest) { public BaseResponse selectAllCert(@RequestBody PostSelCertRequest postSelCertRequest) {
String customerId = null; String customerId = null;
if (StrUtil.isEmpty(postSelCertRequest.getCustomerId())) if (StrUtil.isEmpty(postSelCertRequest.getCustomerId()))
@ -96,6 +97,76 @@ public class SupCertController {
if (postSelCertRequest.getCertType() == null) { if (postSelCertRequest.getCertType() == null) {
return ResultVOUtils.error(500, "参数错误!"); return ResultVOUtils.error(500, "参数错误!");
} }
if (postSelCertRequest.getManufacturerIdFk() == null) {
String errMsg = "";
ArrayList<String> list = new ArrayList<>();
int i = postSelCertRequest.getSupCertSetEntities().size();
for (SupCertSetEntity supCertSetEntity : postSelCertRequest.getSupCertSetEntities()) {
i--;
FilterSupCertRequest supCertRequest = new FilterSupCertRequest();
supCertRequest.setName(supCertSetEntity.getName());
supCertRequest.setCustomerId(customerId);
List<SupCertEntity> supCertEntities = supCertService.selectCompanyCert(supCertRequest);
if (supCertEntities.size() != 0) {
list.add(supCertEntities.get(0).getName());
if (supCertEntities.size() != 0 && i == 0) {
for (String s : list) {
errMsg = errMsg + "," + s;
}
return ResultVOUtils.error(999, errMsg.substring(1) + "已存在!");
}
}
}
}else{
if(postSelCertRequest.getProductIdFk()==null) {
String errMsg = "";
ArrayList<String> list = new ArrayList<>();
int i = postSelCertRequest.getSupCertSetEntities().size();
for (SupCertSetEntity supCertSetEntity : postSelCertRequest.getSupCertSetEntities()) {
i--;
FilterSupCertRequest supCertRequest = new FilterSupCertRequest();
supCertRequest.setName(supCertSetEntity.getName());
supCertRequest.setCustomerId(customerId);
supCertRequest.setManufacturerIdFk(postSelCertRequest.getManufacturerIdFk());
supCertRequest.setType(2);
List<SupCertEntity> supCertEntities = supCertService.selectCompanyCert(supCertRequest);
if (supCertEntities.size() != 0) {
list.add(supCertEntities.get(0).getName());
if (supCertEntities.size() != 0 && i == 0) {
for (String s : list) {
errMsg = errMsg + "," + s;
}
return ResultVOUtils.error(999, errMsg.substring(1) + "已存在!");
}
}
}
}else{
String errMsg = "";
ArrayList<String> list = new ArrayList<>();
int i = postSelCertRequest.getSupCertSetEntities().size();
for (SupCertSetEntity supCertSetEntity : postSelCertRequest.getSupCertSetEntities()) {
i--;
FilterSupCertRequest supCertRequest = new FilterSupCertRequest();
supCertRequest.setName(supCertSetEntity.getName());
supCertRequest.setCustomerId(customerId);
supCertRequest.setManufacturerIdFk(postSelCertRequest.getManufacturerIdFk());
supCertRequest.setProductIdFk(postSelCertRequest.getProductIdFk());
supCertRequest.setType(3);
List<SupCertEntity> supCertEntities = supCertService.selectCompanyCert(supCertRequest);
if (supCertEntities.size() != 0) {
list.add(supCertEntities.get(0).getName());
if (supCertEntities.size() != 0 && i == 0) {
for (String s : list) {
errMsg = errMsg + "," + s;
}
return ResultVOUtils.error(999, errMsg.substring(1) + "已存在!");
}
}
}
}
}
for (SupCertSetEntity supCertSetEntity : postSelCertRequest.getSupCertSetEntities()) { for (SupCertSetEntity supCertSetEntity : postSelCertRequest.getSupCertSetEntities()) {
SupCertEntity supCertEntity = new SupCertEntity(); SupCertEntity supCertEntity = new SupCertEntity();
supCertEntity.setName(supCertSetEntity.getName()); supCertEntity.setName(supCertSetEntity.getName());
@ -127,9 +198,11 @@ public class SupCertController {
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@PostMapping("/sup/info/insertCompanyCert") @PostMapping("/sup/info/insertCompanyCert")
@Log(title = "资质证书", businessType = BusinessType.INSERT)
public BaseResponse insertCompanyCert(@RequestBody SupCertEntity supCertEntity) { public BaseResponse insertCompanyCert(@RequestBody SupCertEntity supCertEntity) {
supCertEntity.setCreateTime(new Date()); supCertEntity.setCreateTime(new Date());
supCertEntity.setUpdateTime(new Date()); supCertEntity.setUpdateTime(new Date());
supCertEntity.setStatus(0);
boolean b = supCertService.insertCompanyCert(supCertEntity); boolean b = supCertService.insertCompanyCert(supCertEntity);
return ResultVOUtils.success("成功"); return ResultVOUtils.success("成功");
} }
@ -137,6 +210,7 @@ public class SupCertController {
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@PostMapping("/sale/sup/cert/audit") @PostMapping("/sale/sup/cert/audit")
@Log(title = "资质证书", businessType = BusinessType.UPDATE)
public BaseResponse auditSupCert(@RequestBody SupCertEntity supCertEntity) { public BaseResponse auditSupCert(@RequestBody SupCertEntity supCertEntity) {
supCertEntity.setCreateTime(new Date()); supCertEntity.setCreateTime(new Date());
supCertEntity.setUpdateTime(new Date()); supCertEntity.setUpdateTime(new Date());
@ -144,6 +218,38 @@ public class SupCertController {
return ResultVOUtils.success("成功"); return ResultVOUtils.success("成功");
} }
//撤回单据
@AuthRuleAnnotation("")
@PostMapping("/sale/sup/cert/revoke")
@Log(title = "单据管理", businessType = BusinessType.UPDATE)
public BaseResponse revokeSupCert(@RequestBody SupCertEntity supCertEntity) {
supCertEntity.setCreateTime(new Date());
supCertEntity.setUpdateTime(new Date());
boolean b = supCertService.updateCompanyCert(supCertEntity);
if (supCertEntity.getType() == ConstantStatus.CERT_COMPANY) {
SupCompanyEntity supCompanyEntity = supCompanyService.findCompany(supCertEntity.getCustomerId());
supCompanyEntity.setAuditStatus(ConstantStatus.AUDIT_UN);
supCompanyEntity.setUpdateTime(new Date());
supCompanyService.modifyCompany(supCompanyEntity);
} else if (supCertEntity.getType() == ConstantStatus.CERT_MANUFACTURER) {
SupManufacturerEntity supManufacturerEntity = supManufacturerService.findManufacturer(supCertEntity.getManufacturerIdFk());
supManufacturerEntity.setAuditStatus(ConstantStatus.AUDIT_UN);
supManufacturerEntity.setUpdateTime(new Date());
supManufacturerService.modifyCompany(supManufacturerEntity);
} else if (supCertEntity.getType() == ConstantStatus.CERT_PRODUCT) {
SupProductResponse supProductResponse = supProductService.findByProductId(supCertEntity.getProductIdFk());
SupProductEntity supProductEntity = new SupProductEntity();
supProductEntity.setId(supProductResponse.getId());
supProductEntity.setUpdateTime(new Date());
supProductEntity.setAuditStatus(ConstantStatus.AUDIT_UN);
supProductService.modifyRegistration(supProductEntity);
}
return ResultVOUtils.success("成功");
}
@Resource @Resource
SupCompanyService supCompanyService; SupCompanyService supCompanyService;
@Resource @Resource
@ -153,9 +259,21 @@ public class SupCertController {
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@PostMapping("/sup/info/updateCompanyCert") @PostMapping("/sup/info/updateCompanyCert")
@Log(title = "资质证书", businessType = BusinessType.UPDATE)
public BaseResponse updateCompanyCert(@RequestBody PostSupCertRequest postSupCertRequest) { public BaseResponse updateCompanyCert(@RequestBody PostSupCertRequest postSupCertRequest) {
SupCertEntity supCertEntity = new SupCertEntity(); SupCertEntity supCertEntity = new SupCertEntity();
BeanUtils.copyProperties(postSupCertRequest, supCertEntity); BeanUtils.copyProperties(postSupCertRequest, supCertEntity);
if(postSupCertRequest.getVailDate() !=null && postSupCertRequest.getExpireDate() != null){
if(postSupCertRequest.getVailDate().getTime()>postSupCertRequest.getExpireDate().getTime()){
return ResultVOUtils.error(999,"生效期不能小于失效期!");
}
}
if (postSupCertRequest.getRepeatUpload() == 1) { if (postSupCertRequest.getRepeatUpload() == 1) {
//已审核的重新提交 //已审核的重新提交
//1.修改对应的资质信息进入变更审核状态, //1.修改对应的资质信息进入变更审核状态,
@ -219,18 +337,17 @@ public class SupCertController {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, "参数不能为空!"); return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, "参数不能为空!");
} }
//查询模板文件是否存在 //查询模板文件是否存在
FilterPdfModuleRequest filterPdfModuleRequest = new FilterPdfModuleRequest();
filterPdfModuleRequest.setId(inspectionPDFTemplateRequest.getModuleId()); SysPdfTemplateRelevanceStatemenEntity sysPdfTemplateRelevanceStatemenEntity = systemPDFModuleService.selectByStatemenId(inspectionPDFTemplateRequest.getId());
SystemPDFModuleEntity systemPDFModule = systemPDFModuleService.findSystemPDFModule(filterPdfModuleRequest); if (null == sysPdfTemplateRelevanceStatemenEntity) {
if (null == systemPDFModule) {
return ResultVOUtils.error(ResultEnum.DATA_NOT, "所属模块错误"); return ResultVOUtils.error(ResultEnum.DATA_NOT, "所属模块错误");
} }
SystemPDFTemplateEntity systemPDFTemplateEntity = systemPDFTemplateService.selectById(String.valueOf(systemPDFModule.getTemplateId())); SystemPDFTemplateEntity systemPDFTemplateEntity = systemPDFTemplateService.selectById(String.valueOf(sysPdfTemplateRelevanceStatemenEntity.getTemplateId()));
if (null == systemPDFTemplateEntity) { if (null == systemPDFTemplateEntity) {
return ResultVOUtils.error(ResultEnum.DATA_NOT, "模板错误"); return ResultVOUtils.error(ResultEnum.DATA_NOT, "模板错误");
} }
return ResultVOUtils.success(systemPDFModule.getTemplateId()); return ResultVOUtils.success(sysPdfTemplateRelevanceStatemenEntity.getTemplateId());
} }
/** /**
@ -258,27 +375,31 @@ public class SupCertController {
int i = 1; int i = 1;
if (selectSupCertList != null && selectSupCertList.size() > 0) { if (selectSupCertList != null && selectSupCertList.size() > 0) {
for (SupCertEntity obj : selectSupCertList) { for (SupCertEntity obj : selectSupCertList) {
//组装数据 List<String> urlList = Arrays.asList(obj.getFilePath().split(","));
Map<String, Object> supData = new HashMap<>(); for (String url : urlList) {
supData.put("companyName", supCompanyEntity.getCompanyName() == null ? ' ' : supCompanyEntity.getCompanyName()); //组装数据
supData.put("creditNum", supCompanyEntity.getCreditNum() == null ? ' ' : supCompanyEntity.getCreditNum()); Map<String, Object> supData = new HashMap<>();
supData.put("classes", supCompanyEntity.getClasses().equals(1) ? "医院" : "经营企业"); supData.put("companyName", supCompanyEntity.getCompanyName() == null ? ' ' : supCompanyEntity.getCompanyName());
supData.put("area", supCompanyEntity.getArea() == null ? ' ' : supCompanyEntity.getArea()); supData.put("creditNum", supCompanyEntity.getCreditNum() == null ? ' ' : supCompanyEntity.getCreditNum());
supData.put("contacts", supCompanyEntity.getContacts() == null ? ' ' : supCompanyEntity.getContacts()); supData.put("classes", supCompanyEntity.getClasses().equals(1) ? "医院" : "经营企业");
supData.put("detailAddr", supCompanyEntity.getDetailAddr() == null ? ' ' : supCompanyEntity.getDetailAddr()); supData.put("area", supCompanyEntity.getArea() == null ? ' ' : supCompanyEntity.getArea());
supData.put("mobile", supCompanyEntity.getMobile() == null ? ' ' : supCompanyEntity.getMobile()); supData.put("contacts", supCompanyEntity.getContacts() == null ? ' ' : supCompanyEntity.getContacts());
supData.put("email", supCompanyEntity.getEmail() == null ? ' ' : supCompanyEntity.getEmail()); supData.put("detailAddr", supCompanyEntity.getDetailAddr() == null ? ' ' : supCompanyEntity.getDetailAddr());
supData.put("index", String.valueOf(i)); supData.put("mobile", supCompanyEntity.getMobile() == null ? ' ' : supCompanyEntity.getMobile());
supData.put("name", obj.getName() == null ? ' ' : obj.getName()); supData.put("email", supCompanyEntity.getEmail() == null ? ' ' : supCompanyEntity.getEmail());
supData.put("code", obj.getCode() == null ? ' ' : obj.getCode()); supData.put("index", String.valueOf(i));
supData.put("vaiDate", formatter.format(obj.getVailDate())); supData.put("name", obj.getName() == null ? ' ' : obj.getName());
supData.put("expireDate", formatter.format(obj.getExpireDate())); supData.put("code", obj.getCode() == null ? ' ' : obj.getCode());
supData.put("status", obj.getStatus() == 0 ? "有效" : "失效"); supData.put("vaiDate", obj.getVailDate() == null ? ' ' : formatter.format(obj.getVailDate()));
supData.put("auditStatus", getAuditStatus(obj.getAuditStatus())); supData.put("expireDate", obj.getExpireDate() == null ? ' ' : formatter.format(obj.getExpireDate()));
supData.put("remark", obj.getRemark() == null ? ' ' : obj.getRemark()); supData.put("status", obj.getStatus() == 0 ? "有效" : "失效");
supData.put("filePath", "D:/udi/udiwms/udiwmsfile/register/image2/" + obj.getFilePath()); supData.put("auditStatus", getAuditStatus(obj.getAuditStatus()));
list.add(supData); supData.put("remark", obj.getRemark() == null ? ' ' : obj.getRemark());
i++; supData.put("filePath", filePath + "register/image2/" + url);
list.add(supData);
i++;
}
} }
} }
@ -368,29 +489,32 @@ public class SupCertController {
int i = 1; int i = 1;
if (selectSupCertList != null && selectSupCertList.size() > 0) { if (selectSupCertList != null && selectSupCertList.size() > 0) {
for (SupCertEntity obj : selectSupCertList) { for (SupCertEntity obj : selectSupCertList) {
//组装数据 List<String> urlList = Arrays.asList(obj.getFilePath().split(","));
Map<String, Object> supData = new HashMap<>(); for (String url : urlList) {
supData.put("customerName", supManufacturerEntity.getSupName() == null ? ' ' : supManufacturerEntity.getSupName()); //组装数据
supData.put("companyName", supManufacturerEntity.getCompanyName() == null ? ' ' : supManufacturerEntity.getCompanyName()); Map<String, Object> supData = new HashMap<>();
supData.put("companyType", supManufacturerEntity.getCompanyType().equals(1) ? "境内企业" : "境外企业"); supData.put("customerName", supManufacturerEntity.getSupName() == null ? ' ' : supManufacturerEntity.getSupName());
supData.put("creditCode", supManufacturerEntity.getCreditCode() == null ? ' ' : supManufacturerEntity.getCreditCode()); supData.put("companyName", supManufacturerEntity.getCompanyName() == null ? ' ' : supManufacturerEntity.getCompanyName());
supData.put("placeArea", supManufacturerEntity.getPlaceArea() == null ? ' ' : supManufacturerEntity.getPlaceArea()); supData.put("companyType", supManufacturerEntity.getCompanyType().equals(1) ? "境内企业" : "境外企业");
supData.put("productionArea", supManufacturerEntity.getProductionArea() == null ? ' ' : supManufacturerEntity.getProductionArea()); supData.put("creditCode", supManufacturerEntity.getCreditCode() == null ? ' ' : supManufacturerEntity.getCreditCode());
supData.put("registerStatus", getRegisterStatus(supManufacturerEntity.getRegisterStatus())); supData.put("placeArea", supManufacturerEntity.getPlaceArea() == null ? ' ' : supManufacturerEntity.getPlaceArea());
supData.put("placeAddress", supManufacturerEntity.getPlaceAddress() == null ? ' ' : supManufacturerEntity.getPlaceAddress()); supData.put("productionArea", supManufacturerEntity.getProductionArea() == null ? ' ' : supManufacturerEntity.getProductionArea());
supData.put("productionAddress", supManufacturerEntity.getProductionAddress() == null ? ' ' : supManufacturerEntity.getProductionAddress()); supData.put("registerStatus", getRegisterStatus(supManufacturerEntity.getRegisterStatus()));
supData.put("remark1", supManufacturerEntity.getRemark() == null ? ' ' : supManufacturerEntity.getRemark()); supData.put("placeAddress", supManufacturerEntity.getPlaceAddress() == null ? ' ' : supManufacturerEntity.getPlaceAddress());
supData.put("index", String.valueOf(i)); supData.put("productionAddress", supManufacturerEntity.getProductionAddress() == null ? ' ' : supManufacturerEntity.getProductionAddress());
supData.put("name", obj.getName() == null ? ' ' : obj.getName()); supData.put("remark1", supManufacturerEntity.getRemark() == null ? ' ' : supManufacturerEntity.getRemark());
supData.put("code", obj.getCode() == null ? ' ' : obj.getCode()); supData.put("index", String.valueOf(i));
supData.put("vaiDate", formatter.format(obj.getVailDate())); supData.put("name", obj.getName() == null ? ' ' : obj.getName());
supData.put("expireDate", formatter.format(obj.getExpireDate())); supData.put("code", obj.getCode() == null ? ' ' : obj.getCode());
supData.put("status", obj.getStatus() == 0 ? "有效" : "失效"); supData.put("vaiDate", obj.getVailDate() == null ? ' ' : formatter.format(obj.getVailDate()));
supData.put("auditStatus", getAuditStatus(obj.getAuditStatus())); supData.put("expireDate", obj.getExpireDate() == null ? ' ' : formatter.format(obj.getExpireDate()));
supData.put("remark2", obj.getRemark() == null ? ' ' : obj.getRemark()); supData.put("status", obj.getStatus() == 0 ? "有效" : "失效");
supData.put("filePath", "d:/1s/udiwms/register/file/image2/" + obj.getFilePath()); supData.put("auditStatus", getAuditStatus(obj.getAuditStatus()));
list.add(supData); supData.put("remark2", obj.getRemark() == null ? ' ' : obj.getRemark());
i++; supData.put("filePath", filePath + "register/image2/" + url);
list.add(supData);
i++;
}
} }
} }
@ -428,31 +552,35 @@ public class SupCertController {
int i = 1; int i = 1;
if (selectSupCertList != null && selectSupCertList.size() > 0) { if (selectSupCertList != null && selectSupCertList.size() > 0) {
for (SupCertEntity obj : selectSupCertList) { for (SupCertEntity obj : selectSupCertList) {
//组装数据
Map<String, Object> supData = new HashMap<>(); List<String> urlList = Arrays.asList(obj.getFilePath().split(","));
supData.put("customerName", supManufacturerEntity.getSupName() == null ? ' ' : supManufacturerEntity.getSupName()); for (String url : urlList) {
supData.put("manufacturerldFk", supManufacturerEntity.getCompanyName() == null ? ' ' : supManufacturerEntity.getCompanyName()); //组装数据
supData.put("recordProductName", supProductEntity.getRecordProductName() == null ? ' ' : supProductEntity.getRecordProductName()); Map<String, Object> supData = new HashMap<>();
supData.put("recordCode", supProductEntity.getRecordCode() == null ? ' ' : supProductEntity.getRecordCode()); supData.put("customerName", supManufacturerEntity.getSupName() == null ? ' ' : supManufacturerEntity.getSupName());
supData.put("recordPeopleName", supProductEntity.getRecordPeopleName() == null ? ' ' : supProductEntity.getRecordPeopleName()); supData.put("manufacturerldFk", supManufacturerEntity.getCompanyName() == null ? ' ' : supManufacturerEntity.getCompanyName());
supData.put("hchzsb", supProductEntity.getHchzsb() == null ? ' ' : supProductEntity.getHchzsb()); supData.put("recordProductName", supProductEntity.getRecordProductName() == null ? ' ' : supProductEntity.getRecordProductName());
supData.put("productType", supProductEntity.getProductType() == null ? ' ' : supProductEntity.getProductType()); supData.put("recordCode", supProductEntity.getRecordCode() == null ? ' ' : supProductEntity.getRecordCode());
supData.put("productDirectoryCode", supProductEntity.getProductDirectoryCode() == null ? ' ' : supProductEntity.getProductDirectoryCode()); supData.put("recordPeopleName", supProductEntity.getRecordPeopleName() == null ? ' ' : supProductEntity.getRecordPeopleName());
supData.put("specification", supProductEntity.getSpecification() == null ? ' ' : supProductEntity.getSpecification()); supData.put("hchzsb", supProductEntity.getHchzsb() == null ? ' ' : supProductEntity.getHchzsb());
supData.put("cpms", supProductEntity.getCpms() == null ? ' ' : supProductEntity.getCpms()); supData.put("productType", supProductEntity.getProductType() == null ? ' ' : supProductEntity.getProductType());
supData.put("remark1", supProductEntity.getRemark() == null ? ' ' : supProductEntity.getRemark()); supData.put("productDirectoryCode", supProductEntity.getProductDirectoryCode() == null ? ' ' : supProductEntity.getProductDirectoryCode());
supData.put("specification", supProductEntity.getSpecification() == null ? ' ' : supProductEntity.getSpecification());
supData.put("index", String.valueOf(i)); // supData.put("cpms", supProductEntity.getCpms() == null ? ' ' : supProductEntity.getCpms());
supData.put("name", obj.getName() == null ? ' ' : obj.getName()); supData.put("remark1", supProductEntity.getRemark() == null ? ' ' : supProductEntity.getRemark());
supData.put("code", obj.getCode() == null ? ' ' : obj.getCode());
supData.put("vaiDate", formatter.format(obj.getVailDate())); supData.put("index", String.valueOf(i));
supData.put("expireDate", formatter.format(obj.getExpireDate())); supData.put("name", obj.getName() == null ? ' ' : obj.getName());
supData.put("status", obj.getStatus() == 0 ? "有效" : "失效"); supData.put("code", obj.getCode() == null ? ' ' : obj.getCode());
supData.put("auditStatus", getAuditStatus(obj.getAuditStatus())); supData.put("vaiDate", obj.getVailDate() == null ? ' ' : formatter.format(obj.getVailDate()));
supData.put("remark2", obj.getRemark() == null ? ' ' : obj.getRemark()); supData.put("expireDate", obj.getExpireDate() == null ? ' ' : formatter.format(obj.getExpireDate()));
supData.put("filePath", "d:/1s/udiwms/register/file/image2/" + obj.getFilePath()); supData.put("status", obj.getStatus() == 0 ? "有效" : "失效");
list.add(supData); supData.put("auditStatus", getAuditStatus(obj.getAuditStatus()));
i++; supData.put("remark2", obj.getRemark() == null ? ' ' : obj.getRemark());
supData.put("filePath", filePath + "register/image2/" + url);
list.add(supData);
i++;
}
} }
} }
@ -460,35 +588,17 @@ public class SupCertController {
JasperUtils.jasperReport(request, response, param, systemPDFTemplateEntity.getPath(), "pdf"); JasperUtils.jasperReport(request, response, param, systemPDFTemplateEntity.getPath(), "pdf");
} }
//首营预览文件
//撤回单据 @PostMapping("/udiwms/image/register/file")
@AuthRuleAnnotation("") public BaseResponse uploadRegisterFile(@RequestBody FilterImageRequest filterImageRequest) {
@PostMapping("/sale/sup/cert/revoke") List<String> urlList = Arrays.asList(filterImageRequest.getImageUrl().split(","));
public BaseResponse revokeSupCert(@RequestBody SupCertEntity supCertEntity) { List<String> list = new ArrayList<>();
supCertEntity.setCreateTime(new Date()); for (String obj : urlList) {
supCertEntity.setUpdateTime(new Date()); String url = filterImageRequest.getCertFileUrl() + obj;
boolean b = supCertService.updateCompanyCert(supCertEntity); list.add(url);
if (supCertEntity.getType() == ConstantStatus.CERT_COMPANY) {
SupCompanyEntity supCompanyEntity = supCompanyService.findCompany(supCertEntity.getCustomerId());
supCompanyEntity.setAuditStatus(ConstantStatus.AUDIT_UN);
supCompanyEntity.setUpdateTime(new Date());
supCompanyService.modifyCompany(supCompanyEntity);
} else if (supCertEntity.getType() == ConstantStatus.CERT_MANUFACTURER) {
SupManufacturerEntity supManufacturerEntity = supManufacturerService.findManufacturer(supCertEntity.getManufacturerIdFk());
supManufacturerEntity.setAuditStatus(ConstantStatus.AUDIT_UN);
supManufacturerEntity.setUpdateTime(new Date());
supManufacturerService.modifyCompany(supManufacturerEntity);
} else if (supCertEntity.getType() == ConstantStatus.CERT_PRODUCT) {
SupProductResponse supProductResponse = supProductService.findByProductId(supCertEntity.getProductIdFk());
SupProductEntity supProductEntity = new SupProductEntity();
supProductEntity.setId(supProductResponse.getId());
supProductEntity.setUpdateTime(new Date());
supProductEntity.setAuditStatus(ConstantStatus.AUDIT_UN);
supProductService.modifyRegistration(supProductEntity);
} }
return ResultVOUtils.success(list);
return ResultVOUtils.success("成功");
} }
} }

@ -2,9 +2,11 @@ package com.glxp.api.controller.purchase;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.glxp.api.annotation.Log;
import com.glxp.api.common.enums.ResultEnum; import com.glxp.api.common.enums.ResultEnum;
import com.glxp.api.common.res.BaseResponse; import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils; import com.glxp.api.common.util.ResultVOUtils;
import com.glxp.api.constant.BusinessType;
import com.glxp.api.req.purchase.FilterCertRemindMsgRequest; import com.glxp.api.req.purchase.FilterCertRemindMsgRequest;
import com.glxp.api.res.purchase.SupCertRemindMsgResponse; import com.glxp.api.res.purchase.SupCertRemindMsgResponse;
import com.glxp.api.service.purchase.SupCertRemindMsgService; import com.glxp.api.service.purchase.SupCertRemindMsgService;
@ -46,6 +48,7 @@ public class SupCertRemindMsgController {
* @return * @return
*/ */
@GetMapping("/sup/cert/remind/msg/confirmMsg") @GetMapping("/sup/cert/remind/msg/confirmMsg")
@Log(title = "资质预警", businessType = BusinessType.UPDATE)
public BaseResponse confirmMsg(Integer id, String handleMsg) { public BaseResponse confirmMsg(Integer id, String handleMsg) {
if (null == id || StrUtil.isBlank(handleMsg)) { if (null == id || StrUtil.isBlank(handleMsg)) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL); return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
@ -61,6 +64,7 @@ public class SupCertRemindMsgController {
* @return * @return
*/ */
@GetMapping("/sup/cert/remind/msg/ignoreMsg") @GetMapping("/sup/cert/remind/msg/ignoreMsg")
@Log(title = "资质预警", businessType = BusinessType.UPDATE)
public BaseResponse ignoreMsg(Integer id, Integer ignoreStatus) { public BaseResponse ignoreMsg(Integer id, Integer ignoreStatus) {
if (null == id || null == ignoreStatus) { if (null == id || null == ignoreStatus) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL); return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);

@ -2,11 +2,12 @@ package com.glxp.api.controller.purchase;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.glxp.api.annotation.AuthRuleAnnotation; import com.glxp.api.annotation.AuthRuleAnnotation;
import com.glxp.api.annotation.Log;
import com.glxp.api.common.enums.ResultEnum; import com.glxp.api.common.enums.ResultEnum;
import com.glxp.api.common.res.BaseResponse; import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils; import com.glxp.api.common.util.ResultVOUtils;
import com.glxp.api.constant.BusinessType;
import com.glxp.api.entity.purchase.SupCertSetEntity; import com.glxp.api.entity.purchase.SupCertSetEntity;
import com.glxp.api.req.purchase.FilterCertSetsRequest; import com.glxp.api.req.purchase.FilterCertSetsRequest;
import com.glxp.api.req.system.DeleteRequest; import com.glxp.api.req.system.DeleteRequest;
@ -51,6 +52,7 @@ public class SupCertSetController {
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@PostMapping("/sup/cert/set/add") @PostMapping("/sup/cert/set/add")
@Log(title = "资质证书", businessType = BusinessType.INSERT)
public BaseResponse addCertSet(@RequestBody SupCertSetEntity supCertSetEntity) { public BaseResponse addCertSet(@RequestBody SupCertSetEntity supCertSetEntity) {
if (supCertSetEntity == null) { if (supCertSetEntity == null) {
supCertSetEntity = new SupCertSetEntity(); supCertSetEntity = new SupCertSetEntity();
@ -77,6 +79,7 @@ public class SupCertSetController {
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@PostMapping("/sup/cert/set/update") @PostMapping("/sup/cert/set/update")
@Log(title = "资质证书", businessType = BusinessType.UPDATE)
public BaseResponse updateCertSet(@RequestBody SupCertSetEntity supCertSetEntity) { public BaseResponse updateCertSet(@RequestBody SupCertSetEntity supCertSetEntity) {
if (CollUtil.isNotEmpty(supCertSetEntity.getFlbmList())) { if (CollUtil.isNotEmpty(supCertSetEntity.getFlbmList())) {
String flbm = supCertSetEntity.getFlbmList().stream().collect(Collectors.joining(",")); String flbm = supCertSetEntity.getFlbmList().stream().collect(Collectors.joining(","));
@ -99,6 +102,7 @@ public class SupCertSetController {
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@PostMapping("/sup/cert/set/delete") @PostMapping("/sup/cert/set/delete")
@Log(title = "资质证书", businessType = BusinessType.DELETE)
public BaseResponse deleteCertSet(@RequestBody DeleteRequest deleteRequest) { public BaseResponse deleteCertSet(@RequestBody DeleteRequest deleteRequest) {
boolean b = supCertSetService.deleteById(deleteRequest.getId()); boolean b = supCertSetService.deleteById(deleteRequest.getId());

@ -5,9 +5,11 @@ import cn.hutool.core.util.StrUtil;
import cn.hutool.extra.pinyin.PinyinUtil; import cn.hutool.extra.pinyin.PinyinUtil;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.glxp.api.annotation.AuthRuleAnnotation; import com.glxp.api.annotation.AuthRuleAnnotation;
import com.glxp.api.annotation.Log;
import com.glxp.api.common.enums.ResultEnum; import com.glxp.api.common.enums.ResultEnum;
import com.glxp.api.common.res.BaseResponse; import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils; import com.glxp.api.common.util.ResultVOUtils;
import com.glxp.api.constant.BusinessType;
import com.glxp.api.constant.ConstantStatus; import com.glxp.api.constant.ConstantStatus;
import com.glxp.api.entity.auth.AuthAdmin; import com.glxp.api.entity.auth.AuthAdmin;
import com.glxp.api.entity.basic.BasicCorpEntity; import com.glxp.api.entity.basic.BasicCorpEntity;
@ -65,6 +67,7 @@ public class SupCompanyController {
SupCompanyService supCompanyService; SupCompanyService supCompanyService;
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@GetMapping("/api/pur/getSupComapnys") @GetMapping("/api/pur/getSupComapnys")
public BaseResponse getSupComapnys(FilterSupCompanyRequest companyRequest) { public BaseResponse getSupComapnys(FilterSupCompanyRequest companyRequest) {
@ -79,14 +82,16 @@ public class SupCompanyController {
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@PostMapping("/api/pur/addCompany") @PostMapping("/api/pur/addCompany")
@Log(title = "资质证书", businessType = BusinessType.INSERT)
public BaseResponse insertCompany(@RequestBody SupCompanyEntity companyEntity) { public BaseResponse insertCompany(@RequestBody SupCompanyEntity companyEntity) {
//判断是不是存在草稿 //判断是不是存在草稿
if(companyEntity.getAuditStatus()==6){ if (companyEntity.getAuditStatus() == 6) {
List<SupCertEntity> supCertEntityList = supCertService.findAll(companyEntity.getCustomerId()); for(SupCertEntity obj:supCertEntityList){ List<SupCertEntity> supCertEntityList = supCertService.findAll(companyEntity.getCustomerId());
if(obj.getAuditStatus()==0){ for (SupCertEntity obj : supCertEntityList) {
return ResultVOUtils.error(999,"证书中存在草稿不允许提交!"); if (obj.getAuditStatus() == 0) {
return ResultVOUtils.error(999, "证书中存在草稿不允许提交!");
} }
} }
@ -122,18 +127,16 @@ public class SupCompanyController {
} }
String customerId = CustomUtil.getId(); //重新生成customerId
CustomerContactEntity customerContactEntity = new CustomerContactEntity(); CustomerContactEntity customerContactEntity = new CustomerContactEntity();
customerContactEntity.setTel(companyEntity.getTel()); customerContactEntity.setTel(companyEntity.getTel());
customerContactEntity.setMobile(companyEntity.getMobile()); customerContactEntity.setMobile(companyEntity.getMobile());
customerContactEntity.setEmail(companyEntity.getEmail()); customerContactEntity.setEmail(companyEntity.getEmail());
customerContactEntity.setContacts(companyEntity.getContacts()); customerContactEntity.setContacts(companyEntity.getContacts());
customerContactEntity.setCustomerId(customerId); customerContactEntity.setCustomerId(companyEntity.getCustomerId());
customerContactService.insertCustomerContact(customerContactEntity); customerContactService.insertCustomerContact(customerContactEntity);
//更新相关证书对应的customerId //更新相关证书对应的customerId
supCertService.updateCustomerId(companyEntity.getCustomerId(), customerId,ConstantStatus.AUDIT_UN); supCertService.updateCustomerId(companyEntity.getCustomerId(), companyEntity.getCustomerId(), ConstantStatus.AUDIT_UN);
companyEntity.setCustomerId(customerId); companyEntity.setCustomerId(companyEntity.getCustomerId());
companyEntity.setCreateTime(new Date()); companyEntity.setCreateTime(new Date());
companyEntity.setUpdateTime(new Date()); companyEntity.setUpdateTime(new Date());
@ -146,14 +149,15 @@ public class SupCompanyController {
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@PostMapping("/api/pur/modifyCompany") @PostMapping("/api/pur/modifyCompany")
@Log(title = "资质证书", businessType = BusinessType.UPDATE)
public BaseResponse modifyCompany(@RequestBody SupCompanyEntity companyEntity) { public BaseResponse modifyCompany(@RequestBody SupCompanyEntity companyEntity) {
if (companyEntity.getAuditStatus() == ConstantStatus.AUDIT_UN || companyEntity.getAuditStatus() == ConstantStatus.AUDIT_CHANGE) { if (companyEntity.getAuditStatus() == ConstantStatus.AUDIT_UN || companyEntity.getAuditStatus() == ConstantStatus.AUDIT_CHANGE) {
//判断是不是存在草稿 //判断是不是存在草稿
List<SupCertEntity> supCertEntityList = supCertService.findAll(companyEntity.getCustomerId()); List<SupCertEntity> supCertEntityList = supCertService.findAll(companyEntity.getCustomerId());
for(SupCertEntity obj:supCertEntityList){ for (SupCertEntity obj : supCertEntityList) {
if(obj.getAuditStatus()==0){ if (obj.getAuditStatus() == 0) {
return ResultVOUtils.error(999,"证书中存在草稿不允许提交!"); return ResultVOUtils.error(999, "证书中存在草稿不允许提交!");
} }
} }
@ -204,10 +208,11 @@ public class SupCompanyController {
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@PostMapping("/api/pur/auditCompany") @PostMapping("/api/pur/auditCompany")
@Log(title = "资质证书", businessType = BusinessType.UPDATE)
public BaseResponse auditCompany(@RequestBody SupCompanyEntity companyEntity) { public BaseResponse auditCompany(@RequestBody SupCompanyEntity companyEntity) {
if(companyEntity.getAuditStatus()==1){ if (companyEntity.getAuditStatus() == 1) {
//查询用户上传的证书 //查询用户上传的证书
FilterSupCertRequest filterSupCertRequest = new FilterSupCertRequest(); FilterSupCertRequest filterSupCertRequest = new FilterSupCertRequest();
filterSupCertRequest.setCustomerId(companyEntity.getCustomerId()); filterSupCertRequest.setCustomerId(companyEntity.getCustomerId());
@ -241,7 +246,7 @@ public class SupCompanyController {
return ResultVOUtils.error(500, "必传证书不齐全!"); return ResultVOUtils.error(500, "必传证书不齐全!");
} }
} }
String msg = "";
//查询是否包含审核未通过的证书 //查询是否包含审核未通过的证书
if (companyEntity.getAuditStatus() == ConstantStatus.AUDIT_PASS if (companyEntity.getAuditStatus() == ConstantStatus.AUDIT_PASS
|| companyEntity.getAuditStatus() == ConstantStatus.AUDIT_CHANGE_PASS) { || companyEntity.getAuditStatus() == ConstantStatus.AUDIT_CHANGE_PASS) {
@ -252,18 +257,22 @@ public class SupCompanyController {
List<SupCertEntity> supCertEntityList = supCertService.filterCompanyCert(filterSupCertRequest); List<SupCertEntity> supCertEntityList = supCertService.filterCompanyCert(filterSupCertRequest);
if (CollUtil.isNotEmpty(supCertEntityList)) { if (CollUtil.isNotEmpty(supCertEntityList)) {
for (SupCertEntity supCertEntity : supCertEntityList) { for (SupCertEntity supCertEntity : supCertEntityList) {
supCertEntity.setAuditStatus(ConstantStatus.AUDIT_PASS); msg += supCertEntity.getName() + ",";
supCertService.updateCompanyCert(supCertEntity);
} }
// return ResultVOUtils.error(500, "审核失败,剩余" + supCertEntityList.size() + "个证书还未审核或审核未通过!"); return ResultVOUtils.error(500, "审核失败,还有必须提交证书未确认(" + msg.substring(0, msg.length() - 1) + ")");
} }
} }
AuthAdmin authAdmin = getUser(); AuthAdmin authAdmin = getUser();
companyEntity.setAuditor(authAdmin.getId() + ""); companyEntity.setAuditor(authAdmin.getId() + "");
companyEntity.setAuditTime(new Date()); companyEntity.setAuditTime(new Date());
companyEntity.setUpdateTime(new Date()); companyEntity.setUpdateTime(new Date());
if(companyEntity.getAuditComment() == null){
companyEntity.setAuditComment("");
}
boolean b = companyService.modifyCompany(companyEntity); boolean b = companyService.modifyCompany(companyEntity);
CustomerContactEntity customerContactEntity = new CustomerContactEntity(); CustomerContactEntity customerContactEntity = new CustomerContactEntity();
customerContactEntity.setTel(companyEntity.getTel()); customerContactEntity.setTel(companyEntity.getTel());
@ -283,7 +292,7 @@ public class SupCompanyController {
basicCorpEntity.setMobile(companyEntity.getMobile()); basicCorpEntity.setMobile(companyEntity.getMobile());
basicCorpEntity.setCorpType(ConstantStatus.CORP_SP); basicCorpEntity.setCorpType(ConstantStatus.CORP_SP);
basicCorpEntity.setUpdateTime(new Date()); basicCorpEntity.setUpdateTime(new Date());
basicCorpService.insertBasicUnitMaintain(basicCorpEntity); basicCorpService.updateByErpId(basicCorpEntity);
return ResultVOUtils.success("修改成功"); return ResultVOUtils.success("修改成功");
} }
@ -307,6 +316,7 @@ public class SupCompanyController {
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@PostMapping("api/pur/supCompany/delete") @PostMapping("api/pur/supCompany/delete")
@Log(title = "资质证书", businessType = BusinessType.DELETE)
public BaseResponse deleteSupCompany(@RequestBody DeleteRequest deleteRequest) { public BaseResponse deleteSupCompany(@RequestBody DeleteRequest deleteRequest) {
boolean b = supCompanyService.deleteCompany(deleteRequest.getId()); boolean b = supCompanyService.deleteCompany(deleteRequest.getId());
if (b) if (b)
@ -316,6 +326,9 @@ public class SupCompanyController {
} }
} }
public String getCustomerId() { public String getCustomerId() {
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
if (attributes == null) { if (attributes == null) {

@ -4,9 +4,11 @@ import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.glxp.api.annotation.AuthRuleAnnotation; import com.glxp.api.annotation.AuthRuleAnnotation;
import com.glxp.api.annotation.Log;
import com.glxp.api.common.enums.ResultEnum; import com.glxp.api.common.enums.ResultEnum;
import com.glxp.api.common.res.BaseResponse; import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils; import com.glxp.api.common.util.ResultVOUtils;
import com.glxp.api.constant.BusinessType;
import com.glxp.api.constant.ConstantStatus; import com.glxp.api.constant.ConstantStatus;
import com.glxp.api.entity.auth.AuthAdmin; import com.glxp.api.entity.auth.AuthAdmin;
import com.glxp.api.entity.purchase.SupCertEntity; import com.glxp.api.entity.purchase.SupCertEntity;
@ -91,29 +93,30 @@ public class SupManufacturerController {
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@PostMapping("/sup/manufacturer/addCompany") @PostMapping("/sup/manufacturer/addCompany")
@Log(title = "资质证书", businessType = BusinessType.INSERT)
public BaseResponse addCompany(@RequestBody SupManufacturerEntity supManufacturerEntity) { public BaseResponse addCompany(@RequestBody SupManufacturerEntity supManufacturerEntity) {
//判断用户名和社会信用代码不能重复 //判断用户名和社会信用代码不能重复
FilterSupManufacturerRequest filterSupManufacturerRequest=new FilterSupManufacturerRequest(); FilterSupManufacturerRequest filterSupManufacturerRequest = new FilterSupManufacturerRequest();
filterSupManufacturerRequest.setCompanyName(supManufacturerEntity.getCompanyName()); filterSupManufacturerRequest.setCompanyName(supManufacturerEntity.getCompanyName());
filterSupManufacturerRequest.setCustomerId(getCustomerId()); filterSupManufacturerRequest.setCustomerId(getCustomerId());
List<SupManufacturerEntity> companyEntities = supManufacturerService.getCompanyByNameAndCode(filterSupManufacturerRequest); List<SupManufacturerEntity> companyEntities = supManufacturerService.getCompanyByNameAndCode(filterSupManufacturerRequest);
if(companyEntities.size()>0){ if (companyEntities.size() > 0) {
return ResultVOUtils.error(999,"企业名称不能重复!"); return ResultVOUtils.error(999, "企业名称不能重复!");
} }
filterSupManufacturerRequest=new FilterSupManufacturerRequest(); filterSupManufacturerRequest = new FilterSupManufacturerRequest();
filterSupManufacturerRequest.setCustomerId(getCustomerId()); filterSupManufacturerRequest.setCustomerId(getCustomerId());
filterSupManufacturerRequest.setCreditCode(supManufacturerEntity.getCreditCode()); filterSupManufacturerRequest.setCreditCode(supManufacturerEntity.getCreditCode());
companyEntities = supManufacturerService.getCompanyByNameAndCode(filterSupManufacturerRequest); companyEntities = supManufacturerService.getCompanyByNameAndCode(filterSupManufacturerRequest);
if(companyEntities.size()>0){ if (companyEntities.size() > 0) {
return ResultVOUtils.error(999,"统一社会信用代码不能重复!"); return ResultVOUtils.error(999, "统一社会信用代码不能重复!");
} }
//提交审核 //提交审核
if (supManufacturerEntity.getAuditStatus() == ConstantStatus.AUDIT_CHANGE || supManufacturerEntity.getAuditStatus() == ConstantStatus.AUDIT_UN) { if (supManufacturerEntity.getAuditStatus() == ConstantStatus.AUDIT_CHANGE || supManufacturerEntity.getAuditStatus() == ConstantStatus.AUDIT_UN) {
//判断是否上级供应商是否审核通过 //判断是否上级供应商是否审核通过
SupCompanyEntity supCompanyEntity = supCompanyService.findCompany(supManufacturerEntity.getCustomerId()); SupCompanyEntity supCompanyEntity = supCompanyService.findCompany(supManufacturerEntity.getCustomerId());
if (supCompanyEntity.getAuditStatus() != ConstantStatus.AUDIT_PASS if (supCompanyEntity.getAuditStatus() == null || supCompanyEntity.getAuditStatus() != ConstantStatus.AUDIT_PASS
) { ) {
return ResultVOUtils.error(500, "所属配送企业资质未通过审核,暂时无法提交!"); return ResultVOUtils.error(500, "所属配送企业资质未通过审核,暂时无法提交!");
} }
@ -124,27 +127,27 @@ public class SupManufacturerController {
List<SupCertSetEntity> supCertSetEntities = supCertSetService.filterCertSets(filterCertSetsRequest); List<SupCertSetEntity> supCertSetEntities = supCertSetService.filterCertSets(filterCertSetsRequest);
List<SupCertEntity> supCertEntityList = supCertService.findAll(supManufacturerEntity.getCustomerId(), supManufacturerEntity.getManufacturerId()); List<SupCertEntity> supCertEntityList = supCertService.findAll(supManufacturerEntity.getCustomerId(), supManufacturerEntity.getManufacturerId());
//判断存在有草稿的未提交的就不能通过 //判断存在有草稿的未提交的就不能通过
for(SupCertEntity obj:supCertEntityList){ for (SupCertEntity obj : supCertEntityList) {
if (obj.getAuditStatus() == 0.) { if (obj.getAuditStatus() == 0.) {
return ResultVOUtils.error(999,"资质证书存在草稿不能提交!"); return ResultVOUtils.error(999, "资质证书存在草稿不能提交!");
} }
} }
ListIterator<SupCertSetEntity> iterable = supCertSetEntities.listIterator(); ListIterator<SupCertSetEntity> iterable = supCertSetEntities.listIterator();
while (iterable.hasNext()) { while (iterable.hasNext()) {
SupCertSetEntity supCertSetEntity = iterable.next(); SupCertSetEntity supCertSetEntity = iterable.next();
if (( supCertSetEntity.getForeign() != null && supCertSetEntity.getForeign() == 2 if ((supCertSetEntity.getForeign() != null && supCertSetEntity.getForeign() == 2
&& StrUtil.trimToEmpty(supManufacturerEntity.getCompanyType()).equals("2")) && StrUtil.trimToEmpty(supManufacturerEntity.getCompanyType()).equals("2"))
|| ||
( (
supCertSetEntity.getForeign() != null && supCertSetEntity.getForeign() == 1 supCertSetEntity.getForeign() != null && supCertSetEntity.getForeign() == 1
&& StrUtil.trimToEmpty(supManufacturerEntity.getCompanyType()).equals("2")) && StrUtil.trimToEmpty(supManufacturerEntity.getCompanyType()).equals("2"))
|| ||
( supCertSetEntity.getForeign() != null (supCertSetEntity.getForeign() != null
&& supCertSetEntity.getForeign() == 1 && supCertSetEntity.getForeign() == 1
&& supManufacturerEntity.getCompanyType().equals("1")) && supManufacturerEntity.getCompanyType().equals("1"))
|| ||
( supCertSetEntity.getForeign() != null (supCertSetEntity.getForeign() != null
&& supCertSetEntity.getForeign() == 3 && supCertSetEntity.getForeign() == 3
&& supManufacturerEntity.getCompanyType().equals("1"))) { && supManufacturerEntity.getCompanyType().equals("1"))) {
for (SupCertEntity supCertEntity : supCertEntityList) { for (SupCertEntity supCertEntity : supCertEntityList) {
@ -186,34 +189,36 @@ public class SupManufacturerController {
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@PostMapping("/sup/manufacturer/modifyCompany") @PostMapping("/sup/manufacturer/modifyCompany")
@Log(title = "资质证书", businessType = BusinessType.UPDATE)
public BaseResponse modifyCompany(@RequestBody SupManufacturerEntity supManufacturerEntity) { public BaseResponse modifyCompany(@RequestBody SupManufacturerEntity supManufacturerEntity) {
if (StrUtil.isEmpty(supManufacturerEntity.getManufacturerId()) || StrUtil.isEmpty(supManufacturerEntity.getCustomerId())) { if (StrUtil.isEmpty(supManufacturerEntity.getManufacturerId()) || StrUtil.isEmpty(supManufacturerEntity.getCustomerId())) {
return ResultVOUtils.error(500, "参数错误!"); return ResultVOUtils.error(500, "参数错误!");
} }
if (supManufacturerEntity.getId() == 0) {//新增
//判断用户名和社会信用代码不能重复 //判断用户名和社会信用代码不能重复
FilterSupManufacturerRequest filterSupManufacturerRequest=new FilterSupManufacturerRequest(); FilterSupManufacturerRequest filterSupManufacturerRequest = new FilterSupManufacturerRequest();
filterSupManufacturerRequest.setCompanyName(supManufacturerEntity.getCompanyName()); filterSupManufacturerRequest.setCompanyName(supManufacturerEntity.getCompanyName());
filterSupManufacturerRequest.setCustomerId(getCustomerId()); filterSupManufacturerRequest.setCustomerId(getCustomerId());
List<SupManufacturerEntity> companyEntities = supManufacturerService.getCompanyByNameAndCode(filterSupManufacturerRequest); List<SupManufacturerEntity> companyEntities = supManufacturerService.getCompanyByNameAndCode(filterSupManufacturerRequest);
if(companyEntities.size()>0){ if (companyEntities.size() > 0) {
return ResultVOUtils.error(999,"企业名称不能重复!"); return ResultVOUtils.error(999, "企业名称不能重复!");
} }
filterSupManufacturerRequest=new FilterSupManufacturerRequest(); filterSupManufacturerRequest = new FilterSupManufacturerRequest();
filterSupManufacturerRequest.setCustomerId(getCustomerId()); filterSupManufacturerRequest.setCustomerId(getCustomerId());
filterSupManufacturerRequest.setCreditCode(supManufacturerEntity.getCreditCode()); filterSupManufacturerRequest.setCreditCode(supManufacturerEntity.getCreditCode());
companyEntities = supManufacturerService.getCompanyByNameAndCode(filterSupManufacturerRequest); companyEntities = supManufacturerService.getCompanyByNameAndCode(filterSupManufacturerRequest);
if(companyEntities.size()>0){ if (companyEntities.size() > 0) {
return ResultVOUtils.error(999,"统一社会信用代码不能重复!"); return ResultVOUtils.error(999, "统一社会信用代码不能重复!");
}
} }
//提交审核 //提交审核
if (supManufacturerEntity.getAuditStatus() == ConstantStatus.AUDIT_CHANGE || supManufacturerEntity.getAuditStatus() == ConstantStatus.AUDIT_UN) { if (supManufacturerEntity.getAuditStatus() == ConstantStatus.AUDIT_CHANGE || supManufacturerEntity.getAuditStatus() == ConstantStatus.AUDIT_UN) {
//判断是否上级供应商是否审核通过 //判断是否上级供应商是否审核通过
SupCompanyEntity supCompanyEntity = supCompanyService.findCompany(supManufacturerEntity.getCustomerId()); SupCompanyEntity supCompanyEntity = supCompanyService.findCompany(supManufacturerEntity.getCustomerId());
if (supCompanyEntity.getAuditStatus() == ConstantStatus.AUDIT_UN if (supCompanyEntity.getAuditStatus() == ConstantStatus.AUDIT_UN || supCompanyEntity.getAuditStatus() == ConstantStatus.AUDIT_CHANGE_REJECT
|| supCompanyEntity.getAuditStatus() == ConstantStatus.AUDIT_DRAFT) { || supCompanyEntity.getAuditStatus() == ConstantStatus.AUDIT_DRAFT || supCompanyEntity.getAuditStatus() == ConstantStatus.AUDIT_REJECT) {
return ResultVOUtils.error(500, "所属配送企业资质未通过审核,暂时无法提交!"); return ResultVOUtils.error(500, "所属配送企业资质未通过审核,暂时无法提交!");
} }
@ -224,27 +229,27 @@ public class SupManufacturerController {
List<SupCertSetEntity> supCertSetEntities = supCertSetService.filterCertSets(filterCertSetsRequest); List<SupCertSetEntity> supCertSetEntities = supCertSetService.filterCertSets(filterCertSetsRequest);
List<SupCertEntity> supCertEntityList = supCertService.findAll(supManufacturerEntity.getCustomerId(), supManufacturerEntity.getManufacturerId()); List<SupCertEntity> supCertEntityList = supCertService.findAll(supManufacturerEntity.getCustomerId(), supManufacturerEntity.getManufacturerId());
//判断存在有草稿的未提交的就不能通过 //判断存在有草稿的未提交的就不能通过
for(SupCertEntity obj:supCertEntityList){ for (SupCertEntity obj : supCertEntityList) {
if (obj.getAuditStatus() == 0.) { if (obj.getAuditStatus() == 0.) {
return ResultVOUtils.error(999,"资质证书存在草稿不能提交!"); return ResultVOUtils.error(999, "资质证书存在草稿不能提交!");
} }
} }
ListIterator<SupCertSetEntity> iterable = supCertSetEntities.listIterator(); ListIterator<SupCertSetEntity> iterable = supCertSetEntities.listIterator();
while (iterable.hasNext()) { while (iterable.hasNext()) {
SupCertSetEntity supCertSetEntity = iterable.next(); SupCertSetEntity supCertSetEntity = iterable.next();
if (( supCertSetEntity.getForeign() != null && supCertSetEntity.getForeign() == 2 if ((supCertSetEntity.getForeign() != null && supCertSetEntity.getForeign() == 2
&& StrUtil.trimToEmpty(supManufacturerEntity.getCompanyType()).equals("2")) && StrUtil.trimToEmpty(supManufacturerEntity.getCompanyType()).equals("2"))
|| ||
( (
supCertSetEntity.getForeign() != null && supCertSetEntity.getForeign() == 1 supCertSetEntity.getForeign() != null && supCertSetEntity.getForeign() == 1
&& StrUtil.trimToEmpty(supManufacturerEntity.getCompanyType()).equals("2")) && StrUtil.trimToEmpty(supManufacturerEntity.getCompanyType()).equals("2"))
|| ||
( supCertSetEntity.getForeign() != null (supCertSetEntity.getForeign() != null
&& supCertSetEntity.getForeign() == 1 && supCertSetEntity.getForeign() == 1
&& supManufacturerEntity.getCompanyType().equals("1")) && supManufacturerEntity.getCompanyType().equals("1"))
|| ||
( supCertSetEntity.getForeign() != null (supCertSetEntity.getForeign() != null
&& supCertSetEntity.getForeign() == 3 && supCertSetEntity.getForeign() == 3
&& supManufacturerEntity.getCompanyType().equals("1"))) { && supManufacturerEntity.getCompanyType().equals("1"))) {
for (SupCertEntity supCertEntity : supCertEntityList) { for (SupCertEntity supCertEntity : supCertEntityList) {
@ -290,6 +295,7 @@ public class SupManufacturerController {
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@PostMapping("/udiwms/sup/manufacturer/audit") @PostMapping("/udiwms/sup/manufacturer/audit")
@Log(title = "资质证书", businessType = BusinessType.UPDATE)
public BaseResponse auditMmanufacturer(@RequestBody SupManufacturerEntity supManufacturerEntity) { public BaseResponse auditMmanufacturer(@RequestBody SupManufacturerEntity supManufacturerEntity) {
if (StrUtil.isEmpty(supManufacturerEntity.getManufacturerId()) || StrUtil.isEmpty(supManufacturerEntity.getCustomerId())) { if (StrUtil.isEmpty(supManufacturerEntity.getManufacturerId()) || StrUtil.isEmpty(supManufacturerEntity.getCustomerId())) {
@ -297,8 +303,7 @@ public class SupManufacturerController {
} }
if (supManufacturerEntity.getAuditStatus() == 1 || supManufacturerEntity.getAuditStatus() == 4) {
if(supManufacturerEntity.getAuditStatus()==1 || supManufacturerEntity.getAuditStatus()==4){
//查询上传的资质证书 //查询上传的资质证书
FilterSupCertRequest filterSupCertRequest = new FilterSupCertRequest(); FilterSupCertRequest filterSupCertRequest = new FilterSupCertRequest();
filterSupCertRequest.setCustomerId(supManufacturerEntity.getCustomerId()); filterSupCertRequest.setCustomerId(supManufacturerEntity.getCustomerId());
@ -314,18 +319,18 @@ public class SupManufacturerController {
while (iterable.hasNext()) { while (iterable.hasNext()) {
SupCertSetEntity supCertSetEntity = iterable.next(); SupCertSetEntity supCertSetEntity = iterable.next();
if (( supCertSetEntity.getForeign() != null && supCertSetEntity.getForeign() == 2 if ((supCertSetEntity.getForeign() != null && supCertSetEntity.getForeign() == 2
&& StrUtil.trimToEmpty(supManufacturerEntity.getCompanyType()).equals("2")) && StrUtil.trimToEmpty(supManufacturerEntity.getCompanyType()).equals("2"))
|| ||
( (
supCertSetEntity.getForeign() != null && supCertSetEntity.getForeign() == 1 supCertSetEntity.getForeign() != null && supCertSetEntity.getForeign() == 1
&& StrUtil.trimToEmpty(supManufacturerEntity.getCompanyType()).equals("2")) && StrUtil.trimToEmpty(supManufacturerEntity.getCompanyType()).equals("2"))
|| ||
( supCertSetEntity.getForeign() != null (supCertSetEntity.getForeign() != null
&& supCertSetEntity.getForeign() == 1 && supCertSetEntity.getForeign() == 1
&& supManufacturerEntity.getCompanyType().equals("1")) && supManufacturerEntity.getCompanyType().equals("1"))
|| ||
( supCertSetEntity.getForeign() != null (supCertSetEntity.getForeign() != null
&& supCertSetEntity.getForeign() == 3 && supCertSetEntity.getForeign() == 3
&& supManufacturerEntity.getCompanyType().equals("1"))) { && supManufacturerEntity.getCompanyType().equals("1"))) {
for (SupCertEntity supCertEntity : supCertEntityList) { for (SupCertEntity supCertEntity : supCertEntityList) {
@ -347,7 +352,7 @@ public class SupManufacturerController {
} }
} }
String msg = "";
// 查询是否包含审核未通过的证书 // 查询是否包含审核未通过的证书
if (supManufacturerEntity.getAuditStatus() == ConstantStatus.AUDIT_PASS || if (supManufacturerEntity.getAuditStatus() == ConstantStatus.AUDIT_PASS ||
supManufacturerEntity.getAuditStatus() == ConstantStatus.AUDIT_CHANGE_PASS) { supManufacturerEntity.getAuditStatus() == ConstantStatus.AUDIT_CHANGE_PASS) {
@ -359,10 +364,9 @@ public class SupManufacturerController {
List<SupCertEntity> supCertEntityList = supCertService.filterCompanyCert(filterSupCertRequest); List<SupCertEntity> supCertEntityList = supCertService.filterCompanyCert(filterSupCertRequest);
if (CollUtil.isNotEmpty(supCertEntityList)) { if (CollUtil.isNotEmpty(supCertEntityList)) {
for (SupCertEntity supCertEntity : supCertEntityList) { for (SupCertEntity supCertEntity : supCertEntityList) {
supCertEntity.setAuditStatus(ConstantStatus.AUDIT_PASS); msg += supCertEntity.getName() + ",";
supCertService.updateCompanyCert(supCertEntity);
} }
// return ResultVOUtils.error(500, "审核失败,剩余" + supCertEntityList.size() + "个证书还未审核或审核未通过!"); return ResultVOUtils.error(500, "审核失败,还有必须提交证书未确认(" + msg.substring(0, msg.length() - 1) + ")");
} }
} }
@ -382,6 +386,7 @@ public class SupManufacturerController {
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@GetMapping("/sup/manufacturer/basic/delete") @GetMapping("/sup/manufacturer/basic/delete")
@Log(title = "资质证书", businessType = BusinessType.DELETE)
public BaseResponse deleteContact(DeleteRequest deleteRequest) { public BaseResponse deleteContact(DeleteRequest deleteRequest) {
boolean b = supManufacturerService.deleteById(deleteRequest.getId()); boolean b = supManufacturerService.deleteById(deleteRequest.getId());
if (b) if (b)

@ -3,13 +3,15 @@ package com.glxp.api.controller.purchase;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.glxp.api.annotation.AuthRuleAnnotation; import com.glxp.api.annotation.AuthRuleAnnotation;
import com.glxp.api.annotation.Log;
import com.glxp.api.common.enums.ResultEnum; import com.glxp.api.common.enums.ResultEnum;
import com.glxp.api.common.res.BaseResponse; import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils; import com.glxp.api.common.util.ResultVOUtils;
import com.glxp.api.constant.BusinessType;
import com.glxp.api.constant.ConstantStatus; import com.glxp.api.constant.ConstantStatus;
import com.glxp.api.entity.auth.AuthAdmin; import com.glxp.api.entity.auth.AuthAdmin;
import com.glxp.api.entity.basic.UdiRelevanceEntity;
import com.glxp.api.entity.purchase.SupCertEntity; import com.glxp.api.entity.purchase.SupCertEntity;
import com.glxp.api.entity.purchase.SupCertSetEntity; import com.glxp.api.entity.purchase.SupCertSetEntity;
import com.glxp.api.entity.purchase.SupManufacturerEntity; import com.glxp.api.entity.purchase.SupManufacturerEntity;
@ -29,9 +31,6 @@ import com.glxp.api.service.purchase.SupCertService;
import com.glxp.api.service.purchase.SupCertSetService; import com.glxp.api.service.purchase.SupCertSetService;
import com.glxp.api.service.purchase.SupManufacturerService; import com.glxp.api.service.purchase.SupManufacturerService;
import com.glxp.api.service.purchase.SupProductService; import com.glxp.api.service.purchase.SupProductService;
import com.glxp.api.service.thrsys.ThrProductsService;
import com.glxp.api.service.thrsys.ThrSystemService;
import com.glxp.api.util.GennerOrderUtils;
import org.springframework.beans.BeanUtils; 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;
@ -84,6 +83,7 @@ public class SupProductController {
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@PostMapping("/sup/product/addRegistration") @PostMapping("/sup/product/addRegistration")
@Log(title = "资质证书", businessType = BusinessType.INSERT)
public BaseResponse addRegistration(@RequestBody SupProductEntity supProductEntity) { public BaseResponse addRegistration(@RequestBody SupProductEntity supProductEntity) {
//提交审核 //提交审核
@ -105,14 +105,14 @@ public class SupProductController {
ListIterator<SupCertSetEntity> iterable = supCertSetEntities.listIterator(); ListIterator<SupCertSetEntity> iterable = supCertSetEntities.listIterator();
while (iterable.hasNext()) { while (iterable.hasNext()) {
SupCertSetEntity supCertSetEntity = iterable.next(); SupCertSetEntity supCertSetEntity = iterable.next();
if (supCertSetEntity.getImports()!=null && supCertSetEntity.getImports() == 1 || StrUtil.isNotEmpty(supCertSetEntity.getCplx()) && supCertSetEntity.getCplx().equals("全部") if (supCertSetEntity.getImports() != null && supCertSetEntity.getImports() == 1 || StrUtil.isNotEmpty(supCertSetEntity.getCplx()) && supCertSetEntity.getCplx().equals("全部")
|| StrUtil.isNotEmpty(supCertSetEntity.getHchzsb()) && supCertSetEntity.getHchzsb().equals("全部") || StrUtil.isNotEmpty(supCertSetEntity.getHchzsb()) && supCertSetEntity.getHchzsb().equals("全部")
|| (supCertSetEntity.getImports() != null && supCertSetEntity.getImports() == 2 || (supCertSetEntity.getImports() != null && supCertSetEntity.getImports() == 2
&& StrUtil.trimToEmpty(supProductEntity.getRecordCode()).contains("进")) && StrUtil.trimToEmpty(supProductEntity.getRecordCode()).contains("进"))
|| (supCertSetEntity.getImports() != null && supCertSetEntity.getImports() == 3 && !StrUtil.trimToEmpty(supProductEntity.getRecordCode()).contains("进")) || (supCertSetEntity.getImports() != null && supCertSetEntity.getImports() == 3 && !StrUtil.trimToEmpty(supProductEntity.getRecordCode()).contains("进"))
|| (StrUtil.trimToEmpty(supProductEntity.getProductType()).equals(supCertSetEntity.getCplx())) || (StrUtil.trimToEmpty(supProductEntity.getProductType()).equals(supCertSetEntity.getCplx()))
|| (StrUtil.trimToEmpty(supProductEntity.getHchzsb()).equals(supCertSetEntity.getHchzsb())) || (StrUtil.trimToEmpty(supProductEntity.getHchzsb()).equals(supCertSetEntity.getHchzsb()))
|| StrUtil.isNotEmpty(supCertSetEntity.getFlbm()) &&(supCertSetEntity.getFlbm().contains(StrUtil.trimToEmpty(supProductEntity.getProductDirectoryCode()))) || StrUtil.isNotEmpty(supCertSetEntity.getFlbm()) && (supCertSetEntity.getFlbm().contains(StrUtil.trimToEmpty(supProductEntity.getProductDirectoryCode())))
) { ) {
for (SupCertEntity supCertEntity : supCertEntityList) { for (SupCertEntity supCertEntity : supCertEntityList) {
if (supCertEntity.getName().equals(supCertSetEntity.getName())) { if (supCertEntity.getName().equals(supCertSetEntity.getName())) {
@ -149,25 +149,30 @@ public class SupProductController {
@PostMapping("/sup/product/selectBind") @PostMapping("/sup/product/selectBind")
public BaseResponse selectBind(@RequestBody SelectProductBindRequest selectProductBindRequest) { public BaseResponse selectBind(@RequestBody SelectProductBindRequest selectProductBindRequest) {
UdiRelevanceResponse udiRelevanceResponse = udiRelevanceService.selectUdiId(Long.valueOf(selectProductBindRequest.getRelIdFk()));
SupProductEntity supProductEntity = supProductService.findByManufactury(udiRelevanceResponse.getCpmctymc(), udiRelevanceResponse.getManufactory(),selectProductBindRequest.getManufacturerId());
if (supProductEntity != null) {
return ResultVOUtils.error(500, "该产品资质已存在,请勿重复添加!");
}else{
supProductEntity = new SupProductEntity();
BeanUtils.copyProperties(udiRelevanceResponse, supProductEntity);
supProductEntity.setProductId(selectProductBindRequest.getProductId());
supProductEntity.setRecordCode(udiRelevanceResponse.getZczbhhzbapzbh());
supProductEntity.setRelIdFk(udiRelevanceResponse.getId() + "");
supProductEntity.setRecordProductName(udiRelevanceResponse.getCpmctymc());
supProductEntity.setProductType(udiRelevanceResponse.getQxlb());
supProductEntity.setProductDirectoryCode(udiRelevanceResponse.getFlbm());
supProductEntity.setRecordPeopleName(udiRelevanceResponse.getYlqxzcrbarmc());
supProductEntity.setSpecification(udiRelevanceResponse.getGgxh());
supProductEntity.setCreateTime(new Date());
supProductEntity.setUpdateTime(new Date());
supProductEntity.setManufacturerIdFk(selectProductBindRequest.getManufacturerId());
supProductEntity.setCustomerId(selectProductBindRequest.getCustomerId());
supProductEntity.setHchzsb(udiRelevanceResponse.getCplb());
// supProductEntity.setCompanyName(selectProductBindRequest.getCompanyName());
supProductEntity.setAuditStatus(selectProductBindRequest.getAuditStatus());
}
UdiRelevanceResponse udiRelevanceResponse = udiRelevanceService.selectGroupById(Long.valueOf(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.setCreateTime(new Date());
supProductEntity.setUpdateTime(new Date());
supProductEntity.setManufacturerIdFk(selectProductBindRequest.getManufacturerId());
supProductEntity.setCustomerId(selectProductBindRequest.getCustomerId());
supProductEntity.setHchzsb(udiRelevanceResponse.getCplb());
supProductEntity.setAuditStatus(selectProductBindRequest.getAuditStatus());
return ResultVOUtils.success(supProductEntity); return ResultVOUtils.success(supProductEntity);
// boolean b = supProductService.insertRegistration(supProductEntity); // boolean b = supProductService.insertRegistration(supProductEntity);
@ -181,19 +186,23 @@ public class SupProductController {
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@PostMapping("/sup/product/modifyRegistration") @PostMapping("/sup/product/modifyRegistration")
@Log(title = "资质证书", businessType = BusinessType.UPDATE)
public BaseResponse modifyRegistration(@RequestBody SupProductEntity supProductEntity) { public BaseResponse modifyRegistration(@RequestBody SupProductEntity supProductEntity) {
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, "参数错误!");
} }
//判断是不是存在草稿
List<SupCertEntity> supCertEntityList1 = supCertService.findAll(supProductEntity.getCustomerId(), supProductEntity.getManufacturerIdFk(), supProductEntity.getProductId());
for(SupCertEntity obj:supCertEntityList1){
if(obj.getAuditStatus()==0){
return ResultVOUtils.error(999,"证书中存在草稿不允许提交!");
}
}
//提交审核 //提交审核
if (supProductEntity.getAuditStatus() == ConstantStatus.AUDIT_CHANGE || supProductEntity.getAuditStatus() == ConstantStatus.AUDIT_UN) {
//判断是不是存在草稿
List<SupCertEntity> supCertEntityList1 = supCertService.findAll(supProductEntity.getCustomerId(), supProductEntity.getManufacturerIdFk(), supProductEntity.getProductId());
for (SupCertEntity obj : supCertEntityList1) {
if (obj.getAuditStatus() == 0) {
return ResultVOUtils.error(999, "证书中存在草稿不允许提交!");
}
}
//判断是否上级供应商是否审核通过 //判断是否上级供应商是否审核通过
@ -212,14 +221,14 @@ public class SupProductController {
while (iterable.hasNext()) { while (iterable.hasNext()) {
SupCertSetEntity supCertSetEntity = iterable.next(); SupCertSetEntity supCertSetEntity = iterable.next();
if (supCertSetEntity.getImports()!=null && supCertSetEntity.getImports() == 1 || StrUtil.isNotEmpty(supCertSetEntity.getCplx()) && supCertSetEntity.getCplx().equals("全部") if (supCertSetEntity.getImports() != null && supCertSetEntity.getImports() == 1 || StrUtil.isNotEmpty(supCertSetEntity.getCplx()) && supCertSetEntity.getCplx().equals("全部")
|| StrUtil.isNotEmpty(supCertSetEntity.getHchzsb()) && supCertSetEntity.getHchzsb().equals("全部") || StrUtil.isNotEmpty(supCertSetEntity.getHchzsb()) && supCertSetEntity.getHchzsb().equals("全部")
|| (supCertSetEntity.getImports() != null && supCertSetEntity.getImports() == 2 || (supCertSetEntity.getImports() != null && supCertSetEntity.getImports() == 2
&& StrUtil.trimToEmpty(supProductEntity.getRecordCode()).contains("进")) && StrUtil.trimToEmpty(supProductEntity.getRecordCode()).contains("进"))
|| (supCertSetEntity.getImports() != null && supCertSetEntity.getImports() == 3 && !StrUtil.trimToEmpty(supProductEntity.getRecordCode()).contains("进")) || (supCertSetEntity.getImports() != null && supCertSetEntity.getImports() == 3 && !StrUtil.trimToEmpty(supProductEntity.getRecordCode()).contains("进"))
|| (StrUtil.trimToEmpty(supProductEntity.getProductType()).equals(supCertSetEntity.getCplx())) || (StrUtil.trimToEmpty(supProductEntity.getProductType()).equals(supCertSetEntity.getCplx()))
|| (StrUtil.trimToEmpty(supProductEntity.getHchzsb()).equals(supCertSetEntity.getHchzsb())) || (StrUtil.trimToEmpty(supProductEntity.getHchzsb()).equals(supCertSetEntity.getHchzsb()))
|| StrUtil.isNotEmpty(supCertSetEntity.getFlbm()) &&(supCertSetEntity.getFlbm().contains(StrUtil.trimToEmpty(supProductEntity.getProductDirectoryCode()))) || StrUtil.isNotEmpty(supCertSetEntity.getFlbm()) && (supCertSetEntity.getFlbm().contains(StrUtil.trimToEmpty(supProductEntity.getProductDirectoryCode())))
) { ) {
for (SupCertEntity supCertEntity : supCertEntityList) { for (SupCertEntity supCertEntity : supCertEntityList) {
if (supCertEntity.getName().equals(supCertSetEntity.getName())) { if (supCertEntity.getName().equals(supCertSetEntity.getName())) {
@ -241,7 +250,7 @@ public class SupProductController {
return ResultVOUtils.error(500, errMsg.substring(1) + "等证书未上传,无法提交审核!"); return ResultVOUtils.error(500, errMsg.substring(1) + "等证书未上传,无法提交审核!");
} }
}
supProductEntity.setUpdateTime(new Date()); supProductEntity.setUpdateTime(new Date());
SupProductResponse originEntity = supProductService.findByProductId(supProductEntity.getProductId()); SupProductResponse originEntity = supProductService.findByProductId(supProductEntity.getProductId());
supCertService.updateProductId(originEntity.getCustomerId(), supProductEntity.getCustomerId(), originEntity.getManufacturerIdFk(), supCertService.updateProductId(originEntity.getCustomerId(), supProductEntity.getCustomerId(), originEntity.getManufacturerIdFk(),
@ -262,7 +271,7 @@ public class SupProductController {
if (supProductEntity.getAuditStatus() == null) { if (supProductEntity.getAuditStatus() == null) {
return ResultVOUtils.error(500, "参数错误!"); return ResultVOUtils.error(500, "参数错误!");
} }
if(supProductEntity.getAuditStatus()==1){ if (supProductEntity.getAuditStatus() == 1) {
//查询用户上传的证书 //查询用户上传的证书
FilterSupCertRequest filterSupCertRequest = new FilterSupCertRequest(); FilterSupCertRequest filterSupCertRequest = new FilterSupCertRequest();
filterSupCertRequest.setCustomerId(supProductEntity.getCustomerId()); filterSupCertRequest.setCustomerId(supProductEntity.getCustomerId());
@ -280,14 +289,14 @@ public class SupProductController {
while (iterable.hasNext()) { while (iterable.hasNext()) {
SupCertSetEntity supCertSetEntity = iterable.next(); SupCertSetEntity supCertSetEntity = iterable.next();
if (supCertSetEntity.getImports()!=null && supCertSetEntity.getImports() == 1 || StrUtil.isNotEmpty(supCertSetEntity.getCplx()) && supCertSetEntity.getCplx().equals("全部") if (supCertSetEntity.getImports() != null && supCertSetEntity.getImports() == 1 || StrUtil.isNotEmpty(supCertSetEntity.getCplx()) && supCertSetEntity.getCplx().equals("全部")
|| StrUtil.isNotEmpty(supCertSetEntity.getHchzsb()) && supCertSetEntity.getHchzsb().equals("全部") || StrUtil.isNotEmpty(supCertSetEntity.getHchzsb()) && supCertSetEntity.getHchzsb().equals("全部")
|| (supCertSetEntity.getImports() != null && supCertSetEntity.getImports() == 2 || (supCertSetEntity.getImports() != null && supCertSetEntity.getImports() == 2
&& StrUtil.trimToEmpty(supProductEntity.getRecordCode()).contains("进")) && StrUtil.trimToEmpty(supProductEntity.getRecordCode()).contains("进"))
|| (supCertSetEntity.getImports() != null && supCertSetEntity.getImports() == 3 && !StrUtil.trimToEmpty(supProductEntity.getRecordCode()).contains("进")) || (supCertSetEntity.getImports() != null && supCertSetEntity.getImports() == 3 && !StrUtil.trimToEmpty(supProductEntity.getRecordCode()).contains("进"))
|| (StrUtil.trimToEmpty(supProductEntity.getProductType()).equals(supCertSetEntity.getCplx())) || (StrUtil.trimToEmpty(supProductEntity.getProductType()).equals(supCertSetEntity.getCplx()))
|| (StrUtil.trimToEmpty(supProductEntity.getHchzsb()).equals(supCertSetEntity.getHchzsb())) || (StrUtil.trimToEmpty(supProductEntity.getHchzsb()).equals(supCertSetEntity.getHchzsb()))
|| StrUtil.isNotEmpty(supCertSetEntity.getFlbm()) &&(supCertSetEntity.getFlbm().contains(StrUtil.trimToEmpty(supProductEntity.getProductDirectoryCode()))) || StrUtil.isNotEmpty(supCertSetEntity.getFlbm()) && (supCertSetEntity.getFlbm().contains(StrUtil.trimToEmpty(supProductEntity.getProductDirectoryCode())))
) { ) {
for (SupCertEntity supCertEntity : supCertEntityList) { for (SupCertEntity supCertEntity : supCertEntityList) {
if (supCertEntity.getName().equals(supCertSetEntity.getName())) { if (supCertEntity.getName().equals(supCertSetEntity.getName())) {
@ -309,7 +318,7 @@ public class SupProductController {
return ResultVOUtils.error(500, "必传证书不齐全"); return ResultVOUtils.error(500, "必传证书不齐全");
} }
} }
String msg = "";
// 查询是否包含审核未通过的证书 // 查询是否包含审核未通过的证书
if (supProductEntity.getAuditStatus() == ConstantStatus.AUDIT_PASS || if (supProductEntity.getAuditStatus() == ConstantStatus.AUDIT_PASS ||
supProductEntity.getAuditStatus() == ConstantStatus.AUDIT_CHANGE_PASS) { supProductEntity.getAuditStatus() == ConstantStatus.AUDIT_CHANGE_PASS) {
@ -322,17 +331,23 @@ public class SupProductController {
List<SupCertEntity> supCertEntityList = supCertService.filterCompanyCert(filterSupCertRequest); List<SupCertEntity> supCertEntityList = supCertService.filterCompanyCert(filterSupCertRequest);
if (CollUtil.isNotEmpty(supCertEntityList)) { if (CollUtil.isNotEmpty(supCertEntityList)) {
for (SupCertEntity supCertEntity : supCertEntityList) { for (SupCertEntity supCertEntity : supCertEntityList) {
supCertEntity.setAuditStatus(ConstantStatus.AUDIT_PASS); msg += supCertEntity.getName() + ",";
supCertService.updateCompanyCert(supCertEntity);
} }
return ResultVOUtils.error(500, "审核失败,还有必须提交证书未确认(" + msg.substring(0, msg.length() - 1) + ")");
// return ResultVOUtils.error(500, "审核失败,剩余" + supCertEntityList.size() + "个证书还未审核或审核未通过!");
} }
} }
supProductEntity.setUpdateTime(new Date()); supProductEntity.setUpdateTime(new Date());
boolean b = supProductService.modifyRegistration(supProductEntity); boolean b = supProductService.modifyRegistration(supProductEntity);
if (StrUtil.isNotEmpty(supProductEntity.getRelIdFk())) {
UdiRelevanceEntity udiRelevanceEntity = udiRelevanceService.selectById(Long.parseLong(supProductEntity.getRelIdFk()));
if (udiRelevanceEntity != null) {
udiRelevanceEntity.setDispatch(true);
udiRelevanceService.updateUdiRelevance(udiRelevanceEntity);
}
}
// if (supProductEntity.getAuditStatus() == ConstantStatus.AUDIT_PASS) { // if (supProductEntity.getAuditStatus() == ConstantStatus.AUDIT_PASS) {
// SupProductResponse supProductResponse = supProductService.findJoinRegistration(supProductEntity.getId()); // SupProductResponse supProductResponse = supProductService.findJoinRegistration(supProductEntity.getId());
@ -414,6 +429,7 @@ public class SupProductController {
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@GetMapping("/sup/product/delete") @GetMapping("/sup/product/delete")
@Log(title = "资质证书", businessType = BusinessType.DELETE)
public BaseResponse delete(DeleteCompanyFileRequest deleteCompanyFileRequest) { public BaseResponse delete(DeleteCompanyFileRequest deleteCompanyFileRequest) {
boolean b = supProductService.deleteById(deleteCompanyFileRequest.getId()); boolean b = supProductService.deleteById(deleteCompanyFileRequest.getId());
if (b) if (b)

@ -63,4 +63,6 @@ public interface BasicCorpDao extends BaseMapperPlus<BasicCorpDao, BasicCorpEnti
* @return * @return
*/ */
String selectNameByErpId(@Param("supId") String supId); String selectNameByErpId(@Param("supId") String supId);
List<BasicCorpEntity> getCorpList();
} }

@ -19,6 +19,7 @@ public interface UdiRelevanceDao extends BaseMapperPlus<UdiRelevanceDao, UdiRele
List<UdiRelevanceResponse> filterCertUdi(FilterUdiRelRequest filterUdiRelRequest); List<UdiRelevanceResponse> filterCertUdi(FilterUdiRelRequest filterUdiRelRequest);
List<UdiRelevanceResponse> filterCertUdi(FilterUdiRelRequest filterUdiRelRequest);
List<UdiRelevanceResponse> filterUdiGp(FilterUdiRelRequest filterUdiRelRequest); List<UdiRelevanceResponse> filterUdiGp(FilterUdiRelRequest filterUdiRelRequest);

@ -1,5 +1,6 @@
package com.glxp.api.dao.system; package com.glxp.api.dao.system;
import com.glxp.api.entity.system.SysPdfTemplateRelevanceStatemenEntity;
import com.glxp.api.entity.system.SystemPDFTemplateRelevanceEntity; import com.glxp.api.entity.system.SystemPDFTemplateRelevanceEntity;
import com.glxp.api.req.system.FilterPdfTemplateRelevanceRequest; import com.glxp.api.req.system.FilterPdfTemplateRelevanceRequest;
import com.glxp.api.res.system.SystemPDFTemplateRelevanceResponse; import com.glxp.api.res.system.SystemPDFTemplateRelevanceResponse;
@ -60,4 +61,6 @@ public interface SystemPDFTemplateRelevanceDao {
boolean udpateRl(SystemPDFTemplateRelevanceEntity systemPDFTemplateRelevanceEntity); boolean udpateRl(SystemPDFTemplateRelevanceEntity systemPDFTemplateRelevanceEntity);
SystemPDFTemplateRelevanceEntity selectModuleldAndAction(@Param("moduleId") Integer moduleId,@Param("localAction") String localAction); SystemPDFTemplateRelevanceEntity selectModuleldAndAction(@Param("moduleId") Integer moduleId,@Param("localAction") String localAction);
SysPdfTemplateRelevanceStatemenEntity selectByStatemenId(String id);
} }

@ -199,5 +199,7 @@ public class SupManufacturerEntity{
private String failCout; private String failCout;
@TableField(exist = false) @TableField(exist = false)
private String passCout; private String passCout;
@TableField("agentName")
private String agentName;
} }

@ -0,0 +1,12 @@
package com.glxp.api.req.purchase;
import lombok.Data;
@Data
public class FilterImageRequest {
private String imageUrl;
private String certFileUrl;
}

@ -19,4 +19,5 @@ public class FilterPoductRequest extends ListPageRequest {
private String customerId; private String customerId;
private Integer auditStatus; private Integer auditStatus;
private String lastUpdateTime; private String lastUpdateTime;
private String relIdFk;
} }

@ -16,6 +16,8 @@ public interface BasicCorpService {
boolean updateById(BasicCorpEntity basicCorpEntity); boolean updateById(BasicCorpEntity basicCorpEntity);
boolean updateByErpId(BasicCorpEntity basicCorpEntity);
boolean insert(BasicCorpEntity basicUnitMaintainEntity); boolean insert(BasicCorpEntity basicUnitMaintainEntity);
// boolean updateById(BasicUnitMaintainSaveRequest basicUnitMaintainSaveRequest); // boolean updateById(BasicUnitMaintainSaveRequest basicUnitMaintainSaveRequest);
@ -48,4 +50,7 @@ public interface BasicCorpService {
* @return * @return
*/ */
boolean verifyExists(BasicCorpEntity basicCorpEntity); boolean verifyExists(BasicCorpEntity basicCorpEntity);
List<BasicCorpEntity> getCorpList();
} }

@ -91,6 +91,8 @@ public interface UdiRelevanceService extends IService<UdiRelevanceEntity> {
*/ */
String findUuidById(String relId); String findUuidById(String relId);
UdiRelevanceResponse selectUdiId(Long id);
List<UdiRelevanceResponse> selectGroupByNameCode(String nameCode, Boolean isDisable); List<UdiRelevanceResponse> selectGroupByNameCode(String nameCode, Boolean isDisable);

@ -1,6 +1,7 @@
package com.glxp.api.service.basic.impl; package com.glxp.api.service.basic.impl;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.glxp.api.dao.basic.BasicCorpDao; import com.glxp.api.dao.basic.BasicCorpDao;
import com.glxp.api.entity.basic.BasicCorpEntity; import com.glxp.api.entity.basic.BasicCorpEntity;
@ -58,6 +59,14 @@ public class BasicCorpServiceImpl implements BasicCorpService {
return basicCorpDao.customUpdateById(basicUnitMaintainSaveRequest)>0?true:false; return basicCorpDao.customUpdateById(basicUnitMaintainSaveRequest)>0?true:false;
} }
@Override
public boolean updateByErpId(BasicCorpEntity basicCorpEntity) {
basicCorpEntity.setUpdateTime(new Date());
QueryWrapper<BasicCorpEntity> ew=new QueryWrapper<>();
ew.eq("erpId",basicCorpEntity.getErpId());
return basicCorpDao.update(basicCorpEntity,ew)>0?true:false;
}
@Override @Override
public boolean deleteById(String id) { public boolean deleteById(String id) {
return basicCorpDao.deleteById(id); return basicCorpDao.deleteById(id);
@ -114,6 +123,11 @@ public class BasicCorpServiceImpl implements BasicCorpService {
return false; return false;
} }
@Override
public List<BasicCorpEntity> getCorpList() {
return basicCorpDao.getCorpList();
}
@Override @Override
public BasicCorpEntity selectById(String id) { public BasicCorpEntity selectById(String id) {
return basicCorpDao.selectById(id); return basicCorpDao.selectById(id);

@ -400,4 +400,30 @@ public class UdiRelevanceServiceImpl extends ServiceImpl<UdiRelevanceDao, UdiRel
UdiEntity udi = FilterUdiUtils.getUdi(code); UdiEntity udi = FilterUdiUtils.getUdi(code);
return udiRelevanceDao.selectRelIdByNameCode(udi.getUdi()); return udiRelevanceDao.selectRelIdByNameCode(udi.getUdi());
} }
@Override
public UdiRelevanceResponse selectUdiId(Long id) {
FilterUdiRelRequest filterUdiRelRequest = new FilterUdiRelRequest();
filterUdiRelRequest.setId(id);
List<UdiRelevanceResponse> data = udiRelevanceDao.filterUdiRelevance(filterUdiRelRequest);
if (data != null && data.size() > 0)
return data.get(0);
return null;
}
@Override
public List<UdiRelevanceResponse> filterCertUdi(FilterUdiRelRequest filterUdiRelRequest) {
if (filterUdiRelRequest == null) {
return Collections.emptyList();
}
if (filterUdiRelRequest.getPage() != null) {
int offset = (filterUdiRelRequest.getPage() - 1) * filterUdiRelRequest.getLimit();
PageHelper.offsetPage(offset, filterUdiRelRequest.getLimit());
}
List<UdiRelevanceResponse> data = udiRelevanceDao.filterCertUdi(filterUdiRelRequest);
return data;
}
} }

@ -3,13 +3,14 @@ package com.glxp.api.service.purchase;
import com.baomidou.mybatisplus.extension.service.IService;
import com.glxp.api.entity.purchase.SupCertEntity; import com.glxp.api.entity.purchase.SupCertEntity;
import com.glxp.api.req.purchase.FilterSupCertRequest; import com.glxp.api.req.purchase.FilterSupCertRequest;
import com.glxp.api.req.purchase.purPlanPrintRequest; import com.glxp.api.req.purchase.purPlanPrintRequest;
import java.util.List; import java.util.List;
public interface SupCertService { public interface SupCertService extends IService<SupCertEntity> {
List<SupCertEntity> filterCompanyCert(FilterSupCertRequest filterSupCertRequest); List<SupCertEntity> filterCompanyCert(FilterSupCertRequest filterSupCertRequest);
@ -21,6 +22,8 @@ public interface SupCertService {
List<SupCertEntity> findAll(String customerId, String manufacturerId, String productId); List<SupCertEntity> findAll(String customerId, String manufacturerId, String productId);
List<SupCertEntity> selectCompanyCert(FilterSupCertRequest filterSupCertRequest);
List<SupCertEntity> getCompanyCert(FilterSupCertRequest filterSupCertRequest); List<SupCertEntity> getCompanyCert(FilterSupCertRequest filterSupCertRequest);

@ -1,14 +1,13 @@
package com.glxp.api.service.purchase; package com.glxp.api.service.purchase;
import com.baomidou.mybatisplus.extension.service.IService;
import com.glxp.api.entity.purchase.SupCertSetEntity; import com.glxp.api.entity.purchase.SupCertSetEntity;
import com.glxp.api.req.purchase.FilterCertSetsRequest; import com.glxp.api.req.purchase.FilterCertSetsRequest;
import java.util.List; import java.util.List;
public interface SupCertSetService { public interface SupCertSetService extends IService<SupCertSetEntity> {
List<SupCertSetEntity> filterCertSets(FilterCertSetsRequest filterCertSetsRequest); List<SupCertSetEntity> filterCertSets(FilterCertSetsRequest filterCertSetsRequest);

@ -2,12 +2,13 @@ package com.glxp.api.service.purchase;
import com.baomidou.mybatisplus.extension.service.IService;
import com.glxp.api.entity.purchase.SupCompanyEntity; import com.glxp.api.entity.purchase.SupCompanyEntity;
import com.glxp.api.req.purchase.FilterSupCompanyRequest; import com.glxp.api.req.purchase.FilterSupCompanyRequest;
import java.util.List; import java.util.List;
public interface SupCompanyService { public interface SupCompanyService extends IService<SupCompanyEntity> {
SupCompanyEntity findCompanyByUnitFk(String unitFk); SupCompanyEntity findCompanyByUnitFk(String unitFk);

@ -1,14 +1,13 @@
package com.glxp.api.service.purchase; package com.glxp.api.service.purchase;
import com.baomidou.mybatisplus.extension.service.IService;
import com.glxp.api.entity.purchase.SupManufacturerEntity; import com.glxp.api.entity.purchase.SupManufacturerEntity;
import com.glxp.api.req.purchase.FilterSupManufacturerRequest; import com.glxp.api.req.purchase.FilterSupManufacturerRequest;
import java.util.List; import java.util.List;
public interface SupManufacturerService { public interface SupManufacturerService extends IService<SupManufacturerEntity> {
SupManufacturerEntity findCompany(Long id); SupManufacturerEntity findCompany(Long id);

@ -1,6 +1,7 @@
package com.glxp.api.service.purchase; package com.glxp.api.service.purchase;
import com.baomidou.mybatisplus.extension.service.IService;
import com.glxp.api.entity.purchase.SupProductEntity; import com.glxp.api.entity.purchase.SupProductEntity;
import com.glxp.api.req.purchase.FilterPoductRequest; import com.glxp.api.req.purchase.FilterPoductRequest;
import com.glxp.api.res.purchase.SupProductResponse; import com.glxp.api.res.purchase.SupProductResponse;
@ -8,12 +9,17 @@ import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
public interface SupProductService { public interface SupProductService extends IService<SupProductEntity> {
SupProductEntity findRegistration(Long id); SupProductEntity findRegistration(Long id);
SupProductResponse findByProductId(String productId); SupProductResponse findByProductId(String productId);
SupProductEntity findByRelIdFk(String relIdFk);
SupProductEntity findByManufactury(String cpmctymc, String manufactory,String manufacturerIdFk);
SupProductResponse findByPassByReCert(String registerCert); SupProductResponse findByPassByReCert(String registerCert);
SupProductResponse findJoinRegistration(Long id); SupProductResponse findJoinRegistration(Long id);
@ -31,4 +37,4 @@ public interface SupProductService {
boolean deleteById(@Param("id") String id); boolean deleteById(@Param("id") String id);
boolean deleteByEnterpriseId(@Param("enterpriseId") String enterpriseId); boolean deleteByEnterpriseId(@Param("enterpriseId") String enterpriseId);
} }

@ -1,6 +1,7 @@
package com.glxp.api.service.purchase.impl; package com.glxp.api.service.purchase.impl;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.glxp.api.constant.ConstantStatus; import com.glxp.api.constant.ConstantStatus;
import com.glxp.api.dao.purchase.SupCertDao; import com.glxp.api.dao.purchase.SupCertDao;
@ -17,7 +18,7 @@ import java.util.List;
@Service @Service
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public class SupCertServiceImpl implements SupCertService { public class SupCertServiceImpl extends ServiceImpl<SupCertDao, SupCertEntity> implements SupCertService {
@Resource @Resource
SupCertDao supCertDao; SupCertDao supCertDao;
@ -34,6 +35,20 @@ public class SupCertServiceImpl implements SupCertService {
return supCertDao.filterCompanyCert(filterSupCertRequest); return supCertDao.filterCompanyCert(filterSupCertRequest);
} }
@Override
public List<SupCertEntity> selectCompanyCert(FilterSupCertRequest filterSupCertRequest) {
if (filterSupCertRequest == null) {
return Collections.emptyList();
}
if (filterSupCertRequest.getPage() != null) {
int offset = (filterSupCertRequest.getPage() - 1) * filterSupCertRequest.getLimit();
PageHelper.offsetPage(offset, filterSupCertRequest.getLimit());
}
List<SupCertEntity> companyEntities = supCertDao.getCompanyCert(filterSupCertRequest);
return companyEntities;
}
@Override @Override
public List<SupCertEntity> getCompanyCert(FilterSupCertRequest filterSupCertRequest) { public List<SupCertEntity> getCompanyCert(FilterSupCertRequest filterSupCertRequest) {
@ -97,8 +112,8 @@ public class SupCertServiceImpl implements SupCertService {
} }
@Override @Override
public boolean updateCustomerId(String oldId, String newId,Integer auditStatus) { public boolean updateCustomerId(String oldId, String newId, Integer auditStatus) {
return supCertDao.updateCustomerId(oldId, newId,auditStatus); return supCertDao.updateCustomerId(oldId, newId, auditStatus);
} }
@Override @Override

@ -1,5 +1,6 @@
package com.glxp.api.service.purchase.impl; package com.glxp.api.service.purchase.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.glxp.api.dao.purchase.SupCertSetDao; import com.glxp.api.dao.purchase.SupCertSetDao;
import com.glxp.api.entity.purchase.SupCertSetEntity; import com.glxp.api.entity.purchase.SupCertSetEntity;
@ -14,7 +15,7 @@ import java.util.List;
@Service @Service
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public class SupCertSetServiceImpl implements SupCertSetService { public class SupCertSetServiceImpl extends ServiceImpl<SupCertSetDao, SupCertSetEntity> implements SupCertSetService {
@Resource @Resource
SupCertSetDao supCertSetDao; SupCertSetDao supCertSetDao;

@ -1,5 +1,6 @@
package com.glxp.api.service.purchase.impl; package com.glxp.api.service.purchase.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.glxp.api.dao.purchase.SupCompanyDao; import com.glxp.api.dao.purchase.SupCompanyDao;
import com.glxp.api.entity.purchase.SupCompanyEntity; import com.glxp.api.entity.purchase.SupCompanyEntity;
@ -14,7 +15,7 @@ import java.util.List;
@Service @Service
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public class SupCompanyServiceImpl implements SupCompanyService { public class SupCompanyServiceImpl extends ServiceImpl<SupCompanyDao,SupCompanyEntity> implements SupCompanyService {
@Resource @Resource
SupCompanyDao supCompanyDao; SupCompanyDao supCompanyDao;

@ -2,6 +2,7 @@ package com.glxp.api.service.purchase.impl;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.glxp.api.dao.purchase.SupManufacturerDao; import com.glxp.api.dao.purchase.SupManufacturerDao;
import com.glxp.api.entity.purchase.SupManufacturerEntity; import com.glxp.api.entity.purchase.SupManufacturerEntity;
@ -16,7 +17,7 @@ import java.util.List;
@Service @Service
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public class SupManufacturerServiceImpl implements SupManufacturerService { public class SupManufacturerServiceImpl extends ServiceImpl<SupManufacturerDao, SupManufacturerEntity> implements SupManufacturerService {
@Resource @Resource
SupManufacturerDao supManufacturerDao; SupManufacturerDao supManufacturerDao;

@ -2,6 +2,8 @@ package com.glxp.api.service.purchase.impl;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.glxp.api.constant.ConstantStatus; import com.glxp.api.constant.ConstantStatus;
import com.glxp.api.dao.purchase.SupProductDao; import com.glxp.api.dao.purchase.SupProductDao;
@ -18,7 +20,7 @@ import java.util.List;
@Service @Service
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public class SupProductServiceImpl implements SupProductService { public class SupProductServiceImpl extends ServiceImpl<SupProductDao, SupProductEntity> implements SupProductService {
@Resource @Resource
SupProductDao supProductDao; SupProductDao supProductDao;
@ -69,6 +71,37 @@ public class SupProductServiceImpl implements SupProductService {
return null; return null;
} }
@Override
public SupProductEntity findByRelIdFk(String relIdFk) {
List<SupProductEntity> supProductEntities = supProductDao.selectList(new QueryWrapper<SupProductEntity>().eq("relIdFk", relIdFk)
.and(tmp -> tmp.eq("auditStatus", ConstantStatus.AUDIT_PASS).or().eq("auditStatus", ConstantStatus.AUDIT_PASS))
.last("LIMIT 1"));
if (CollUtil.isNotEmpty(supProductEntities))
return supProductEntities.get(0);
else return null;
}
@Override
public SupProductEntity findByManufactury(String cpmctymc, String manufactory, String manufacturerIdFk) {
QueryWrapper<SupProductEntity> ew = new QueryWrapper<>();
if (StrUtil.isNotEmpty(manufactory)) {
ew.eq("manufactory", manufactory);
}
if (StrUtil.isNotEmpty(cpmctymc)) {
ew.eq("recordProductName", cpmctymc);
}
if (StrUtil.isNotEmpty(manufacturerIdFk)) {
ew.eq("manufacturerIdFk", manufacturerIdFk);
}
ew.last("limit 1");
List<SupProductEntity> supProductEntities = supProductDao.selectList(ew);
if (CollUtil.isNotEmpty(supProductEntities))
return supProductEntities.get(0);
else return null;
}
@Override @Override
public SupProductEntity findRegistrationByName(String recordProductName) { public SupProductEntity findRegistrationByName(String recordProductName) {
return supProductDao.findRegistrationByName(recordProductName); return supProductDao.findRegistrationByName(recordProductName);

@ -1,6 +1,7 @@
package com.glxp.api.service.system; package com.glxp.api.service.system;
import com.glxp.api.entity.system.SysPdfTemplateRelevanceStatemenEntity;
import com.glxp.api.entity.system.SystemPDFModuleEntity; import com.glxp.api.entity.system.SystemPDFModuleEntity;
import com.glxp.api.req.system.FilterPdfModuleRequest; import com.glxp.api.req.system.FilterPdfModuleRequest;
import com.glxp.api.req.system.SysPdfModuleSaveRequest; import com.glxp.api.req.system.SysPdfModuleSaveRequest;
@ -26,4 +27,6 @@ public interface SystemPDFModuleService {
boolean deleteById(Integer id); boolean deleteById(Integer id);
List<SystemPDFModuleEntity> findByLastTime(Date lastUpdateTime); List<SystemPDFModuleEntity> findByLastTime(Date lastUpdateTime);
SysPdfTemplateRelevanceStatemenEntity selectByStatemenId(String id);
} }

@ -2,6 +2,8 @@ package com.glxp.api.service.system.impl;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.glxp.api.dao.system.SystemPDFModuleDao; import com.glxp.api.dao.system.SystemPDFModuleDao;
import com.glxp.api.dao.system.SystemPDFTemplateRelevanceDao;
import com.glxp.api.entity.system.SysPdfTemplateRelevanceStatemenEntity;
import com.glxp.api.entity.system.SystemPDFModuleEntity; import com.glxp.api.entity.system.SystemPDFModuleEntity;
import com.glxp.api.req.system.FilterPdfModuleRequest; import com.glxp.api.req.system.FilterPdfModuleRequest;
import com.glxp.api.req.system.SysPdfModuleSaveRequest; import com.glxp.api.req.system.SysPdfModuleSaveRequest;
@ -19,6 +21,9 @@ public class SystemPDFModuleServiceImpl implements SystemPDFModuleService {
@Resource @Resource
SystemPDFModuleDao systemPDFModuleDao; SystemPDFModuleDao systemPDFModuleDao;
@Resource
SystemPDFTemplateRelevanceDao systemPDFTemplateRelevanceDao;
@Override @Override
public List<SystemPDFModuleEntity> queryPage(FilterPdfModuleRequest FilterPDFModuleRequest) { public List<SystemPDFModuleEntity> queryPage(FilterPdfModuleRequest FilterPDFModuleRequest) {
int offset = (FilterPDFModuleRequest.getPage() - 1) * FilterPDFModuleRequest.getLimit(); int offset = (FilterPDFModuleRequest.getPage() - 1) * FilterPDFModuleRequest.getLimit();
@ -67,4 +72,9 @@ public class SystemPDFModuleServiceImpl implements SystemPDFModuleService {
public List<SystemPDFModuleEntity> findByLastTime(Date lastUpdateTime) { public List<SystemPDFModuleEntity> findByLastTime(Date lastUpdateTime) {
return systemPDFModuleDao.selectByLastTime(lastUpdateTime); return systemPDFModuleDao.selectByLastTime(lastUpdateTime);
} }
@Override
public SysPdfTemplateRelevanceStatemenEntity selectByStatemenId(String id) {
return systemPDFTemplateRelevanceDao.selectByStatemenId(id);
}
} }

@ -312,4 +312,15 @@
<select id="selectNameByErpId" resultType="java.lang.String"> <select id="selectNameByErpId" resultType="java.lang.String">
select name from basic_corp where erpId = #{supId} select name from basic_corp where erpId = #{supId}
</select> </select>
<select id="getCorpList" resultType="com.glxp.api.entity.basic.BasicCorpEntity">
SELECT
*
FROM
basic_corp
WHERE
erpId NOT IN ( SELECT customerId FROM sup_company )
AND corpType = 2;
</select>
</mapper> </mapper>

@ -1248,4 +1248,174 @@
</where> </where>
limit 1 limit 1
</select> </select>
<!-- 资质证书选入产品分组查询-->
<select id="filterCertUdi" parameterType="com.glxp.api.req.basic.FilterUdiRelRequest"
resultType="com.glxp.api.res.basic.UdiRelevanceResponse">
select basic_udirel.*,
bht.name classifyName,
basic_products.originUuid,
basic_products.nameCode,
basic_products.deviceRecordKey,
basic_products.packRatio,
basic_products.packUnit,
basic_products.packLevel,
basic_products.bhxjsl,
basic_products.bhzxxsbzsl,
basic_products.zxxsbzbhsydysl,
basic_products.bhxjcpbm,
basic_products.bzcj,
basic_products.cpmctymc,
basic_products.cplb,
basic_products.flbm,
basic_products.ggxh,
basic_products.qxlb,
basic_products.tyshxydm,
basic_products.ylqxzcrbarmc,
basic_products.zczbhhzbapzbh,
basic_products.ylqxzcrbarywmc,
basic_products.sydycpbs,
basic_products.sjcpbm,
basic_products.versionNumber,
basic_products.diType,
basic_products.ybbm,
basic_products.sptm,
basic_products.manufactory,
basic_products.measname,
basic_products.productType,
basic_products.scbssfbhph,
basic_products.scbssfbhxlh,
basic_products.scbssfbhscrq,
basic_products.scbssfbhsxrq,
basic_products.cpms,
basic_products.allowNoBatch,
basic_products.allowNoExpire,
basic_products.allowNoProduct,
basic_products.allowNoSerial,
basic_products.spmc,
basic_products.cplx,
basic_products.hchzsb,
basic_products.cpdls,
basic_products.price,
basic_products.basicPrductRemak1,
basic_products.basicPrductRemak2,
basic_products.basicPrductRemak3,
basic_products.basicPrductRemak4,
basic_products.basicPrductRemak5,
basic_products.basicPrductRemak6,
basic_products.basicPrductRemak7,
basic_products.basicPrductRemak8
FROM basic_products
inner JOIN basic_udirel
ON basic_products.uuid = basic_udirel.uuid
left join basic_hosp_type bht on basic_udirel.relCode = bht.code
inner join company_product_relevance on company_product_relevance.udiRlIdFk = basic_udirel.id
<where>
<if test="ylqxzcrbarmc != '' and ylqxzcrbarmc != null">
AND ylqxzcrbarmc LIKE concat('%', #{ylqxzcrbarmc}, '%')
</if>
<if test="manufactory != '' and manufactory != null">
AND manufactory LIKE concat('%', #{manufactory}, '%')
</if>
<if test="relCode != '' and relCode != null">
AND relCode = #{relCode}
</if>
<if test="bindType != '' and bindType != null">
AND relCode is null
or trim(relCode) = ''
</if>
<if test="supName != '' and supName != null">
AND supName LIKE concat('%', #{supName}, '%')
</if>
<if test="nameCode != '' and nameCode != null">
AND nameCode LIKE concat(#{nameCode}, '%')
</if>
<if test="cpmctymc != '' and cpmctymc != null">
AND cpmctymc LIKE concat('%', #{cpmctymc}, '%')
</if>
<if test="ggxh != '' and ggxh != null">
AND ggxh LIKE concat('%', #{ggxh}, '%')
</if>
<if test="unionCode != '' and unionCode != null">
and (
nameCode LIKE concat('%', #{unionCode}, '%')
or ybbm LIKE concat('%', #{unionCode}, '%')
or sptm LIKE concat('%', #{unionCode}, '%'))
</if>
<if test="isDisable == false">
AND (basic_udirel.isDisable is null or basic_udirel.isDisable = false)
</if>
<if test="thrPiId != '' and thrPiId != null">
and (thirdId LIKE concat('%', #{thrPiId}, '%')
or thirdId1 LIKE concat('%', #{thrPiId}, '%')
or thirdId2 LIKE concat('%', #{thrPiId}, '%')
or thirdId3 LIKE concat('%', #{thrPiId}, '%')
or thirdId4 LIKE concat('%', #{thrPiId}, '%'))
</if>
<if test="uuid != '' and uuid != null">
AND basic_udirel.uuid = #{uuid}
</if>
<if test="thirdId != '' and thirdId != null">
AND thirdId = #{thirdId}
</if>
<if test="udplatCode != '' and udplatCode != null">
AND udplatCode = #{udplatCode}
</if>
<if test="zczbhhzbapzbh != '' and zczbhhzbapzbh != null">
AND zczbhhzbapzbh LIKE concat(#{zczbhhzbapzbh}, '%')
</if>
<if test="diType != '' and diType != null">
AND diType = #{diType}
</if>
<if test="filterType != null and filterType == 1">
AND (thirdId <![CDATA[<>]]> '' or thirdId1 <![CDATA[<>]]> '' or thirdId2 <![CDATA[<>]]> '' or
thirdId3 <![CDATA[<>]]> '' or thirdId4 <![CDATA[<>]]> '')
and basic_products.originUuid <![CDATA[<>]]> ''
</if>
<if test="filterType != null and filterType == 2">
AND basic_products.originUuid is NULL
</if>
<if test="filterType != null and filterType == 3">
AND (mainId is NULL or mainId = '')
and basic_products.originUuid <![CDATA[<>]]> ''
</if>
<if test="filterType != null and filterType == 4">
AND thirdId1 is NULL
and basic_products.originUuid <![CDATA[<>]]> ''
</if>
<if test="filterType != null and filterType == 5">
AND thirdId2 is NULL
and basic_products.originUuid <![CDATA[<>]]> ''
</if>
<if test="filterType != null and filterType == 6">
AND thirdId3 is NULL
and basic_products.originUuid <![CDATA[<>]]> ''
</if>
<if test="filterType != null and filterType == 7">
AND thirdId4 is NULL
and basic_products.originUuid <![CDATA[<>]]> ''
</if>
<if test="filterType != null and filterType == 10">
AND basic_udirel.updateTime is NULL
</if>
<if test="lockStatus != '' and lockStatus != null">
AND basic_udirel.lockStatus = #{lockStatus}
</if>
<if test="mainId != '' and mainId != null">
AND mainId = #{mainId}
</if>
<if test="id != '' and id != null">
AND basic_udirel.id = #{id}
</if>
<if test="customerId != '' and customerId != null">
AND company_product_relevance.unitFk = #{customerId}
</if>
<if test="tyshxydm != '' and tyshxydm != null">
AND basic_products.tyshxydm = #{tyshxydm}
</if>
</where>
GROUP BY cpmctymc, manufactory
</select>
</mapper> </mapper>

@ -36,6 +36,20 @@
ORDER BY id DESC ORDER BY id DESC
</select> </select>
<select id="selectCompanyCert" parameterType="com.glxp.api.req.purchase.FilterSupCertRequest"
resultType="com.glxp.api.entity.purchase.SupCertEntity">
SELECT * FROM sup_cert
<where>
<if test="customerId != null and customerId != ''">
and customerId = #{customerId}
</if>
<if test="name != null and name != ''">
and #{name}
</if>
</where>
</select>
<select id="findCompanyCertByName" parameterType="java.lang.String" <select id="findCompanyCertByName" parameterType="java.lang.String"
resultType="com.glxp.api.entity.purchase.SupCertEntity"> resultType="com.glxp.api.entity.purchase.SupCertEntity">
@ -57,7 +71,12 @@
<if test="manufacturerIdFk != null and manufacturerIdFk != ''"> <if test="manufacturerIdFk != null and manufacturerIdFk != ''">
and manufacturerIdFk = #{manufacturerIdFk} and manufacturerIdFk = #{manufacturerIdFk}
</if> </if>
<if test="productIdFk != null and productIdFk != ''">
and productIdFk = #{productIdFk}
</if>
<if test="type != null">
and type = #{type}
</if>
</where> </where>
</select> </select>
@ -170,4 +189,4 @@
ORDER BY id DESC ORDER BY id DESC
</select> </select>
</mapper> </mapper>

@ -15,10 +15,10 @@
<select id="filterCompany" parameterType="com.glxp.api.req.purchase.FilterSupCompanyRequest" <select id="filterCompany" parameterType="com.glxp.api.req.purchase.FilterSupCompanyRequest"
resultType="com.glxp.api.entity.purchase.SupCompanyEntity"> resultType="com.glxp.api.entity.purchase.SupCompanyEntity">
SELECT SELECT
* *
<if test="manufacturerStatus!=null"> <if test="manufacturerStatus!=null">
,(SELECT count(*) FROM sup_manufacturer WHERE sup_company.customerId=sup_manufacturer.customerId AND sup_manufacturer.auditStatus!=1 AND sup_manufacturer.auditStatus!=0 AND sup_manufacturer.auditStatus!=4 ) as failCout, ,(SELECT count(*) FROM sup_manufacturer WHERE sup_company.customerId=sup_manufacturer.customerId AND sup_manufacturer.auditStatus!=1 AND sup_manufacturer.auditStatus!=0 AND sup_manufacturer.auditStatus!=4 ) as failCout,
(SELECT count(*) FROM sup_manufacturer WHERE sup_company.customerId=sup_manufacturer.customerId AND (sup_manufacturer.auditStatus=1 OR sup_manufacturer.auditStatus=4) ) as passCout (SELECT count(*) FROM sup_manufacturer WHERE sup_company.customerId=sup_manufacturer.customerId AND (sup_manufacturer.auditStatus=1 OR sup_manufacturer.auditStatus=4) ) as passCout
,(SELECT count(*) FROM sup_product WHERE sup_company.customerId=sup_product.customerId AND sup_product.auditStatus!=0 AND sup_product.auditStatus!=1 AND sup_product.auditStatus!=4 ) as productFailCout, ,(SELECT count(*) FROM sup_product WHERE sup_company.customerId=sup_product.customerId AND sup_product.auditStatus!=0 AND sup_product.auditStatus!=1 AND sup_product.auditStatus!=4 ) as productFailCout,
(SELECT count(*) FROM sup_product WHERE sup_company.customerId=sup_product.customerId AND (sup_product.auditStatus=1 OR sup_product.auditStatus=4) ) as prouctPassCout (SELECT count(*) FROM sup_product WHERE sup_company.customerId=sup_product.customerId AND (sup_product.auditStatus=1 OR sup_product.auditStatus=4) ) as prouctPassCout
</if> </if>
@ -187,7 +187,5 @@
#{auditTime}, #{auditComment}, #{editStatus}) #{auditTime}, #{auditComment}, #{editStatus})
</insert> </insert>
<select id="selectNameByCustomerId" resultType="java.lang.String">
select companyName from sup_company where customerId = #{customerId} </mapper>
</select>
</mapper>

@ -99,6 +99,7 @@
<if test="manufacturerId != null">manufacturerId=#{manufacturerId},</if> <if test="manufacturerId != null">manufacturerId=#{manufacturerId},</if>
<if test="auditStatus != null">auditStatus=#{auditStatus},</if> <if test="auditStatus != null">auditStatus=#{auditStatus},</if>
<if test="auditComment != null">auditComment=#{auditComment},</if> <if test="auditComment != null">auditComment=#{auditComment},</if>
<if test="agentName != null">agentName=#{agentName},</if>
</set> </set>
@ -114,7 +115,7 @@
registerStatus, productionLicenceNum, productionLicenceDate, registerStatus, productionLicenceNum, productionLicenceDate,
productionRecordNum, productionRecordSection, productionRecordDate, productionRecordNum, productionRecordSection, productionRecordDate,
remark, createTime, updateTime, customerId, manufacturerId, remark, createTime, updateTime, customerId, manufacturerId,
auditStatus, auditComment) auditStatus, auditComment,agentName)
values (#{companyName}, #{creditCode}, #{companyType}, values (#{companyName}, #{creditCode}, #{companyType},
#{placeArea}, #{placeAreaCode}, #{placeAddress}, #{placeArea}, #{placeAreaCode}, #{placeAddress},
#{legalPersonName}, #{legalPersonPapersType}, #{legalPersonPapersCode}, #{legalPersonName}, #{legalPersonPapersType}, #{legalPersonPapersCode},
@ -122,7 +123,7 @@
#{registerStatus}, #{productionLicenceNum}, #{productionLicenceDate}, #{registerStatus}, #{productionLicenceNum}, #{productionLicenceDate},
#{productionRecordNum}, #{productionRecordSection}, #{productionRecordDate}, #{productionRecordNum}, #{productionRecordSection}, #{productionRecordDate},
#{remark}, #{createTime}, #{updateTime}, #{customerId}, #{manufacturerId}, #{auditStatus}, #{remark}, #{createTime}, #{updateTime}, #{customerId}, #{manufacturerId}, #{auditStatus},
#{auditComment}) #{auditComment},#{agentName})
</insert> </insert>
<delete id="deleteById" parameterType="Map"> <delete id="deleteById" parameterType="Map">
@ -157,7 +158,4 @@
</where> </where>
</select> </select>
<select id="selectNameByManufacturerId" resultType="java.lang.String">
select companyName from sup_manufacturer where manufacturerId = #{manufacturerId}
</select>
</mapper> </mapper>

@ -2,7 +2,6 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.api.dao.purchase.SupProductDao"> <mapper namespace="com.glxp.api.dao.purchase.SupProductDao">
<select id="findRegistration" parameterType="java.lang.Long" <select id="findRegistration" parameterType="java.lang.Long"
resultType="com.glxp.api.entity.purchase.SupProductEntity"> resultType="com.glxp.api.entity.purchase.SupProductEntity">
SELECT * SELECT *
@ -19,7 +18,8 @@
<select id="filterProducts" parameterType="com.glxp.api.req.purchase.FilterPoductRequest" <select id="filterProducts" parameterType="com.glxp.api.req.purchase.FilterPoductRequest"
resultType="com.glxp.api.entity.purchase.SupProductEntity"> resultType="com.glxp.api.entity.purchase.SupProductEntity">
SELECT sup_product.* FROM sup_product SELECT sup_product.*
FROM sup_product
<where> <where>
<if test="id != null and id != ''"> <if test="id != null and id != ''">
and sup_product.id = #{id} and sup_product.id = #{id}
@ -30,14 +30,21 @@
<if test="enterpriseId != null and enterpriseId != ''"> <if test="enterpriseId != null and enterpriseId != ''">
and sup_product.enterpriseId = #{enterpriseId} and sup_product.enterpriseId = #{enterpriseId}
</if> </if>
<if test="relIdFk != null and relIdFk != ''">
and sup_product.relIdFk = #{relIdFk}
</if>
<if test="manufactory != null and manufactory != ''">
and sup_product.manufactory = #{manufactory}
</if>
<if test="recordCode != null and recordCode != ''"> <if test="recordCode != null and recordCode != ''">
and sup_product.recordCode like concat('%',#{recordCode},'%') and sup_product.recordCode like concat('%', #{recordCode}, '%')
</if> </if>
<if test="recordProductName != null and recordProductName != ''"> <if test="recordProductName != null and recordProductName != ''">
and sup_product.recordProductName like concat('%',#{recordProductName},'%') and sup_product.recordProductName like concat('%', #{recordProductName}, '%')
</if> </if>
<if test="recordPeopleName != null and recordPeopleName != ''"> <if test="recordPeopleName != null and recordPeopleName != ''">
and sup_product.recordPeopleName like concat('%',#{recordPeopleName},'%') and sup_product.recordPeopleName like concat('%', #{recordPeopleName}, '%')
</if> </if>
<if test="manufacturerIdFk != null and manufacturerIdFk != ''"> <if test="manufacturerIdFk != null and manufacturerIdFk != ''">
and sup_product.manufacturerIdFk = #{manufacturerIdFk} and sup_product.manufacturerIdFk = #{manufacturerIdFk}
@ -45,24 +52,24 @@
<if test="customerId != null and customerId != ''"> <if test="customerId != null and customerId != ''">
and sup_product.customerId = #{customerId} and sup_product.customerId = #{customerId}
</if> </if>
<if test="auditStatus != null and auditStatus !=20 and auditStatus !=22 and auditStatus !=21"> <if test="auditStatus != null and auditStatus != 20 and auditStatus != 22 and auditStatus != 21">
and sup_product.auditStatus = #{auditStatus} and sup_product.auditStatus = #{auditStatus}
</if> </if>
<if test="manufactory != null and manufactory != ''"> <if test="auditStatus == 20">
and sup_product.manufactory = #{manufactory} and (sup_product.auditStatus = 0 or sup_product.auditStatus = 5 or
</if> sup_product.auditStatus = 2)
<if test="auditStatus ==20">
and (sup_product.auditStatus = 0 or sup_product.auditStatus=5 or
sup_product.auditStatus=2)
</if> </if>
<if test="auditStatus ==21"> <if test="auditStatus == 21">
and <![CDATA[ sup_product.auditStatus <> 0 ]]> and <![CDATA[ sup_product.auditStatus <> 0
]]>
</if> </if>
<if test="auditStatus ==22"> <if test="auditStatus == 22">
and (sup_product.auditStatus = 1 or sup_product.auditStatus=4 ) and (sup_product.auditStatus = 1 or sup_product.auditStatus = 4)
</if> </if>
<if test="lastUpdateTime!=null and lastUpdateTime!=''"> <if test="lastUpdateTime != null and lastUpdateTime != ''">
<![CDATA[ and DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S')>= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S') ]]> <![CDATA[
and DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S') >= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S')
]]>
</if> </if>
</where> </where>
</select> </select>
@ -70,19 +77,68 @@
<select id="getRegistration" parameterType="com.glxp.api.req.purchase.FilterPoductRequest" <select id="getRegistration" parameterType="com.glxp.api.req.purchase.FilterPoductRequest"
resultType="com.glxp.api.res.purchase.SupProductResponse"> resultType="com.glxp.api.res.purchase.SupProductResponse">
SELECT sup_product.* ,sup_company.companyName SELECT sup_product.id,
supName,sup_manufacturer.companyName manufacturerName FROM sup_product sup_product.productId,
inner join sup_company sup_product.enterpriseId,
on sup_product.customerId = sup_company.customerId sup_product.recordCode,
INNER JOIN sup_manufacturer sup_product.recordProductName,
on sup_manufacturer.manufacturerId = sup_product.productManageType,
sup_product.manufacturerIdFk sup_product.recordPeopleName,
sup_product.recordPeopleArea,
sup_product.recordPeopleAreaCode,
sup_product.recordPeopleAddress,
sup_product.productType,
sup_product.productDirectoryCode,
sup_product.agentArea,
sup_product.agentAreaCode,
sup_product.agentAddress,
sup_product.instructions,
sup_product.productAddress,
sup_product.recordText,
sup_product.placeOrigin,
sup_product.productionRegion,
sup_product.productionCompanyName,
sup_product.afterSale,
sup_product.specification,
sup_product.structure,
sup_product.scope,
sup_product.other,
sup_product.filePath,
sup_product.manufacturerIdFk,
sup_product.customerId,
sup_product.auditStatus,
sup_product.auditComment,
sup_product.sptm,
sup_product.ybbm,
sup_product.measname,
sup_product.cpms,
sup_product.relIdFk,
sup_product.hchzsb,
sup_product.remark,
sup_product.createUser,
sup_product.createTime,
sup_product.updateUser,
sup_product.updateTime,
sup_product.manufactory,
sup_product.allowNoBatch,
sup_product.allowNoExpire,
sup_product.allowNoProduct,
sup_product.allowNoSerial,
sup_company.companyName supName,
sup_manufacturer.companyName manufacturerName,
sup_manufacturer.companyName,
sup_manufacturer.agentName
FROM sup_product
inner join sup_company
on sup_product.customerId = sup_company.customerId
INNER JOIN sup_manufacturer
on sup_manufacturer.manufacturerId =
sup_product.manufacturerIdFk
<where> <where>
<if test="id != null and id != ''"> <if test="id != null and id != ''">
and sup_product.id = #{id} and sup_product.id = #{id}
</if> </if>
<if test="productId != null and productId != ''"> <if test="productId != null and productId != ''">
and sup_product.productId = #{productId} and sup_product.productId = #{productId}
</if> </if>
@ -90,13 +146,13 @@
and sup_product.enterpriseId = #{enterpriseId} and sup_product.enterpriseId = #{enterpriseId}
</if> </if>
<if test="recordCode != null and recordCode != ''"> <if test="recordCode != null and recordCode != ''">
and sup_product.recordCode like concat('%',#{recordCode},'%') and sup_product.recordCode like concat('%', #{recordCode}, '%')
</if> </if>
<if test="recordProductName != null and recordProductName != ''"> <if test="recordProductName != null and recordProductName != ''">
and sup_product.recordProductName like concat('%',#{recordProductName},'%') and sup_product.recordProductName like concat('%', #{recordProductName}, '%')
</if> </if>
<if test="recordPeopleName != null and recordPeopleName != ''"> <if test="recordPeopleName != null and recordPeopleName != ''">
and sup_product.recordPeopleName like concat('%',#{recordPeopleName},'%') and sup_product.recordPeopleName like concat('%', #{recordPeopleName}, '%')
</if> </if>
<if test="manufacturerIdFk != null and manufacturerIdFk != ''"> <if test="manufacturerIdFk != null and manufacturerIdFk != ''">
and sup_product.manufacturerIdFk = #{manufacturerIdFk} and sup_product.manufacturerIdFk = #{manufacturerIdFk}
@ -104,138 +160,222 @@
<if test="customerId != null and customerId != ''"> <if test="customerId != null and customerId != ''">
and sup_product.customerId = #{customerId} and sup_product.customerId = #{customerId}
</if> </if>
<if test="auditStatus != null and auditStatus !=20 and auditStatus !=22 and auditStatus !=21"> <if test="auditStatus != null and auditStatus != 20 and auditStatus != 22 and auditStatus != 21">
and sup_product.auditStatus = #{auditStatus} and sup_product.auditStatus = #{auditStatus}
</if> </if>
<if test="auditStatus ==20"> <if test="auditStatus == 20">
and (sup_product.auditStatus = 0 or sup_product.auditStatus=5 or and (sup_product.auditStatus = 0 or sup_product.auditStatus = 5 or
sup_product.auditStatus=2) sup_product.auditStatus = 2)
</if> </if>
<if test="auditStatus ==21"> <if test="auditStatus == 21">
and <![CDATA[ sup_product.auditStatus <> 0 ]]> and <![CDATA[ sup_product.auditStatus <> 0
]]>
</if>
<if test="relIdFk != null and relIdFk != ''">
and sup_product.relIdFk = #{relIdFk}
</if> </if>
<if test="manufactory != null and manufactory != ''"> <if test="manufactory != null and manufactory != ''">
and sup_product.manufactory = #{manufactory} and sup_product.manufactory = #{manufactory}
</if> </if>
<if test="auditStatus ==22"> <if test="auditStatus == 22">
and (sup_product.auditStatus = 1 or sup_product.auditStatus=4 ) and (sup_product.auditStatus = 1 or sup_product.auditStatus = 4)
</if> </if>
</where> </where>
</select> </select>
<update id="modifyRegistration" parameterType="com.glxp.api.entity.purchase.SupProductEntity"> <update id="modifyRegistration" parameterType="com.glxp.api.entity.purchase.SupProductEntity">
UPDATE sup_product UPDATE sup_product
<set> <set>
<if test="enterpriseId != null">enterpriseId=#{enterpriseId},</if> <if test="enterpriseId != null">
<if test="recordCode != null">recordCode=#{recordCode},</if> enterpriseId=#{enterpriseId},
<if test="recordProductName != null">recordProductName=#{recordProductName},</if> </if>
<if test="productManageType != null">productManageType=#{productManageType},</if> <if test="recordCode != null">
<if test="recordPeopleName != null">recordPeopleName=#{recordPeopleName},</if> recordCode=#{recordCode},
<if test="recordPeopleArea != null">recordPeopleArea=#{recordPeopleArea},</if> </if>
<if test="recordPeopleAreaCode != null">recordPeopleAreaCode=#{recordPeopleAreaCode},</if> <if test="recordProductName != null">
<if test="recordPeopleAddress != null">recordPeopleAddress=#{recordPeopleAddress},</if> recordProductName=#{recordProductName},
<if test="productType != null">productType=#{productType},</if> </if>
<if test="productDirectoryCode != null">productDirectoryCode=#{productDirectoryCode},</if> <if test="productManageType != null">
<if test="agentName != null">agentName=#{agentName},</if> productManageType=#{productManageType},
<if test="agentArea != null">agentArea=#{agentArea},</if> </if>
<if test="agentAreaCode != null">agentAreaCode=#{agentAreaCode},</if> <if test="recordPeopleName != null">
<if test="agentAddress != null">agentAddress=#{agentAddress},</if> recordPeopleName=#{recordPeopleName},
<if test="instructions != null">instructions=#{instructions},</if> </if>
<if test="productAddress != null">productAddress=#{productAddress},</if> <if test="recordPeopleArea != null">
<if test="recordText != null">recordText=#{recordText},</if> recordPeopleArea=#{recordPeopleArea},
<if test="placeOrigin != null">placeOrigin=#{placeOrigin},</if> </if>
<if test="productionRegion != null">productionRegion=#{productionRegion},</if> <if test="recordPeopleAreaCode != null">
<if test="productionCompanyName != null">productionCompanyName=#{productionCompanyName},</if> recordPeopleAreaCode=#{recordPeopleAreaCode},
<if test="afterSale != null">afterSale=#{afterSale},</if> </if>
<if test="specification != null">specification=#{specification},</if> <if test="recordPeopleAddress != null">
<if test="structure != null">structure=#{structure},</if> recordPeopleAddress=#{recordPeopleAddress},
<if test="scope != null">scope=#{scope},</if> </if>
<if test="other != null">other=#{other},</if> <if test="productType != null">
<if test="filePath != null">filePath=#{filePath},</if> productType=#{productType},
<if test="remark != null">remark=#{remark},</if> </if>
<if test="createTime != null">createTime=#{createTime},</if> <if test="productDirectoryCode != null">
<if test="updateTime != null">updateTime=#{updateTime},</if> productDirectoryCode=#{productDirectoryCode},
<if test="manufacturerIdFk != null">manufacturerIdFk=#{manufacturerIdFk},</if> </if>
<if test="customerId != null">customerId=#{customerId},</if> <if test="agentName != null">
<if test="productId != null">productId=#{productId},</if> agentName=#{agentName},
<if test="auditStatus != null">auditStatus=#{auditStatus},</if> </if>
<if test="auditComment != null">auditComment=#{auditComment},</if> <if test="agentArea != null">
<if test="sptm != null">sptm=#{sptm},</if> agentArea=#{agentArea},
<if test="ybbm != null">ybbm=#{ybbm},</if> </if>
<if test="measname != null">measname=#{measname},</if> <if test="agentAreaCode != null">
<if test="cpms != null">cpms=#{cpms},</if> agentAreaCode=#{agentAreaCode},
<if test="hchzsb != null">hchzsb=#{hchzsb},</if> </if>
<if test="relIdFk != null">relIdFk=#{relIdFk},</if> <if test="agentAddress != null">
<if test="manufactory != null">manufactory=#{manufactory},</if> agentAddress=#{agentAddress},
<if test="allowNoBatch != null">allowNoBatch=#{allowNoBatch},</if> </if>
<if test="allowNoExpire != null">allowNoExpire=#{allowNoExpire},</if> <if test="instructions != null">
<if test="allowNoProduct != null">allowNoProduct=#{allowNoProduct},</if> instructions=#{instructions},
<if test="allowNoSerial != null">allowNoSerial=#{allowNoSerial},</if> </if>
<if test="productAddress != null">
productAddress=#{productAddress},
</if>
<if test="recordText != null">
recordText=#{recordText},
</if>
<if test="placeOrigin != null">
placeOrigin=#{placeOrigin},
</if>
<if test="productionRegion != null">
productionRegion=#{productionRegion},
</if>
<if test="productionCompanyName != null">
productionCompanyName=#{productionCompanyName},
</if>
<if test="afterSale != null">
afterSale=#{afterSale},
</if>
<if test="specification != null">
specification=#{specification},
</if>
<if test="structure != null">
structure=#{structure},
</if>
<if test="scope != null">
scope=#{scope},
</if>
<if test="other != null">
other=#{other},
</if>
<if test="filePath != null">
filePath=#{filePath},
</if>
<if test="remark != null">
remark=#{remark},
</if>
<if test="createTime != null">
createTime=#{createTime},
</if>
<if test="updateTime != null">
updateTime=#{updateTime},
</if>
<if test="manufacturerIdFk != null">
manufacturerIdFk=#{manufacturerIdFk},
</if>
<if test="customerId != null">
customerId=#{customerId},
</if>
<if test="productId != null">
productId=#{productId},
</if>
<if test="auditStatus != null">
auditStatus=#{auditStatus},
</if>
<if test="auditComment != null">
auditComment=#{auditComment},
</if>
<if test="sptm != null">
sptm=#{sptm},
</if>
<if test="ybbm != null">
ybbm=#{ybbm},
</if>
<if test="measname != null">
measname=#{measname},
</if>
<if test="hchzsb != null">
hchzsb=#{hchzsb},
</if>
<if test="relIdFk != null">
relIdFk=#{relIdFk},
</if>
<if test="manufactory != null">
manufactory=#{manufactory},
</if>
<if test="allowNoBatch != null">
allowNoBatch=#{allowNoBatch},
</if>
<if test="allowNoExpire != null">
allowNoExpire=#{allowNoExpire},
</if>
<if test="allowNoProduct != null">
allowNoProduct=#{allowNoProduct},
</if>
<if test="allowNoSerial != null">
allowNoSerial=#{allowNoSerial},
</if>
</set> </set>
WHERE id=#{id} WHERE id = #{id}
</update> </update>
<insert id="insertRegistration" parameterType="com.glxp.api.entity.purchase.SupProductEntity"> <insert id="insertRegistration" parameterType="com.glxp.api.entity.purchase.SupProductEntity">
replace replace
INTO sup_product(enterpriseId, recordCode, recordProductName, INTO sup_product(enterpriseId, recordCode, recordProductName,
productManageType, recordPeopleName, recordPeopleArea, productManageType, recordPeopleName, recordPeopleArea,
recordPeopleAreaCode, recordPeopleAddress, productType, recordPeopleAreaCode, recordPeopleAddress, productType,
productDirectoryCode, agentName, agentArea, productDirectoryCode, agentName, agentArea,
agentAreaCode, agentAddress, instructions, agentAreaCode, agentAddress, instructions,
productAddress, recordText, placeOrigin, productAddress, recordText, placeOrigin,
productionRegion, productionCompanyName, afterSale, productionRegion, productionCompanyName, afterSale,
specification, structure, `scope`, specification, structure, `scope`,
other, filePath, remark, other, filePath, remark,
createTime, updateTime, manufacturerIdFk, customerId, productId createTime, updateTime, manufacturerIdFk, customerId, productId
, auditStatus, auditComment, sptm, ybbm, measname, cpms, hchzsb,relIdFk,manufactory, allowNoBatch, , auditStatus, auditComment, sptm, ybbm, measname, hchzsb, relIdFk, manufactory, allowNoBatch,
allowNoExpire, allowNoProduct, allowNoSerial) allowNoExpire, allowNoProduct, allowNoSerial)
values ( values (#{enterpriseId},
#{enterpriseId}, #{recordCode},
#{recordCode}, #{recordProductName},
#{recordProductName}, #{productManageType},
#{productManageType}, #{recordPeopleName},
#{recordPeopleName}, #{recordPeopleArea},
#{recordPeopleArea}, #{recordPeopleAreaCode},
#{recordPeopleAreaCode}, #{recordPeopleAddress},
#{recordPeopleAddress}, #{productType},
#{productType}, #{productDirectoryCode},
#{productDirectoryCode}, #{agentName},
#{agentName}, #{agentArea},
#{agentArea}, #{agentAreaCode},
#{agentAreaCode}, #{agentAddress},
#{agentAddress}, #{instructions},
#{instructions}, #{productAddress},
#{productAddress}, #{recordText},
#{recordText}, #{placeOrigin},
#{placeOrigin}, #{productionRegion},
#{productionRegion}, #{productionCompanyName},
#{productionCompanyName}, #{afterSale},
#{afterSale}, #{specification},
#{specification}, #{structure},
#{structure}, #{scope},
#{scope}, #{other},
#{other}, #{filePath},
#{filePath}, #{remark},
#{remark}, #{createTime},
#{createTime}, #{updateTime},
#{updateTime}, #{manufacturerIdFk},
#{manufacturerIdFk}, #{customerId},
#{customerId}, #{productId}
#{productId}, ,
#{auditStatus}, #{auditStatus},
#{auditComment}, #{auditComment},
#{sptm}, #{sptm},
#{ybbm}, #{ybbm},
#{measname}, #{measname},
#{cpms}, #{hchzsb}, #{relIdFk}, #{manufactory}, #{allowNoBatch}, #{allowNoExpire}, #{allowNoProduct},
#{hchzsb}, #{allowNoSerial})
#{relIdFk},
#{manufactory}, #{allowNoBatch}, #{allowNoExpire}, #{allowNoProduct},
#{allowNoSerial}
)
</insert> </insert>
<delete id="deleteById" parameterType="Map"> <delete id="deleteById" parameterType="Map">
@ -249,5 +389,4 @@
FROM sup_product FROM sup_product
WHERE enterpriseId = #{enterpriseId} WHERE enterpriseId = #{enterpriseId}
</delete> </delete>
</mapper>
</mapper>

@ -128,4 +128,11 @@
</if> </if>
</where> </where>
</select> </select>
<select id="selectByStatemenId" parameterType="java.lang.String"
resultType="com.glxp.api.entity.system.SysPdfTemplateRelevanceStatemenEntity">
select *
FROM sys_pdf_template_relevance_statemen
WHERE id = #{id}
</select>
</mapper> </mapper>

Loading…
Cancel
Save