From c074b535996825730809c447dd6c87d899edd04e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E6=98=8E=E6=A2=81?= <2429105222@qq.com> Date: Mon, 8 May 2023 16:57:11 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E7=89=A9=E8=B4=A8=E6=91=86=E6=94=BE?= =?UTF-8?q?=E5=8F=98=E6=9B=B4=E5=8A=9F=E8=83=BD=E4=BB=A3=E7=A0=81=E6=8F=90?= =?UTF-8?q?=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../basic/UdiRelevanceController.java | 19 +++++++++++++++---- .../system/SysPdfTemplateController.java | 2 +- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/glxp/api/controller/basic/UdiRelevanceController.java b/src/main/java/com/glxp/api/controller/basic/UdiRelevanceController.java index 46ba0cb8..140ecfb6 100644 --- a/src/main/java/com/glxp/api/controller/basic/UdiRelevanceController.java +++ b/src/main/java/com/glxp/api/controller/basic/UdiRelevanceController.java @@ -16,10 +16,7 @@ import com.glxp.api.entity.inv.InvProductEntity; import com.glxp.api.entity.system.SystemParamConfigEntity; import com.glxp.api.entity.thrsys.ThrProductsEntity; import com.glxp.api.entity.thrsys.ThrSystemEntity; -import com.glxp.api.req.basic.UdiCombineRequest; -import com.glxp.api.req.basic.FilterUdiRelRequest; -import com.glxp.api.req.basic.LockUdiRequest; -import com.glxp.api.req.basic.UdiRelevanceSaveRequest; +import com.glxp.api.req.basic.*; import com.glxp.api.req.system.DeleteRequest; import com.glxp.api.req.thrsys.FilterBasicThirdSysRequest; import com.glxp.api.res.PageSimpleResponse; @@ -70,6 +67,8 @@ public class UdiRelevanceController extends BaseController { ThrDataService thrDataService; @Resource UdiRlSupService udiRlSupService; + @Resource + ProductInfoService productInfoService; //手持终端下载UDI产品信息 @AuthRuleAnnotation("") @@ -698,4 +697,16 @@ public class UdiRelevanceController extends BaseController { return ResultVOUtils.success(ggxhList); } + //国家库uuid获取产品 + @PostMapping("/udi/udirel/selectOriginuuid") + @Log(title = "单据管理", businessType = BusinessType.INSERT) + public BaseResponse selectOriginuuid(@RequestBody ProductInfoFilterRequest productInfoFilterRequest, BindingResult bindingResult) { + + if (bindingResult.hasErrors()) { + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); + } + List udiProductEntities = productInfoService.findAll(productInfoFilterRequest); + return ResultVOUtils.success(udiProductEntities); + } + } diff --git a/src/main/java/com/glxp/api/controller/system/SysPdfTemplateController.java b/src/main/java/com/glxp/api/controller/system/SysPdfTemplateController.java index ad76cad4..78a3bf67 100644 --- a/src/main/java/com/glxp/api/controller/system/SysPdfTemplateController.java +++ b/src/main/java/com/glxp/api/controller/system/SysPdfTemplateController.java @@ -73,7 +73,7 @@ public class SysPdfTemplateController { SystemPDFTemplateEntity systemPDFTemplateEntity = systemPDFTemplateService.selectById(String.valueOf(filterPdfTemplateRequest.getId())); String data = ""; - if (systemPDFTemplateEntity.getModule() == 2) { + if (systemPDFTemplateEntity.getModule() == 2 || systemPDFTemplateEntity.getModule() == 3) { 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\"},{\"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\"}]}"; } else if (systemPDFTemplateEntity.getModule() == 0) { From 2c20566d391dc84fdf2c74f13384de87d9cee0ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E6=98=8E=E6=A2=81?= <2429105222@qq.com> Date: Thu, 11 May 2023 15:39:06 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E5=8D=95=E6=8D=AE=E6=89=93=E5=8D=B0?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=89=93=E5=8D=B0=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../glxp/api/controller/basic/BasicOrderPrintController.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/glxp/api/controller/basic/BasicOrderPrintController.java b/src/main/java/com/glxp/api/controller/basic/BasicOrderPrintController.java index 79c3e88e..f8fa7301 100644 --- a/src/main/java/com/glxp/api/controller/basic/BasicOrderPrintController.java +++ b/src/main/java/com/glxp/api/controller/basic/BasicOrderPrintController.java @@ -36,6 +36,7 @@ import com.glxp.api.service.system.SystemPDFTemplateRelevanceService; import com.glxp.api.service.system.SystemPDFTemplateService; import com.glxp.api.util.JasperUtils; import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Value; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RestController; @@ -72,6 +73,8 @@ public class BasicOrderPrintController { IoCodeService ioCodeService; @Resource SystemPDFTemplateRelevanceCodeService systemPDFTemplateRelevanceCodeService; + @Value("${file_path}") + private String filePath; //校验模板是否正确 @AuthRuleAnnotation("") @@ -202,7 +205,7 @@ public class BasicOrderPrintController { data.put("data", list); String param = JSON.toJSONString(data); - JasperUtils.jasperReport(request, response, param, systemPDFTemplateEntity.getPath(), "pdf"); + JasperUtils.jasperReport(request, response, param, filePath+"pdf/template/"+systemPDFTemplateEntity.getPath(), "pdf"); } From b493e80846e5a832f264574721c395057a5d1abd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E6=98=8E=E6=A2=81?= <2429105222@qq.com> Date: Mon, 15 May 2023 17:33:46 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E5=86=85=E9=83=A8=E7=A0=81=E5=92=8C?= =?UTF-8?q?=E6=98=8E=E7=BB=86=E6=89=93=E5=8D=B0=E4=BB=A3=E7=A0=81=E6=8F=90?= =?UTF-8?q?=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inout/IoOrderDetailResultController.java | 116 ++++++++++++++++++ .../inv/InvInnerOrderPrintController.java | 96 ++++++++++++++- .../inout/FilterOrderDetailResultRequest.java | 3 + .../inout/IoOrderDetailResultResponse.java | 2 + 4 files changed, 215 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/glxp/api/controller/inout/IoOrderDetailResultController.java b/src/main/java/com/glxp/api/controller/inout/IoOrderDetailResultController.java index 04f9a76f..653ebcab 100644 --- a/src/main/java/com/glxp/api/controller/inout/IoOrderDetailResultController.java +++ b/src/main/java/com/glxp/api/controller/inout/IoOrderDetailResultController.java @@ -2,6 +2,7 @@ package com.glxp.api.controller.inout; 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.annotation.AuthRuleAnnotation; import com.glxp.api.common.enums.ResultEnum; @@ -13,19 +14,36 @@ import com.glxp.api.entity.basic.BasicBussinessTypeEntity; import com.glxp.api.entity.inout.IoOrderDetailBizEntity; import com.glxp.api.entity.inout.IoOrderDetailCodeEntity; import com.glxp.api.entity.inout.IoOrderEntity; +import com.glxp.api.entity.system.SysPdfTemplateRelevanceStatemenEntity; +import com.glxp.api.entity.system.SystemPDFTemplateEntity; import com.glxp.api.req.inout.FilterCodeRequest; import com.glxp.api.req.inout.FilterOrderDetailResultRequest; import com.glxp.api.req.inout.FilterOrderRequest; +import com.glxp.api.req.inout.InspectionPDFTemplateRequest; import com.glxp.api.res.inout.IoCodeResponse; import com.glxp.api.res.inout.IoOrderDetailResultResponse; import com.glxp.api.service.basic.IBasicBussinessTypeService; import com.glxp.api.service.inout.*; +import com.glxp.api.service.system.SystemPDFModuleService; +import com.glxp.api.service.system.SystemPDFTemplateService; +import com.glxp.api.util.JasperUtils; +import net.sf.jasperreports.engine.JRException; +import org.springframework.beans.factory.annotation.Value; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.HashMap; import java.util.List; +import java.util.Map; /** * 单据扫码明细查询接口 @@ -40,6 +58,12 @@ public class IoOrderDetailResultController extends BaseController { IBasicBussinessTypeService basicBussinessTypeService; @Resource IoCodeService codeService; + @Resource + private SystemPDFTemplateService systemPDFTemplateService; + @Resource + private SystemPDFModuleService systemPDFModuleService; + @Value("${file_path}") + private String filePath; /** * 查询单据扫码明细列表 @@ -140,4 +164,96 @@ public class IoOrderDetailResultController extends BaseController { return ResultVOUtils.success(orderDetailBizEntities); } + + //校验模板是否正确 + @AuthRuleAnnotation("") + @PostMapping("/udiwms/pdf/template/order/result/file") + public BaseResponse inspectionStockOrderPDFFromTemplateFile(@RequestBody InspectionPDFTemplateRequest inspectionPDFTemplateRequest) { + + //查询模板文件是否存在 + SysPdfTemplateRelevanceStatemenEntity sysPdfTemplateRelevanceStatemenEntity = systemPDFModuleService.selectByStatemenId(inspectionPDFTemplateRequest.getId()); + if (null == sysPdfTemplateRelevanceStatemenEntity) { + return ResultVOUtils.error(ResultEnum.DATA_NOT, "所属模块错误"); + } + + SystemPDFTemplateEntity systemPDFTemplateEntity = systemPDFTemplateService.selectById(String.valueOf(sysPdfTemplateRelevanceStatemenEntity.getTemplateId())); + if (null == systemPDFTemplateEntity) { + return ResultVOUtils.error(ResultEnum.DATA_NOT, "模板错误"); + } + return ResultVOUtils.success(sysPdfTemplateRelevanceStatemenEntity.getTemplateId()); + } + + + /** + * 出入库明细打印 + * + * @param filterOrderDetailResultRequest + * @return + */ + @AuthRuleAnnotation("") + @PostMapping("/udiwms/inout/resultDetail/filterOrderPrint") + public BaseResponse filterOrderPrint(@RequestBody FilterOrderDetailResultRequest filterOrderDetailResultRequest, HttpServletRequest request, HttpServletResponse response) throws JRException, IOException { + List ioOrderDetailResultResponseList=new ArrayList<>(); + SystemPDFTemplateEntity systemPDFTemplateEntity = systemPDFTemplateService.selectById(filterOrderDetailResultRequest.getTemplateId()); + //打印单号标签 + Map data = new HashMap<>(1); + List list = new ArrayList<>(); + SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");//定义新的日期格式 + + //按选入打印 + if(filterOrderDetailResultRequest.getList() != null && filterOrderDetailResultRequest.getList().size()>0){ + ioOrderDetailResultResponseList =filterOrderDetailResultRequest.getList(); + }else{ + //按查询打印 + FilterOrderRequest filterOrderRequest = new FilterOrderRequest(); + filterOrderRequest.setVueType(filterOrderDetailResultRequest.getActionType()); + List actions = orderService.setActions(filterOrderRequest); + if (CollUtil.isEmpty(actions)) { + return ResultVOUtils.success(""); + } + filterOrderDetailResultRequest.setActions(actions); + ioOrderDetailResultResponseList = orderDetailResultService.filterOrderList(filterOrderDetailResultRequest); + for (IoOrderDetailResultResponse orderDetailResultResponse : ioOrderDetailResultResponseList) { + if (orderDetailResultResponse.getMainAction().equals(ConstantType.TYPE_OUT)) { + orderDetailResultResponse.setOutCount(orderDetailResultResponse.getReCount()); + orderDetailResultResponse.setInCount(0); + } else { + orderDetailResultResponse.setOutCount(0); + orderDetailResultResponse.setInCount(orderDetailResultResponse.getReCount()); + } + } + } + int i=1; + for (IoOrderDetailResultResponse ioOrderDetailResultResponse : ioOrderDetailResultResponseList) { + //组装数据 + Map ioOrderDetailResultData = new HashMap<>(); + ioOrderDetailResultData.put("index", String.valueOf(i)); + ioOrderDetailResultData.put("nameCode", ioOrderDetailResultResponse.getNameCode() == null ? ' ' : ioOrderDetailResultResponse.getNameCode()); + ioOrderDetailResultData.put("batchNo", ioOrderDetailResultResponse.getBatchNo() == null ? ' ' : ioOrderDetailResultResponse.getBatchNo()); + ioOrderDetailResultData.put("productDate", ioOrderDetailResultResponse.getProductDate() == null ? ' ' : ioOrderDetailResultResponse.getProductDate()); + ioOrderDetailResultData.put("expireDate", ioOrderDetailResultResponse.getExpireDate() == null ? ' ' : ioOrderDetailResultResponse.getExpireDate()); + ioOrderDetailResultData.put("coName", ioOrderDetailResultResponse.getCoName() == null ? ' ' : ioOrderDetailResultResponse.getCoName()); + ioOrderDetailResultData.put("certCode", ioOrderDetailResultResponse.getCertCode() == null ? ' ' : ioOrderDetailResultResponse.getCertCode()); + ioOrderDetailResultData.put("ylqxzcrbarmc", ioOrderDetailResultResponse.getYlqxzcrbarmc() == null ? ' ' : ioOrderDetailResultResponse.getYlqxzcrbarmc()); + ioOrderDetailResultData.put("manufacturer", ioOrderDetailResultResponse.getManufacturer() == null ? ' ' : ioOrderDetailResultResponse.getManufacturer()); + ioOrderDetailResultData.put("measname", ioOrderDetailResultResponse.getMeasname() == null ? ' ' : ioOrderDetailResultResponse.getMeasname()); + ioOrderDetailResultData.put("spec", ioOrderDetailResultResponse.getSpec() == null ? ' ' : ioOrderDetailResultResponse.getSpec()); + ioOrderDetailResultData.put("price", ioOrderDetailResultResponse.getPrice() == null ? ' ' : ioOrderDetailResultResponse.getPrice()); + ioOrderDetailResultData.put("count", ioOrderDetailResultResponse.getCount()); + ioOrderDetailResultData.put("reCount",ioOrderDetailResultResponse.getReCount()); + ioOrderDetailResultData.put("inCount", ioOrderDetailResultResponse.getInCount()); + ioOrderDetailResultData.put("acceptCount", ioOrderDetailResultResponse.getAcceptCount()); + ioOrderDetailResultData.put("fromCorpName", ioOrderDetailResultResponse.getFromCorpName() == null ? ' ' : ioOrderDetailResultResponse.getFromCorpName()); + ioOrderDetailResultData.put("billTypeName", ioOrderDetailResultResponse.getBillTypeName() == null ? ' ' : ioOrderDetailResultResponse.getBillTypeName()); + ioOrderDetailResultData.put("mainAction", ioOrderDetailResultResponse.getMainAction() == null ? ' ' : ioOrderDetailResultResponse.getMainAction()); + ioOrderDetailResultData.put("auditTime", ioOrderDetailResultResponse.getAuditTime() == null ? ' ' : formatter.format(ioOrderDetailResultResponse.getAuditTime())); + list.add(ioOrderDetailResultData); + i++; + } + + String param = JSON.toJSONString(list); + JasperUtils.jasperReport(request, response, param, filePath+"pdf/template/"+systemPDFTemplateEntity.getPath(), "pdf"); + return ResultVOUtils.success(); + } + } diff --git a/src/main/java/com/glxp/api/controller/inv/InvInnerOrderPrintController.java b/src/main/java/com/glxp/api/controller/inv/InvInnerOrderPrintController.java index 49a2cc13..b64f4696 100644 --- a/src/main/java/com/glxp/api/controller/inv/InvInnerOrderPrintController.java +++ b/src/main/java/com/glxp/api/controller/inv/InvInnerOrderPrintController.java @@ -1,5 +1,6 @@ package com.glxp.api.controller.inv; +import com.alibaba.fastjson.JSON; import com.github.pagehelper.PageInfo; import com.glxp.api.annotation.AuthRuleAnnotation; import com.glxp.api.annotation.Log; @@ -12,6 +13,7 @@ import com.glxp.api.entity.inv.InnerOrderEntity; import com.glxp.api.entity.inv.InvInnerOrderPrintEntity; import com.glxp.api.entity.inv.InvInnerOrderPdfTempEntity; import com.glxp.api.entity.system.SysPdfTemplateRelevanceLabelEntity; +import com.glxp.api.entity.system.SysPdfTemplateRelevanceStatemenEntity; import com.glxp.api.entity.system.SystemPDFModuleEntity; import com.glxp.api.entity.system.SystemPDFTemplateEntity; import com.glxp.api.req.inout.InspectionPDFTemplateRequest; @@ -62,6 +64,8 @@ public class InvInnerOrderPrintController { private IoOrderService ioOrderService; @Resource private InnerOrderService innerOrderService; + @Value("${file_path}") + private String filePath; @GetMapping("/udiwms/innerOrderPrint/filter") @@ -171,7 +175,7 @@ public class InvInnerOrderPrintController { innerOrderPdfTempService.insertStockPrintTempEntity(stockPrintTempEntity); stockPrintTempEntities.add(stockPrintTempEntity); } - jaspaperService.printPdfLocal(splits, stockPrintTempEntities, systemPDFTemplateEntity.getPath()); + jaspaperService.printPdfLocal(splits, stockPrintTempEntities, filePath + "/pdf/template/" + systemPDFTemplateEntity.getPath()); PageInfo pageInfo; pageInfo = new PageInfo<>(stockPrintTempEntities); PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); @@ -182,7 +186,7 @@ public class InvInnerOrderPrintController { } else { Map data = new HashMap(); data.put("data", printEntities); - JasperUtils.jasperReport(request, response, data, systemPDFTemplateEntity.getPath(), "pdf"); + JasperUtils.jasperReport(request, response, data, filePath + "/pdf/template/" + systemPDFTemplateEntity.getPath(), "pdf"); } @@ -217,6 +221,94 @@ public class InvInnerOrderPrintController { } + + //-----------打印码 + @AuthRuleAnnotation("") + @PostMapping("/udiwms/pdf/template/inspection/stock/qrcode/text/statement/file") + public BaseResponse inspectionStockQRCodeTextPDFFromTemplateStatementFile( + @RequestBody InspectionPDFTemplateRequest inspectionPDFTemplateRequest) throws Exception { + + //查询模板文件是否存在 + SysPdfTemplateRelevanceStatemenEntity sysPdfTemplateRelevanceStatemenEntity = systemPDFModuleService.selectByStatemenId(inspectionPDFTemplateRequest.getLabelId()+""); + if (null == sysPdfTemplateRelevanceStatemenEntity) { + return ResultVOUtils.error(ResultEnum.DATA_NOT, "所属模块错误"); + } + + SystemPDFTemplateEntity systemPDFTemplateEntity = systemPDFTemplateService.selectById(String.valueOf(sysPdfTemplateRelevanceStatemenEntity.getTemplateId())); + if (null == systemPDFTemplateEntity) { + return ResultVOUtils.error(ResultEnum.DATA_NOT, "模板错误"); + } + return ResultVOUtils.success(sysPdfTemplateRelevanceStatemenEntity.getTemplateId()); + } + + @AuthRuleAnnotation("") + @PostMapping("/udiwms/pdf/template/stock/qrcode/text/statement/file") + public BaseResponse stockQRCodeTextPDFFromTemplateStatementFile( + @RequestBody InnerOrderQRCodeTextPDFTemplateRequest stockQRCodeTextPDFTemplateRequest, + HttpServletRequest request, HttpServletResponse response) throws Exception { + + SysPdfTemplateRelevanceStatemenEntity sysPdfTemplateRelevanceStatemenEntity = systemPDFModuleService.selectByStatemenId(stockQRCodeTextPDFTemplateRequest.getLabelId()+""); + if (sysPdfTemplateRelevanceStatemenEntity == null) return ResultVOUtils.error(500, "未找到单据模板模块设置,请检查"); + + SystemPDFTemplateEntity systemPDFTemplateEntity = + systemPDFTemplateService.selectById(String.valueOf(sysPdfTemplateRelevanceStatemenEntity.getTemplateId())); + if (systemPDFTemplateEntity == null) return ResultVOUtils.error(ResultEnum.DATA_NOT, "模板错误"); + + List printEntities = new ArrayList<>(); + List mStockPrintEntities = new ArrayList<>(); + FilterinnerOrderprintRequest filterinnerOrderprintRequest = new FilterinnerOrderprintRequest(); + if (stockQRCodeTextPDFTemplateRequest.getOrderId() != null) { + filterinnerOrderprintRequest.setSOrderId(stockQRCodeTextPDFTemplateRequest.getOrderId()); + } else { + filterinnerOrderprintRequest.setId(stockQRCodeTextPDFTemplateRequest.getQueryId()); + } + List stockPrintEntities = invInnerOrderPrintService.filterJoinInnerPrint(filterinnerOrderprintRequest); + if (stockPrintEntities != null && stockPrintEntities.size() > 0) { + mStockPrintEntities.addAll(stockPrintEntities); + } + for (InnerOrderPrintResponse InnerOrderPrintResponse : mStockPrintEntities) { + PdfPrintCountEntity pdfPrintCount = getCount(stockQRCodeTextPDFTemplateRequest.getCountList(), InnerOrderPrintResponse); + if (pdfPrintCount != null && pdfPrintCount.getRowCount() > 0) { + for (int i = 0; i < pdfPrintCount.getRowCount(); i++) { + InnerOrderPrintResponse clone = new InnerOrderPrintResponse(); + BeanUtils.copyProperties(InnerOrderPrintResponse, clone); + printEntities.add(clone); + } + } else { + printEntities.add(InnerOrderPrintResponse); + } + } + + + String param = JSON.toJSONString(printEntities); + JasperUtils.jasperReport(request, response, param, filePath + "/pdf/template/" + systemPDFTemplateEntity.getPath(), "pdf"); + + String orderId = ""; + for (InnerOrderPrintResponse InnerOrderPrintResponse : mStockPrintEntities) { + InvInnerOrderPrintEntity innerOrderPrintEntity = new InvInnerOrderPrintEntity(); + innerOrderPrintEntity.setStatus(1); + innerOrderPrintEntity.setId(InnerOrderPrintResponse.getId()); + invInnerOrderPrintService.updateOrder(innerOrderPrintEntity); + orderId = InnerOrderPrintResponse.getId() + ""; + } + + //查询订单id + InvInnerOrderPrintEntity innerOrderPrintEntity = invInnerOrderPrintService.selectById(orderId); + //更新内部码状态 + InnerOrderEntity innerOrderEntity = innerOrderService.findByRecordKey(innerOrderPrintEntity.getOrderIdFk()); + if (innerOrderEntity != null) { + innerOrderEntity.setGenStatus(2); + innerOrderEntity.setId(innerOrderEntity.getId()); + innerOrderService.update(innerOrderEntity); + } + IoOrderEntity ioOrderEntity = new IoOrderEntity(); + ioOrderEntity.setInCodeStatus(1); + ioOrderEntity.setBillNo(innerOrderPrintEntity.getOrderIdFk()); + ioOrderService.updateByBillNo(ioOrderEntity); + return null; + + } + public PdfPrintCountEntity getCount(List countList, InnerOrderPrintResponse InnerOrderPrintResponse) { for (PdfPrintCountEntity pdfPrintCount : countList) { if (pdfPrintCount.getQueryId().equals(InnerOrderPrintResponse.getId() + "")) { diff --git a/src/main/java/com/glxp/api/req/inout/FilterOrderDetailResultRequest.java b/src/main/java/com/glxp/api/req/inout/FilterOrderDetailResultRequest.java index 700c315c..f27320f3 100644 --- a/src/main/java/com/glxp/api/req/inout/FilterOrderDetailResultRequest.java +++ b/src/main/java/com/glxp/api/req/inout/FilterOrderDetailResultRequest.java @@ -1,5 +1,6 @@ package com.glxp.api.req.inout; +import com.glxp.api.res.inout.IoOrderDetailResultResponse; import com.glxp.api.util.page.ListPageRequest; import lombok.Data; @@ -43,7 +44,9 @@ public class FilterOrderDetailResultRequest extends ListPageRequest { private String endAduditTime; //结束日期 private String fromCorp; private String actionType; + private String templateId; private String manufacturer; private String zczbhhzbapzbh; private List actions; + private List list; } diff --git a/src/main/java/com/glxp/api/res/inout/IoOrderDetailResultResponse.java b/src/main/java/com/glxp/api/res/inout/IoOrderDetailResultResponse.java index 2c079da3..56e2da9f 100644 --- a/src/main/java/com/glxp/api/res/inout/IoOrderDetailResultResponse.java +++ b/src/main/java/com/glxp/api/res/inout/IoOrderDetailResultResponse.java @@ -3,6 +3,7 @@ package com.glxp.api.res.inout; import lombok.Data; import java.math.BigDecimal; +import java.util.Date; /** * 单据扫码明细VO @@ -159,6 +160,7 @@ public class IoOrderDetailResultResponse { private String fromCorpName; private String billTypeName; private String mainAction; + private Date auditTime; } From 69c3c9e8301308bbe3bbdb482b96d8cd74ebda2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E6=98=8E=E6=A2=81?= <2429105222@qq.com> Date: Tue, 23 May 2023 16:04:58 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E5=86=85=E9=83=A8=E7=A0=81=E5=92=8C?= =?UTF-8?q?=E6=98=8E=E7=BB=86=E6=89=93=E5=8D=B0=E4=BB=A3=E7=A0=81=E6=8F=90?= =?UTF-8?q?=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/schemas/schema_v2.1.sql | 746 +++++++++++---------- 1 file changed, 376 insertions(+), 370 deletions(-) diff --git a/src/main/resources/schemas/schema_v2.1.sql b/src/main/resources/schemas/schema_v2.1.sql index 5df05c4b..cfbdc7ff 100644 --- a/src/main/resources/schemas/schema_v2.1.sql +++ b/src/main/resources/schemas/schema_v2.1.sql @@ -1,370 +1,376 @@ -# 字段新增 (表名,字段名,字段类型,修改方式(1:新增,2:修改,3:删除) - - -CALL Pro_Temp_ColumnWork('basic_download_status', 'cacheFilePath', - 'varchar(255) ', 1); - -CALL Pro_Temp_ColumnWork('auth_user_bustype', 'updateTime', - 'datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ', 1); -CALL Pro_Temp_ColumnWork('auth_warehouse_bustype', 'updateTime', - 'datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ', 1); -CALL Pro_Temp_ColumnWork('auth_warehouse_user', 'updateTime', - 'datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ', 1); -CALL Pro_Temp_ColumnWork('auth_dept_user', 'updateTime', - 'datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ', 1); - -CALL Pro_Temp_ColumnWork('sync_data_set', 'department', 'tinyint ', 1); -CALL Pro_Temp_ColumnWork('sync_data_set', 'warehouseDict', 'tinyint ', 1); -CALL Pro_Temp_ColumnWork('sync_data_set', 'userData', 'tinyint ', 1); - -CALL Pro_Temp_ColumnWork('sync_data_set', 'udiCodeLost', 'tinyint ', 1); -CALL Pro_Temp_ColumnWork('sync_data_set', 'udiCodeRel', 'tinyint ', 1); -CALL Pro_Temp_ColumnWork('sync_data_set', 'dbDiCompany', 'tinyint', 1); - -CALL Pro_Temp_ColumnWork('io_order', 'fromReceiveBillNo', 'varchar(255) ', 1); -CALL Pro_Temp_ColumnWork('io_order', 'fromThrBillNo', 'varchar(255) ', 1); -CALL Pro_Temp_ColumnWork('io_order', 'syncStatus', 'tinyint ', 1); -CALL Pro_Temp_ColumnWork('io_order', 'busType', 'tinyint ', 1); -CALL Pro_Temp_ColumnWork('io_order', 'deliveryStatus', 'tinyint ', 1); -CALL Pro_Temp_ColumnWork('io_order', 'inCodeStatus', 'tinyint ', 1); -CALL Pro_Temp_ColumnWork('io_order', 'processStatus', 'tinyint ', 1); - -CALL Pro_Temp_ColumnWork('io_order', 'suppleCount', 'tinyint ', 1); -CALL Pro_Temp_ColumnWork('io_order', 'relKey', 'varchar(255) ', 1); -CALL Pro_Temp_ColumnWork('io_order', 'checkTime', 'datetime ', 1); -CALL Pro_Temp_ColumnWork('io_order', 'checkUser', 'varchar(255) ', 1); -CALL Pro_Temp_ColumnWork('io_order', 'regStatus', 'varchar(255) ', 1); - -CALL Pro_Temp_ColumnWork('io_order_detail_biz', 'regStatus', 'varchar(255) ', 1); - - - -CALL Pro_Temp_ColumnWork('io_code_lost', 'nameCode', 'varchar(255) ', 1); - -CALL Pro_Temp_ColumnWork('thr_bustype_origin', 'thirdSysName', 'varchar(255) ', 3); -CALL Pro_Temp_ColumnWork('thr_system_bus_api', 'thirdBuyName', 'varchar(255) ', 3); - -CALL Pro_Temp_ColumnWork('io_order_detail_biz', 'bindRlIds', 'varchar(255) ', 1); -CALL Pro_Temp_ColumnWork('io_order_detail_biz', 'checkFileName', 'varchar(255) ', 1); -CALL Pro_Temp_ColumnWork('io_order_invoice', 'bizIdFk', 'int ', 1); - -CALL Pro_Temp_ColumnWork('thr_products', 'updateUser', 'varchar(255) ', 1); -CALL Pro_Temp_ColumnWork('thr_products', 'createUser', 'varchar(255) ', 1); -CALL Pro_Temp_ColumnWork('thr_products', 'createTime', 'varchar(255) ', 1); - - - -CALL Pro_Temp_ColumnWork('auth_warehouse', 'advanceType', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('auth_warehouse', 'spUse', 'tinyint', 1); - - -CALL Pro_Temp_ColumnWork('basic_udirel', 'relCode', 'varchar(255) ', 1); -CALL Pro_Temp_ColumnWork('basic_udirel', 'lowStockNum', 'varchar(255) ', 1); -CALL Pro_Temp_ColumnWork('basic_udirel', 'useExpireTime', 'int', 1); -CALL Pro_Temp_ColumnWork('basic_udirel', 'dispatch', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_udirel', 'groupBuy', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_udirel', 'isDateBy', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_udirel', 'needCert', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_udirel', 'certIdFk', 'varchar(255)', 1); - -CALL Pro_Temp_ColumnWork('basic_products', 'allowNoSerial', 'tinyint', 1); - - -CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'vailDispatch', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'vailGroupBuy', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'busType', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'inStock', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'actionType', 'tinyint', 1); - -CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'thrCheckEnable', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'thrCheckWebNew', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'thrCheckPdaUn', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'thrCheckPdaEd', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'thrCheckUdims', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'thrCheckPc', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'thrCheckSp', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'thrCheckChange', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'thrCheckBalance', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'thrCheckCopy', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'fillCodeRel', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'checkVailDate', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'checkExpire', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'checkCertExpire', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'preInBackAction', 'varchar(255) ', 1); -CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'backPreinType', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('io_order', 'checkPreInOrders', 'varchar(255)', 1); -CALL Pro_Temp_ColumnWork('io_order', 'checkPreInSpaceCode', 'varchar(255)', 1); -CALL Pro_Temp_ColumnWork('io_order', 'checkPreInInvCode', 'varchar(255)', 1); - -CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'sortNum', 'int', 1); - - - -CALL Pro_Temp_ColumnWork('pur_delivery_detail', 'batchNo', 'varchar(255) ', 1); -CALL Pro_Temp_ColumnWork('pur_delivery_detail', 'productDate', 'varchar(255) ', 1); -CALL Pro_Temp_ColumnWork('pur_delivery_detail', 'expireDate', 'varchar(255) ', 1); - -CALL Pro_Temp_ColumnWork('pur_arrival_detail', 'batchNo', 'varchar(255) ', 1); -CALL Pro_Temp_ColumnWork('pur_arrival_detail', 'productDate', 'varchar(255) ', 1); -CALL Pro_Temp_ColumnWork('pur_arrival_detail', 'expireDate', 'varchar(255) ', 1); -CALL Pro_Temp_ColumnWork('pur_arrival_detail', 'arrivalCount', 'int ', 1); -CALL Pro_Temp_ColumnWork('pur_arrival', 'supId', 'varchar(255) ', 1); - -CALL Pro_Temp_ColumnWork('pur_returned_detail', 'batchNo', 'varchar(255) ', 1); -CALL Pro_Temp_ColumnWork('pur_returned_detail', 'productDate', 'varchar(255) ', 1); -CALL Pro_Temp_ColumnWork('pur_returned_detail', 'expireDate', 'varchar(255) ', 1); - - -CALL Pro_Temp_ColumnWork('pur_delivery', 'supId', 'varchar(255) ', 1); -CALL Pro_Temp_ColumnWork('pur_returned', 'supId', 'varchar(255) ', 1); - - -CALL Pro_Temp_ColumnWork('basic_bustype_pre', 'targetBusAction', 'varchar(255)', 1); -CALL Pro_Temp_ColumnWork('basic_bustype_pre', 'busBeforeTime', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_bustype_pre', 'beforeTime', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_bustype_pre', 'auditStatus', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_bustype_pre', 'busAuditStatus', 'tinyint', 1); - -CALL Pro_Temp_ColumnWork('basic_bustype_pre', 'createType', 'tinyint', 1); - -CALL Pro_Temp_ColumnWork('basic_bustype_change', 'auditStatus', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_bustype_change', 'busAuditStatus', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_bustype_change', 'targetBusAction', 'varchar(255)', 1); -CALL Pro_Temp_ColumnWork('basic_bustype_change', 'beforeTime', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('basic_bustype_change', 'busBeforeTime', 'tinyint', 1); - -CALL Pro_Temp_ColumnWork('pur_order', 'emergency', 'varchar(255)', 1); -CALL Pro_Temp_ColumnWork('pur_order', 'supId', 'varchar(255)', 1); -CALL Pro_Temp_ColumnWork('pur_order', 'arrivalTime', 'datetime', 1); -CALL Pro_Temp_ColumnWork('pur_order', 'dealStatus', 'int', 1); - -INSERT ignore INTO `auth_warehouse`(`id`, `code`, `name`, `parentId`, `remark`, `defaultInv`, `thirdId`, `thirdId1`, - `thirdId2`, `thirdId3`, `thirdId4`, `parentCode`, `advanceType`, `spUse`) -VALUES ('1541070754823692288', '1000000', '总库', '1000', '总111111', 0, '1001304', '402', NULL, NULL, NULL, '', 1, 1); -INSERT ignore INTO `auth_warehouse`(`id`, `code`, `name`, `parentId`, `remark`, `defaultInv`, `thirdId`, `thirdId1`, - `thirdId2`, `thirdId3`, `thirdId4`, `parentCode`, `advanceType`, `spUse`) -VALUES ('1541070754823692289', '1000002', '寄售库', '1000', '总111111', 0, '1001304', '402', NULL, NULL, NULL, '', 3, 1); -INSERT ignore INTO `auth_warehouse`(`id`, `code`, `name`, `parentId`, `remark`, `defaultInv`, `thirdId`, `thirdId1`, - `thirdId2`, `thirdId3`, `thirdId4`, `parentCode`, `advanceType`, `spUse`) -VALUES ('1541070754823692290', '1000001', '预验收库', '1000', '总111111', 0, '1001304', '402', NULL, NULL, NULL, '', 2, 1); - - -CALL Pro_Temp_ColumnWork('pur_order_detail', 'planCount', 'tinyint', 1); - -CALL Pro_Temp_ColumnWork('inv_prein_detail', 'status', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('inv_prein_detail', 'originCount', 'int', 1); -CALL Pro_Temp_ColumnWork('inv_prein_detail', 'originReCount', 'int', 1); - -CALL Pro_Temp_ColumnWork('inv_prein_detail', 'mainAction', 'varchar(255)', 1); -CALL Pro_Temp_ColumnWork('inv_prein_detail', 'action', 'varchar(255)', 1); - -CALL Pro_Temp_ColumnWork('io_code_lost', 'nameCode', 'varchar(255)', 1); - -INSERT ignore INTO `sys_param_config`(`id`, `parentId`, `paramName`, `paramKey`, `paramValue`, `paramStatus`, - `paramType`, `paramExplain`) -VALUES (20040, 0, '允许送货单直接入库变更库存', 'deliveryInstock', '0', 1, 0, '0:否;1:是'); - -CALL Pro_Temp_ColumnWork('sup_product', 'manufactory', 'varchar(255)', 1); -CALL Pro_Temp_ColumnWork('sup_product', 'allowNoBatch', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('sup_product', 'allowNoExpire', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('sup_product', 'allowNoProduct', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('sup_product', 'allowNoSerial', 'tinyint', 1); - -CALL Pro_Temp_ColumnWork('inv_remind_msg', 'remindCount', 'int', 1); -CALL Pro_Temp_ColumnWork('sup_cert_remind_msg', 'remindCount', 'int', 1); - -CALL Pro_Temp_ColumnWork('sync_data_bustypes', 'orderStatus', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('sync_data_bustypes', 'direct', 'tinyint', 1); - - -CALL Pro_Temp_ColumnWork('sup_manufacturer', 'agentName', 'varchar(255)', 1); -CALL Pro_Temp_ColumnWork('sys_pdf_module', 'modelKey', 'varchar(255)', 1); -CALL Pro_Temp_ColumnWork('sys_pdf_template', 'bussinessType', 'varchar(255)', 1); -CALL Pro_Temp_ColumnWork('sys_pdf_template', 'bussinessStatus', 'varchar(255)', 1); - -CALL Pro_Temp_ColumnWork('io_order_detail_biz', 'filePath', 'varchar(255)', 1); - -CALL Pro_Temp_ColumnWork('io_order', 'checkStatus', 'tinyint', 1); - -INSERT ignore INTO `sys_scheduled`(`id`, `cronName`, `cron`, `customerId`, `remark`) -VALUES (100, 'clean_log_task', '0 0 2 1/1 * ? ', NULL, '删除日志数据'); - - - -CALL Pro_Temp_ColumnWork('inv_product', 'nowStock', 'int ', 1); -CALL Pro_Temp_ColumnWork('inv_product', 'frozenCount', 'int ', 1); -CALL Pro_Temp_ColumnWork('inv_product', 'planInCount', 'int ', 1); -CALL Pro_Temp_ColumnWork('inv_product', 'planOutCount', 'int ', 1); -CALL Pro_Temp_ColumnWork('inv_product', 'onWayCount', 'int ', 1); -CALL Pro_Temp_ColumnWork('inv_product', 'availableStock', 'int ', 1); - -CALL Pro_Temp_ColumnWork('inv_product_detail', 'inCount', 'int ', 1); -CALL Pro_Temp_ColumnWork('inv_product_detail', 'outCount', 'int ', 1); -CALL Pro_Temp_ColumnWork('inv_prein_product_detail', 'inCount', 'int ', 1); -CALL Pro_Temp_ColumnWork('inv_prein_product_detail', 'outCount', 'int ', 1); -CALL Pro_Temp_ColumnWork('inv_pre_product_detail', 'inCount', 'int ', 1); -CALL Pro_Temp_ColumnWork('inv_pre_product_detail', 'outCount', 'int ', 1); - - -CALL Pro_Temp_ColumnWork('auth_warehouse', 'updateTime', 'datetime ', 1); - -CALL Pro_Temp_ColumnWork('sync_data_set', 'basicType', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('sync_data_set', 'basicDept', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('sync_data_set', 'updateTime', 'datetime', 1); - -CALL Pro_Temp_ColumnWork('sync_data_set', 'orderToInSyncTime', 'int', 1); -CALL Pro_Temp_ColumnWork('sync_data_set', 'supCert', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('sync_data_set', 'systemConfig', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('sync_data_set', 'printConfig', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('sync_data_set', 'scanChangeConfig', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('sync_data_set', 'busChangeConfig', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('sync_data_set', 'basicThirdDept', 'tinyint', 1); -CALL Pro_Temp_ColumnWork('thr_inv_warehouse', 'updateTime', 'datetime', 1); -CALL Pro_Temp_ColumnWork('sys_param_config', 'updateTime', 'datetime', 1); -CALL Pro_Temp_ColumnWork('sys_pdf_template_relevance_code', 'updateTime', 'datetime', 1); -CALL Pro_Temp_ColumnWork('sys_pdf_template_relevance_biz', 'updateTime', 'datetime', 1); -CALL Pro_Temp_ColumnWork('sys_pdf_template_relevance_label', 'updateTime', 'datetime', 1); -CALL Pro_Temp_ColumnWork('sys_pdf_template_relevance_statemen', 'updateTime', 'datetime', 1); - -CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'advancePreIn', 'tinyint', 1); - - -INSERT ignore INTO `sys_scheduled`(`id`, `cronName`, `cron`, `customerId`, `remark`) -VALUES (211, 'syncDi', '0 24 3 * * ?', NULL, NULL); -INSERT ignore INTO `sys_scheduled`(`id`, `cronName`, `cron`, `customerId`, `remark`) -VALUES (212, 'syncCompany', '0 0 3 * * 1', NULL, NULL); - - - -# CALL Pro_Temp_ColumnWork('sup_cert_set', 'foreign', 'tinyint', 3); -# CALL Pro_Temp_ColumnWork('sup_cert_set', 'needForeign', 'tinyint', 1); - - -CREATE TABLE IF NOT EXISTS `inv_prein_product` -( - `id` int NOT NULL AUTO_INCREMENT, - `relIdFk` bigint NULL DEFAULT NULL COMMENT '耗材字典ID', - `nameCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '最小销售标识', - `batchNo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批次号', - `productionDate` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '生产日期', - `expireDate` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '失效日期', - `inCount` int NULL DEFAULT NULL COMMENT '入库数量', - `outCount` int NULL DEFAULT NULL COMMENT '出库数量', - `reCount` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '实际数量', - `customerId` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '客户ID', - `supId` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '供应商ID', - `deptCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '部门编码', - `invCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '仓库编码', - `createTime` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', - `updateTime` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', - PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB - CHARACTER SET = utf8mb4 - COLLATE = utf8mb4_0900_ai_ci COMMENT = '预验收库存表' - ROW_FORMAT = DYNAMIC; - -SET FOREIGN_KEY_CHECKS = 1; - - - -CREATE TABLE IF NOT EXISTS `inv_prein_product_detail` -( - `id` int NOT NULL AUTO_INCREMENT, - `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'UDI码', - `mainAction` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '出入单据类型', - `action` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '单据类型', - `orderId` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '订单号外键', - `relId` int NOT NULL COMMENT '耗材字典ID', - `nameCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '最小销售标识', - `batchNo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批次号', - `produceDate` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '生产日期', - `expireDate` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '失效日期', - `serialNo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '序列号', - `supId` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '供应商', - `count` int NULL DEFAULT NULL COMMENT '扫码数量', - `reCount` int NULL DEFAULT NULL COMMENT '实际数量', - `deptCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '部门编码', - `invCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '仓库编码', - `invSpaceCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货位编码', - `purchaseType` tinyint NULL DEFAULT NULL COMMENT '采购类型', - `updateTime` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', - PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB - CHARACTER SET = utf8mb4 - COLLATE = utf8mb4_0900_ai_ci COMMENT = '预验收库存详情表' - ROW_FORMAT = DYNAMIC; - - -CREATE TABLE IF NOT EXISTS `sync_data_change_bustypes` -( - `id` int NOT NULL AUTO_INCREMENT, - `action` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, - `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, - `outChange` tinyint NULL DEFAULT NULL, - `orderStatus` tinyint NULL DEFAULT NULL, - PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB - AUTO_INCREMENT = 128 - CHARACTER SET = utf8mb4 - COLLATE = utf8mb4_0900_ai_ci COMMENT = '单据同步 - 业务单据类型' - ROW_FORMAT = DYNAMIC; - - -# 修改主键为LONG -CALL Pro_Temp_ColumnWork('basic_hosp_type', 'id', 'bigint', 2); -CALL Pro_Temp_ColumnWork('basic_udirel', 'id', 'bigint', 2); -CALL Pro_Temp_ColumnWork('basic_products', 'id', 'bigint', 2); -CALL Pro_Temp_ColumnWork('company_product_relevance', 'id', 'bigint', 2); - -CALL Pro_Temp_ColumnWork('basic_corp', 'id', 'bigint', 2); - - -CALL Pro_Temp_ColumnWork('sup_cert', 'id', 'bigint', 2); -CALL Pro_Temp_ColumnWork('sup_cert_set', 'id', 'bigint', 2); -CALL Pro_Temp_ColumnWork('sup_company', 'id', 'bigint', 2); -CALL Pro_Temp_ColumnWork('sup_manufacturer', 'id', 'bigint', 2); -CALL Pro_Temp_ColumnWork('sup_product', 'id', 'bigint', 2); - - -CALL Pro_Temp_ColumnWork('io_code_lost', 'id', 'bigint', 2); -CALL Pro_Temp_ColumnWork('io_code_rel', 'id', 'bigint', 2); - -CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'id', 'bigint', 2); -CALL Pro_Temp_ColumnWork('basic_bustype_change', 'id', 'bigint', 2); -CALL Pro_Temp_ColumnWork('thr_bustype_origin', 'id', 'bigint', 2); - - -CALL Pro_Temp_ColumnWork('auth_user', 'id', 'bigint', 2); -CALL Pro_Temp_ColumnWork('auth_user_bustype', 'id', 'bigint', 2); -CALL Pro_Temp_ColumnWork('auth_user_bustype', 'userId', 'bigint', 2); -CALL Pro_Temp_ColumnWork('auth_dept', 'id', 'bigint', 2); -CALL Pro_Temp_ColumnWork('auth_warehouse', 'id', 'bigint', 2); -CALL Pro_Temp_ColumnWork('auth_warehouse_bustype', 'id', 'bigint', 2); -CALL Pro_Temp_ColumnWork('auth_warehouse_user', 'id', 'bigint', 2); -CALL Pro_Temp_ColumnWork('auth_space', 'id', 'bigint', 2); - -CALL Pro_Temp_ColumnWork('auth_dept_user', 'userId', 'bigint', 2); -CALL Pro_Temp_ColumnWork('auth_dept_user', 'deptId', 'bigint', 2); - -CALL Pro_Temp_ColumnWork('thr_dept', 'id', 'bigint', 2); -CALL Pro_Temp_ColumnWork('thr_inv_warehouse', 'id', 'bigint', 2); -CALL Pro_Temp_ColumnWork('thr_products', 'id', 'bigint', 2); -CALL Pro_Temp_ColumnWork('thr_corp', 'id', 'bigint', 2); - - -CALL Pro_Temp_ColumnWork('auth_dept_user', 'userId', 'bigint', 2); -CALL Pro_Temp_ColumnWork('auth_dept_user', 'deptId', 'bigint', 2); -CALL Pro_Temp_ColumnWork('basic_bustype_pre', 'Id', 'bigint', 2); -CALL Pro_Temp_ColumnWork('basic_export_status', 'remark', 'varchar(2048)', 2); -CALL Pro_Temp_ColumnWork('auth_role', 'isCustomer', 'int', 1); - -ALTER TABLE `auth_dept_user` - ADD UNIQUE (`userId`, deptId); - - -CALL Pro_Temp_ColumnWork('sync_data_bustypes', 'id', 'bigint', 2); -CALL Pro_Temp_ColumnWork('sync_data_set', 'orderInvoice', 'tinyint', 1); - -CALL Pro_Temp_ColumnWork('io_order_invoice', 'id', 'bigint ', 2); - - +# # 字段新增 (表名,字段名,字段类型,修改方式(1:新增,2:修改,3:删除) +# +# +# CALL Pro_Temp_ColumnWork('basic_download_status', 'cacheFilePath', +# 'varchar(255) ', 1); +# +# CALL Pro_Temp_ColumnWork('auth_user_bustype', 'updateTime', +# 'datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ', 1); +# CALL Pro_Temp_ColumnWork('auth_warehouse_bustype', 'updateTime', +# 'datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ', 1); +# CALL Pro_Temp_ColumnWork('auth_warehouse_user', 'updateTime', +# 'datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ', 1); +# CALL Pro_Temp_ColumnWork('auth_dept_user', 'updateTime', +# 'datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ', 1); +# +# CALL Pro_Temp_ColumnWork('sync_data_set', 'department', 'tinyint ', 1); +# CALL Pro_Temp_ColumnWork('sync_data_set', 'warehouseDict', 'tinyint ', 1); +# CALL Pro_Temp_ColumnWork('sync_data_set', 'userData', 'tinyint ', 1); +# +# CALL Pro_Temp_ColumnWork('sync_data_set', 'udiCodeLost', 'tinyint ', 1); +# CALL Pro_Temp_ColumnWork('sync_data_set', 'udiCodeRel', 'tinyint ', 1); +# CALL Pro_Temp_ColumnWork('sync_data_set', 'dbDiCompany', 'tinyint', 1); +# +# CALL Pro_Temp_ColumnWork('io_order', 'fromReceiveBillNo', 'varchar(255) ', 1); +# CALL Pro_Temp_ColumnWork('io_order', 'fromThrBillNo', 'varchar(255) ', 1); +# CALL Pro_Temp_ColumnWork('io_order', 'syncStatus', 'tinyint ', 1); +# CALL Pro_Temp_ColumnWork('io_order', 'busType', 'tinyint ', 1); +# CALL Pro_Temp_ColumnWork('io_order', 'deliveryStatus', 'tinyint ', 1); +# CALL Pro_Temp_ColumnWork('io_order', 'inCodeStatus', 'tinyint ', 1); +# CALL Pro_Temp_ColumnWork('io_order', 'processStatus', 'tinyint ', 1); +# +# CALL Pro_Temp_ColumnWork('io_order', 'suppleCount', 'tinyint ', 1); +# CALL Pro_Temp_ColumnWork('io_order', 'relKey', 'varchar(255) ', 1); +# CALL Pro_Temp_ColumnWork('io_order', 'checkTime', 'datetime ', 1); +# CALL Pro_Temp_ColumnWork('io_order', 'checkUser', 'varchar(255) ', 1); +# CALL Pro_Temp_ColumnWork('io_order', 'regStatus', 'varchar(255) ', 1); +# +# CALL Pro_Temp_ColumnWork('io_order_detail_biz', 'regStatus', 'varchar(255) ', 1); +# +# +# +# CALL Pro_Temp_ColumnWork('io_code_lost', 'nameCode', 'varchar(255) ', 1); +# +# CALL Pro_Temp_ColumnWork('thr_bustype_origin', 'thirdSysName', 'varchar(255) ', 3); +# CALL Pro_Temp_ColumnWork('thr_system_bus_api', 'thirdBuyName', 'varchar(255) ', 3); +# +# CALL Pro_Temp_ColumnWork('io_order_detail_biz', 'bindRlIds', 'varchar(255) ', 1); +# CALL Pro_Temp_ColumnWork('io_order_detail_biz', 'checkFileName', 'varchar(255) ', 1); +# CALL Pro_Temp_ColumnWork('io_order_invoice', 'bizIdFk', 'int ', 1); +# +# CALL Pro_Temp_ColumnWork('thr_products', 'updateUser', 'varchar(255) ', 1); +# CALL Pro_Temp_ColumnWork('thr_products', 'createUser', 'varchar(255) ', 1); +# CALL Pro_Temp_ColumnWork('thr_products', 'createTime', 'varchar(255) ', 1); +# +# +# +# CALL Pro_Temp_ColumnWork('auth_warehouse', 'advanceType', 'tinyint', 1); +# CALL Pro_Temp_ColumnWork('auth_warehouse', 'spUse', 'tinyint', 1); +# +# +# CALL Pro_Temp_ColumnWork('basic_udirel', 'relCode', 'varchar(255) ', 1); +# CALL Pro_Temp_ColumnWork('basic_udirel', 'lowStockNum', 'varchar(255) ', 1); +# CALL Pro_Temp_ColumnWork('basic_udirel', 'useExpireTime', 'int', 1); +# CALL Pro_Temp_ColumnWork('basic_udirel', 'dispatch', 'tinyint', 1); +# CALL Pro_Temp_ColumnWork('basic_udirel', 'groupBuy', 'tinyint', 1); +# CALL Pro_Temp_ColumnWork('basic_udirel', 'isDateBy', 'tinyint', 1); +# CALL Pro_Temp_ColumnWork('basic_udirel', 'needCert', 'tinyint', 1); +# CALL Pro_Temp_ColumnWork('basic_udirel', 'certIdFk', 'varchar(255)', 1); +# +# CALL Pro_Temp_ColumnWork('basic_products', 'allowNoSerial', 'tinyint', 1); +# +# +# CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'vailDispatch', 'tinyint', 1); +# CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'vailGroupBuy', 'tinyint', 1); +# CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'busType', 'tinyint', 1); +# CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'inStock', 'tinyint', 1); +# CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'actionType', 'tinyint', 1); +# +# CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'thrCheckEnable', 'tinyint', 1); +# CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'thrCheckWebNew', 'tinyint', 1); +# CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'thrCheckPdaUn', 'tinyint', 1); +# CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'thrCheckPdaEd', 'tinyint', 1); +# CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'thrCheckUdims', 'tinyint', 1); +# CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'thrCheckPc', 'tinyint', 1); +# CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'thrCheckSp', 'tinyint', 1); +# CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'thrCheckChange', 'tinyint', 1); +# CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'thrCheckBalance', 'tinyint', 1); +# CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'thrCheckCopy', 'tinyint', 1); +# CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'fillCodeRel', 'tinyint', 1); +# CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'checkVailDate', 'tinyint', 1); +# CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'checkExpire', 'tinyint', 1); +# CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'checkCertExpire', 'tinyint', 1); +# CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'preInBackAction', 'varchar(255) ', 1); +# CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'backPreinType', 'tinyint', 1); +# CALL Pro_Temp_ColumnWork('io_order', 'checkPreInOrders', 'varchar(255)', 1); +# CALL Pro_Temp_ColumnWork('io_order', 'checkPreInSpaceCode', 'varchar(255)', 1); +# CALL Pro_Temp_ColumnWork('io_order', 'checkPreInInvCode', 'varchar(255)', 1); +# +# CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'sortNum', 'int', 1); +# +# +# +# CALL Pro_Temp_ColumnWork('pur_delivery_detail', 'batchNo', 'varchar(255) ', 1); +# CALL Pro_Temp_ColumnWork('pur_delivery_detail', 'productDate', 'varchar(255) ', 1); +# CALL Pro_Temp_ColumnWork('pur_delivery_detail', 'expireDate', 'varchar(255) ', 1); +# +# CALL Pro_Temp_ColumnWork('pur_arrival_detail', 'batchNo', 'varchar(255) ', 1); +# CALL Pro_Temp_ColumnWork('pur_arrival_detail', 'productDate', 'varchar(255) ', 1); +# CALL Pro_Temp_ColumnWork('pur_arrival_detail', 'expireDate', 'varchar(255) ', 1); +# CALL Pro_Temp_ColumnWork('pur_arrival_detail', 'arrivalCount', 'int ', 1); +# CALL Pro_Temp_ColumnWork('pur_arrival', 'supId', 'varchar(255) ', 1); +# +# CALL Pro_Temp_ColumnWork('pur_returned_detail', 'batchNo', 'varchar(255) ', 1); +# CALL Pro_Temp_ColumnWork('pur_returned_detail', 'productDate', 'varchar(255) ', 1); +# CALL Pro_Temp_ColumnWork('pur_returned_detail', 'expireDate', 'varchar(255) ', 1); +# +# +# CALL Pro_Temp_ColumnWork('pur_delivery', 'supId', 'varchar(255) ', 1); +# CALL Pro_Temp_ColumnWork('pur_returned', 'supId', 'varchar(255) ', 1); +# +# +# CALL Pro_Temp_ColumnWork('basic_bustype_pre', 'targetBusAction', 'varchar(255)', 1); +# CALL Pro_Temp_ColumnWork('basic_bustype_pre', 'busBeforeTime', 'tinyint', 1); +# CALL Pro_Temp_ColumnWork('basic_bustype_pre', 'beforeTime', 'tinyint', 1); +# CALL Pro_Temp_ColumnWork('basic_bustype_pre', 'auditStatus', 'tinyint', 1); +# CALL Pro_Temp_ColumnWork('basic_bustype_pre', 'busAuditStatus', 'tinyint', 1); +# +# CALL Pro_Temp_ColumnWork('basic_bustype_pre', 'createType', 'tinyint', 1); +# +# CALL Pro_Temp_ColumnWork('basic_bustype_change', 'auditStatus', 'tinyint', 1); +# CALL Pro_Temp_ColumnWork('basic_bustype_change', 'busAuditStatus', 'tinyint', 1); +# CALL Pro_Temp_ColumnWork('basic_bustype_change', 'targetBusAction', 'varchar(255)', 1); +# CALL Pro_Temp_ColumnWork('basic_bustype_change', 'beforeTime', 'tinyint', 1); +# CALL Pro_Temp_ColumnWork('basic_bustype_change', 'busBeforeTime', 'tinyint', 1); +# +# CALL Pro_Temp_ColumnWork('pur_order', 'emergency', 'varchar(255)', 1); +# CALL Pro_Temp_ColumnWork('pur_order', 'supId', 'varchar(255)', 1); +# CALL Pro_Temp_ColumnWork('pur_order', 'arrivalTime', 'datetime', 1); +# CALL Pro_Temp_ColumnWork('pur_order', 'dealStatus', 'int', 1); +# +# INSERT ignore INTO `auth_warehouse`(`id`, `code`, `name`, `parentId`, `remark`, `defaultInv`, `thirdId`, `thirdId1`, +# `thirdId2`, `thirdId3`, `thirdId4`, `parentCode`, `advanceType`, `spUse`) +# VALUES ('1541070754823692288', '1000000', '总库', '1000', '总111111', 0, '1001304', '402', NULL, NULL, NULL, '', 1, 1); +# INSERT ignore INTO `auth_warehouse`(`id`, `code`, `name`, `parentId`, `remark`, `defaultInv`, `thirdId`, `thirdId1`, +# `thirdId2`, `thirdId3`, `thirdId4`, `parentCode`, `advanceType`, `spUse`) +# VALUES ('1541070754823692289', '1000002', '寄售库', '1000', '总111111', 0, '1001304', '402', NULL, NULL, NULL, '', 3, 1); +# INSERT ignore INTO `auth_warehouse`(`id`, `code`, `name`, `parentId`, `remark`, `defaultInv`, `thirdId`, `thirdId1`, +# `thirdId2`, `thirdId3`, `thirdId4`, `parentCode`, `advanceType`, `spUse`) +# VALUES ('1541070754823692290', '1000001', '预验收库', '1000', '总111111', 0, '1001304', '402', NULL, NULL, NULL, '', 2, 1); +# +# +# CALL Pro_Temp_ColumnWork('pur_order_detail', 'planCount', 'tinyint', 1); +# +# CALL Pro_Temp_ColumnWork('inv_prein_detail', 'status', 'tinyint', 1); +# CALL Pro_Temp_ColumnWork('inv_prein_detail', 'originCount', 'int', 1); +# CALL Pro_Temp_ColumnWork('inv_prein_detail', 'originReCount', 'int', 1); +# +# CALL Pro_Temp_ColumnWork('inv_prein_detail', 'mainAction', 'varchar(255)', 1); +# CALL Pro_Temp_ColumnWork('inv_prein_detail', 'action', 'varchar(255)', 1); +# +# CALL Pro_Temp_ColumnWork('io_code_lost', 'nameCode', 'varchar(255)', 1); +# +# INSERT ignore INTO `sys_param_config`(`id`, `parentId`, `paramName`, `paramKey`, `paramValue`, `paramStatus`, +# `paramType`, `paramExplain`) +# VALUES (20040, 0, '允许送货单直接入库变更库存', 'deliveryInstock', '0', 1, 0, '0:否;1:是'); +# +# CALL Pro_Temp_ColumnWork('sup_product', 'manufactory', 'varchar(255)', 1); +# CALL Pro_Temp_ColumnWork('sup_product', 'allowNoBatch', 'tinyint', 1); +# CALL Pro_Temp_ColumnWork('sup_product', 'allowNoExpire', 'tinyint', 1); +# CALL Pro_Temp_ColumnWork('sup_product', 'allowNoProduct', 'tinyint', 1); +# CALL Pro_Temp_ColumnWork('sup_product', 'allowNoSerial', 'tinyint', 1); +# +# CALL Pro_Temp_ColumnWork('inv_remind_msg', 'remindCount', 'int', 1); +# CALL Pro_Temp_ColumnWork('sup_cert_remind_msg', 'remindCount', 'int', 1); +# +# CALL Pro_Temp_ColumnWork('sync_data_bustypes', 'orderStatus', 'tinyint', 1); +# CALL Pro_Temp_ColumnWork('sync_data_bustypes', 'direct', 'tinyint', 1); +# +# +# CALL Pro_Temp_ColumnWork('sup_manufacturer', 'agentName', 'varchar(255)', 1); +# CALL Pro_Temp_ColumnWork('sys_pdf_module', 'modelKey', 'varchar(255)', 1); +# CALL Pro_Temp_ColumnWork('sys_pdf_template', 'bussinessType', 'varchar(255)', 1); +# CALL Pro_Temp_ColumnWork('sys_pdf_template', 'bussinessStatus', 'varchar(255)', 1); +# +# CALL Pro_Temp_ColumnWork('io_order_detail_biz', 'filePath', 'varchar(255)', 1); +# +# CALL Pro_Temp_ColumnWork('io_order', 'checkStatus', 'tinyint', 1); +# +# INSERT ignore INTO `sys_scheduled`(`id`, `cronName`, `cron`, `customerId`, `remark`) +# VALUES (100, 'clean_log_task', '0 0 2 1/1 * ? ', NULL, '删除日志数据'); +# +# +# +# CALL Pro_Temp_ColumnWork('inv_product', 'nowStock', 'int ', 1); +# CALL Pro_Temp_ColumnWork('inv_product', 'frozenCount', 'int ', 1); +# CALL Pro_Temp_ColumnWork('inv_product', 'planInCount', 'int ', 1); +# CALL Pro_Temp_ColumnWork('inv_product', 'planOutCount', 'int ', 1); +# CALL Pro_Temp_ColumnWork('inv_product', 'onWayCount', 'int ', 1); +# CALL Pro_Temp_ColumnWork('inv_product', 'availableStock', 'int ', 1); +# +# CALL Pro_Temp_ColumnWork('inv_product_detail', 'inCount', 'int ', 1); +# CALL Pro_Temp_ColumnWork('inv_product_detail', 'outCount', 'int ', 1); +# CALL Pro_Temp_ColumnWork('inv_prein_product_detail', 'inCount', 'int ', 1); +# CALL Pro_Temp_ColumnWork('inv_prein_product_detail', 'outCount', 'int ', 1); +# CALL Pro_Temp_ColumnWork('inv_pre_product_detail', 'inCount', 'int ', 1); +# CALL Pro_Temp_ColumnWork('inv_pre_product_detail', 'outCount', 'int ', 1); +# +# +# CALL Pro_Temp_ColumnWork('auth_warehouse', 'updateTime', 'datetime ', 1); +# +# CALL Pro_Temp_ColumnWork('sync_data_set', 'basicType', 'tinyint', 1); +# CALL Pro_Temp_ColumnWork('sync_data_set', 'basicDept', 'tinyint', 1); +# CALL Pro_Temp_ColumnWork('sync_data_set', 'updateTime', 'datetime', 1); +# +# CALL Pro_Temp_ColumnWork('sync_data_set', 'orderToInSyncTime', 'int', 1); +# CALL Pro_Temp_ColumnWork('sync_data_set', 'supCert', 'tinyint', 1); +# CALL Pro_Temp_ColumnWork('sync_data_set', 'systemConfig', 'tinyint', 1); +# CALL Pro_Temp_ColumnWork('sync_data_set', 'printConfig', 'tinyint', 1); +# CALL Pro_Temp_ColumnWork('sync_data_set', 'scanChangeConfig', 'tinyint', 1); +# CALL Pro_Temp_ColumnWork('sync_data_set', 'busChangeConfig', 'tinyint', 1); +# CALL Pro_Temp_ColumnWork('sync_data_set', 'basicThirdDept', 'tinyint', 1); +# CALL Pro_Temp_ColumnWork('thr_inv_warehouse', 'updateTime', 'datetime', 1); +# CALL Pro_Temp_ColumnWork('sys_param_config', 'updateTime', 'datetime', 1); +# CALL Pro_Temp_ColumnWork('sys_pdf_template_relevance_code', 'updateTime', 'datetime', 1); +# CALL Pro_Temp_ColumnWork('sys_pdf_template_relevance_biz', 'updateTime', 'datetime', 1); +# CALL Pro_Temp_ColumnWork('sys_pdf_template_relevance_label', 'updateTime', 'datetime', 1); +# CALL Pro_Temp_ColumnWork('sys_pdf_template_relevance_statemen', 'updateTime', 'datetime', 1); +# +# CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'advancePreIn', 'tinyint', 1); +# +# +# INSERT ignore INTO `sys_scheduled`(`id`, `cronName`, `cron`, `customerId`, `remark`) +# VALUES (211, 'syncDi', '0 24 3 * * ?', NULL, NULL); +# INSERT ignore INTO `sys_scheduled`(`id`, `cronName`, `cron`, `customerId`, `remark`) +# VALUES (212, 'syncCompany', '0 0 3 * * 1', NULL, NULL); +# +# +# +# # CALL Pro_Temp_ColumnWork('sup_cert_set', 'foreign', 'tinyint', 3); +# # CALL Pro_Temp_ColumnWork('sup_cert_set', 'needForeign', 'tinyint', 1); +# +# +# CREATE TABLE IF NOT EXISTS `inv_prein_product` +# ( +# `id` int NOT NULL AUTO_INCREMENT, +# `relIdFk` bigint NULL DEFAULT NULL COMMENT '耗材字典ID', +# `nameCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '最小销售标识', +# `batchNo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批次号', +# `productionDate` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '生产日期', +# `expireDate` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '失效日期', +# `inCount` int NULL DEFAULT NULL COMMENT '入库数量', +# `outCount` int NULL DEFAULT NULL COMMENT '出库数量', +# `reCount` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '实际数量', +# `customerId` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '客户ID', +# `supId` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '供应商ID', +# `deptCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '部门编码', +# `invCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '仓库编码', +# `createTime` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', +# `updateTime` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', +# PRIMARY KEY (`id`) USING BTREE +# ) ENGINE = InnoDB +# CHARACTER SET = utf8mb4 +# COLLATE = utf8mb4_0900_ai_ci COMMENT = '预验收库存表' +# ROW_FORMAT = DYNAMIC; +# +# SET FOREIGN_KEY_CHECKS = 1; +# +# +# +# CREATE TABLE IF NOT EXISTS `inv_prein_product_detail` +# ( +# `id` int NOT NULL AUTO_INCREMENT, +# `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'UDI码', +# `mainAction` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '出入单据类型', +# `action` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '单据类型', +# `orderId` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '订单号外键', +# `relId` int NOT NULL COMMENT '耗材字典ID', +# `nameCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '最小销售标识', +# `batchNo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批次号', +# `produceDate` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '生产日期', +# `expireDate` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '失效日期', +# `serialNo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '序列号', +# `supId` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '供应商', +# `count` int NULL DEFAULT NULL COMMENT '扫码数量', +# `reCount` int NULL DEFAULT NULL COMMENT '实际数量', +# `deptCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '部门编码', +# `invCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '仓库编码', +# `invSpaceCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货位编码', +# `purchaseType` tinyint NULL DEFAULT NULL COMMENT '采购类型', +# `updateTime` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', +# PRIMARY KEY (`id`) USING BTREE +# ) ENGINE = InnoDB +# CHARACTER SET = utf8mb4 +# COLLATE = utf8mb4_0900_ai_ci COMMENT = '预验收库存详情表' +# ROW_FORMAT = DYNAMIC; +# +# +# CREATE TABLE IF NOT EXISTS `sync_data_change_bustypes` +# ( +# `id` int NOT NULL AUTO_INCREMENT, +# `action` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, +# `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL, +# `outChange` tinyint NULL DEFAULT NULL, +# `orderStatus` tinyint NULL DEFAULT NULL, +# PRIMARY KEY (`id`) USING BTREE +# ) ENGINE = InnoDB +# AUTO_INCREMENT = 128 +# CHARACTER SET = utf8mb4 +# COLLATE = utf8mb4_0900_ai_ci COMMENT = '单据同步 - 业务单据类型' +# ROW_FORMAT = DYNAMIC; +# +# +# # 修改主键为LONG +# CALL Pro_Temp_ColumnWork('basic_hosp_type', 'id', 'bigint', 2); +# CALL Pro_Temp_ColumnWork('basic_udirel', 'id', 'bigint', 2); +# CALL Pro_Temp_ColumnWork('basic_products', 'id', 'bigint', 2); +# CALL Pro_Temp_ColumnWork('company_product_relevance', 'id', 'bigint', 2); +# +# CALL Pro_Temp_ColumnWork('basic_corp', 'id', 'bigint', 2); +# +# +# CALL Pro_Temp_ColumnWork('sup_cert', 'id', 'bigint', 2); +# CALL Pro_Temp_ColumnWork('sup_cert_set', 'id', 'bigint', 2); +# CALL Pro_Temp_ColumnWork('sup_company', 'id', 'bigint', 2); +# CALL Pro_Temp_ColumnWork('sup_manufacturer', 'id', 'bigint', 2); +# CALL Pro_Temp_ColumnWork('sup_product', 'id', 'bigint', 2); +# +# +# CALL Pro_Temp_ColumnWork('io_code_lost', 'id', 'bigint', 2); +# CALL Pro_Temp_ColumnWork('io_code_rel', 'id', 'bigint', 2); +# +# CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'id', 'bigint', 2); +# CALL Pro_Temp_ColumnWork('basic_bustype_change', 'id', 'bigint', 2); +# CALL Pro_Temp_ColumnWork('thr_bustype_origin', 'id', 'bigint', 2); +# +# +# CALL Pro_Temp_ColumnWork('auth_user', 'id', 'bigint', 2); +# CALL Pro_Temp_ColumnWork('auth_user_bustype', 'id', 'bigint', 2); +# CALL Pro_Temp_ColumnWork('auth_user_bustype', 'userId', 'bigint', 2); +# CALL Pro_Temp_ColumnWork('auth_dept', 'id', 'bigint', 2); +# CALL Pro_Temp_ColumnWork('auth_warehouse', 'id', 'bigint', 2); +# CALL Pro_Temp_ColumnWork('auth_warehouse_bustype', 'id', 'bigint', 2); +# CALL Pro_Temp_ColumnWork('auth_warehouse_user', 'id', 'bigint', 2); +# CALL Pro_Temp_ColumnWork('auth_space', 'id', 'bigint', 2); +# +# CALL Pro_Temp_ColumnWork('auth_dept_user', 'userId', 'bigint', 2); +# CALL Pro_Temp_ColumnWork('auth_dept_user', 'deptId', 'bigint', 2); +# +# CALL Pro_Temp_ColumnWork('thr_dept', 'id', 'bigint', 2); +# CALL Pro_Temp_ColumnWork('thr_inv_warehouse', 'id', 'bigint', 2); +# CALL Pro_Temp_ColumnWork('thr_products', 'id', 'bigint', 2); +# CALL Pro_Temp_ColumnWork('thr_corp', 'id', 'bigint', 2); +# +# +# CALL Pro_Temp_ColumnWork('auth_dept_user', 'userId', 'bigint', 2); +# CALL Pro_Temp_ColumnWork('auth_dept_user', 'deptId', 'bigint', 2); +# CALL Pro_Temp_ColumnWork('basic_bustype_pre', 'Id', 'bigint', 2); +# CALL Pro_Temp_ColumnWork('basic_export_status', 'remark', 'varchar(2048)', 2); +# CALL Pro_Temp_ColumnWork('auth_role', 'isCustomer', 'int', 1); +# +# ALTER TABLE `auth_dept_user` +# ADD UNIQUE (`userId`, deptId); +# +# +# CALL Pro_Temp_ColumnWork('sync_data_bustypes', 'id', 'bigint', 2); +# CALL Pro_Temp_ColumnWork('sync_data_set', 'orderInvoice', 'tinyint', 1); +# +# CALL Pro_Temp_ColumnWork('io_order_invoice', 'id', 'bigint ', 2); +# +# +INSERT ignore INTO `sys_pdf_template_relevance_label`(`id`, `templateId`, `customerId`, `adminId`, `moduleId`, `localAction`, `remark1`, `remark2`, `remark3`, `printType`, `modelKey`) VALUES (1, 30, 110, 0, 9, '内部码打印', NULL, NULL, NULL, NULL, 'lable'); +INSERT ignore INTO `sys_pdf_template_relevance_statemen`(`id`, `templateId`, `customerId`, `adminId`, `moduleId`, `localAction`, `remark1`, `remark2`, `remark3`, `printType`, `modelKey`) VALUES (1, 31, 110, 0, NULL, '配送企业资质打印', NULL, NULL, NULL, NULL, 'reportForms'); +INSERT ignore INTO `sys_pdf_template_relevance_statemen`(`id`, `templateId`, `customerId`, `adminId`, `moduleId`, `localAction`, `remark1`, `remark2`, `remark3`, `printType`, `modelKey`) VALUES (2, 32, 110, 0, NULL, '生产企业资质打印', NULL, NULL, NULL, NULL, 'reportForms'); +INSERT ignore INTO `sys_pdf_template_relevance_statemen`(`id`, `templateId`, `customerId`, `adminId`, `moduleId`, `localAction`, `remark1`, `remark2`, `remark3`, `printType`, `modelKey`) VALUES (3, 33, 110, 0, NULL, '配送产品资质打印', NULL, NULL, NULL, NULL, 'reportForms'); +INSERT ignore INTO `sys_pdf_template_relevance_statemen`(`id`, `templateId`, `customerId`, `adminId`, `moduleId`, `localAction`, `remark1`, `remark2`, `remark3`, `printType`, `modelKey`) VALUES (4, 33, 110, 0, NULL, '库存报表打印', NULL, NULL, NULL, NULL, 'reportForms'); +INSERT ignore INTO `sys_pdf_template_relevance_statemen`(`id`, `templateId`, `customerId`, `adminId`, `moduleId`, `localAction`, `remark1`, `remark2`, `remark3`, `printType`, `modelKey`) VALUES (5, 33, 110, 0, NULL, '内部码报表打印', NULL, NULL, NULL, NULL, 'reportForms'); From be1c63e774dbcbfde988caf0318796c86926fdca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E6=98=8E=E6=A2=81?= <2429105222@qq.com> Date: Tue, 23 May 2023 16:05:09 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E5=86=85=E9=83=A8=E7=A0=81=E5=92=8C?= =?UTF-8?q?=E6=98=8E=E7=BB=86=E6=89=93=E5=8D=B0=E4=BB=A3=E7=A0=81=E6=8F=90?= =?UTF-8?q?=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/application-dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index c2a962d2..eed086a0 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -3,7 +3,7 @@ server: spring: datasource: driver-class-name: com.p6spy.engine.spy.P6SpyDriver - jdbc-url: jdbc:p6spy:mysql://127.0.0.1:3306/udi_spms_pt?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true + jdbc-url: jdbc:p6spy:mysql://127.0.0.1:3306/udi_spms?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true username: root password: 123456 hikari: