打印全部内部码问题

pro
anthonywj 2 years ago
parent 044313f22b
commit e6cf46a50c

@ -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());

@ -10,11 +10,10 @@ import com.glxp.api.common.util.ResultVOUtils;
import com.glxp.api.constant.BusinessType;
import com.glxp.api.entity.inout.IoOrderEntity;
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.inv.InvInnerOrderPrintEntity;
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;
import com.glxp.api.req.inv.*;
@ -42,7 +41,10 @@ import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.util.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@RestController
public class InvInnerOrderPrintController {
@ -280,8 +282,8 @@ public class InvInnerOrderPrintController {
}
Map<String,Object> map=new HashMap<>();
map.put("data",printEntities);
Map<String, Object> map = new HashMap<>();
map.put("data", printEntities);
String param = JSON.toJSONString(map);
JasperUtils.jasperReport(request, response, param, filePath + "/pdf/template/" + FileUtils.getLastFileName(systemPDFTemplateEntity.getPath()), "pdf");

@ -13,7 +13,6 @@ public class PCLoginRequest {
@NotEmpty(message = "密码不能为空")
private String password;
@NotEmpty(message = "机器码不能为空")
private String machineInfo;
}

Loading…
Cancel
Save