|
|
|
@ -4,6 +4,7 @@ import com.github.pagehelper.PageInfo;
|
|
|
|
|
import com.glxp.sale.admin.constant.ConstantStatus;
|
|
|
|
|
import com.glxp.sale.admin.controller.inout.utils.ContrastErpUtil;
|
|
|
|
|
import com.glxp.sale.admin.controller.inout.utils.InoutUtils;
|
|
|
|
|
import com.glxp.sale.admin.entity.basic.BussinessTypeEntity;
|
|
|
|
|
import com.glxp.sale.admin.entity.inout.ErpOrderEntity;
|
|
|
|
|
import com.glxp.sale.admin.entity.inout.OrderEntity;
|
|
|
|
|
import com.glxp.sale.admin.entity.inout.WarehouseEntity;
|
|
|
|
@ -14,6 +15,7 @@ import com.glxp.sale.admin.entity.udid.UdiEntity;
|
|
|
|
|
import com.glxp.sale.admin.req.inout.*;
|
|
|
|
|
import com.glxp.sale.admin.res.PageSimpleResponse;
|
|
|
|
|
import com.glxp.sale.admin.res.inout.WarehouseResponse;
|
|
|
|
|
import com.glxp.sale.admin.service.basic.BussinessTypeService;
|
|
|
|
|
import com.glxp.sale.admin.service.basic.UdiInfoService;
|
|
|
|
|
import com.glxp.sale.admin.service.basic.UdiRelevanceService;
|
|
|
|
|
import com.glxp.sale.admin.service.inout.CodesTempService;
|
|
|
|
@ -51,22 +53,15 @@ public class WareHouseController {
|
|
|
|
|
@Resource
|
|
|
|
|
private OrderService orderService;
|
|
|
|
|
@Resource
|
|
|
|
|
private MipsBarcodeService mipsBarcodeService;
|
|
|
|
|
@Resource
|
|
|
|
|
private ProductInfoService productInfoService;
|
|
|
|
|
@Resource
|
|
|
|
|
private MyErpOrderService myErpOrderService;
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
private IoTransInoutService ioTransInoutService;
|
|
|
|
|
@Resource
|
|
|
|
|
private CodesTempService codesTempService;
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
private UdiInfoService udiInfoService;
|
|
|
|
|
@Resource
|
|
|
|
|
private UdiRelevanceService udiRelevanceService;
|
|
|
|
|
@Resource
|
|
|
|
|
private SystemParamConfigService systemParamConfigService;
|
|
|
|
|
private BussinessTypeService bussinessTypeService;
|
|
|
|
|
|
|
|
|
|
@GetMapping("admin/warehouse/inout/list")
|
|
|
|
|
public BaseResponse list(WarehouseQueryRequest warehouseQueryRequest) {
|
|
|
|
@ -166,100 +161,6 @@ public class WareHouseController {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// @PostMapping("/admin/warehouse/inout/adList")//TODO 出入库
|
|
|
|
|
// public BaseResponse adList(@RequestParam("warehouseEntities") String warehouseEntities) {
|
|
|
|
|
//
|
|
|
|
|
// try {
|
|
|
|
|
// List<WarehouseEntity> warehouseEntityList = FastJsonUtils.getJsonToList(warehouseEntities, WarehouseEntity.class);
|
|
|
|
|
// List<String> orders = new ArrayList<>();
|
|
|
|
|
// List<Warehousetemp> warehousetempList = new WarehousBeanUtils().entityToTemp(warehouseEntityList);
|
|
|
|
|
// new Thread(() -> {
|
|
|
|
|
// String id = null;
|
|
|
|
|
// String orderId = null;
|
|
|
|
|
// List<List<Warehousetemp>> orderList = new ArrayList<>();
|
|
|
|
|
// List<Warehousetemp> orderOne = null;
|
|
|
|
|
// if (warehousetempList != null && warehousetempList.size() > 0) {
|
|
|
|
|
// for (int i = 0; i < warehousetempList.size(); i++) {
|
|
|
|
|
// Warehousetemp warehouseEntity = warehousetempList.get(i);
|
|
|
|
|
// if (!orders.contains(warehouseEntity.getCorporderid())) {
|
|
|
|
|
// orderOne = new ArrayList<>();
|
|
|
|
|
// orderList.add(orderOne);
|
|
|
|
|
// orders.add(warehouseEntity.getCorporderid());
|
|
|
|
|
// id = System.currentTimeMillis() + i + "";
|
|
|
|
|
// OrderEntity orderSaveRequest = new OrderEntity();
|
|
|
|
|
// orderSaveRequest.setId(id);
|
|
|
|
|
// if (warehouseEntity.getActdate() != null) {
|
|
|
|
|
// orderSaveRequest.setActDate(warehouseEntity.getActdate());
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// orderSaveRequest.setAction(warehouseEntity.getAction());
|
|
|
|
|
// orderSaveRequest.setActor(warehouseEntity.getActor());
|
|
|
|
|
// orderSaveRequest.setCorpOrderId(warehouseEntity.getCorporderid());
|
|
|
|
|
// orderSaveRequest.setFromCorpId(warehouseEntity.getFromcorpid());
|
|
|
|
|
// orderSaveRequest.setMainAction(warehouseEntity.getMainaction());
|
|
|
|
|
// orderSaveRequest.setFromCorp(warehouseEntity.getFromcorp());
|
|
|
|
|
// orderSaveRequest.setFromType("手持终端");
|
|
|
|
|
// orderSaveRequest.setStatus(3);//error
|
|
|
|
|
// orderSaveRequest.setExportStatus(0);//未上传
|
|
|
|
|
// orderService.insertOrder(orderSaveRequest);
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// warehouseEntity.setOrderid(id);
|
|
|
|
|
// warehousetempList.get(i).setOrderid(id);
|
|
|
|
|
// orderOne.add(warehouseEntity);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// boolean b = codesService.insertTempWarehouses(warehousetempList);
|
|
|
|
|
//
|
|
|
|
|
// for (int i = 0; i < orderList.size(); i++) {
|
|
|
|
|
// List<Warehousetemp> filterList = orderList.get(i);
|
|
|
|
|
// List<Warehousetemp> insertList = new ArrayList<>();
|
|
|
|
|
// String result;
|
|
|
|
|
// for (int j = 0; j < filterList.size(); j++) {
|
|
|
|
|
// Warehousetemp warehousetemp = filterList.get(j);
|
|
|
|
|
// result = new InoutUtils().filterCode(codesService, warehousetemp,systemParamConfigService);
|
|
|
|
|
// if (result == null) {
|
|
|
|
|
// insertList.add(warehousetemp);
|
|
|
|
|
//
|
|
|
|
|
// } else {
|
|
|
|
|
// orderService.updateRemark(warehousetemp.getOrderid(), result);
|
|
|
|
|
// insertList.clear();
|
|
|
|
|
// break;
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// if (insertList.size() > 0) {
|
|
|
|
|
// orderId = insertList.get(0).getOrderid();
|
|
|
|
|
// codesService.insertWarehouses(new WarehousBeanUtils().tempsToEntitys(insertList));
|
|
|
|
|
// Warehousetemp warehousetemp = insertList.get(0);
|
|
|
|
|
// CommitRequest commitRequest = new CommitRequest();
|
|
|
|
|
// commitRequest.setOrderId(warehousetemp.getOrderid());
|
|
|
|
|
// List<Warehousetemp> warehousetemps = codesService.findTempByOrderId(commitRequest);
|
|
|
|
|
// orderService.updateOrderStatus(orderId, ConstantStatus.ORDER_STATUS_SUCCESS);//"success"
|
|
|
|
|
// List<Long> ids = new ArrayList<>();
|
|
|
|
|
// for (Warehousetemp w : warehousetemps) {
|
|
|
|
|
// ids.add(w.getId());
|
|
|
|
|
// }
|
|
|
|
|
// codesService.deleteTempWarehouses(ids);
|
|
|
|
|
// insertList.clear();
|
|
|
|
|
// List<WarehouseEntity> transData = codesService.findByReceiptId(orderId);
|
|
|
|
|
// new ContrastErpUtil().contrastErp(basicInstrumentMaintainService, basicInstrumentMaintainRelevanceService, myErpOrderService, orderService, transData, systemParamConfigService);
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
//// List<WarehouseEntity> transData = codesService.findByReceiptId(orderId);
|
|
|
|
|
//// new InoutUtils().generateConstrastDetail(productInfoService, myErpOrderService, transData);
|
|
|
|
|
//
|
|
|
|
|
// }).start();
|
|
|
|
|
//
|
|
|
|
|
// } catch (Exception e) {
|
|
|
|
|
// return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// return ResultVOUtils.success("添加成功");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
@PostMapping("/warehouse/inout/commit")//TODO 重新提交
|
|
|
|
|
public BaseResponse commitOrder(@RequestBody CommitRequest commitRequest,
|
|
|
|
|
BindingResult bindingResult) {
|
|
|
|
@ -271,105 +172,6 @@ public class WareHouseController {
|
|
|
|
|
return ResultVOUtils.success("提交成功");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// @PostMapping("warehouse/inout/postCodes")
|
|
|
|
|
// public BaseResponse postCodes(@RequestBody PostErpOrderRequest postErpOrderRequest, BindingResult bindingResult) {
|
|
|
|
|
//
|
|
|
|
|
// if (bindingResult.hasErrors()) {
|
|
|
|
|
// return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
|
|
|
|
|
// }
|
|
|
|
|
// List<ErpOrderEntity> erpOrderEntities = postErpOrderRequest.getErpOrderEntities();
|
|
|
|
|
// try {
|
|
|
|
|
// List<WarehouseEntity> warehouseEntityList = postErpOrderRequest.getCodes();
|
|
|
|
|
// List<String> orders = new ArrayList<>();
|
|
|
|
|
// List<Warehousetemp> warehousetempList = new WarehousBeanUtils().entityToTemp(warehouseEntityList);
|
|
|
|
|
// new Thread(() -> {
|
|
|
|
|
// String id = null;
|
|
|
|
|
// String orderId = null;
|
|
|
|
|
// List<List<Warehousetemp>> orderList = new ArrayList<>();
|
|
|
|
|
// List<Warehousetemp> orderOne = null;
|
|
|
|
|
// if (warehousetempList != null && warehousetempList.size() > 0) {
|
|
|
|
|
// for (int i = 0; i < warehousetempList.size(); i++) {
|
|
|
|
|
// Warehousetemp warehouseEntity = warehousetempList.get(i);
|
|
|
|
|
// if (!orders.contains(warehouseEntity.getCorporderid())) {
|
|
|
|
|
// orderOne = new ArrayList<>();
|
|
|
|
|
// orderList.add(orderOne);
|
|
|
|
|
// orders.add(warehouseEntity.getCorporderid());
|
|
|
|
|
// id = System.currentTimeMillis() + i + "";
|
|
|
|
|
// OrderEntity orderSaveRequest = new OrderEntity();
|
|
|
|
|
// orderSaveRequest.setId(id);
|
|
|
|
|
// if (warehouseEntity.getActdate() != null) {
|
|
|
|
|
// orderSaveRequest.setActDate(warehouseEntity.getActdate());
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// orderSaveRequest.setAction(warehouseEntity.getAction());
|
|
|
|
|
// orderSaveRequest.setActor(warehouseEntity.getActor());
|
|
|
|
|
// orderSaveRequest.setCorpOrderId(warehouseEntity.getCorporderid());
|
|
|
|
|
// orderSaveRequest.setFromCorpId(warehouseEntity.getFromcorpid());
|
|
|
|
|
// orderSaveRequest.setMainAction(warehouseEntity.getMainaction());
|
|
|
|
|
// orderSaveRequest.setFromCorp(warehouseEntity.getFromcorp());
|
|
|
|
|
// orderSaveRequest.setFromType("手持终端");
|
|
|
|
|
// orderSaveRequest.setStatus(3);//error
|
|
|
|
|
// orderSaveRequest.setExportStatus(0);//未上传
|
|
|
|
|
// orderService.insertOrder(orderSaveRequest);
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// warehouseEntity.setOrderid(id);
|
|
|
|
|
// warehousetempList.get(i).setOrderid(id);
|
|
|
|
|
// orderOne.add(warehouseEntity);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// boolean b = codesService.insertTempWarehouses(warehousetempList);
|
|
|
|
|
// for (int i = 0; i < orderList.size(); i++) {
|
|
|
|
|
// List<Warehousetemp> filterList = orderList.get(i);
|
|
|
|
|
// List<Warehousetemp> insertList = new ArrayList<>();
|
|
|
|
|
// String result;
|
|
|
|
|
// for (int j = 0; j < filterList.size(); j++) {
|
|
|
|
|
// Warehousetemp warehousetemp = filterList.get(j);
|
|
|
|
|
// result = new InoutUtils().filterCode(codesService, warehousetemp,systemParamConfigService);
|
|
|
|
|
// if (result == null) {
|
|
|
|
|
// insertList.add(warehousetemp);
|
|
|
|
|
//
|
|
|
|
|
// } else {
|
|
|
|
|
// orderService.updateRemark(warehousetemp.getOrderid(), result);
|
|
|
|
|
// insertList.clear();
|
|
|
|
|
// break;
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// if (insertList.size() > 0) {
|
|
|
|
|
// orderId = insertList.get(0).getOrderid();
|
|
|
|
|
// codesService.insertWarehouses(new WarehousBeanUtils().tempsToEntitys(insertList));
|
|
|
|
|
// Warehousetemp warehousetemp = insertList.get(0);
|
|
|
|
|
// CommitRequest commitRequest = new CommitRequest();
|
|
|
|
|
// commitRequest.setOrderId(warehousetemp.getOrderid());
|
|
|
|
|
// List<Warehousetemp> warehousetemps = codesService.findTempByOrderId(commitRequest);
|
|
|
|
|
// orderService.updateOrderStatus(orderId, ConstantStatus.ORDER_STATUS_SUCCESS);//"success"
|
|
|
|
|
// List<Long> ids = new ArrayList<>();
|
|
|
|
|
// for (Warehousetemp w : warehousetemps) {
|
|
|
|
|
// ids.add(w.getId());
|
|
|
|
|
// }
|
|
|
|
|
// codesService.deleteTempWarehouses(ids);
|
|
|
|
|
// if (erpOrderEntities != null && erpOrderEntities.size() > 0) {
|
|
|
|
|
// updateErpOrderId(erpOrderEntities, insertList.get(0).getCorporderid(), orderId);
|
|
|
|
|
// List<WarehouseEntity> transData = codesService.findByReceiptId(orderId);
|
|
|
|
|
// new ContrastErpUtil().contrastErp(basicInstrumentMaintainService, basicInstrumentMaintainRelevanceService, myErpOrderService, orderService, transData,systemParamConfigService);
|
|
|
|
|
// } else {
|
|
|
|
|
// List<WarehouseEntity> datas = codesService.findByReceiptId(orderId);
|
|
|
|
|
// new InoutUtils().generateConstrastDetail(basicInstrumentMaintainService, basicInstrumentMaintainRelevanceService, myErpOrderService, datas);
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// insertList.clear();
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// }).start();
|
|
|
|
|
//
|
|
|
|
|
// } catch (Exception e) {
|
|
|
|
|
// return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// return ResultVOUtils.success("导入成功");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("warehouse/inout/submitOrderWeb")
|
|
|
|
|
public BaseResponse submitOrderWeb(@RequestParam("orderId") String orderId) {
|
|
|
|
@ -397,8 +199,9 @@ public class WareHouseController {
|
|
|
|
|
if (StringUtils.isBlank(code)) return ResultVOUtils.error(ResultEnum.DATA_ERROR);
|
|
|
|
|
UdiEntity udiEntity = FilterUdiUtils.getUdi(code);
|
|
|
|
|
if (udiEntity == null)
|
|
|
|
|
return ResultVOUtils.error(500,"UDI码格式错误!");
|
|
|
|
|
return ResultVOUtils.error(500, "UDI码格式错误!");
|
|
|
|
|
String orderId = addOrderRequest.getOrderId();
|
|
|
|
|
BussinessTypeEntity bussinessTypeEntity = bussinessTypeService.findBTByAction(addOrderRequest.getBillType());
|
|
|
|
|
if (StringUtils.isBlank(orderId)) {
|
|
|
|
|
orderId = System.currentTimeMillis() + new Random().nextInt(10) + "";
|
|
|
|
|
OrderEntity orderSaveRequest = new OrderEntity();
|
|
|
|
@ -406,8 +209,11 @@ public class WareHouseController {
|
|
|
|
|
if (addOrderRequest.getActDate() != null) {
|
|
|
|
|
orderSaveRequest.setActDate(addOrderRequest.getActDate());
|
|
|
|
|
}
|
|
|
|
|
orderSaveRequest.setMainAction(addOrderRequest.getMainAction());
|
|
|
|
|
orderSaveRequest.setAction(addOrderRequest.getAction());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
orderSaveRequest.setMainAction(bussinessTypeEntity.getMainAction());
|
|
|
|
|
orderSaveRequest.setAction(bussinessTypeEntity.getAction());
|
|
|
|
|
orderSaveRequest.setActor(addOrderRequest.getActor());
|
|
|
|
|
orderSaveRequest.setCorpOrderId(addOrderRequest.getCorpOrderId());
|
|
|
|
|
orderSaveRequest.setFromCorpId(addOrderRequest.getFromCorpId());
|
|
|
|
@ -438,8 +244,8 @@ public class WareHouseController {
|
|
|
|
|
warehouseEntity.setOrderId(orderId);
|
|
|
|
|
warehouseEntity.setCorpOrderId(addOrderRequest.getCorpOrderId());
|
|
|
|
|
warehouseEntity.setActDate(addOrderRequest.getActDate());
|
|
|
|
|
warehouseEntity.setMainAction(addOrderRequest.getMainAction());
|
|
|
|
|
warehouseEntity.setAction(addOrderRequest.getAction());
|
|
|
|
|
warehouseEntity.setMainAction(bussinessTypeEntity.getMainAction());
|
|
|
|
|
warehouseEntity.setAction(bussinessTypeEntity.getAction());
|
|
|
|
|
warehouseEntity.setActor(addOrderRequest.getActor());
|
|
|
|
|
warehouseEntity.setFromCorpId(addOrderRequest.getFromCorpId());
|
|
|
|
|
warehouseEntity.setFromCorp(addOrderRequest.getFromCorp());
|
|
|
|
@ -507,89 +313,6 @@ public class WareHouseController {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// @PostMapping("warehouse/inout/mipsToInout")
|
|
|
|
|
// public BaseResponse mipsToInout(@RequestBody MipsToInoutRequest mipsToInoutRequest, BindingResult bindingResult) {
|
|
|
|
|
// new Thread(() -> {
|
|
|
|
|
// List<ProductOrderDetailEntity> productOrderEntities = mipsToInoutRequest.getProductOrderEntities();
|
|
|
|
|
// if (productOrderEntities != null && productOrderEntities.size() > 0) {
|
|
|
|
|
// String orderId = "0";
|
|
|
|
|
// OrderEntity orderSaveRequest = new OrderEntity();
|
|
|
|
|
// String id = System.currentTimeMillis() + "";
|
|
|
|
|
// orderSaveRequest.setId(id);
|
|
|
|
|
// orderId = id;
|
|
|
|
|
// orderSaveRequest.setActDate(DateUtil.getDateTime());
|
|
|
|
|
// orderSaveRequest.setFromType("单据转换");
|
|
|
|
|
// orderSaveRequest.setAction(mipsToInoutRequest.getAction());
|
|
|
|
|
//// orderSaveRequest.setCorpOrderId(productOrderEntity.getOrderNo());
|
|
|
|
|
// if (mipsToInoutRequest.getAction().substring(mipsToInoutRequest.getAction().length() - 2).equals("In")) {
|
|
|
|
|
// orderSaveRequest.setMainAction("WareHouseIn");
|
|
|
|
|
// } else {
|
|
|
|
|
// orderSaveRequest.setMainAction("WareHouseOut");
|
|
|
|
|
// }
|
|
|
|
|
// orderSaveRequest.setStatus(3);//error
|
|
|
|
|
// orderSaveRequest.setRemark("该订单无条码");
|
|
|
|
|
// orderSaveRequest.setExportStatus(0);//未上传
|
|
|
|
|
// orderService.insertOrder(orderSaveRequest);
|
|
|
|
|
// List<MipsBarcodeEntity> mipsBarcodeEntities = new ArrayList<>();
|
|
|
|
|
// for (int i = 0; i < productOrderEntities.size(); i++) {
|
|
|
|
|
// ProductOrderDetailEntity productOrderEntity = productOrderEntities.get(i);
|
|
|
|
|
// List<MipsBarcodeEntity> temps = mipsBarcodeService.selectAllByOrderId(productOrderEntity.getOrderNo());
|
|
|
|
|
// if (temps != null && temps.size() > 0) {
|
|
|
|
|
// mipsBarcodeEntities.addAll(temps);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// if (mipsBarcodeEntities.size() > 0) {
|
|
|
|
|
// List<Warehousetemp> warehousetempList = new ArrayList<>();
|
|
|
|
|
// for (MipsBarcodeEntity mipsBarcodeEntity : mipsBarcodeEntities) {
|
|
|
|
|
// Warehousetemp warehousetemp = new Warehousetemp();
|
|
|
|
|
// warehousetemp.setOrderid(id);
|
|
|
|
|
// warehousetemp.setMainaction(orderSaveRequest.getMainAction());
|
|
|
|
|
// warehousetemp.setAction(mipsToInoutRequest.getAction());
|
|
|
|
|
// warehousetemp.setCode(mipsBarcodeEntity.getCode());
|
|
|
|
|
// warehousetemp.setBatchno(mipsBarcodeEntity.getBatchNo());
|
|
|
|
|
// warehousetemp.setActdate(DateUtil.getDateTime());
|
|
|
|
|
// warehousetempList.add(warehousetemp);
|
|
|
|
|
// }
|
|
|
|
|
// boolean b = codesService.insertTempWarehouses(warehousetempList);
|
|
|
|
|
// if (warehousetempList != null && warehousetempList.size() > 0) {
|
|
|
|
|
// String result;
|
|
|
|
|
// List<Warehousetemp> insertList = new ArrayList<>();
|
|
|
|
|
// for (int j = 0; j < warehousetempList.size(); j++) {
|
|
|
|
|
// Warehousetemp warehousetemp = warehousetempList.get(j);
|
|
|
|
|
// result = new InoutUtils().filterCode(codesService, warehousetemp,systemParamConfigService);
|
|
|
|
|
// if (result == null) {
|
|
|
|
|
// insertList.add(warehousetemp);
|
|
|
|
|
// } else {
|
|
|
|
|
// orderService.updateRemark(warehousetemp.getOrderid(), result);
|
|
|
|
|
// insertList.clear();
|
|
|
|
|
// break;
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// if (insertList.size() > 0) {
|
|
|
|
|
// codesService.insertWarehouses(new WarehousBeanUtils().tempsToEntitys(insertList));
|
|
|
|
|
// Warehousetemp warehousetemp = insertList.get(0);
|
|
|
|
|
// CommitRequest commitRequest = new CommitRequest();
|
|
|
|
|
// commitRequest.setOrderId(warehousetemp.getOrderid());
|
|
|
|
|
// List<Warehousetemp> warehousetemps = codesService.findTempByOrderId(commitRequest);
|
|
|
|
|
// orderService.updateOrderStatus(insertList.get(0).getOrderid(), ConstantStatus.ORDER_STATUS_SUCCESS);//"success"
|
|
|
|
|
// List<Long> ids = new ArrayList<>();
|
|
|
|
|
// for (Warehousetemp w : warehousetemps) {
|
|
|
|
|
// ids.add(w.getId());
|
|
|
|
|
// }
|
|
|
|
|
// codesService.deleteTempWarehouses(ids);
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// List<WarehouseEntity> transData = codesService.findByReceiptId(orderId);
|
|
|
|
|
// new InoutUtils().generateConstrastDetail(basicInstrumentMaintainService, basicInstrumentMaintainRelevanceService, myErpOrderService, transData);
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
// }).start();
|
|
|
|
|
//
|
|
|
|
|
// return ResultVOUtils.success("后台已开始转换,请稍后刷新重试!");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/admin/warehouse/inout/save")
|
|
|
|
|
public BaseResponse save(@RequestBody @Valid WarehouseSaveRequest warehouseSaveRequest,
|
|
|
|
|