|  |  | @ -13,6 +13,7 @@ import com.glxp.api.entity.inout.IoOrderEntity; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.entity.purchase.SupCertEntity; |  |  |  | import com.glxp.api.entity.purchase.SupCertEntity; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.entity.purchase.SupManufacturerEntity; |  |  |  | import com.glxp.api.entity.purchase.SupManufacturerEntity; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.entity.purchase.SupProductEntity; |  |  |  | import com.glxp.api.entity.purchase.SupProductEntity; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import com.glxp.api.entity.system.SysPdfTemplateRelevanceCodeEntity; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.entity.system.SystemPDFModuleEntity; |  |  |  | import com.glxp.api.entity.system.SystemPDFModuleEntity; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.entity.system.SystemPDFTemplateEntity; |  |  |  | import com.glxp.api.entity.system.SystemPDFTemplateEntity; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.entity.system.SystemPDFTemplateRelevanceEntity; |  |  |  | import com.glxp.api.entity.system.SystemPDFTemplateRelevanceEntity; | 
			
		
	
	
		
		
			
				
					|  |  | @ -30,6 +31,7 @@ import com.glxp.api.service.inout.IoCodeService; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.service.inout.IoOrderDetailBizService; |  |  |  | import com.glxp.api.service.inout.IoOrderDetailBizService; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.service.inout.IoOrderService; |  |  |  | import com.glxp.api.service.inout.IoOrderService; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.service.system.SystemPDFModuleService; |  |  |  | import com.glxp.api.service.system.SystemPDFModuleService; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import com.glxp.api.service.system.SystemPDFTemplateRelevanceCodeService; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.service.system.SystemPDFTemplateRelevanceService; |  |  |  | import com.glxp.api.service.system.SystemPDFTemplateRelevanceService; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.service.system.SystemPDFTemplateService; |  |  |  | import com.glxp.api.service.system.SystemPDFTemplateService; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.glxp.api.util.JasperUtils; |  |  |  | import com.glxp.api.util.JasperUtils; | 
			
		
	
	
		
		
			
				
					|  |  | @ -71,6 +73,8 @@ public class BasicOrderPrintController { | 
			
		
	
		
		
			
				
					
					|  |  |  |     IoCodeService ioCodeService; |  |  |  |     IoCodeService ioCodeService; | 
			
		
	
		
		
			
				
					
					|  |  |  |     @Value("${file_path}") |  |  |  |     @Value("${file_path}") | 
			
		
	
		
		
			
				
					
					|  |  |  |     private String filePath; |  |  |  |     private String filePath; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     @Resource | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     SystemPDFTemplateRelevanceCodeService systemPDFTemplateRelevanceCodeService; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     //校验模板是否正确
 |  |  |  |     //校验模板是否正确
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     @AuthRuleAnnotation("") |  |  |  |     @AuthRuleAnnotation("") | 
			
		
	
	
		
		
			
				
					|  |  | @ -78,9 +82,10 @@ public class BasicOrderPrintController { | 
			
		
	
		
		
			
				
					
					|  |  |  |     public BaseResponse inspectionStockOrderPDFFromTemplateFile(@RequestBody FilterOrderPrintRequest filterOrderPrintRequest) { |  |  |  |     public BaseResponse inspectionStockOrderPDFFromTemplateFile(@RequestBody FilterOrderPrintRequest filterOrderPrintRequest) { | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         SystemPDFTemplateRelevanceEntity systemPDFTemplateRelevanceEntityt = systemPDFTemplateRelevanceService.selectModuleldAndAction(filterOrderPrintRequest.getModuleId(), filterOrderPrintRequest.getAction()); |  |  |  |         String name=getStatusName(filterOrderPrintRequest.getStatus()); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |         if (systemPDFTemplateRelevanceEntityt != null) { |  |  |  |         SysPdfTemplateRelevanceCodeEntity sysPdfTemplateRelevanceCodeEntity = systemPDFTemplateRelevanceCodeService.selectNameAndAction(name, filterOrderPrintRequest.getAction()); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             SystemPDFTemplateEntity systemPDFTemplateEntity = systemPDFTemplateService.selectById(systemPDFTemplateRelevanceEntityt.getTemplateId() + ""); |  |  |  |         if (sysPdfTemplateRelevanceCodeEntity != null) { | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             SystemPDFTemplateEntity systemPDFTemplateEntity = systemPDFTemplateService.selectById(sysPdfTemplateRelevanceCodeEntity.getTemplateId() + ""); | 
			
		
	
		
		
			
				
					
					|  |  |  |             if (systemPDFTemplateEntity == null) { |  |  |  |             if (systemPDFTemplateEntity == null) { | 
			
		
	
		
		
			
				
					
					|  |  |  |                 return ResultVOUtils.error(999, "所属模板错误!"); |  |  |  |                 return ResultVOUtils.error(999, "所属模板错误!"); | 
			
		
	
		
		
			
				
					
					|  |  |  |             } else { |  |  |  |             } else { | 
			
		
	
	
		
		
			
				
					|  |  | @ -97,7 +102,8 @@ public class BasicOrderPrintController { | 
			
		
	
		
		
			
				
					
					|  |  |  |     @PostMapping("/udiwms/pdf/template/order/file") |  |  |  |     @PostMapping("/udiwms/pdf/template/order/file") | 
			
		
	
		
		
			
				
					
					|  |  |  |     public void printSupCertProduction(@RequestBody FilterOrderPrintRequest filterOrderPrintRequest, HttpServletRequest request, HttpServletResponse response) throws Exception { |  |  |  |     public void printSupCertProduction(@RequestBody FilterOrderPrintRequest filterOrderPrintRequest, HttpServletRequest request, HttpServletResponse response) throws Exception { | 
			
		
	
		
		
			
				
					
					|  |  |  |         SystemPDFTemplateEntity systemPDFTemplateEntity = systemPDFTemplateService.selectById(filterOrderPrintRequest.getTemplateId()); |  |  |  |         SystemPDFTemplateEntity systemPDFTemplateEntity = systemPDFTemplateService.selectById(filterOrderPrintRequest.getTemplateId()); | 
			
		
	
		
		
			
				
					
					|  |  |  |         SystemPDFTemplateRelevanceEntity systemPDFTemplateRelevanceEntityt = systemPDFTemplateRelevanceService.selectModuleldAndAction(filterOrderPrintRequest.getModuleId(), filterOrderPrintRequest.getAction()); |  |  |  |         String name=getStatusName(filterOrderPrintRequest.getStatus()); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         SysPdfTemplateRelevanceCodeEntity sysPdfTemplateRelevanceCodeEntity = systemPDFTemplateRelevanceCodeService.selectNameAndAction(name, filterOrderPrintRequest.getAction()); | 
			
		
	
		
		
			
				
					
					|  |  |  |         //打印单号标签
 |  |  |  |         //打印单号标签
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         Map<String, Object> data = new HashMap<>(1); |  |  |  |         Map<String, Object> data = new HashMap<>(1); | 
			
		
	
		
		
			
				
					
					|  |  |  |         List<Object> list = new ArrayList<>(); |  |  |  |         List<Object> list = new ArrayList<>(); | 
			
		
	
	
		
		
			
				
					|  |  | @ -125,8 +131,8 @@ public class BasicOrderPrintController { | 
			
		
	
		
		
			
				
					
					|  |  |  |                     bizData.put("locInv", ioOrderResponse.getInvName() == null ? ' ' : ioOrderResponse.getInvName()); |  |  |  |                     bizData.put("locInv", ioOrderResponse.getInvName() == null ? ' ' : ioOrderResponse.getInvName()); | 
			
		
	
		
		
			
				
					
					|  |  |  |                     bizData.put("billNo", ioOrderResponse.getBillNo() == null ? ' ' : ioOrderResponse.getBillNo()); |  |  |  |                     bizData.put("billNo", ioOrderResponse.getBillNo() == null ? ' ' : ioOrderResponse.getBillNo()); | 
			
		
	
		
		
			
				
					
					|  |  |  |                     bizData.put("billdate", formatter.format(ioOrderResponse.getCreateTime())); |  |  |  |                     bizData.put("billdate", formatter.format(ioOrderResponse.getCreateTime())); | 
			
		
	
		
		
			
				
					
					|  |  |  |                     bizData.put("remark1", systemPDFTemplateRelevanceEntityt.getRemark1() == null ? ' ' : systemPDFTemplateRelevanceEntityt.getRemark1()); |  |  |  |                     bizData.put("remark1", sysPdfTemplateRelevanceCodeEntity.getRemark1() == null ? ' ' : sysPdfTemplateRelevanceCodeEntity.getRemark1()); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                     bizData.put("remark2", systemPDFTemplateRelevanceEntityt.getRemark2() == null ? ' ' : systemPDFTemplateRelevanceEntityt.getRemark2()); |  |  |  |                     bizData.put("remark2", sysPdfTemplateRelevanceCodeEntity.getRemark2() == null ? ' ' : sysPdfTemplateRelevanceCodeEntity.getRemark2()); | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                     bizData.put("productName", udiProductEntity.getCpms() == null ? ' ' : udiProductEntity.getCpms()); |  |  |  |                     bizData.put("productName", udiProductEntity.getCpms() == null ? ' ' : udiProductEntity.getCpms()); | 
			
		
	
		
		
			
				
					
					|  |  |  |                     bizData.put("spmc", obj.getCoName() == null ? ' ' : obj.getCoName()); |  |  |  |                     bizData.put("spmc", obj.getCoName() == null ? ' ' : obj.getCoName()); | 
			
		
	
		
		
			
				
					
					|  |  |  |                     bizData.put("spec", obj.getSpec() == null ? ' ' : obj.getSpec()); |  |  |  |                     bizData.put("spec", obj.getSpec() == null ? ' ' : obj.getSpec()); | 
			
		
	
	
		
		
			
				
					|  |  | @ -174,8 +180,8 @@ public class BasicOrderPrintController { | 
			
		
	
		
		
			
				
					
					|  |  |  |                     bizData.put("locInv", ioOrderResponse.getInvName() == null ? ' ' : ioOrderResponse.getInvName()); |  |  |  |                     bizData.put("locInv", ioOrderResponse.getInvName() == null ? ' ' : ioOrderResponse.getInvName()); | 
			
		
	
		
		
			
				
					
					|  |  |  |                     bizData.put("billNo", ioOrderResponse.getBillNo() == null ? ' ' : ioOrderResponse.getBillNo()); |  |  |  |                     bizData.put("billNo", ioOrderResponse.getBillNo() == null ? ' ' : ioOrderResponse.getBillNo()); | 
			
		
	
		
		
			
				
					
					|  |  |  |                     bizData.put("billdate", formatter.format(ioOrderResponse.getCreateTime())); |  |  |  |                     bizData.put("billdate", formatter.format(ioOrderResponse.getCreateTime())); | 
			
		
	
		
		
			
				
					
					|  |  |  |                     bizData.put("remark1", systemPDFTemplateRelevanceEntityt.getRemark1() == null ? ' ' : systemPDFTemplateRelevanceEntityt.getRemark1()); |  |  |  |                     bizData.put("remark1", sysPdfTemplateRelevanceCodeEntity.getRemark1() == null ? ' ' : sysPdfTemplateRelevanceCodeEntity.getRemark1()); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                     bizData.put("remark2", systemPDFTemplateRelevanceEntityt.getRemark2() == null ? ' ' : systemPDFTemplateRelevanceEntityt.getRemark2()); |  |  |  |                     bizData.put("remark2", sysPdfTemplateRelevanceCodeEntity.getRemark2() == null ? ' ' : sysPdfTemplateRelevanceCodeEntity.getRemark2()); | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                     bizData.put("productName", udiProductEntity.getCpms() == null ? ' ' : udiProductEntity.getCpms()); |  |  |  |                     bizData.put("productName", udiProductEntity.getCpms() == null ? ' ' : udiProductEntity.getCpms()); | 
			
		
	
		
		
			
				
					
					|  |  |  |                     bizData.put("spmc", ioOrderDetailBizEntity.getCoName() == null ? ' ' : ioOrderDetailBizEntity.getCoName()); |  |  |  |                     bizData.put("spmc", ioOrderDetailBizEntity.getCoName() == null ? ' ' : ioOrderDetailBizEntity.getCoName()); | 
			
		
	
		
		
			
				
					
					|  |  |  |                     bizData.put("spec", ioOrderDetailBizEntity.getSpec() == null ? ' ' : ioOrderDetailBizEntity.getSpec()); |  |  |  |                     bizData.put("spec", ioOrderDetailBizEntity.getSpec() == null ? ' ' : ioOrderDetailBizEntity.getSpec()); | 
			
		
	
	
		
		
			
				
					|  |  | @ -198,7 +204,21 @@ public class BasicOrderPrintController { | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         data.put("data", list); |  |  |  |         data.put("data", list); | 
			
		
	
		
		
			
				
					
					|  |  |  |         String param = JSON.toJSONString(data); |  |  |  |         String param = JSON.toJSONString(data); | 
			
		
	
		
		
			
				
					
					|  |  |  |         JasperUtils.jasperReport(request, response, param, filePath + "/pdf/template/"+systemPDFTemplateEntity.getPath(), "pdf"); |  |  |  |         JasperUtils.jasperReport(request, response, param, systemPDFTemplateEntity.getPath(), "pdf"); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     public  String getStatusName(Integer type){ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         String name=""; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         if(type==3){ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             name="ScanCodeVerification"; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         }else  if(type==5){ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             name="ScanCodeCheck"; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         }else  if(type==10){ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             name="ScanCode"; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         }else  if(type==7){ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             name="ScanCodeAlready"; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         return name; | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | } |  |  |  | } | 
			
		
	
	
		
		
			
				
					|  |  | 
 |