浏览代码

Revert "1"

This reverts commit bb8d0ca00af6400df2ab9504e9c5b164a1a9f21d.
gongdecai 3 年之前
父节点
当前提交
19a331b414

+ 0 - 7
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/mapper/WarehouseBaseInfoMapper.java

@@ -1,7 +1,5 @@
 package com.yh.saas.plugin.yiliangyiyun.mapper;
 
-import com.yh.saas.plugin.yiliangyiyun.entity.ContractManagementInfo;
-import com.yh.saas.plugin.yiliangyiyun.entity.TranCarInfo;
 import com.yh.saas.plugin.yiliangyiyun.entity.WarehouseBaseInfo;
 import com.baomidou.mybatisplus.mapper.BaseMapper;
 import com.yh.saas.plugin.yiliangyiyun.entity.view.ExportVView;
@@ -77,9 +75,4 @@ public interface WarehouseBaseInfoMapper extends BaseMapper<WarehouseBaseInfo> {
      */
     Integer getTemWareHouseCountByCondition(Map<String, Object> pageView);
 
-
-    List<ContractManagementInfo> getContractManagementInfo(Map<String, Object> pageView);
-    List<TranCarInfo> getTranCarInfo(Map<String, Object> pageView);
-    List<TranCarInfo> getTranCarInfo1(Map<String, Object> pageView);
-
 }

+ 45 - 113
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/WarehouseBaseInfoServiceImpl.java

