zhangyuewww 2 роки тому
батько
коміт
1f6dc12566

+ 13 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/SalesTransferInfo.java

@@ -1,8 +1,10 @@
 package com.yh.saas.plugin.yiliangyiyun.entity;
 
 import java.io.Serializable;
+import java.util.List;
 
 
+import com.baomidou.mybatisplus.annotations.TableField;
 import com.baomidou.mybatisplus.annotations.TableId;
 import com.baomidou.mybatisplus.annotations.TableName;
 import com.baomidou.mybatisplus.enums.IdType;
@@ -88,6 +90,17 @@ public class SalesTransferInfo extends BaseModel<SalesTransferInfo> {
      * 工作流ID
      */
     private String workflowId;
+    @TableField(exist = false)
+    private String taskId;
+    /**
+     * 发起人
+     */
+    @TableField(exist = false)
+    private String creater;
+    @TableField(exist = false)
+    private List<WarehouseInOutInfo> warehouseInOutInfoList;
+    @TableField(exist = false)
+    private List<TranCarInfo> tranCarInfoList;
 
 
     @Override

+ 8 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/WarehouseInOutInfo.java

@@ -260,6 +260,14 @@ public class WarehouseInOutInfo extends BaseModel<WarehouseInOutInfo> {
      * 状态标识(1已暂存3已提交)
      */
     private String statusFlag;
+    /**
+     * 销售转移状态
+     */
+    private String salesTransferStatus;
+    /**
+     * 销售转移id
+     */
+    private String salesTransferId;
     /**
      * 状态
      */

+ 59 - 42
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/ContractManagementInfoServiceImpl.java

@@ -2989,8 +2989,9 @@ public class ContractManagementInfoServiceImpl extends ServiceImpl<ContractManag
             ContractGoodsInfo contractGoodsInfo = contractGoodsInfoService.selectOne(new EntityWrapper<ContractGoodsInfo>()
                     .eq("contract_id", contractManagementInfo.getId()));
             TranTaskInfo tranTaskInfo =tranTaskInfoService.selectOne(new EntityWrapper<TranTaskInfo>()
-            .eq("send_warehouse",warehouseName)
-            .eq("contract_no", contractManagementInfo.getContractNo()));
+                    .eq("send_warehouse",warehouseName)
+                    .eq("comp_id",compId)
+                    .eq("contract_no", contractManagementInfo.getContractNo()));
             if (tranTaskInfo!=null){
                 //查合同下的车牌号,出库只能查到未出库的
                 List<TranCarInfo> tranCarInfoList = tranCarInfoService.selectList(new EntityWrapper<TranCarInfo>()
@@ -3000,7 +3001,7 @@ public class ContractManagementInfoServiceImpl extends ServiceImpl<ContractManag
                     contractManagementInfo.setTranCarInfoList(tranCarInfoList);
                 }
                 List<TranCarInfo> tranCarInfoList1 = tranCarInfoService.selectList(new EntityWrapper<TranCarInfo>()
-                        .eq("contract_no", contractManagementInfo.getContractNo())
+                        .eq("info_id",tranTaskInfo.getId())
                         .eq("fleet_flag", "1")
                         .last("ORDER BY CONVERT ( fleet_name USING gbk ) ASC"));
                 if (!CollectionUtils.isEmpty(tranCarInfoList1)) {
@@ -3047,6 +3048,7 @@ public class ContractManagementInfoServiceImpl extends ServiceImpl<ContractManag
                 BeanUtils.copyProperties(inOutWarehouseTask, contractManagementInfo1);
                 TranTaskInfo tranTaskInfo =tranTaskInfoService.selectOne(new EntityWrapper<TranTaskInfo>()
                         .eq("send_warehouse",warehouseName)
+                        .eq("comp_id",compId)
                         .eq("contract_no", inOutWarehouseTask.getMoveTaskNo()));
                 if (tranTaskInfo!=null){
                     //查移库任务编号下的车牌号,移库出库只能查到未出库的
@@ -3116,21 +3118,26 @@ public class ContractManagementInfoServiceImpl extends ServiceImpl<ContractManag
         if (contractManagementInfo != null) {
             ContractGoodsInfo contractGoodsInfo = contractGoodsInfoService.selectOne(new EntityWrapper<ContractGoodsInfo>()
                     .eq("contract_id", contractManagementInfo.getId()));
-            //查合同下的车牌号,入库只能查到未提交的
-            List<TranCarInfo> tranCarInfoList = tranCarInfoService.selectList(new EntityWrapper<TranCarInfo>()
-                    .eq("contract_no", contractManagementInfo.getContractNo())
-                    .eq("fleet_flag", "0").eq("tran_type", "4").eq("three_tran_type", "汽运").ne("submit", "2")
-                    .last("ORDER BY CONVERT ( car_no USING gbk ) ASC"));
-            if (!org.springframework.util.CollectionUtils.isEmpty(tranCarInfoList)) {
-                contractManagementInfo.setTranCarInfoList(tranCarInfoList);
-            }
-            //查合同下的车队,入库只能查到未提交的
-            List<TranCarInfo> tranCarInfoList1 = tranCarInfoService.selectList(new EntityWrapper<TranCarInfo>()
-                    .eq("contract_no", contractManagementInfo.getContractNo())
-                    .eq("fleet_flag", "1").eq("tran_type", "4").eq("three_tran_type", "汽运")
-                    .last("ORDER BY CONVERT ( fleet_name USING gbk ) ASC"));
-            if (!org.springframework.util.CollectionUtils.isEmpty(tranCarInfoList1)) {
-                contractManagementInfo.setTranCarInfoList1(tranCarInfoList1);
+            TranTaskInfo tranTaskInfo =tranTaskInfoService.selectOne(new EntityWrapper<TranTaskInfo>()
+                    .eq("comp_id",compId)
+                    .eq("contract_no", contractManagementInfo.getContractNo()));
+            if (tranTaskInfo!=null) {
+                //查合同下的车牌号,入库只能查到未提交的
+                List<TranCarInfo> tranCarInfoList = tranCarInfoService.selectList(new EntityWrapper<TranCarInfo>()
+                        .eq("info_id", tranTaskInfo.getId())
+                        .eq("fleet_flag", "0").eq("tran_type", "4").eq("three_tran_type", "汽运").ne("submit", "2")
+                        .last("ORDER BY CONVERT ( car_no USING gbk ) ASC"));
+                if (!org.springframework.util.CollectionUtils.isEmpty(tranCarInfoList)) {
+                    contractManagementInfo.setTranCarInfoList(tranCarInfoList);
+                }
+                //查合同下的车队,入库只能查到未提交的
+                List<TranCarInfo> tranCarInfoList1 = tranCarInfoService.selectList(new EntityWrapper<TranCarInfo>()
+                        .eq("info_id", tranTaskInfo.getId())
+                        .eq("fleet_flag", "1").eq("tran_type", "4").eq("three_tran_type", "汽运")
+                        .last("ORDER BY CONVERT ( fleet_name USING gbk ) ASC"));
+                if (!org.springframework.util.CollectionUtils.isEmpty(tranCarInfoList1)) {
+                    contractManagementInfo.setTranCarInfoList1(tranCarInfoList1);
+                }
             }
             //查船名
             Wrapper<TranCarInfo> shipListWrapper = new EntityWrapper<>();
@@ -3168,18 +3175,23 @@ public class ContractManagementInfoServiceImpl extends ServiceImpl<ContractManag
             if (contractManagementInfo != null) {
                 ContractGoodsInfo contractGoodsInfo = contractGoodsInfoService.selectOne(new EntityWrapper<ContractGoodsInfo>()
                         .eq("contract_id", contractManagementInfo.getId()));
-                //查合同下的车牌号,入库只能查到未提交的
-                List<TranCarInfo> tranCarInfoList = tranCarInfoService.selectList(new EntityWrapper<TranCarInfo>()
-                        .eq("contract_no", contractManagementInfo.getContractNo()).eq("fleet_flag", "0").eq("tran_type", "1").ne("submit", "2")
-                        .last("ORDER BY CONVERT ( car_no USING gbk ) ASC"));
-                if (!org.springframework.util.CollectionUtils.isEmpty(tranCarInfoList)) {
-                    contractManagementInfo.setTranCarInfoList(tranCarInfoList);
-                }
-                List<TranCarInfo> tranCarInfoList1 = tranCarInfoService.selectList(new EntityWrapper<TranCarInfo>()
-                        .eq("contract_no", contractManagementInfo.getContractNo()).eq("fleet_flag", "1").eq("tran_type", "1")
-                        .last("ORDER BY CONVERT ( fleet_name USING gbk ) ASC"));
-                if (!org.springframework.util.CollectionUtils.isEmpty(tranCarInfoList1)) {
-                    contractManagementInfo.setTranCarInfoList1(tranCarInfoList1);
+                TranTaskInfo tranTaskInfo =tranTaskInfoService.selectOne(new EntityWrapper<TranTaskInfo>()
+                        .eq("comp_id",compId)
+                        .eq("contract_no", contractManagementInfo.getContractNo()));
+                if (tranTaskInfo!=null) {
+                    //查合同下的车牌号,入库只能查到未提交的
+                    List<TranCarInfo> tranCarInfoList = tranCarInfoService.selectList(new EntityWrapper<TranCarInfo>()
+                            .eq("info_id", tranTaskInfo.getId()).eq("fleet_flag", "0").eq("tran_type", "1").ne("submit", "2")
+                            .last("ORDER BY CONVERT ( car_no USING gbk ) ASC"));
+                    if (!org.springframework.util.CollectionUtils.isEmpty(tranCarInfoList)) {
+                        contractManagementInfo.setTranCarInfoList(tranCarInfoList);
+                    }
+                    List<TranCarInfo> tranCarInfoList1 = tranCarInfoService.selectList(new EntityWrapper<TranCarInfo>()
+                            .eq("info_id", tranTaskInfo.getId()).eq("fleet_flag", "1").eq("tran_type", "1")
+                            .last("ORDER BY CONVERT ( fleet_name USING gbk ) ASC"));
+                    if (!org.springframework.util.CollectionUtils.isEmpty(tranCarInfoList1)) {
+                        contractManagementInfo.setTranCarInfoList1(tranCarInfoList1);
+                    }
                 }
                 //查船名
                 Wrapper<TranCarInfo> shipListWrapper = new EntityWrapper<>();
@@ -3226,18 +3238,23 @@ public class ContractManagementInfoServiceImpl extends ServiceImpl<ContractManag
                     if (inOutWarehouseTask != null) {
                         ContractManagementInfo contractManagementInfo1 = new ContractManagementInfo();
                         BeanUtils.copyProperties(inOutWarehouseTask, contractManagementInfo1);
-                        //查移库任务编号下的车牌号,入库只能查到已出库的
-                        List<TranCarInfo> tranCarInfoList = tranCarInfoService.selectList(new EntityWrapper<TranCarInfo>()
-                                .eq("contract_no", inOutWarehouseTask.getMoveTaskNo()).eq("fleet_flag", "0").eq("tran_type", "1").eq("submit", "1")
-                                .last("ORDER BY CONVERT ( car_no USING gbk ) ASC"));
-                        if (!org.springframework.util.CollectionUtils.isEmpty(tranCarInfoList)) {
-                            contractManagementInfo1.setTranCarInfoList(tranCarInfoList);
-                        }
-                        List<TranCarInfo> tranCarInfoList1 = tranCarInfoService.selectList(new EntityWrapper<TranCarInfo>()
-                                .eq("contract_no", inOutWarehouseTask.getMoveTaskNo()).eq("fleet_flag", "1").eq("tran_type", "1")
-                                .last("ORDER BY CONVERT ( fleet_name USING gbk ) ASC"));
-                        if (!org.springframework.util.CollectionUtils.isEmpty(tranCarInfoList1)) {
-                            contractManagementInfo1.setTranCarInfoList1(tranCarInfoList1);
+                        TranTaskInfo tranTaskInfo =tranTaskInfoService.selectOne(new EntityWrapper<TranTaskInfo>()
+                                .eq("comp_id",compId)
+                                .eq("contract_no", inOutWarehouseTask.getMoveTaskNo()));
+                        if (tranTaskInfo!=null) {
+                            //查移库任务编号下的车牌号,入库只能查到已出库的
+                            List<TranCarInfo> tranCarInfoList = tranCarInfoService.selectList(new EntityWrapper<TranCarInfo>()
+                                    .eq("info_id", tranTaskInfo.getId()).eq("fleet_flag", "0").eq("tran_type", "1").eq("submit", "1")
+                                    .last("ORDER BY CONVERT ( car_no USING gbk ) ASC"));
+                            if (!org.springframework.util.CollectionUtils.isEmpty(tranCarInfoList)) {
+                                contractManagementInfo1.setTranCarInfoList(tranCarInfoList);
+                            }
+                            List<TranCarInfo> tranCarInfoList1 = tranCarInfoService.selectList(new EntityWrapper<TranCarInfo>()
+                                    .eq("info_id", tranTaskInfo.getId()).eq("fleet_flag", "1").eq("tran_type", "1")
+                                    .last("ORDER BY CONVERT ( fleet_name USING gbk ) ASC"));
+                            if (!org.springframework.util.CollectionUtils.isEmpty(tranCarInfoList1)) {
+                                contractManagementInfo1.setTranCarInfoList1(tranCarInfoList1);
+                            }
                         }
                         //查船名
                         Wrapper<TranCarInfo> shipListWrapper = new EntityWrapper<>();

+ 1 - 1
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/TranTaskInfoServiceImpl.java

@@ -442,7 +442,7 @@ public class TranTaskInfoServiceImpl extends ServiceImpl<TranTaskInfoMapper, Tra
                         tranTaskInfo.setShipNo(tranCarInfo.getShipNo());
                     }
                 }
-                else {
+                else if ("2".equals(flag)){
                     wrapper.eq("tran_type","火运");
                 }
                 //查看运输阶段信息

+ 1 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/WarehouseInOutInfoMapper.xml

@@ -95,6 +95,7 @@
         w.consignee,
         w.tran_car_no as tranCarNo,
         w.agent,
+        w.sales_transfer_status as salesTransferStatus,
         w.back_office as backOffice,
         w.status_flag as statusFlag,
         w.status as status,