Explorar el Código

1.PDA出库拣货增加托盘号
2.PDA出库拣货完成修改单头状态

k hace 2 años
padre
commit
f625ea183f

+ 2 - 0
warewms-ams/src/main/java/com/ruoyi/ams/order/form/PickForm.java

@@ -8,6 +8,8 @@ import javax.validation.constraints.NotEmpty;
 public class PickForm {
     @NotEmpty(message = "出库单号不能为空")
     private String orderNo;
+    @NotEmpty(message = "分拣托盘不能为空")
+    private String palletNo;
     private String sku;
     @NotEmpty(message = "条码不能为空")
     private String sn;

+ 16 - 1
warewms-ams/src/main/java/com/ruoyi/ams/order/service/impl/WmsDocOrderHeaderServiceImpl.java

@@ -579,6 +579,7 @@ public class WmsDocOrderHeaderServiceImpl implements IWmsDocOrderHeaderService {
     @Override
     public AjaxResult toPick(PickForm pickForm) {
         String orderNo = pickForm.getOrderNo();
+        String palletNo = pickForm.getPalletNo();
         String sn = pickForm.getSn();
         BigDecimal qty = new BigDecimal(pickForm.getQty()); // 拣货数量
         // 验证sn
@@ -589,6 +590,7 @@ public class WmsDocOrderHeaderServiceImpl implements IWmsDocOrderHeaderService {
         ActAllocationDetailsFrom actAllocationQuery = new ActAllocationDetailsFrom();
         actAllocationQuery.setOrderNo(orderNo);
         actAllocationQuery.setLotatt02(sn);
+        actAllocationQuery.setLotatt07(palletNo);
         actAllocationQuery.setStatus(Constant.ORDER_STS.STS21.getValue());
         actAllocationDetailsFromList = actAllocationDetailsService.selectActAllocationDetailsInvLotAttList(actAllocationQuery);
         if (actAllocationDetailsFromList.size() == 0) {
@@ -656,7 +658,20 @@ public class WmsDocOrderHeaderServiceImpl implements IWmsDocOrderHeaderService {
             wmsDocOrderDetails.setLineStatus(Constant.ORDER_STS.STS40.getValue());
         }
         wmsDocOrderDetailsMapper.updateWmsDocOrderDetails(wmsDocOrderDetails);
-        // todo 更新头单
+        // 更新头单
+        String orderSts = Constant.ORDER_STS.STS99.getValue();
+        WmsDocOrderHeader wmsDocOrderHeader = new WmsDocOrderHeader();
+        wmsDocOrderHeader.setOrderNo(orderNo);
+        List<WmsDocOrderDetails> wmsDocOrderDetailsList = wmsDocOrderDetailsMapper.selectWmsDocOrderDetailsByOrderNo(orderNo);
+        for (WmsDocOrderDetails details : wmsDocOrderDetailsList) {
+            if (!details.getLineStatus().equals(Constant.ORDER_STS.STS40.getValue())) {
+                orderSts = Constant.ORDER_STS.STS30.getValue();
+                break;
+            }
+        }
+        wmsDocOrderHeader.setOrderStatus(orderSts);
+        wmsDocOrderHeaderService.updateWmsDocOrderHeader(wmsDocOrderHeader);
+
         return AjaxResult.success("拣货成功");
     }
 

+ 16 - 0
warewms-ams/src/main/resources/mapper/docOrder/ActAllocationDetailsMapper.xml

@@ -156,6 +156,22 @@
             <if test="status != null  and status != ''"> and status = #{status}</if>
             <if test="lotatt01 != null  and lotatt01 != ''"> and lotatt01 = #{lotatt01}</if>
             <if test="lotatt02 != null  and lotatt02 != ''"> and lotatt02 = #{lotatt02}</if>
+            <if test="lotatt03 != null  and lotatt03 != ''"> and lotatt03 = #{lotatt03}</if>
+            <if test="lotatt04 != null  and lotatt04 != ''"> and lotatt04 = #{lotatt04}</if>
+            <if test="lotatt05 != null  and lotatt05 != ''"> and lotatt05 = #{lotatt05}</if>
+            <if test="lotatt06 != null  and lotatt06 != ''"> and lotatt06 = #{lotatt06}</if>
+            <if test="lotatt07 != null  and lotatt07 != ''"> and lotatt07 = #{lotatt07}</if>
+            <if test="lotatt08 != null  and lotatt08 != ''"> and lotatt08 = #{lotatt08}</if>
+            <if test="lotatt09 != null  and lotatt09 != ''"> and lotatt09 = #{lotatt09}</if>
+            <if test="lotatt10 != null  and lotatt10 != ''"> and lotatt10 = #{lotatt10}</if>
+            <if test="lotatt11 != null  and lotatt11 != ''"> and lotatt11 = #{lotatt11}</if>
+            <if test="lotatt12 != null  and lotatt12 != ''"> and lotatt12 = #{lotatt12}</if>
+            <if test="lotatt13 != null  and lotatt13 != ''"> and lotatt13 = #{lotatt13}</if>
+            <if test="lotatt14 != null  and lotatt14 != ''"> and lotatt14 = #{lotatt14}</if>
+            <if test="lotatt15 != null  and lotatt15 != ''"> and lotatt15 = #{lotatt15}</if>
+            <if test="lotatt16 != null  and lotatt16 != ''"> and lotatt16 = #{lotatt16}</if>
+            <if test="lotatt17 != null  and lotatt17 != ''"> and lotatt17 = #{lotatt17}</if>
+            <if test="lotatt18 != null  and lotatt18 != ''"> and lotatt18 = #{lotatt18}</if>
         </where>
     </select>