|
|
@ -47,37 +47,37 @@ public class PrePressController { |
|
|
|
|
|
|
|
|
@Autowired |
|
|
@Autowired |
|
|
private FinalRollDao finalRollDao; |
|
|
private FinalRollDao finalRollDao; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
@Autowired |
|
|
private ShipmentRepository shipRepo; |
|
|
private ShipmentRepository shipRepo; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
@Autowired |
|
|
private ProjectCodeRepository pjcRepo; |
|
|
private ProjectCodeRepository pjcRepo; |
|
|
@Autowired |
|
|
@Autowired |
|
|
private MailSendService mailSendService; |
|
|
private MailSendService mailSendService; |
|
|
@Value("${com.ftp.ftpHost}") |
|
|
|
|
|
private String ftpHost; |
|
|
|
|
|
|
|
|
|
|
|
@Value("${com.ftp.ftpPort}") |
|
|
|
|
|
private Integer ftpPort; |
|
|
|
|
|
|
|
|
|
|
|
@Value("${com.ftp.ftpUser}") |
|
|
|
|
|
private String ftpUser; |
|
|
|
|
|
|
|
|
|
|
|
@Value("${com.ftp.ftpPassword}") |
|
|
|
|
|
private String ftpPassword; |
|
|
|
|
|
|
|
|
|
|
|
@Value("${com.ftp.ftpDir}") |
|
|
|
|
|
private String ftpDir; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Value("${com.ftp.ftpHost}") |
|
|
|
|
|
private String ftpHost; |
|
|
|
|
|
|
|
|
|
|
|
@Value("${com.ftp.ftpPort}") |
|
|
|
|
|
private Integer ftpPort; |
|
|
|
|
|
|
|
|
|
|
|
@Value("${com.ftp.ftpUser}") |
|
|
|
|
|
private String ftpUser; |
|
|
|
|
|
|
|
|
|
|
|
@Value("${com.ftp.ftpPassword}") |
|
|
|
|
|
private String ftpPassword; |
|
|
|
|
|
|
|
|
|
|
|
@Value("${com.ftp.ftpDir}") |
|
|
|
|
|
private String ftpDir; |
|
|
|
|
|
|
|
|
@Autowired |
|
|
@Autowired |
|
|
private PrepressService prepressService; |
|
|
private PrepressService prepressService; |
|
|
@Value("${item.zipPath}") |
|
|
@Value("${item.zipPath}") |
|
|
private String zipPath; |
|
|
private String zipPath; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
@Autowired |
|
|
private BasicDao basicDao; |
|
|
private BasicDao basicDao; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@InitBinder |
|
|
@InitBinder |
|
|
public void initBinder(WebDataBinder binder) { |
|
|
public void initBinder(WebDataBinder binder) { |
|
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); |
|
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); |
|
|
@ -97,7 +97,7 @@ public class PrePressController { |
|
|
public String prepressReworkHome(){ |
|
|
public String prepressReworkHome(){ |
|
|
return "sntracking/prepress_rework"; |
|
|
return "sntracking/prepress_rework"; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/query") |
|
|
@GetMapping("/query") |
|
|
public String prepressQuery(){ |
|
|
public String prepressQuery(){ |
|
|
return "sntracking/prepress_query"; |
|
|
return "sntracking/prepress_query"; |
|
|
@ -110,15 +110,15 @@ public class PrePressController { |
|
|
public String receiveQty(){ |
|
|
public String receiveQty(){ |
|
|
return "sntracking/receiveQty"; |
|
|
return "sntracking/receiveQty"; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* |
|
|
|
|
|
* @Title: serialInfo |
|
|
|
|
|
* @Description: 查询信息页面 |
|
|
|
|
|
* @author lirui |
|
|
|
|
|
* @date 2018年4月20日 |
|
|
|
|
|
* @param @return 参数 |
|
|
|
|
|
* @return String 返回类型 |
|
|
|
|
|
|
|
|
* |
|
|
|
|
|
* @Title: serialInfo |
|
|
|
|
|
* @Description: 查询信息页面 |
|
|
|
|
|
* @author lirui |
|
|
|
|
|
* @date 2018年4月20日 |
|
|
|
|
|
* @param @return 参数 |
|
|
|
|
|
* @return String 返回类型 |
|
|
* @throws |
|
|
* @throws |
|
|
*/ |
|
|
*/ |
|
|
@GetMapping("/serialInfo") |
|
|
@GetMapping("/serialInfo") |
|
|
@ -134,14 +134,14 @@ public class PrePressController { |
|
|
return "/sntracking/so_order_info"; |
|
|
return "/sntracking/so_order_info"; |
|
|
} |
|
|
} |
|
|
/** |
|
|
/** |
|
|
* |
|
|
|
|
|
* @Title: getSerialInfo |
|
|
|
|
|
* @Description: TODO(这里用一句话描述这个方法的作用) |
|
|
|
|
|
* @author lirui |
|
|
|
|
|
* @date 2018年4月20日 |
|
|
|
|
|
|
|
|
* |
|
|
|
|
|
* @Title: getSerialInfo |
|
|
|
|
|
* @Description: TODO(这里用一句话描述这个方法的作用) |
|
|
|
|
|
* @author lirui |
|
|
|
|
|
* @date 2018年4月20日 |
|
|
* @param @param serialNo |
|
|
* @param @param serialNo |
|
|
* @param @return 参数 |
|
|
|
|
|
* @return Object 返回类型 |
|
|
|
|
|
|
|
|
* @param @return 参数 |
|
|
|
|
|
* @return Object 返回类型 |
|
|
* @throws |
|
|
* @throws |
|
|
*/ |
|
|
*/ |
|
|
@PostMapping("/serialInfo") |
|
|
@PostMapping("/serialInfo") |
|
|
@ -153,7 +153,7 @@ public class PrePressController { |
|
|
map.put("rows", rows); |
|
|
map.put("rows", rows); |
|
|
return map; |
|
|
return map; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/missingReportData") |
|
|
@PostMapping("/missingReportData") |
|
|
@ResponseBody |
|
|
@ResponseBody |
|
|
public Object missingReportData(String serialNo){ |
|
|
public Object missingReportData(String serialNo){ |
|
|
@ -163,7 +163,7 @@ public class PrePressController { |
|
|
map.put("rows", rows); |
|
|
map.put("rows", rows); |
|
|
return map; |
|
|
return map; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/downSerialInfo") |
|
|
@GetMapping("/downSerialInfo") |
|
|
@ResponseBody |
|
|
@ResponseBody |
|
|
public Object downSerialInfo(@RequestParam("serilaNo") String serilaNo, |
|
|
public Object downSerialInfo(@RequestParam("serilaNo") String serilaNo, |
|
|
@ -316,7 +316,7 @@ public class PrePressController { |
|
|
map.put("rows", page.getContent()); |
|
|
map.put("rows", page.getContent()); |
|
|
return map; |
|
|
return map; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/reworkAll") |
|
|
@GetMapping("/reworkAll") |
|
|
@ResponseBody |
|
|
@ResponseBody |
|
|
public Map soInfoReworkJson( |
|
|
public Map soInfoReworkJson( |
|
|
@ -449,14 +449,14 @@ public class PrePressController { |
|
|
} |
|
|
} |
|
|
return ret; |
|
|
return ret; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* |
|
|
|
|
|
* @Title: addSoInfo |
|
|
|
|
|
* @Description: 工单新增信息 |
|
|
|
|
|
|
|
|
* |
|
|
|
|
|
* @Title: addSoInfo |
|
|
|
|
|
* @Description: 工单新增信息 |
|
|
* @author: LR |
|
|
* @author: LR |
|
|
* @date 2024年6月19日 下午2:24:09 |
|
|
|
|
|
* @return: Object |
|
|
|
|
|
|
|
|
* @date 2024年6月19日 下午2:24:09 |
|
|
|
|
|
* @return: Object |
|
|
* @throws |
|
|
* @throws |
|
|
*/ |
|
|
*/ |
|
|
@PostMapping("/soinfo/addSoInfo") |
|
|
@PostMapping("/soinfo/addSoInfo") |
|
|
@ -476,7 +476,7 @@ public class PrePressController { |
|
|
} |
|
|
} |
|
|
return resultMap; |
|
|
return resultMap; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 新增返工订单 |
|
|
* 新增返工订单 |
|
|
* @param soInfo |
|
|
* @param soInfo |
|
|
@ -495,7 +495,7 @@ public class PrePressController { |
|
|
soInfo.setFirstRollTime(new Date()); |
|
|
soInfo.setFirstRollTime(new Date()); |
|
|
soInfo.validate(); |
|
|
soInfo.validate(); |
|
|
//查询是否经过热覆合 |
|
|
//查询是否经过热覆合 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//设置参数 |
|
|
//设置参数 |
|
|
soInfo.setLaminationFlag("Y"); |
|
|
soInfo.setLaminationFlag("Y"); |
|
|
//添加全的客户料号 |
|
|
//添加全的客户料号 |
|
|
@ -513,7 +513,7 @@ public class PrePressController { |
|
|
} |
|
|
} |
|
|
return ret; |
|
|
return ret; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/soinfo/{id}/update") |
|
|
@PostMapping("/soinfo/{id}/update") |
|
|
@ResponseBody |
|
|
@ResponseBody |
|
|
public Map add(@PathVariable("id") Integer id, SoInfo soInfo){ |
|
|
public Map add(@PathVariable("id") Integer id, SoInfo soInfo){ |
|
|
@ -603,8 +603,8 @@ public class PrePressController { |
|
|
} |
|
|
} |
|
|
return ret; |
|
|
return ret; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/soinfo/{id}/refreshSerials") |
|
|
@PostMapping("/soinfo/{id}/refreshSerials") |
|
|
@ResponseBody |
|
|
@ResponseBody |
|
|
public Map refreshSerials(@PathVariable Integer id,Authentication authentication){ |
|
|
public Map refreshSerials(@PathVariable Integer id,Authentication authentication){ |
|
|
@ -640,14 +640,14 @@ public class PrePressController { |
|
|
File file = new File("snfiles"+File.separator + filename + ".csv"); |
|
|
File file = new File("snfiles"+File.separator + filename + ".csv"); |
|
|
return new FileSystemResource(file); |
|
|
return new FileSystemResource(file); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* |
|
|
|
|
|
* @Title: downloadFileZip |
|
|
|
|
|
* @Description: 下载已经生成好的文件 |
|
|
|
|
|
|
|
|
* |
|
|
|
|
|
* @Title: downloadFileZip |
|
|
|
|
|
* @Description: 下载已经生成好的文件 |
|
|
* @author: LR |
|
|
* @author: LR |
|
|
* @date 2024年7月29日 下午5:46:22 |
|
|
|
|
|
* @return: FileSystemResource |
|
|
|
|
|
|
|
|
* @date 2024年7月29日 下午5:46:22 |
|
|
|
|
|
* @return: FileSystemResource |
|
|
* @throws |
|
|
* @throws |
|
|
*/ |
|
|
*/ |
|
|
@GetMapping("/downloadFileZip/{fileName}") |
|
|
@GetMapping("/downloadFileZip/{fileName}") |
|
|
@ -786,7 +786,7 @@ public class PrePressController { |
|
|
} |
|
|
} |
|
|
return ret; |
|
|
return ret; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
@Autowired |
|
|
private SequenceRepository seqRepo; |
|
|
private SequenceRepository seqRepo; |
|
|
|
|
|
|
|
|
@ -855,14 +855,14 @@ public class PrePressController { |
|
|
} |
|
|
} |
|
|
return ret; |
|
|
return ret; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* |
|
|
|
|
|
* @Title: genSerials |
|
|
|
|
|
* @Description: 产生工单得码包新的方法 |
|
|
|
|
|
|
|
|
* |
|
|
|
|
|
* @Title: genSerials |
|
|
|
|
|
* @Description: 产生工单得码包新的方法 |
|
|
* @author: LR |
|
|
* @author: LR |
|
|
* @date 2024年6月19日 下午2:46:03 |
|
|
|
|
|
* @return: Object |
|
|
|
|
|
|
|
|
* @date 2024年6月19日 下午2:46:03 |
|
|
|
|
|
* @return: Object |
|
|
* @throws |
|
|
* @throws |
|
|
*/ |
|
|
*/ |
|
|
@PostMapping("/soinfo/{id}/genSerials") |
|
|
@PostMapping("/soinfo/{id}/genSerials") |
|
|
@ -893,10 +893,10 @@ public class PrePressController { |
|
|
//查询物料的信息 |
|
|
//查询物料的信息 |
|
|
PartData partData = basicDao.getPartDataByPartNo(partNo); |
|
|
PartData partData = basicDao.getPartDataByPartNo(partNo); |
|
|
String codeType = partData.getCodeType(); |
|
|
String codeType = partData.getCodeType(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Calendar cal = Calendar.getInstance(); |
|
|
Calendar cal = Calendar.getInstance(); |
|
|
cal.setTime(soInfo.getSerialsDate()); |
|
|
cal.setTime(soInfo.getSerialsDate()); |
|
|
String platCode3 = "GDC"; |
|
|
|
|
|
|
|
|
String platCode3 = "J4K"; |
|
|
String year1 = String.valueOf(cal.get(Calendar.YEAR) % 10); |
|
|
String year1 = String.valueOf(cal.get(Calendar.YEAR) % 10); |
|
|
String week2 = org.apache.commons.lang3.StringUtils.leftPad(String.valueOf(cal.get(Calendar.WEEK_OF_YEAR)), 2, '0'); |
|
|
String week2 = org.apache.commons.lang3.StringUtils.leftPad(String.valueOf(cal.get(Calendar.WEEK_OF_YEAR)), 2, '0'); |
|
|
String day1 = String.valueOf(cal.get(Calendar.DAY_OF_WEEK)); |
|
|
String day1 = String.valueOf(cal.get(Calendar.DAY_OF_WEEK)); |
|
|
@ -936,7 +936,7 @@ public class PrePressController { |
|
|
|
|
|
|
|
|
ZipEntry entry = new ZipEntry(fileName + ".csv"); |
|
|
ZipEntry entry = new ZipEntry(fileName + ".csv"); |
|
|
zos.putNextEntry(entry); |
|
|
zos.putNextEntry(entry); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//查询当前物料的数据 获取编码的类型 |
|
|
//查询当前物料的数据 获取编码的类型 |
|
|
String partNo = soInfo.getPartNo(); |
|
|
String partNo = soInfo.getPartNo(); |
|
|
PartData part = basicDao.getPartDataByPartNo(partNo); |
|
|
PartData part = basicDao.getPartDataByPartNo(partNo); |
|
|
@ -1097,16 +1097,16 @@ public class PrePressController { |
|
|
|
|
|
|
|
|
return ret; |
|
|
return ret; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* |
|
|
|
|
|
* @Title: downloadSingleTrace |
|
|
|
|
|
* @Description: 按照单排下载 |
|
|
|
|
|
|
|
|
* |
|
|
|
|
|
* @Title: downloadSingleTrace |
|
|
|
|
|
* @Description: 按照单排下载 |
|
|
* @param orderNo |
|
|
* @param orderNo |
|
|
* @return |
|
|
|
|
|
* @return: Map |
|
|
|
|
|
|
|
|
* @return |
|
|
|
|
|
* @return: Map |
|
|
* @author LR |
|
|
* @author LR |
|
|
* @date: 2021-7-28 10:09:34 |
|
|
|
|
|
|
|
|
* @date: 2021-7-28 10:09:34 |
|
|
* @throws |
|
|
* @throws |
|
|
*/ |
|
|
*/ |
|
|
@PostMapping("/downloadSingleTrace") |
|
|
@PostMapping("/downloadSingleTrace") |
|
|
@ -1172,7 +1172,7 @@ public class PrePressController { |
|
|
|
|
|
|
|
|
@Autowired |
|
|
@Autowired |
|
|
JdbcTemplate jdbcTemplate; |
|
|
JdbcTemplate jdbcTemplate; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/ifsOrder") |
|
|
@PostMapping("/ifsOrder") |
|
|
@ResponseBody |
|
|
@ResponseBody |
|
|
@ -1190,7 +1190,7 @@ public class PrePressController { |
|
|
} |
|
|
} |
|
|
return resultMap; |
|
|
return resultMap; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/getReceiveQty") |
|
|
@GetMapping("/getReceiveQty") |
|
|
@ResponseBody |
|
|
@ResponseBody |
|
|
public Object getReceiveQty(@RequestParam(value = "orderNo", required = false) String orderNo, |
|
|
public Object getReceiveQty(@RequestParam(value = "orderNo", required = false) String orderNo, |
|
|
|