| | |
| | | |
| | | @Autowired |
| | | private IInboundDetailService inboundDetailService; |
| | | |
| | | @Autowired |
| | | private IGoodsShelvesService goodsShelvesService; |
| | | @Override |
| | | public boolean submit(String id) { |
| | | InboundOrder inboundOrder = this.getById(id); |
| | |
| | | @Override |
| | | public void addInStorage(JSONObject jSONObject) { |
| | | String inStorehouseType = jSONObject.getString("inStorehouseType"); |
| | | String locationCodeId = jSONObject.getString("locationCodeId"); |
| | | String classifyId = jSONObject.getString("classifyId"); |
| | | Date inboundTime = jSONObject.getDate("inboundTime"); |
| | | //获取入库明细 |
| | |
| | | inStoreDetail.setInStorehouseType("1"); |
| | | inStoreDetail.setToolCode(inboundDetailVo.getToolCodeId()); |
| | | inStoreDetail.setToolId(inboundDetailVo.getToolCode()+"-"+result); |
| | | inStoreDetail.setGoodsShelvesId(locationCodeId); |
| | | inStoreDetailService.save(inStoreDetail); |
| | | //增加库存明细 |
| | | ToolLedgerDetail toolLedgerDetail = new ToolLedgerDetail(); |
| | |
| | | inStoreDetail.setInNumber(inboundDetailVo.getInStorageQuantity()); |
| | | inStoreDetail.setInStorehouseType("1"); |
| | | inStoreDetail.setToolCode(inboundDetailVo.getToolCodeId()); |
| | | inStoreDetail.setGoodsShelvesId(locationCodeId); |
| | | inStoreDetailService.save(inStoreDetail); |
| | | //查询库存明细中是否存在该工具 |
| | | ToolLedgerDetail toolLedgerDetail = toolLedgerDetailService.lambdaQuery().eq(ToolLedgerDetail::getToolCode,inboundDetailVo.getToolCodeId()).one(); |
| | |
| | | inStoreDetail.setInStorehouseType("2"); |
| | | inStoreDetail.setToolCode(inboundDetailVo.getToolCodeId()); |
| | | inStoreDetail.setToolId(inboundDetailVo.getOnlyCode()); |
| | | inStoreDetail.setGoodsShelvesId(locationCodeId); |
| | | inStoreDetailService.save(inStoreDetail); |
| | | //不管到把 |
| | | }else { |
| | |
| | | inStoreDetail.setInNumber(inboundDetailVo.getInStorageQuantity()); |
| | | inStoreDetail.setInStorehouseType("2"); |
| | | inStoreDetail.setToolCode(inboundDetailVo.getToolCodeId()); |
| | | inStoreDetail.setGoodsShelvesId(locationCodeId); |
| | | inStoreDetailService.save(inStoreDetail); |
| | | } |
| | | |
| | |
| | | inStoreDetail.setInStorehouseType("5"); |
| | | inStoreDetail.setToolCode(inboundDetailVo.getToolCodeId()); |
| | | inStoreDetail.setToolId(inboundDetailVo.getOnlyCode()); |
| | | inStoreDetail.setGoodsShelvesId(locationCodeId); |
| | | inStoreDetailService.save(inStoreDetail); |
| | | //不管到把 |
| | | }else { |
| | |
| | | inStoreDetail.setInNumber(inboundDetailVo.getInStorageQuantity()); |
| | | inStoreDetail.setInStorehouseType("5"); |
| | | inStoreDetail.setToolCode(inboundDetailVo.getToolCodeId()); |
| | | inStoreDetail.setGoodsShelvesId(locationCodeId); |
| | | inStoreDetailService.save(inStoreDetail); |
| | | } |
| | | |
| | |
| | | @Override |
| | | public void addApplyInStorage(JSONObject jSONObject) { |
| | | String inStorehouseType = jSONObject.getString("inStorehouseType"); |
| | | String locationCodeId = jSONObject.getString("locationCodeId"); |
| | | //入库申请单id |
| | | String orderId = jSONObject.getString("orderId"); |
| | | //获取入库明细 |
| | |
| | | inStoreDetail.setInStorehouseType("1"); |
| | | inStoreDetail.setToolCode(inboundDetailVo.getToolCodeId()); |
| | | inStoreDetail.setToolId(inboundDetailVo.getToolCode()+"-"+result); |
| | | inStoreDetail.setGoodsShelvesId(locationCodeId); |
| | | inStoreDetailService.save(inStoreDetail); |
| | | //增加库存明细 |
| | | ToolLedgerDetail toolLedgerDetail = new ToolLedgerDetail(); |
| | |
| | | inStoreDetail.setInStorehouseType("1"); |
| | | inStoreDetail.setInStorehouseId(orderId); |
| | | inStoreDetail.setToolCode(inboundDetailVo.getToolCodeId()); |
| | | inStoreDetail.setGoodsShelvesId(locationCodeId); |
| | | inStoreDetailService.save(inStoreDetail); |
| | | //查询库存明细中是否存在该工具 |
| | | ToolLedgerDetail toolLedgerDetail = toolLedgerDetailService.lambdaQuery().eq(ToolLedgerDetail::getToolCode,inboundDetailVo.getToolCodeId()).one(); |
| | |
| | | inStoreDetail.setInStorehouseId(orderId); |
| | | inStoreDetail.setToolCode(inboundDetailVo.getToolCodeId()); |
| | | inStoreDetail.setToolId(inboundDetailVo.getOnlyCode()); |
| | | inStoreDetail.setGoodsShelvesId(locationCodeId); |
| | | inStoreDetailService.save(inStoreDetail); |
| | | //不管到把 |
| | | }else { |
| | |
| | | inStoreDetail.setInStorehouseType("2"); |
| | | inStoreDetail.setInStorehouseId(orderId); |
| | | inStoreDetail.setToolCode(inboundDetailVo.getToolCodeId()); |
| | | inStoreDetail.setGoodsShelvesId(locationCodeId); |
| | | inStoreDetailService.save(inStoreDetail); |
| | | } |
| | | //更改明细入库状态及实际入库数量 |
| | |
| | | inStoreDetail.setInStorehouseId(orderId); |
| | | inStoreDetail.setToolCode(inboundDetailVo.getToolCodeId()); |
| | | inStoreDetail.setToolId(inboundDetailVo.getOnlyCode()); |
| | | inStoreDetail.setGoodsShelvesId(locationCodeId); |
| | | inStoreDetailService.save(inStoreDetail); |
| | | //不管到把 |
| | | }else { |
| | |
| | | inStoreDetail.setInStorehouseType("5"); |
| | | inStoreDetail.setInStorehouseId(orderId); |
| | | inStoreDetail.setToolCode(inboundDetailVo.getToolCodeId()); |
| | | inStoreDetail.setGoodsShelvesId(locationCodeId); |
| | | inStoreDetailService.save(inStoreDetail); |
| | | } |
| | | //更改明细入库状态及实际入库数量 |