配送企业资质打印功能代码提交

zhairh
郑明梁 2 years ago
parent 7f8ce8be8c
commit 99d6f4c9dc

@ -69,10 +69,13 @@ public class SystemPDFTemplateController {
String data = "";
if (systemPDFTemplateEntity.getModule() == 2) {
data =
"{\"data\":[{\"batchNo\":\"2020\",\"billNo\":\"2022040811589\",\"billType\":\"ST39730635520\",\"billdate\":\"2022-04-08\",\"corpId\":\"39864007581\",\"corpName\":\"漳州**有限公司\",\"count\":\"4\",\"customerId\":\"39864007581\",\"expireDate\":\"251020\",\"id\":\"10\",\"index\":\"1\",\"locInv\":\"总库\",\"orderIdFk\":\"SM412208685600\",\"printStatus\":\"102\",\"productDate\":\"201020\",\"productId\":\"169\",\"productName\":\"一次性使用开环式微创肛肠吻合器\",\"sourceType\":\"1\",\"spec\":\"TST33-T80——2993规格\",\"status\":\"5\",\"sweepCount\":\"0\",\"title\":\"漳州**医院\",\"type\":\"2\",\"unitIdFk\":\"39864007581\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"苏械注准2022000000\",\"price\":\"10.00\",\"maintenanceStatus\":\"已养护\",\"code\":\"0106972825505180112101241725012421x003\",\"orderId\":\"DMA202212300022\",\"createTime\":\"2022-12-30 11:06:43\",\"createUser\":\"超级用户\",\"remark\":\"备注\",\"productName\":\"裂解仪\",\"deviceStatus\":\"正常\",\"auditUser\":\"超级用户\"},{\"batchNo\":\"2023\",\"billNo\":\"2022040811589\",\"billType\":\"ST39730635520\",\"billdate\":\"2022-04-08\",\"corpId\":\"39864007581\",\"corpName\":\"漳州**有限公司\",\"count\":\"4\",\"customerId\":\"39864007581\",\"expireDate\":\"251020\",\"id\":\"10\",\"index\":\"2\",\"locInv\":\"总库\",\"orderIdFk\":\"SM412208685600\",\"printStatus\":\"102\",\"productDate\":\"201020\",\"productId\":\"169\",\"productName\":\"一次性使用开环式微创肛肠吻合器\",\"sourceType\":\"1\",\"spec\":\"TST33-T80——2993规格\",\"status\":\"5\",\"sweepCount\":\"0\",\"title\":\"漳州**医院\",\"type\":\"2\",\"unitIdFk\":\"39864007581\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"苏械注准2022000000\",\"price\":\"10.00\",\"maintenanceStatus\":\"已养护\",\"code\":\"0106972825505180112101241725012421x003\",\"orderId\":\"DMA202212300022\",\"createTime\":\"2022-12-30 11:06:43\",\"createUser\":\"超级用户\",\"remark\":\"备注\",\"productName\":\"裂解仪\",\"deviceStatus\":\"正常\",\"auditUser\":\"超级用户\"},{\"batchNo\":\"2021\",\"billNo\":\"2022040811589\",\"billType\":\"ST39730635520\",\"billdate\":\"2022-04-08\",\"corpId\":\"39864007581\",\"corpName\":\"漳州**有限公司\",\"count\":\"4\",\"customerId\":\"39864007581\",\"expireDate\":\"251020\",\"id\":\"10\",\"index\":\"3\",\"locInv\":\"总库\",\"orderIdFk\":\"SM412208685600\",\"printStatus\":\"102\",\"productDate\":\"201020\",\"productId\":\"169\",\"productName\":\"一次性使用开环式微创肛肠吻合器\",\"sourceType\":\"1\",\"spec\":\"TST33-T80——2993规格\",\"status\":\"5\",\"sweepCount\":\"0\",\"title\":\"漳州**医院\",\"type\":\"2\",\"unitIdFk\":\"39864007581\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"苏械注准2022000000\",\"price\":\"10.00\",\"maintenanceStatus\":\"已养护\",\"code\":\"0106972825505180112101241725012421x003\",\"orderId\":\"DMA202212300022\",\"createTime\":\"2022-12-30 11:06:43\",\"createUser\":\"超级用户\",\"remark\":\"备注\",\"productName\":\"裂解仪\",\"deviceStatus\":\"正常\",\"auditUser\":\"超级用户\"}]}";
"{\"data\":[{\"batchNo\":\"2020\",\"billNo\":\"2022040811589\",\"billType\":\"ST39730635520\",\"billdate\":\"2022-04-08\",\"corpId\":\"39864007581\",\"corpName\":\"漳州**有限公司\",\"count\":\"4\",\"customerId\":\"39864007581\",\"expireDate\":\"251020\",\"id\":\"10\",\"index\":\"1\",\"locInv\":\"总库\",\"orderIdFk\":\"SM412208685600\",\"printStatus\":\"102\",\"productDate\":\"201020\",\"productId\":\"169\",\"productName\":\"一次性使用开环式微创肛肠吻合器\",\"sourceType\":\"1\",\"spec\":\"TST33-T80——2993规格\",\"status\":\"5\",\"sweepCount\":\"0\",\"title\":\"漳州**医院\",\"type\":\"2\",\"unitIdFk\":\"39864007581\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"苏械注准2022000000\",\"price\":\"10.00\"},{\"batchNo\":\"2023\",\"billNo\":\"2022040811589\",\"billType\":\"ST39730635520\",\"billdate\":\"2022-04-08\",\"corpId\":\"39864007581\",\"corpName\":\"漳州**有限公司\",\"count\":\"4\",\"customerId\":\"39864007581\",\"expireDate\":\"251020\",\"id\":\"10\",\"index\":\"2\",\"locInv\":\"总库\",\"orderIdFk\":\"SM412208685600\",\"printStatus\":\"102\",\"productDate\":\"201020\",\"productId\":\"169\",\"productName\":\"一次性使用开环式微创肛肠吻合器\",\"sourceType\":\"1\",\"spec\":\"TST33-T80——2993规格\",\"status\":\"5\",\"sweepCount\":\"0\",\"title\":\"漳州**医院\",\"type\":\"2\",\"unitIdFk\":\"39864007581\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"苏械注准2022000000\",\"price\":\"10.00\"},{\"batchNo\":\"2021\",\"billNo\":\"2022040811589\",\"billType\":\"ST39730635520\",\"billdate\":\"2022-04-08\",\"corpId\":\"39864007581\",\"corpName\":\"漳州**有限公司\",\"count\":\"4\",\"customerId\":\"39864007581\",\"expireDate\":\"251020\",\"id\":\"10\",\"index\":\"3\",\"locInv\":\"总库\",\"orderIdFk\":\"SM412208685600\",\"printStatus\":\"102\",\"productDate\":\"201020\",\"productId\":\"169\",\"productName\":\"一次性使用开环式微创肛肠吻合器\",\"sourceType\":\"1\",\"spec\":\"TST33-T80——2993规格\",\"status\":\"5\",\"sweepCount\":\"0\",\"title\":\"漳州**医院\",\"type\":\"2\",\"unitIdFk\":\"39864007581\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"苏械注准2022000000\",\"price\":\"10.00\",\"maintenanceStatus\":\"已养护\",\"code\":\"0106972825505180112101241725012421x003\",\"orderId\":\"DMA202212300022\",\"createTime\":\"2022/12/30 11:06:43\",\"createUser\":\"超级用户\",\"remark\":\"备注\",\"productName\":\"裂解仪\",\"deviceStatus\":\"正常\"}]}";
} else if (systemPDFTemplateEntity.getModule() == 0) {
data =
"{\"data\":[{\"batchNo\":\"2021\",\"corpName\":\"漳州***医院\",\"count\":10,\"cpmctymc\":\"髋关节假体\",\"expireDate\":\"230606\",\"ggxh\":\"DTUCS Ⅱ 3#\",\"id\":4,\"nameCode\":\"06902139302144\",\"produceDate\":\"210606\",\"udiCode\":\"#06902139302144#210606#230606#2021###\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"国械注准201000000000\",\"orderId\":\"MP202212200001\"},{\"batchNo\":\"2021\",\"corpName\":\"漳州***医院\",\"count\":10,\"cpmctymc\":\"髋关节假体\",\"expireDate\":\"230606\",\"ggxh\":\"DTUCS Ⅱ 3#\",\"id\":4,\"nameCode\":\"06902139302144\",\"produceDate\":\"210606\",\"udiCode\":\"#06902139302144#210606#230606#2021###\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"国械注准201000000000\",\"orderId\":\"MP202212200001\"},{\"batchNo\":\"2021\",\"corpName\":\"漳州***医院\",\"count\":10,\"cpmctymc\":\"髋关节假体\",\"expireDate\":\"230606\",\"ggxh\":\"DTUCS Ⅱ 3#\",\"id\":4,\"nameCode\":\"06902139302144\",\"produceDate\":\"210606\",\"udiCode\":\"#06902139302144#210606#230606#2021###\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"国械注准201000000000\",\"orderId\":\"MP202212200001\"},{\"batchNo\":\"2021\",\"corpName\":\"漳州***医院\",\"count\":10,\"cpmctymc\":\"髋关节假体\",\"expireDate\":\"230606\",\"ggxh\":\"DTUCS Ⅱ 3#\",\"id\":4,\"nameCode\":\"06902139302144\",\"produceDate\":\"210606\",\"udiCode\":\"#06902139302144#210606#230606#2021###\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"国械注准201000000000\",\"orderId\":\"MP202212200001\"},{\"batchNo\":\"2021\",\"corpName\":\"漳州***医院\",\"count\":10,\"cpmctymc\":\"髋关节假体\",\"expireDate\":\"230606\",\"ggxh\":\"DTUCS Ⅱ 3#\",\"id\":4,\"nameCode\":\"06902139302144\",\"produceDate\":\"210606\",\"udiCode\":\"#06902139302144#210606#230606#2021###\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"国械注准201000000000\",\"orderId\":\"MP202212200001\"},{\"batchNo\":\"2021\",\"corpName\":\"漳州***医院\",\"count\":10,\"cpmctymc\":\"髋关节假体\",\"expireDate\":\"230606\",\"ggxh\":\"DTUCS Ⅱ 3#\",\"id\":4,\"nameCode\":\"06902139302144\",\"produceDate\":\"210606\",\"udiCode\":\"#06902139302144#210606#230606#2021###\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"国械注准201000000000\",\"orderId\":\"MP202212200001\"}]}";
"{\"data\":[{\"batchNo\":\"2021\",\"corpName\":\"漳州***医院\",\"count\":10,\"cpmctymc\":\"髋关节假体\",\"expireDate\":\"230606\",\"ggxh\":\"DTUCS Ⅱ 3#\",\"id\":4,\"nameCode\":\"06902139302144\",\"produceDate\":\"210606\",\"udiCode\":\"#06902139302144#210606#230606#2021###\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"国械注准201000000000\"},{\"batchNo\":\"2021\",\"corpName\":\"漳州***医院\",\"count\":10,\"cpmctymc\":\"髋关节假体\",\"expireDate\":\"230606\",\"ggxh\":\"DTUCS Ⅱ 3#\",\"id\":4,\"nameCode\":\"06902139302144\",\"produceDate\":\"210606\",\"udiCode\":\"#06902139302144#210606#230606#2021###\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"国械注准201000000000\"},{\"batchNo\":\"2021\",\"corpName\":\"漳州***医院\",\"count\":10,\"cpmctymc\":\"髋关节假体\",\"expireDate\":\"230606\",\"ggxh\":\"DTUCS Ⅱ 3#\",\"id\":4,\"nameCode\":\"06902139302144\",\"produceDate\":\"210606\",\"udiCode\":\"#06902139302144#210606#230606#2021###\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"国械注准201000000000\"},{\"batchNo\":\"2021\",\"corpName\":\"漳州***医院\",\"count\":10,\"cpmctymc\":\"髋关节假体\",\"expireDate\":\"230606\",\"ggxh\":\"DTUCS Ⅱ 3#\",\"id\":4,\"nameCode\":\"06902139302144\",\"produceDate\":\"210606\",\"udiCode\":\"#06902139302144#210606#230606#2021###\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"国械注准201000000000\"},{\"batchNo\":\"2021\",\"corpName\":\"漳州***医院\",\"count\":10,\"cpmctymc\":\"髋关节假体\",\"expireDate\":\"230606\",\"ggxh\":\"DTUCS Ⅱ 3#\",\"id\":4,\"nameCode\":\"06902139302144\",\"produceDate\":\"210606\",\"udiCode\":\"#06902139302144#210606#230606#2021###\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"国械注准201000000000\"},{\"batchNo\":\"2021\",\"corpName\":\"漳州***医院\",\"count\":10,\"cpmctymc\":\"髋关节假体\",\"expireDate\":\"230606\",\"ggxh\":\"DTUCS Ⅱ 3#\",\"id\":4,\"nameCode\":\"06902139302144\",\"produceDate\":\"210606\",\"udiCode\":\"#06902139302144#210606#230606#2021###\",\"ylqxzcrbarmc\":\"漳州**有限公司\",\"zczbhhzbapzbh\":\"国械注准201000000000\",\"orderId\":\"MP202212200001\"}]}";
} else if (systemPDFTemplateEntity.getModule() == 1) {
data =
"[{\"area\":\"北京市市辖区东城区\",\"vaiDate\":\"2023-01-20\",\"code\":\"2222\",\"companyName\":\"小郑哈哈\",\"classes\":\"2\",\"filePath\":\"https://img.tt98.com/d/file/tt98/20200409112430681/a722ac1a6e.jpg\",\"mobile\":\"444\",\"index\":\"1\",\"remark\":\" \",\"detailAddr\":\"333\",\"name\":\"111\",\"creditNum\":\"2222\",\"auditStatus\":\"1\",\"expireDate\":\"2023-01-18\",\"contacts\":\"333\",\"email\":\"455\",\"status\":\"0\"},{\"area\":\"北京市市辖区东城区\",\"vaiDate\":\"2022-11-10\",\"code\":\"534535\",\"companyName\":\"小郑哈哈\",\"classes\":\"2\",\"filePath\":\"https://img0.baidu.com/it/u=2039887338,4134952980&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=705\",\"mobile\":\"444\",\"index\":\"2\",\"remark\":\"5435353\",\"detailAddr\":\"333\",\"name\":\"海关检测报告\",\"creditNum\":\"2222\",\"auditStatus\":\"1\",\"expireDate\":\"2022-11-25\",\"contacts\":\"333\",\"email\":\"455\",\"status\":\"0\"}]";
}
JasperUtils.jasperReport(request, response, data, systemPDFTemplateEntity.getPath(), "pdf");

@ -2,24 +2,35 @@ package com.glxp.api.admin.controller.purchase;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.github.pagehelper.PageInfo;
import com.glxp.api.admin.annotation.AuthRuleAnnotation;
import com.glxp.api.admin.constant.ConstantStatus;
import com.glxp.api.admin.entity.auth.AuthAdmin;
import com.glxp.api.admin.entity.info.SystemPDFModuleEntity;
import com.glxp.api.admin.entity.info.SystemPDFTemplateEntity;
import com.glxp.api.admin.entity.inout.WarehouseUserEntity;
import com.glxp.api.admin.entity.purchase.*;
import com.glxp.api.admin.exception.JsonException;
import com.glxp.api.admin.req.info.CompanyRequest;
import com.glxp.api.admin.req.info.DeleteCompanyFileRequest;
import com.glxp.api.admin.req.info.SystemPDFModuleRequest;
import com.glxp.api.admin.req.inventory.InvCountOrderPrintRequest;
import com.glxp.api.admin.req.itextpdf.InspectionPDFTemplateRequest;
import com.glxp.api.admin.req.purchase.FilterSupCertRequest;
import com.glxp.api.admin.req.purchase.PostSelCertRequest;
import com.glxp.api.admin.req.purchase.PostSupCertRequest;
import com.glxp.api.admin.req.purchase.purPlanPrintRequest;
import com.glxp.api.admin.res.PageSimpleResponse;
import com.glxp.api.admin.res.purchase.SupProductResponse;
import com.glxp.api.admin.service.auth.AuthAdminService;
import com.glxp.api.admin.service.info.SystemPDFModuleService;
import com.glxp.api.admin.service.info.SystemPDFTemplateService;
import com.glxp.api.admin.service.purchase.SupCertService;
import com.glxp.api.admin.service.purchase.SupCompanyService;
import com.glxp.api.admin.service.purchase.SupManufacturerService;
import com.glxp.api.admin.service.purchase.SupProductService;
import com.glxp.api.admin.util.JasperUtils;
import com.glxp.api.common.enums.ResultEnum;
import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils;
@ -35,9 +46,11 @@ import org.springframework.web.context.request.ServletRequestAttributes;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.util.Date;
import java.util.List;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
@RestController
public class SupCertController {
@ -49,6 +62,12 @@ public class SupCertController {
@Value("${file_path}")
private String filePath;
@Resource
private SystemPDFTemplateService systemPDFTemplateService;
@Resource
private SystemPDFModuleService systemPDFModuleService;
@AuthRuleAnnotation("")
@GetMapping("/sup/company/cert/filter")
public BaseResponse filterCompanyCert(FilterSupCertRequest filterSupCertRequest,
@ -190,4 +209,123 @@ public class SupCertController {
AuthAdmin authAdmin = authAdminService.findById(Long.parseLong(userId));
return authAdmin.getCustomerId() + "";
}
/**
*
*
* @param inspectionPDFTemplateRequest
* @return
*/
@AuthRuleAnnotation("")
@PostMapping("/sup/info/verifyTemplateFile")
public BaseResponse verifyTemplateFile(@RequestBody InspectionPDFTemplateRequest inspectionPDFTemplateRequest) {
if (null == inspectionPDFTemplateRequest) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, "参数不能为空!");
}
//查询模板文件是否存在
SystemPDFModuleRequest systemPDFModuleRequest = new SystemPDFModuleRequest();
systemPDFModuleRequest.setId(inspectionPDFTemplateRequest.getModuleId());
SystemPDFModuleEntity systemPDFModule = systemPDFModuleService.findSystemPDFModule(systemPDFModuleRequest);
if (null == systemPDFModule) {
return ResultVOUtils.error(ResultEnum.DATA_NOT, "所属模块错误");
}
SystemPDFTemplateEntity systemPDFTemplateEntity = systemPDFTemplateService.selectById(String.valueOf(systemPDFModule.getTemplateId()));
if (null == systemPDFTemplateEntity) {
return ResultVOUtils.error(ResultEnum.DATA_NOT, "模板错误");
}
return ResultVOUtils.success(systemPDFModule.getTemplateId());
}
/**
*
*
* @param purPlanPrintRequest
* @param request
* @param response
* @throws Exception
*/
@AuthRuleAnnotation("")
@PostMapping("/sup/info/printOrder")
public void printOrder(@RequestBody purPlanPrintRequest purPlanPrintRequest, HttpServletRequest request, HttpServletResponse response) throws Exception {
SystemPDFTemplateEntity systemPDFTemplateEntity = systemPDFTemplateService.selectById(purPlanPrintRequest.getTemplateId());
//打印单号标签
Map<String, Object> data = new HashMap<>(1);
List<Object> list=new ArrayList<>();
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");//定义新的日期格式
//查询配送企业信息
SupCompanyEntity supCompanyEntity=supCompanyService.findCompany(purPlanPrintRequest.getCustomerId());
//查询详情
List<SupCertEntity> selectSupCertList=supCertService.selectSupCertList(purPlanPrintRequest);
int i=1;
if(selectSupCertList!=null && selectSupCertList.size()>0){
for(SupCertEntity obj:selectSupCertList){
//组装数据
Map<String, Object> supData=new HashMap<>();
supData.put("companyName",supCompanyEntity.getCompanyName()==null ? ' ' :supCompanyEntity.getCompanyName());
supData.put("creditNum",supCompanyEntity.getCreditNum()==null ? ' ' :supCompanyEntity.getCreditNum());
supData.put("classes",supCompanyEntity.getClasses()==null ? ' ' :supCompanyEntity.getClasses());
supData.put("area",supCompanyEntity.getArea()==null ? ' ' :supCompanyEntity.getArea());
supData.put("contacts",supCompanyEntity.getContacts()==null ? ' ' :supCompanyEntity.getContacts());
supData.put("detailAddr",supCompanyEntity.getDetailAddr()==null ? ' ' :supCompanyEntity.getDetailAddr());
supData.put("mobile",supCompanyEntity.getMobile()==null ? ' ' :supCompanyEntity.getMobile());
supData.put("email",supCompanyEntity.getEmail()==null ? ' ' :supCompanyEntity.getEmail());
supData.put("index",String.valueOf(i));
supData.put("name",obj.getName()==null ? ' ' :obj.getName());
supData.put("code",obj.getCode()==null ? ' ' :obj.getCode());
supData.put("vaiDate",formatter.format(obj.getVailDate()));
supData.put("expireDate",formatter.format(obj.getExpireDate()));
supData.put("status",obj.getStatus()==0 ? "启用" : "禁用");
supData.put("auditStatus",getAuditStatus(obj.getAuditStatus()));
supData.put("remark",obj.getRemark()==null ? ' ' :obj.getRemark());
supData.put("filePath","d:/1s/udiwms/register/file/image2/" + obj.getFilePath());
list.add(supData);
i++;
}
}
String param= JSON.toJSONString(list);
JasperUtils.jasperReport(request, response, param, systemPDFTemplateEntity.getPath(), "pdf");
}
/**
* ids
*
* @param filterSupCertRequest
* @return
*/
@AuthRuleAnnotation("")
@PostMapping("/sup/info/filterCompanyCertIdList")
public BaseResponse filterCompanyCertIdList(@RequestBody FilterSupCertRequest filterSupCertRequest) {
if(StrUtil.isNotEmpty(filterSupCertRequest.getCustomerId()) && filterSupCertRequest.getType()!=null){
List<SupCertEntity> supCertEntityList=supCertService.filterCompanyCert(filterSupCertRequest);
List<Integer> idsList=supCertEntityList .stream().map(SupCertEntity::getId).distinct().collect(Collectors.toList());
return ResultVOUtils.success(idsList);
}
return ResultVOUtils.error(999,"参数错误");
}
public String getAuditStatus(int type){
if(type==0){
return "草稿";
}else if(type==1){
return "审核通过";
}else if(type==2){
return "审核不通过";
}else if(type==3){
return "申请变更";
}else if(type==4){
return "申请变更通过";
}else if(type==5){
return "申请变更不通过";
}else if(type==6){
return "已提交未审核";
}
return "";
}
}

@ -8,24 +8,29 @@ import com.glxp.api.admin.annotation.AuthRuleAnnotation;
import com.glxp.api.admin.constant.ConstantStatus;
import com.glxp.api.admin.entity.auth.AuthAdmin;
import com.glxp.api.admin.entity.basic.BasicUnitMaintainEntity;
import com.glxp.api.admin.entity.info.SystemPDFModuleEntity;
import com.glxp.api.admin.entity.info.SystemPDFTemplateEntity;
import com.glxp.api.admin.entity.purchase.CustomerContactEntity;
import com.glxp.api.admin.entity.purchase.SupCertEntity;
import com.glxp.api.admin.entity.purchase.SupCertSetEntity;
import com.glxp.api.admin.entity.purchase.SupCompanyEntity;
import com.glxp.api.admin.exception.JsonException;
import com.glxp.api.admin.req.info.SystemPDFModuleRequest;
import com.glxp.api.admin.req.inout.DeleteRequest;
import com.glxp.api.admin.req.purchase.FilterCertSetsRequest;
import com.glxp.api.admin.req.purchase.FilterSupCertRequest;
import com.glxp.api.admin.req.purchase.FilterSupCompanyRequest;
import com.glxp.api.admin.req.purchase.SelectCorpBindRequest;
import com.glxp.api.admin.req.inventory.InvCountOrderPrintRequest;
import com.glxp.api.admin.req.itextpdf.InspectionPDFTemplateRequest;
import com.glxp.api.admin.req.purchase.*;
import com.glxp.api.admin.res.PageSimpleResponse;
import com.glxp.api.admin.service.auth.AuthAdminService;
import com.glxp.api.admin.service.basic.BasicUnitMaintainService;
import com.glxp.api.admin.service.info.SystemPDFModuleService;
import com.glxp.api.admin.service.info.SystemPDFTemplateService;
import com.glxp.api.admin.service.purchase.SupCertService;
import com.glxp.api.admin.service.purchase.CustomerContactService;
import com.glxp.api.admin.service.purchase.SupCertSetService;
import com.glxp.api.admin.service.purchase.SupCompanyService;
import com.glxp.api.admin.util.CustomUtil;
import com.glxp.api.admin.util.JasperUtils;
import com.glxp.api.common.enums.ResultEnum;
import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils;
@ -39,9 +44,10 @@ import org.springframework.web.context.request.ServletRequestAttributes;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.Date;
import java.util.List;
import java.util.ListIterator;
import javax.servlet.http.HttpServletResponse;
import java.text.SimpleDateFormat;
import java.util.*;
import com.alibaba.fastjson.JSON;
@RestController
public class SupCompanyController {
@ -64,6 +70,7 @@ public class SupCompanyController {
@Resource
SupCompanyService supCompanyService;
@AuthRuleAnnotation("")
@GetMapping("/api/pur/getSupComapnys")
public BaseResponse getSupComapnys(FilterSupCompanyRequest companyRequest) {

@ -1,7 +1,9 @@
package com.glxp.api.admin.dao.purchase;
import com.glxp.api.admin.entity.purchase.SupCertEntity;
import com.glxp.api.admin.entity.purchase.SupCertSetEntity;
import com.glxp.api.admin.req.purchase.FilterSupCertRequest;
import com.glxp.api.admin.req.purchase.purPlanPrintRequest;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -35,4 +37,6 @@ public interface SupCertDao {
boolean deleteCert(FilterSupCertRequest filterSupCertRequest);
List<SupCertEntity> selectSupCertList(purPlanPrintRequest purPlanPrintRequest);
}

@ -1,7 +1,9 @@
package com.glxp.api.admin.dao.purchase;
import com.glxp.api.admin.entity.purchase.SupCertEntity;
import com.glxp.api.admin.entity.purchase.SupCertSetEntity;
import com.glxp.api.admin.req.purchase.FilterCertSetsRequest;
import com.glxp.api.admin.req.purchase.purPlanPrintRequest;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@ -18,4 +20,6 @@ public interface SupCertSetDao {
boolean deleteById(String id);
boolean deleteAll();
}

@ -0,0 +1,28 @@
package com.glxp.api.admin.req.purchase;
import lombok.Data;
import java.util.List;
/**
*
*/
@Data
public class purPlanPrintRequest {
/**
* id
*/
private List<String> ids;
/**
* ID
*/
private String templateId;
/**
* id
*/
private String customerId;
}

@ -2,7 +2,9 @@ package com.glxp.api.admin.service.purchase;
import com.glxp.api.admin.entity.purchase.SupCertEntity;
import com.glxp.api.admin.entity.purchase.SupCertSetEntity;
import com.glxp.api.admin.req.purchase.FilterSupCertRequest;
import com.glxp.api.admin.req.purchase.purPlanPrintRequest;
import java.util.List;
@ -38,4 +40,8 @@ public interface SupCertService {
boolean delManufacturerId(String customerId, String manufacturerId);
boolean delProductId(String customerId, String manufacturerId, String productId);
List<SupCertEntity> selectSupCertList(purPlanPrintRequest purPlanPrintRequest);
}

@ -3,6 +3,7 @@ package com.glxp.api.admin.service.purchase;
import com.glxp.api.admin.entity.purchase.SupCertSetEntity;
import com.glxp.api.admin.req.purchase.FilterCertSetsRequest;
import com.glxp.api.admin.req.purchase.purPlanPrintRequest;
import java.util.List;
@ -19,4 +20,5 @@ public interface SupCertSetService {
boolean deleteAll();
}

@ -6,6 +6,7 @@ import com.glxp.api.admin.constant.ConstantStatus;
import com.glxp.api.admin.dao.purchase.SupCertDao;
import com.glxp.api.admin.entity.purchase.SupCertEntity;
import com.glxp.api.admin.req.purchase.FilterSupCertRequest;
import com.glxp.api.admin.req.purchase.purPlanPrintRequest;
import com.glxp.api.admin.service.purchase.SupCertService;
import org.springframework.stereotype.Service;
@ -151,4 +152,9 @@ public class SupCertServiceImpl implements SupCertService {
}
return false;
}
@Override
public List<SupCertEntity> selectSupCertList(purPlanPrintRequest purPlanPrintRequest) {
return supCertDao.selectSupCertList(purPlanPrintRequest);
}
}

@ -4,6 +4,7 @@ import com.github.pagehelper.PageHelper;
import com.glxp.api.admin.dao.purchase.SupCertSetDao;
import com.glxp.api.admin.entity.purchase.SupCertSetEntity;
import com.glxp.api.admin.req.purchase.FilterCertSetsRequest;
import com.glxp.api.admin.req.purchase.purPlanPrintRequest;
import com.glxp.api.admin.service.purchase.SupCertSetService;
import org.springframework.stereotype.Service;
@ -50,4 +51,5 @@ public class SupCertSetServiceImpl implements SupCertSetService {
public boolean deleteAll() {
return supCertSetDao.deleteAll();
}
}

@ -155,4 +155,19 @@
</delete>
<select id="selectSupCertList" parameterType="com.glxp.api.admin.req.purchase.purPlanPrintRequest"
resultType="com.glxp.api.admin.entity.purchase.SupCertEntity">
select * from sup_cert
<where>
<if test="ids != null and ids.size()>0">
AND id in
<foreach collection="ids" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
ORDER BY id DESC
</select>
</mapper>

@ -66,4 +66,6 @@
DELETE
FROM sup_cert_set
</delete>
</mapper>
Loading…
Cancel
Save