| | |
| | | import com.vincent.rsf.framework.exception.CoolException; |
| | | import com.vincent.rsf.server.common.utils.ExcelUtil; |
| | | import com.vincent.rsf.server.manager.controller.params.AsnOrderAndItemsParams; |
| | | import com.vincent.rsf.server.manager.controller.params.OrderOutTaskParam; |
| | | import com.vincent.rsf.server.manager.entity.DeviceSite; |
| | | import com.vincent.rsf.server.manager.entity.WkOrder; |
| | | import com.vincent.rsf.server.manager.entity.WkOrderItem; |
| | | import com.vincent.rsf.server.manager.entity.Matnr; |
| | | import com.vincent.rsf.server.manager.entity.excel.CheckOrderTemplate; |
| | | import com.vincent.rsf.server.manager.enums.*; |
| | | import com.vincent.rsf.server.manager.mapper.CheckOrderMapper; |
| | | import com.vincent.rsf.server.manager.service.AsnOrderItemService; |
| | | import com.vincent.rsf.server.manager.service.CheckOrderItemService; |
| | | import com.vincent.rsf.server.manager.service.CheckOrderService; |
| | | import com.vincent.rsf.server.manager.service.MatnrService; |
| | | import com.vincent.rsf.server.manager.service.*; |
| | | import com.vincent.rsf.server.system.constant.SerialRuleCode; |
| | | import com.vincent.rsf.server.system.utils.SerialRuleUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | private CheckOrderItemService checkOrderItemService; |
| | | @Autowired |
| | | private AsnOrderItemService asnOrderItemService; |
| | | @Autowired |
| | | private DeviceSiteService deviceSiteService; |
| | | |
| | | /** |
| | | * @author Ryan |
| | |
| | | } |
| | | |
| | | /** |
| | | * @param |
| | | * @return |
| | | * @author Ryan |
| | | * @description 修改主单及明细 |
| | | * @time 2025/4/29 13:47 |
| | | */ |
| | | @Override |
| | | public R updateOrderItem(AsnOrderAndItemsParams params, Long loginUserId) { |
| | | WkOrder orders = params.getOrders(); |
| | | if (Objects.isNull(orders)) { |
| | | throw new CoolException("主单信息不能为空!!"); |
| | | } |
| | | if (Objects.isNull(orders.getId())) { |
| | | throw new CoolException("数据错误:单据ID不能为空!!"); |
| | | } |
| | | if (!this.updateById(orders)) { |
| | | throw new CoolException("主单修改失败!!"); |
| | | } |
| | | if (Objects.isNull(params.getItems()) || params.getItems().isEmpty()) { |
| | | throw new CoolException("明细参数不能为空!!"); |
| | | } |
| | | try { |
| | | svaeOrUpdateOrderItem(params, loginUserId); |
| | | } catch (Exception e) { |
| | | throw new CoolException(e.getMessage()); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * @author Ryan |
| | | * @date 2025/7/16 |
| | | * @description: 获取盘点出入站口 |
| | | * @version 1.0 |
| | | */ |
| | | @Override |
| | | public R getSiteNos() { |
| | | List<Integer> list = Arrays.asList(TaskType.TASK_TYPE_CHECK_OUT.type, TaskType.TASK_TYPE_CHECK_IN.type); |
| | | List<DeviceSite> sites = deviceSiteService.list(new LambdaQueryWrapper<DeviceSite>().in(DeviceSite::getType, list).groupBy(DeviceSite::getSite)); |
| | | return R.ok().add(sites); |
| | | } |
| | | |
| | | /** |
| | | * @author Ryan |
| | | * @date 2025/7/16 |
| | | * @description: 盘点出库预览 |
| | | * @version 1.0 |
| | | */ |
| | | @Override |
| | | public R genCheckPreview(OrderOutTaskParam param) { |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * @author Ryan |
| | | * @date 2025/7/16 |
| | | * @description: 取消盘点单据 |
| | |
| | | throw new CoolException("计划收货数量修改失败!!"); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |