|
|
@ -358,8 +358,8 @@ public class StockOrderController {
|
|
|
|
for (String id : stockOrderIdsRequest.getIds()) {
|
|
|
|
for (String id : stockOrderIdsRequest.getIds()) {
|
|
|
|
stockOrderFilterRequest.setId(id);
|
|
|
|
stockOrderFilterRequest.setId(id);
|
|
|
|
StockOrderEntity stockOrderEntity = stockOrderService.findOne(stockOrderFilterRequest);
|
|
|
|
StockOrderEntity stockOrderEntity = stockOrderService.findOne(stockOrderFilterRequest);
|
|
|
|
|
|
|
|
stockPrintService.deleteByOrderId(stockOrderEntity.getId());
|
|
|
|
if (stockOrderEntity == null) continue;
|
|
|
|
if (stockOrderEntity == null) continue;
|
|
|
|
|
|
|
|
|
|
|
|
StockOrderDetailFilterRequest stockOrderDetailFilterRequest = new StockOrderDetailFilterRequest();
|
|
|
|
StockOrderDetailFilterRequest stockOrderDetailFilterRequest = new StockOrderDetailFilterRequest();
|
|
|
|
stockOrderDetailFilterRequest.setLimit(100);
|
|
|
|
stockOrderDetailFilterRequest.setLimit(100);
|
|
|
|
stockOrderDetailFilterRequest.setPage(1);
|
|
|
|
stockOrderDetailFilterRequest.setPage(1);
|
|
|
@ -367,10 +367,6 @@ public class StockOrderController {
|
|
|
|
List<StockOrderDetailEntity> stockOrderDetailEntityList =
|
|
|
|
List<StockOrderDetailEntity> stockOrderDetailEntityList =
|
|
|
|
stockOrderDetailService.filterStockOrderDetail(stockOrderDetailFilterRequest);
|
|
|
|
stockOrderDetailService.filterStockOrderDetail(stockOrderDetailFilterRequest);
|
|
|
|
|
|
|
|
|
|
|
|
// SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
|
|
|
|
|
|
|
|
// Date date = new Date();
|
|
|
|
|
|
|
|
// String dateStr = simpleDateFormat.format(date);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<StockPrintEntity> stockPrintEntities = new ArrayList<>();
|
|
|
|
List<StockPrintEntity> stockPrintEntities = new ArrayList<>();
|
|
|
|
for (StockOrderDetailEntity stockOrderDetailEntity : stockOrderDetailEntityList) {
|
|
|
|
for (StockOrderDetailEntity stockOrderDetailEntity : stockOrderDetailEntityList) {
|
|
|
|
if (stockOrderIdsRequest.isFilterUDIType()) {
|
|
|
|
if (stockOrderIdsRequest.isFilterUDIType()) {
|
|
|
@ -380,50 +376,22 @@ public class StockOrderController {
|
|
|
|
StockPrintEntity stockPrintEntity = new StockPrintEntity();
|
|
|
|
StockPrintEntity stockPrintEntity = new StockPrintEntity();
|
|
|
|
BeanUtils.copyProperties(udiInfoEntity, stockPrintEntity);
|
|
|
|
BeanUtils.copyProperties(udiInfoEntity, stockPrintEntity);
|
|
|
|
stockPrintEntity.setSOrderId(stockOrderEntity.getId());
|
|
|
|
stockPrintEntity.setSOrderId(stockOrderEntity.getId());
|
|
|
|
|
|
|
|
stockPrintEntity.setUpdateTime(new Date());
|
|
|
|
|
|
|
|
stockPrintEntity.setProduceDate(stockOrderDetailEntity.getProductDate());
|
|
|
|
|
|
|
|
stockPrintEntity.setExpireDate(stockOrderDetailEntity.getExpireDate());
|
|
|
|
|
|
|
|
stockPrintEntity.setBatchNo(stockOrderDetailEntity.getBatchNo());
|
|
|
|
stockPrintEntity.setSDetailId(stockOrderDetailEntity.getId());
|
|
|
|
stockPrintEntity.setSDetailId(stockOrderDetailEntity.getId());
|
|
|
|
stockPrintEntities.add(stockPrintEntity);
|
|
|
|
stockPrintEntities.add(stockPrintEntity);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Map<String, Object> reqMap = new HashMap<>();
|
|
|
|
|
|
|
|
// reqMap.put("thirdSys", stockOrderEntity.getThirdSysFk());
|
|
|
|
|
|
|
|
// reqMap.put("nameCode", stockOrderDetailEntity.getProductId());
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// String response = HttpClient.uCloudPost(stpUrl, reqMap);
|
|
|
|
|
|
|
|
// BaseResponse baseResponse =
|
|
|
|
|
|
|
|
// JSONObject.parseObject(response, new TypeReference<BaseResponse>() {
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// //http://139.159.187.130:8080/UDI_WMS_MC/udiwms/stockPrint/getFilter?genKey=61224093960&page=1&limit=10
|
|
|
|
|
|
|
|
// StockQRCodeTextEntity stockQRCodeTextEntity = new StockQRCodeTextEntity();
|
|
|
|
|
|
|
|
// stockQRCodeTextEntity.setOrderId(id);
|
|
|
|
|
|
|
|
// stockQRCodeTextEntity.setDetailId(stockOrderDetailEntity.getId());
|
|
|
|
|
|
|
|
// stockQRCodeTextEntity.setStatus(101 + "");//生成完成
|
|
|
|
|
|
|
|
// stockQRCodeTextEntity.setText(String.valueOf(baseResponse.getData()));
|
|
|
|
|
|
|
|
// Date tDate = new Date();
|
|
|
|
|
|
|
|
// stockQRCodeTextEntity.setCreate_time(tDate);
|
|
|
|
|
|
|
|
// stockQRCodeTextEntity.setUpdate_time(tDate);
|
|
|
|
|
|
|
|
// stockQRCodeTextService.insertStockQRCodeText(stockQRCodeTextEntity);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
PostStockPrintRequest postStockPrintRequest = new PostStockPrintRequest();
|
|
|
|
PostStockPrintRequest postStockPrintRequest = new PostStockPrintRequest();
|
|
|
|
|
|
|
|
|
|
|
|
postStockPrintRequest.setThirdSys(stockOrderEntity.getThirdSysFk());
|
|
|
|
postStockPrintRequest.setThirdSys(stockOrderEntity.getThirdSysFk());
|
|
|
|
postStockPrintRequest.setDatas(stockPrintEntities);
|
|
|
|
postStockPrintRequest.setDatas(stockPrintEntities);
|
|
|
|
if (stockPrintEntities.size() > 0) {
|
|
|
|
if (stockPrintEntities.size() > 0) {
|
|
|
|
String genKey = generateQRCodeText(postStockPrintRequest);
|
|
|
|
generateQRCodeText(postStockPrintRequest);
|
|
|
|
System.out.print(genKey);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// StockQRCodeTextEntity stockQRCodeTextEntity = new StockQRCodeTextEntity();
|
|
|
|
|
|
|
|
// stockQRCodeTextEntity.setOrderId(id);
|
|
|
|
|
|
|
|
//// stockQRCodeTextEntity.setDetailId(stockOrderDetailEntity.getId());
|
|
|
|
|
|
|
|
//// stockQRCodeTextEntity.setDetailId(String.valueOf(0));
|
|
|
|
|
|
|
|
// stockQRCodeTextEntity.setStatus(101 + "");//生成完成
|
|
|
|
|
|
|
|
// stockQRCodeTextEntity.setText(genKey);
|
|
|
|
|
|
|
|
// Date tDate = new Date();
|
|
|
|
|
|
|
|
// stockQRCodeTextEntity.setCreate_time(tDate);
|
|
|
|
|
|
|
|
// stockQRCodeTextEntity.setUpdate_time(tDate);
|
|
|
|
|
|
|
|
// stockQRCodeTextService.insertStockQRCodeText(stockQRCodeTextEntity);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return ResultVOUtils.success("操作成功,生成中。");
|
|
|
|
return ResultVOUtils.success("操作成功,生成中。");
|
|
|
@ -433,19 +401,19 @@ public class StockOrderController {
|
|
|
|
String genKey = null;
|
|
|
|
String genKey = null;
|
|
|
|
if (postStockPrintRequest != null) {
|
|
|
|
if (postStockPrintRequest != null) {
|
|
|
|
|
|
|
|
|
|
|
|
InCodeLogEntity inCodeLogEntity = new InCodeLogEntity();
|
|
|
|
// InCodeLogEntity inCodeLogEntity = new InCodeLogEntity();
|
|
|
|
inCodeLogEntity.setFromType(IncodeStatus.FROM_THRSYS);
|
|
|
|
// inCodeLogEntity.setFromType(IncodeStatus.FROM_THRSYS);
|
|
|
|
inCodeLogEntity.setUpdateTime(new Date(System.currentTimeMillis()));
|
|
|
|
// inCodeLogEntity.setUpdateTime(new Date(System.currentTimeMillis()));
|
|
|
|
if (postStockPrintRequest.getGenKey() == null) {
|
|
|
|
// if (postStockPrintRequest.getGenKey() == null) {
|
|
|
|
genKey = CustomUtil.getId();
|
|
|
|
// genKey = CustomUtil.getId();
|
|
|
|
inCodeLogEntity.setGenKey(genKey);
|
|
|
|
// inCodeLogEntity.setGenKey(genKey);
|
|
|
|
} else {
|
|
|
|
// } else {
|
|
|
|
genKey = postStockPrintRequest.getGenKey();
|
|
|
|
// genKey = postStockPrintRequest.getGenKey();
|
|
|
|
inCodeLogEntity.setGenKey(postStockPrintRequest.getGenKey());
|
|
|
|
// inCodeLogEntity.setGenKey(postStockPrintRequest.getGenKey());
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
inCodeLogEntity.setStatus(IncodeStatus.PROCESS);
|
|
|
|
// inCodeLogEntity.setStatus(IncodeStatus.PROCESS);
|
|
|
|
inCodeLogEntity.setThirdSysFk(postStockPrintRequest.getThirdSys());
|
|
|
|
// inCodeLogEntity.setThirdSysFk(postStockPrintRequest.getThirdSys());
|
|
|
|
inCodeLogService.insertInCodeLog(inCodeLogEntity);
|
|
|
|
// inCodeLogService.insertInCodeLog(inCodeLogEntity);
|
|
|
|
|
|
|
|
|
|
|
|
List<StockPrintEntity> stockPrintEntities = postStockPrintRequest.getDatas();
|
|
|
|
List<StockPrintEntity> stockPrintEntities = postStockPrintRequest.getDatas();
|
|
|
|
if (stockPrintEntities != null && stockPrintEntities.size() > 0) {
|
|
|
|
if (stockPrintEntities != null && stockPrintEntities.size() > 0) {
|
|
|
@ -468,8 +436,8 @@ public class StockOrderController {
|
|
|
|
stockQRCodeTextService.insertStockQRCodeText(stockQRCodeTextEntity);
|
|
|
|
stockQRCodeTextService.insertStockQRCodeText(stockQRCodeTextEntity);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
inCodeLogEntity.setStatus(IncodeStatus.FINISH);
|
|
|
|
// inCodeLogEntity.setStatus(IncodeStatus.FINISH);
|
|
|
|
inCodeLogService.updateInCodeLog(inCodeLogEntity);
|
|
|
|
// inCodeLogService.updateInCodeLog(inCodeLogEntity);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return genKey;
|
|
|
|
return genKey;
|
|
|
|
}
|
|
|
|
}
|
|
|
|