skyouc
2 天以前 0800daaeefdc7761ace0ae895f5a0273eb023e46
相同票号入收货区判断
3个文件已修改
27 ■■■■■ 已修改文件
rsf-server/src/main/java/com/vincent/rsf/server/api/controller/erp/params/SyncOrderParams.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/ReceiveMsgServiceImpl.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-server/src/main/java/com/vincent/rsf/server/manager/schedules/ScheduleJobs.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-server/src/main/java/com/vincent/rsf/server/api/controller/erp/params/SyncOrderParams.java
@@ -27,6 +27,9 @@
    @ApiModelProperty("单号")
    private String orderNo;
    @ApiModelProperty("原库位")
    private String orgLoc;
    @ApiModelProperty("订单ID")
    private Long orderId;
rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/ReceiveMsgServiceImpl.java
@@ -411,6 +411,13 @@
                if (Objects.isNull(one)) {
                    throw new CoolException("单据:" + syncOrder.getOrderNo() + ", 业务类型不存在!!");
                }
                Loc serviceOne = null;
                if (!Objects.isNull(syncOrder.getOrgLoc())) {
                    serviceOne = locService.getOne(new LambdaQueryWrapper<Loc>().eq(!Objects.isNull(syncOrder.getOrgLoc()), Loc::getCode, syncOrder.getOrgLoc()));
                }
                if (!Objects.isNull(serviceOne)) {
                    //TODO 添加调拔移库单功能
                } else {
                WkOrder order = asnOrderService.getOne(new LambdaQueryWrapper<WkOrder>()
                        .eq(!Objects.isNull(syncOrder.getOrderId()), WkOrder::getPoId, syncOrder.getOrderId())
                        .eq(WkOrder::getPoCode, syncOrder.getOrderNo()));
@@ -473,6 +480,7 @@
                if (!asnOrderService.updateById(wkOrder)) {
                    throw new CoolException("计划收货数量修改失败!!");
                }
                }
            });
        }
        return R.ok();
rsf-server/src/main/java/com/vincent/rsf/server/manager/schedules/ScheduleJobs.java
@@ -13,7 +13,10 @@
import com.vincent.rsf.server.system.constant.GlobalConfigCode;
import com.vincent.rsf.server.system.constant.SerialRuleCode;
import com.vincent.rsf.server.system.entity.Config;
import com.vincent.rsf.server.system.entity.FieldsItem;
import com.vincent.rsf.server.system.service.ConfigService;
import com.vincent.rsf.server.system.service.FieldsItemService;
import com.vincent.rsf.server.system.service.impl.FieldsItemServiceImpl;
import com.vincent.rsf.server.system.utils.SerialRuleUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
@@ -62,6 +65,8 @@
    private TransferService transferService;
    @Autowired
    private OutStockService outStockService;
    @Autowired
    private FieldsItemService fieldsItemService;
    /**
     * @author Ryan
@@ -185,6 +190,17 @@
                .setFieldsIndex(orderItem.getFieldsIndex())
                .setShipperId(matnr.getShipperId());
        WarehouseAreasItem warehousItem = warehouseAreasItemService.getOne(new LambdaQueryWrapper<WarehouseAreasItem>().eq(StringUtils.isNotBlank(orderItem.getFieldsIndex()), WarehouseAreasItem::getFieldsIndex, orderItem.getFieldsIndex()));
        if (!Objects.isNull(warehousItem)) {
            //希日相同票号,收货区不可新增相同票号数据
            FieldsItem fieldsItem = fieldsItemService.getOne(new LambdaQueryWrapper<FieldsItem>()
                    .eq(FieldsItem::getUuid, orderItem.getFieldsIndex()).last("LIMIT 1"));
            if (!Objects.isNull(fieldsItem)) {
                throw new CoolException("票号:" + fieldsItem.getValue() + "已在收货区,不可推送相当票号数据。请联系管理员!!" );
            }
        }
        LambdaQueryWrapper<WarehouseAreasItem> queryWrapper = new LambdaQueryWrapper<WarehouseAreasItem>()
                .eq(WarehouseAreasItem::getMatnrCode, orderItem.getMatnrCode())
                .eq(!Cools.isEmpty(orderItem.getFieldsIndex()), WarehouseAreasItem::getFieldsIndex, orderItem.getFieldsIndex())