|
|
|
@ -80,8 +80,7 @@ public class BasicOrderPrintController {
|
|
|
|
|
public BaseResponse inspectionStockOrderPDFFromTemplateFile(@RequestBody FilterOrderPrintRequest filterOrderPrintRequest) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String name=getStatusName(filterOrderPrintRequest.getStatus());
|
|
|
|
|
String name = getStatusName(filterOrderPrintRequest.getStatus());
|
|
|
|
|
SysPdfTemplateRelevanceCodeEntity sysPdfTemplateRelevanceCodeEntity = systemPDFTemplateRelevanceCodeService.selectNameAndAction(name, filterOrderPrintRequest.getAction());
|
|
|
|
|
if (sysPdfTemplateRelevanceCodeEntity != null) {
|
|
|
|
|
SystemPDFTemplateEntity systemPDFTemplateEntity = systemPDFTemplateService.selectById(sysPdfTemplateRelevanceCodeEntity.getTemplateId() + "");
|
|
|
|
@ -101,7 +100,7 @@ public class BasicOrderPrintController {
|
|
|
|
|
@PostMapping("/udiwms/pdf/template/order/file")
|
|
|
|
|
public void printSupCertProduction(@RequestBody FilterOrderPrintRequest filterOrderPrintRequest, HttpServletRequest request, HttpServletResponse response) throws Exception {
|
|
|
|
|
SystemPDFTemplateEntity systemPDFTemplateEntity = systemPDFTemplateService.selectById(filterOrderPrintRequest.getTemplateId());
|
|
|
|
|
String name=getStatusName(filterOrderPrintRequest.getStatus());
|
|
|
|
|
String name = getStatusName(filterOrderPrintRequest.getStatus());
|
|
|
|
|
SysPdfTemplateRelevanceCodeEntity sysPdfTemplateRelevanceCodeEntity = systemPDFTemplateRelevanceCodeService.selectNameAndAction(name, filterOrderPrintRequest.getAction());
|
|
|
|
|
//打印单号标签
|
|
|
|
|
Map<String, Object> data = new HashMap<>(1);
|
|
|
|
@ -203,20 +202,20 @@ public class BasicOrderPrintController {
|
|
|
|
|
|
|
|
|
|
data.put("data", list);
|
|
|
|
|
String param = JSON.toJSONString(data);
|
|
|
|
|
JasperUtils.jasperReport(request, response, param, filePath+"pdf/template/"+FileUtils.getLastFileName(systemPDFTemplateEntity.getPath()), "pdf");
|
|
|
|
|
JasperUtils.jasperReport(request, response, param, filePath + "pdf/template/" + FileUtils.getLastFileName(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";
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
@ -228,7 +227,7 @@ public class BasicOrderPrintController {
|
|
|
|
|
@RequestBody FilterOrderPrintRequest filterOrderPrintRequest) throws Exception {
|
|
|
|
|
|
|
|
|
|
//查询模板文件是否存在
|
|
|
|
|
SysPdfTemplateRelevanceStatemenEntity sysPdfTemplateRelevanceStatemenEntity = systemPDFModuleService.selectByStatemenId(filterOrderPrintRequest.getLabelId()+"");
|
|
|
|
|
SysPdfTemplateRelevanceStatemenEntity sysPdfTemplateRelevanceStatemenEntity = systemPDFModuleService.selectByStatemenId(filterOrderPrintRequest.getLabelId() + "");
|
|
|
|
|
if (null == sysPdfTemplateRelevanceStatemenEntity) {
|
|
|
|
|
return ResultVOUtils.error(ResultEnum.DATA_NOT, "所属模块错误");
|
|
|
|
|
}
|
|
|
|
@ -273,7 +272,10 @@ public class BasicOrderPrintController {
|
|
|
|
|
Map<String, Object> bizData = new HashMap<>();
|
|
|
|
|
bizData.put("index", i);
|
|
|
|
|
bizData.put("nameCode", obj.getNameCode() == null ? ' ' : obj.getNameCode());
|
|
|
|
|
bizData.put("udiCode", udiProductEntity.getUuid() == null ? ' ' : udiProductEntity.getUuid());
|
|
|
|
|
String udiCode = "#" + obj.getNameCode() + "#" + obj.getProduceDate() + "#" + obj.getExpireDate() +
|
|
|
|
|
"#" + obj.getBatchNo() + "#" + obj.getSerialNo() + "#" + obj.getWarehouseCode() + "#" + obj.getDeptCode();
|
|
|
|
|
udiCode = udiCode.replaceAll("#null", "#");
|
|
|
|
|
bizData.put("udiCode", udiCode);
|
|
|
|
|
bizData.put("cpmctymc", udiProductEntity.getCpmctymc() == null ? ' ' : udiProductEntity.getCpmctymc());
|
|
|
|
|
bizData.put("ggxh", udiProductEntity.getGgxh() == null ? ' ' : udiProductEntity.getGgxh());
|
|
|
|
|
bizData.put("batchNo", obj.getBatchNo() == null ? ' ' : obj.getBatchNo());
|
|
|
|
|