@@ -1080,63 +1080,39 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
         }
         //查采购合同编号(不包含自运),以及移库任务编号,销售合同
         else if (flag == 7) {
-//            List<ContractManagementInfo> contractManagementInfoList = contractManagementInfoService.selectList(new EntityWrapper<ContractManagementInfo>()
-//                    .eq("comp_id", compId)
-//                    .eq("delete_flag", "0")
-//                    .eq("contract_type", "2")
-//                    .eq("status_flag", "1")
-//                    .eq("deliver_type", "2")
-//                    .orderBy("update_date", false));
-            Map<String, Object> pageView = new HashMap<>();
-            pageView.put("compId", compId);
-            List<ContractManagementInfo> contractManagementInfoList = baseMapper.getContractManagementInfo(pageView);
+            List<ContractManagementInfo> contractManagementInfoList = contractManagementInfoService.selectList(new EntityWrapper<ContractManagementInfo>()
+                    .eq("comp_id", compId)
+                    .eq("delete_flag", "0")
+                    .eq("contract_type", "2")
+                    .eq("status_flag", "1")
+                    .eq("deliver_type", "2")
+                    .orderBy("update_date", false));
             for (ContractManagementInfo contractManagementInfo : contractManagementInfoList) {
                 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"));
-                Map<String, Object> pageView1 = new HashMap<>();
-                pageView1.put("contractNo", contractManagementInfo.getContractNo());
-                pageView1.put("fleetFlag", "0");
-                pageView1.put("tranType", "4");
-                pageView1.put("threeTranType", "汽运");
-                pageView1.put("submit", "2");
-                pageView1.put("order", "car_no");
-                List<TranCarInfo> tranCarInfoList = baseMapper.getTranCarInfo(pageView1);
+                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 (!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"));
-                Map<String, Object> pageView2 = new HashMap<>();
-                pageView2.put("contractNo", contractManagementInfo.getContractNo());
-                pageView2.put("fleetFlag", "1");
-                pageView2.put("tranType", "4");
-                pageView2.put("threeTranType", "汽运");
-//                pageView2.put("submit", "2");
-                pageView2.put("order", "fleet_name");
-                List<TranCarInfo> tranCarInfoList1 = baseMapper.getTranCarInfo(pageView2);
+                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 (!CollectionUtils.isEmpty(tranCarInfoList1)) {
                     contractManagementInfo.setTranCarInfoList1(tranCarInfoList1);
                 }
                 //查船名
-//                Wrapper<TranCarInfo> shipListWrapper = new EntityWrapper<>();
-//                shipListWrapper.eq("contract_no", contractManagementInfo.getContractNo())
-//                       .eq("delete_flag", "0");
-//                shipListWrapper.andNew().eq("tran_type", "3").or()
-//                        .eq("three_tran_type", "散船");
-//                List<TranCarInfo> shipInfoList = tranCarInfoService.selectList(shipListWrapper);
-                Map<String, Object> pageView3 = new HashMap<>();
-                pageView3.put("contractNo", contractManagementInfo.getContractNo());
-                pageView3.put("tranType", "3");
-                pageView3.put("threeTranType", "散船");
-                List<TranCarInfo> shipInfoList = baseMapper.getTranCarInfo1(pageView3);
+                Wrapper<TranCarInfo> shipListWrapper = new EntityWrapper<>();
+                shipListWrapper.eq("contract_no", contractManagementInfo.getContractNo())
+                       .eq("delete_flag", "0");
+                shipListWrapper.andNew().eq("tran_type", "3").or()
+                        .eq("three_tran_type", "散船");
+                List<TranCarInfo> shipInfoList = tranCarInfoService.selectList(shipListWrapper);
                 if (!CollectionUtils.isEmpty(shipInfoList)) {
                     contractManagementInfo.setShipInfoList(shipInfoList);
                 }
@@ -1160,47 +1136,25 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
                 ContractGoodsInfo contractGoodsInfo = contractGoodsInfoService.selectOne(new EntityWrapper<ContractGoodsInfo>()
                         .eq("contract_id", contractManagementInfo1.getId()));
                 //查合同下的车牌号,入库只能查到未提交的
-//                List<TranCarInfo> tranCarInfoList = tranCarInfoService.selectList(new EntityWrapper<TranCarInfo>()
-//                        .eq("contract_no", contractManagementInfo1.getContractNo()).eq("fleet_flag", "0").eq("tran_type", "1").ne("submit", "2")
-//                        .last("ORDER BY CONVERT ( car_no USING gbk ) ASC"));
-
-                Map<String, Object> pageView1 = new HashMap<>();
-                pageView1.put("contractNo", contractManagementInfo1.getContractNo());
-                pageView1.put("fleetFlag", "0");
-                pageView1.put("tranType", "1");
-                pageView1.put("threeTranType", "汽运");
-                pageView1.put("submit1", "2");
-                pageView1.put("order", "car_no");
-                List<TranCarInfo> tranCarInfoList = baseMapper.getTranCarInfo(pageView1);
-
+                List<TranCarInfo> tranCarInfoList = tranCarInfoService.selectList(new EntityWrapper<TranCarInfo>()
+                        .eq("contract_no", contractManagementInfo1.getContractNo()).eq("fleet_flag", "0").eq("tran_type", "1").ne("submit", "2")
+                        .last("ORDER BY CONVERT ( car_no USING gbk ) ASC"));
                 if (!CollectionUtils.isEmpty(tranCarInfoList)) {
                     contractManagementInfo1.setTranCarInfoList(tranCarInfoList);
                 }
-//                List<TranCarInfo> tranCarInfoList1 = tranCarInfoService.selectList(new EntityWrapper<TranCarInfo>()
-//                        .eq("contract_no", contractManagementInfo1.getContractNo()).eq("fleet_flag", "1").eq("tran_type", "1")
-//                        .last("ORDER BY CONVERT ( fleet_name USING gbk ) ASC"));
-
-                Map<String, Object> pageView2 = new HashMap<>();
-                pageView2.put("contractNo", contractManagementInfo1.getContractNo());
-                pageView2.put("fleetFlag", "1");
-                pageView2.put("tranType", "1");
-                pageView2.put("order", "fleet_name");
-                List<TranCarInfo> tranCarInfoList1 = baseMapper.getTranCarInfo(pageView2);
+                List<TranCarInfo> tranCarInfoList1 = tranCarInfoService.selectList(new EntityWrapper<TranCarInfo>()
+                        .eq("contract_no", contractManagementInfo1.getContractNo()).eq("fleet_flag", "1").eq("tran_type", "1")
+                        .last("ORDER BY CONVERT ( fleet_name USING gbk ) ASC"));
                 if (!CollectionUtils.isEmpty(tranCarInfoList1)) {
                     contractManagementInfo1.setTranCarInfoList1(tranCarInfoList1);
                 }
                 //查船名
-//                Wrapper<TranCarInfo> shipListWrapper = new EntityWrapper<>();
-//                shipListWrapper.eq("contract_no", contractManagementInfo1.getContractNo())
-//                       .eq("delete_flag", "0");
-//                shipListWrapper.andNew().eq("tran_type", "3").or()
-//                        .eq("three_tran_type", "散船");
-                Map<String, Object> pageView3 = new HashMap<>();
-                pageView3.put("contractNo", contractManagementInfo1.getContractNo());
-                pageView3.put("tranType", "3");
-                pageView3.put("threeTranType", "散船");
-                List<TranCarInfo> shipInfoList = baseMapper.getTranCarInfo1(pageView3);
-//                List<TranCarInfo> shipInfoList = tranCarInfoService.selectList(shipListWrapper);
+                Wrapper<TranCarInfo> shipListWrapper = new EntityWrapper<>();
+                shipListWrapper.eq("contract_no", contractManagementInfo1.getContractNo())
+                       .eq("delete_flag", "0");
+                shipListWrapper.andNew().eq("tran_type", "3").or()
+                        .eq("three_tran_type", "散船");
+                List<TranCarInfo> shipInfoList = tranCarInfoService.selectList(shipListWrapper);
                 if (!CollectionUtils.isEmpty(shipInfoList)) {
                     contractManagementInfo1.setShipInfoList(shipInfoList);
                 }
@@ -1220,47 +1174,25 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
                 ContractManagementInfo contractManagementInfo = new ContractManagementInfo();
                 BeanUtils.copyProperties(inOutWarehouseTask, contractManagementInfo);
                 //查移库任务编号下的车牌号,入库只能查到已出库的
-//                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"));
-
-                Map<String, Object> pageView1 = new HashMap<>();
-                pageView1.put("contractNo", inOutWarehouseTask.getMoveTaskNo());
-                pageView1.put("fleetFlag", "0");
-                pageView1.put("tranType", "1");
-                pageView1.put("submit", "1");
-                pageView1.put("order", "car_no");
-                List<TranCarInfo> tranCarInfoList = baseMapper.getTranCarInfo(pageView1);
-
+                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 (!CollectionUtils.isEmpty(tranCarInfoList)) {
                     contractManagementInfo.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"));
-
-                Map<String, Object> pageView2 = new HashMap<>();
-                pageView2.put("contractNo", inOutWarehouseTask.getMoveTaskNo());
-                pageView2.put("fleetFlag", "1");
-                pageView2.put("tranType", "1");
-                pageView2.put("order", "fleet_name");
-                List<TranCarInfo> tranCarInfoList1 = baseMapper.getTranCarInfo(pageView2);
+                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 (!CollectionUtils.isEmpty(tranCarInfoList1)) {
                     contractManagementInfo.setTranCarInfoList1(tranCarInfoList1);
                 }
                 //查船名
-//                Wrapper<TranCarInfo> shipListWrapper = new EntityWrapper<>();
-//                shipListWrapper.eq("contract_no", inOutWarehouseTask.getMoveTaskNo())
-//                        .eq("delete_flag", "0");
-//                shipListWrapper.andNew().eq("tran_type", "3").or()
-//                        .eq("three_tran_type", "散船");
-//                List<TranCarInfo> shipInfoList = tranCarInfoService.selectList(shipListWrapper);
-
-                Map<String, Object> pageView3 = new HashMap<>();
-                pageView3.put("contractNo", inOutWarehouseTask.getMoveTaskNo());
-                pageView3.put("tranType", "3");
-                pageView3.put("threeTranType", "散船");
-                List<TranCarInfo> shipInfoList = baseMapper.getTranCarInfo1(pageView3);
+                Wrapper<TranCarInfo> shipListWrapper = new EntityWrapper<>();
+                shipListWrapper.eq("contract_no", inOutWarehouseTask.getMoveTaskNo())
+                        .eq("delete_flag", "0");
+                shipListWrapper.andNew().eq("tran_type", "3").or()
+                        .eq("three_tran_type", "散船");
+                List<TranCarInfo> shipInfoList = tranCarInfoService.selectList(shipListWrapper);
                 if (!CollectionUtils.isEmpty(shipInfoList)) {
                     contractManagementInfo.setShipInfoList(shipInfoList);
                 }

+ 0 - 69
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/WarehouseBaseInfoMapper.xml

@@ -589,73 +589,4 @@
 		order by wbi.common_warehouse_no,wpi.bin_number
     </select>
 
-
-
-    <select id="getContractManagementInfo" parameterType="Map"
-            resultType="com.yh.saas.plugin.yiliangyiyun.entity.ContractManagementInfo">
-        SELECT
-        *
-        FROM
-        contract_management_info
-        WHERE
-        comp_id= #{compId}
-        and
-        delete_flag = '0'
-        and
-        contract_type = '2'
-         and
-        status_flag = '1'
-         and
-        deliver_type = '2'
-        order by
-        update_date desc
-    </select>
-
-    <select id="getTranCarInfo" parameterType="Map"
-            resultType="com.yh.saas.plugin.yiliangyiyun.entity.TranCarInfo">
-        SELECT
-        *
-        FROM
-        tran_car_info
-        WHERE
-        contract_no= #{contractNo}
-        and
-        delete_flag = '0'
-        <if test="fleetFlag != null and fleetFlag != ''">
-            AND fleet_flag= #{fleetFlag}
-        </if>
-        <if test="tranType != null and tranType != ''">
-            AND tran_type= #{tranType}
-        </if>
-        <if test="threeTranType != null and threeTranType != ''">
-            AND three_tran_type= #{threeTranType}
-        </if>
-        <if test="submit != null and submit != ''">
-            AND submit= #{submit}
-        </if>
-        <if test="submit1 != null and submit1 != ''">
-            AND submit!= #{submit1}
-        </if>
-       ORDER BY CONVERT ( #{order} USING gbk ) ASC
-    </select>
-    <select id="getTranCarInfo1" parameterType="Map"
-            resultType="com.yh.saas.plugin.yiliangyiyun.entity.TranCarInfo">
-        SELECT
-        *
-        FROM
-        tran_car_info
-        WHERE
-        contract_no= #{contractNo}
-        and
-        delete_flag = '0'
-        AND(
-        <if test="tranType != null and tranType != ''">
-             tran_type= #{tranType}
-        </if>
-        <if test="threeTranType != null and threeTranType != ''">
-            or three_tran_type= #{threeTranType}
-        </if>
-        )
-
-    </select>
 </mapper>