zy-asrs-admin/src/components/order/order/orderIn.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
zy-asrs-admin/src/views/in/waitPakin/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/controller/MobileController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/manage/OutManage.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/service/impl/MobileServiceImpl.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
zy-asrs-wms/src/main/resources/application.yml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
zy-asrs-admin/src/components/order/order/orderIn.vue
@@ -57,7 +57,7 @@ { title: formatMessage('db.man_order.order_time', '单据日期'), dataIndex: 'orderTime', width: 160, width: 180, ellipsis: true, ...getColumnSearchProps('orderTime'), }, @@ -92,7 +92,7 @@ { title: formatMessage('db.man_order.create_time', '添加时间'), dataIndex: 'createTime$', width: 140, width: 180, ellipsis: true, ...getColumnSearchProps('createTime$'), }, @@ -106,7 +106,7 @@ { title: formatMessage('db.man_order.update_time', '修改时间'), dataIndex: 'updateTime$', width: 140, width: 180, ellipsis: true, ...getColumnSearchProps('updateTime$'), }, zy-asrs-admin/src/views/in/waitPakin/index.vue
@@ -105,7 +105,7 @@ { title: formatMessage('db.man_wait_pakin.create_time', '添加时间'), dataIndex: 'createTime$', width: 140, width: 180, ellipsis: true, ...getColumnSearchProps('createTime$'), }, @@ -119,7 +119,7 @@ { title: formatMessage('db.man_wait_pakin.update_time', '修改时间'), dataIndex: 'updateTime$', width: 140, width: 180, ellipsis: true, ...getColumnSearchProps('updateTime$'), }, zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/controller/MobileController.java
@@ -81,7 +81,7 @@ * 2. 库位置为在库状态 * @return */ @PostMapping("matnr/in/barcode") @PostMapping("/matnr/in/barcode") public R pakinToStock(@RequestBody PakinOnShelvesParams shelvesParams) { if (StringUtil.isNullOrEmpty(shelvesParams.getBarcode())) { return R.error("拖盘码不能为空!!"); @@ -102,9 +102,9 @@ * 获取拖码盘绑定商品 * @return */ @GetMapping("barcode/matnr/{code}") @GetMapping("/barcode/matnr/{code}") public R getAllGoods(@PathVariable String code) { if (!StringUtil.isNullOrEmpty(code)) { if (StringUtil.isNullOrEmpty(code)) { return R.error("托盘码不能为空!!"); } List<WaitPakin> waitPakins = waitPakinService.list(new LambdaQueryWrapper<WaitPakin>().eq(WaitPakin::getBarcode, code).eq(WaitPakin::getIoStatus, 0)); zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/manage/OutManage.java
@@ -66,7 +66,7 @@ /** * 出库 */ @Transactional @Transactional(rollbackFor = Exception.class) public void out(OutParam outParam) { if (outParam.getOperationPort() == null) { throw new CoolException("作业口不存在"); @@ -943,8 +943,8 @@ //TODO 确认后,需将注释打开 String matUniqueKey = Utils.getMatUniqueKey(taskDetl.getMatnr(), taskDetl.getBatch(), taskDetl.getUniqueField()); // WaveDetl waveDetl = waveDetlService.getOne(new LambdaQueryWrapper<WaveDetl>().eq(WaveDetl::getStockIndex, matUniqueKey).eq(WaveDetl::getWaveId, waveId)); WaveDetl waveDetl = waveDetlService.getOne(new LambdaQueryWrapper<WaveDetl>().eq(WaveDetl::getWaveId, wave.getId()), false); WaveDetl waveDetl = waveDetlService.getOne(new LambdaQueryWrapper<WaveDetl>().eq(WaveDetl::getStockIndex, matUniqueKey).eq(WaveDetl::getWaveId, waveId)); // WaveDetl waveDetl = waveDetlService.getOne(new LambdaQueryWrapper<WaveDetl>().eq(WaveDetl::getWaveId, wave.getId()), false); if (waveDetl == null) { throw new CoolException("波次数据不存在"); } zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/service/impl/MobileServiceImpl.java
@@ -11,6 +11,7 @@ import com.zy.asrs.wms.asrs.service.*; import com.zy.asrs.wms.system.entity.Host; import com.zy.asrs.wms.system.service.HostService; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -19,6 +20,7 @@ import java.util.Date; import java.util.List; import java.util.Objects; import java.util.stream.Collectors; @Service public class MobileServiceImpl implements MobileService { @@ -26,11 +28,15 @@ @Autowired private WaitPakinService waitPakinService; @Autowired private WaitPakinLogService waitPakinLogService; @Autowired private WorkService workService; @Autowired private HostService hostService; @Autowired private OrderService orderService; @Autowired private OrderLogService orderLogService; @Autowired private LocService locService; @Autowired @@ -104,6 +110,9 @@ //判断当前仓库是否为平库位 List<LocArea> locAreas = locAreaService.list(new LambdaQueryWrapper<LocArea>().eq(LocArea::getLocId, loc.getId())); if (locAreas.isEmpty()) { throw new CoolException("库位没有分配所属仓库区域!!"); } locAreas.forEach(locArea -> { LocAreaType typeServiceOne = locAreaTypeService.getOne(new LambdaQueryWrapper<LocAreaType>().eq(LocAreaType::getId, locArea.getTypeId()), false); if (typeServiceOne.getParentId() != LocAreaTypeSts.LOC_AREA_TYPE_FLAT.id && typeServiceOne.getId() != LocAreaTypeSts.LOC_AREA_TYPE_FLAT.id) { @@ -115,7 +124,7 @@ loc.setUpdateTime(new Date()); //库存状态修改为在库状态 loc.setLocStsId(LocStsType.F.val()); if (!locService.save(loc)) { if (!locService.updateById(loc)) { throw new CoolException("库位更新失败!!"); } @@ -132,11 +141,41 @@ locDetl.setMatnr(pakin.getMatnr()); locDetl.setMemo(pakin.getMemo()); locDetl.setUpdateTime(new Date()); if (!locDetlService.save(locDetl)) { if (!locDetlService.saveOrUpdate(locDetl)) { throw new CoolException("库存明细更新失败!!"); } //修改状态为入库中 pakin.setIoStatus(1); }); //删除组拖档,加入历史组拖档 List<WaitPakinLog> waitPakinLogs = new ArrayList<>(); waitPakins.forEach(waitPakin -> { WaitPakinLog pakinLog = new WaitPakinLog(); BeanUtils.copyProperties(waitPakin, pakinLog); if (!waitPakinLogService.saveOrUpdate(pakinLog)) { throw new CoolException("组拖历史档更新失败"); } }); if (!waitPakinService.removeBatchByIds(waitPakins)) { throw new CoolException("组拖档删除失败!!"); } //通过组拖订单ID获取订单,并删除原单据,加入单据历史档 List<Long> list = waitPakins.stream().map(WaitPakin::getOrderId).collect(Collectors.toList()); List<Order> orders = orderService.list(new LambdaQueryWrapper<Order>().in(Order::getId, list)); orders.forEach(order -> { OrderLog orderLog = new OrderLog(); BeanUtils.copyProperties(order, orderLog); if (!orderLogService.save(orderLog)) { throw new CoolException("历史单据更新失败!!"); } }); if (!orderService.removeBatchByIds(orders)) { throw new CoolException("订单删除失败!!"); } return true; } zy-asrs-wms/src/main/resources/application.yml
@@ -13,8 +13,8 @@ validation-timeout: 3000 connection-test-query: select 1 driver-class-name: com.mysql.cj.jdbc.Driver # url: jdbc:mysql://127.0.0.1:3306/wms_dev_test?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true url: jdbc:mysql://127.0.0.1:3306/wms_dev?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true url: jdbc:mysql://127.0.0.1:3306/wms_dev_test?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true # url: jdbc:mysql://127.0.0.1:3306/wms_dev?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true username: root password: 34821015 # driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver