master
wangwei 2 years ago
parent 4bee6cf615
commit 3bc6ad96dd

@ -10,6 +10,7 @@ import com.glxp.api.constant.BusinessType;
import com.glxp.api.entity.inout.IoOrderEntity;
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.SystemPDFModuleEntity;
import com.glxp.api.entity.system.SystemPDFTemplateEntity;
import com.glxp.api.req.inout.InspectionPDFTemplateRequest;
@ -87,13 +88,13 @@ public class InvInnerOrderPrintController {
@PostMapping("/udiwms/pdf/template/inspection/stock/qrcode/text/file")
public BaseResponse inspectionStockQRCodeTextPDFFromTemplateFile(
@RequestBody InspectionPDFTemplateRequest inspectionPDFTemplateRequest) throws Exception {
if (inspectionPDFTemplateRequest.getModuleId() == null)
inspectionPDFTemplateRequest.setModuleId(3);
SystemPDFModuleEntity systemPDFModuleEntity = systemPDFModuleService.selectById(inspectionPDFTemplateRequest.getModuleId() + "");
if (systemPDFModuleEntity == null) return ResultVOUtils.error(500, "未找到单据模板模块设置,请检查");
SysPdfTemplateRelevanceLabelEntity sysPdfTemplateRelevanceLabelEntity = systemPDFModuleService.selectByLabelId(inspectionPDFTemplateRequest.getId() + "");
if (sysPdfTemplateRelevanceLabelEntity == null) return ResultVOUtils.error(500, "未找到单据模板模块设置,请检查");
SystemPDFTemplateEntity systemPDFTemplateEntity =
systemPDFTemplateService.selectById(String.valueOf(systemPDFModuleEntity.getTemplateId()));
systemPDFTemplateService.selectById(String.valueOf(sysPdfTemplateRelevanceLabelEntity.getTemplateId()));
if (systemPDFTemplateEntity == null) return ResultVOUtils.error(ResultEnum.DATA_NOT, "模板错误");
return ResultVOUtils.success();
@ -105,14 +106,14 @@ public class InvInnerOrderPrintController {
@RequestBody InnerOrderQRCodeTextPDFTemplateRequest stockQRCodeTextPDFTemplateRequest,
HttpServletRequest request, HttpServletResponse response) throws Exception {
if (stockQRCodeTextPDFTemplateRequest.getModuleId() == null)
stockQRCodeTextPDFTemplateRequest.setModuleId(3);
SystemPDFModuleEntity systemPDFModuleEntity = systemPDFModuleService.selectById(stockQRCodeTextPDFTemplateRequest.getModuleId() + "");
SysPdfTemplateRelevanceLabelEntity sysPdfTemplateRelevanceLabelEntity = systemPDFModuleService.selectByLabelId(stockQRCodeTextPDFTemplateRequest.getId() + "");
if (sysPdfTemplateRelevanceLabelEntity == null) return ResultVOUtils.error(500, "未找到单据模板模块设置,请检查");
if (systemPDFModuleEntity == null) return ResultVOUtils.error(500, "未找到单据模板模块设置,请检查");
SystemPDFTemplateEntity systemPDFTemplateEntity =
systemPDFTemplateService.selectById(String.valueOf(systemPDFModuleEntity.getTemplateId()));
if (systemPDFTemplateEntity == null) return null;
systemPDFTemplateService.selectById(String.valueOf(sysPdfTemplateRelevanceLabelEntity.getTemplateId()));
if (systemPDFTemplateEntity == null) return ResultVOUtils.error(ResultEnum.DATA_NOT, "模板错误");
List<InnerOrderPrintResponse> printEntities = new ArrayList<>();
List<InnerOrderPrintResponse> mStockPrintEntities = new ArrayList<>();
FilterinnerOrderprintRequest filterinnerOrderprintRequest = new FilterinnerOrderprintRequest();

@ -13,6 +13,7 @@ import com.glxp.api.constant.BusinessType;
import com.glxp.api.constant.ConstantStatus;
import com.glxp.api.entity.auth.AuthAdmin;
import com.glxp.api.entity.purchase.*;
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.exception.JsonException;
@ -281,18 +282,17 @@ public class SupCertController {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, "参数不能为空!");
}
//查询模板文件是否存在
FilterPdfModuleRequest filterPdfModuleRequest = new FilterPdfModuleRequest();
filterPdfModuleRequest.setModelKey(inspectionPDFTemplateRequest.getModelKey());
SystemPDFModuleEntity systemPDFModule = systemPDFModuleService.findSystemPDFModule(filterPdfModuleRequest);
if (null == systemPDFModule) {
SysPdfTemplateRelevanceStatemenEntity sysPdfTemplateRelevanceStatemenEntity = systemPDFModuleService.selectByStatemenId(inspectionPDFTemplateRequest.getId());
if (null == sysPdfTemplateRelevanceStatemenEntity) {
return ResultVOUtils.error(ResultEnum.DATA_NOT, "所属模块错误");
}
SystemPDFTemplateEntity systemPDFTemplateEntity = systemPDFTemplateService.selectById(String.valueOf(systemPDFModule.getTemplateId()));
SystemPDFTemplateEntity systemPDFTemplateEntity = systemPDFTemplateService.selectById(String.valueOf(sysPdfTemplateRelevanceStatemenEntity.getTemplateId()));
if (null == systemPDFTemplateEntity) {
return ResultVOUtils.error(ResultEnum.DATA_NOT, "模板错误");
}
return ResultVOUtils.success(systemPDFModule.getTemplateId());
return ResultVOUtils.success(sysPdfTemplateRelevanceStatemenEntity.getTemplateId());
}
/**

@ -1,5 +1,6 @@
package com.glxp.api.dao.system;
import com.glxp.api.entity.system.SysPdfTemplateRelevanceLabelEntity;
import com.glxp.api.entity.system.SystemPDFModuleEntity;
import com.glxp.api.req.system.FilterPdfModuleRequest;
import com.glxp.api.req.system.SysPdfModuleSaveRequest;
@ -20,6 +21,7 @@ public interface SystemPDFModuleDao {
SystemPDFModuleEntity selectById(String id);
boolean updateById(SysPdfModuleSaveRequest sysPdfModuleSaveRequest);
boolean insert(SystemPDFModuleEntity systemPDFModuleEntity);

@ -1,5 +1,7 @@
package com.glxp.api.dao.system;
import com.glxp.api.entity.system.SysPdfTemplateRelevanceLabelEntity;
import com.glxp.api.entity.system.SysPdfTemplateRelevanceStatemenEntity;
import com.glxp.api.entity.system.SysPdfTemplateRelevanceCodeEntity;
import com.glxp.api.entity.system.SystemPDFTemplateRelevanceEntity;
import com.glxp.api.req.system.FilterPdfTemplateRelevanceRequest;
@ -50,6 +52,11 @@ public interface SystemPDFTemplateRelevanceDao {
boolean insert(SystemPDFTemplateRelevanceEntity systemPDFTemplateRelevanceEntity);
SysPdfTemplateRelevanceLabelEntity selectByLabelId(String id);
SysPdfTemplateRelevanceStatemenEntity selectByStatemenId(String id);
/**
* customerId

@ -1,6 +1,8 @@
package com.glxp.api.service.system;
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.req.system.FilterPdfModuleRequest;
import com.glxp.api.req.system.SysPdfModuleSaveRequest;
@ -18,6 +20,11 @@ public interface SystemPDFModuleService {
SystemPDFModuleEntity selectById(String id);
SysPdfTemplateRelevanceLabelEntity selectByLabelId(String id);
SysPdfTemplateRelevanceStatemenEntity selectByStatemenId(String id);
boolean updateById(SysPdfModuleSaveRequest sysPdfModuleSaveRequest);
boolean insert(SystemPDFModuleEntity systemPDFModuleEntity);

@ -2,6 +2,9 @@ package com.glxp.api.service.system.impl;
import com.github.pagehelper.PageHelper;
import com.glxp.api.dao.system.SystemPDFModuleDao;
import com.glxp.api.dao.system.SystemPDFTemplateRelevanceDao;
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.req.system.FilterPdfModuleRequest;
import com.glxp.api.req.system.SysPdfModuleSaveRequest;
@ -18,6 +21,10 @@ public class SystemPDFModuleServiceImpl implements SystemPDFModuleService {
@Resource
SystemPDFModuleDao systemPDFModuleDao;
@Resource
SystemPDFTemplateRelevanceDao systemPDFTemplateRelevanceDao;
@Override
public List<SystemPDFModuleEntity> queryPage(FilterPdfModuleRequest FilterPDFModuleRequest) {
int offset = (FilterPDFModuleRequest.getPage() - 1) * FilterPDFModuleRequest.getLimit();
@ -46,6 +53,16 @@ public class SystemPDFModuleServiceImpl implements SystemPDFModuleService {
return systemPDFModuleDao.selectById(id);
}
@Override
public SysPdfTemplateRelevanceLabelEntity selectByLabelId(String id) {
return systemPDFTemplateRelevanceDao.selectByLabelId(id);
}
@Override
public SysPdfTemplateRelevanceStatemenEntity selectByStatemenId(String id) {
return systemPDFTemplateRelevanceDao.selectByStatemenId(id);
}
@Override
public boolean updateById(SysPdfModuleSaveRequest sysPdfModuleSaveRequest) {

@ -45,6 +45,8 @@
WHERE id = #{id}
</select>
<update id="updateById" parameterType="com.glxp.api.entity.system.SystemPDFModuleEntity">
UPDATE sys_pdf_module
<set>

@ -61,6 +61,19 @@
</if>
</foreach>
</insert>
<select id="selectByLabelId" parameterType="java.lang.String"
resultType="com.glxp.api.entity.system.SysPdfTemplateRelevanceLabelEntity">
select *
FROM sys_pdf_module_relevance_label
WHERE id = #{id}
</select>
<select id="selectByStatemenId" parameterType="java.lang.String"
resultType="com.glxp.api.entity.system.SysPdfTemplateRelevanceStatemenEntity">
select *
FROM sys_pdf_template_relevance_statemen
WHERE id = #{id}
</select>
<insert id="insert" parameterType="com.glxp.api.entity.system.SystemPDFTemplateRelevanceEntity">
insert

Loading…
Cancel
Save