Jelajahi Sumber

保证金类型改为多选查询

yewc 1 tahun lalu
induk
melakukan
cdae369782

+ 9 - 3
client/src/views/OaSystem/financialManagement/bzjglDeptPage/index.vue

@@ -3,7 +3,7 @@
     <div class="searchBox">
       <div class="form">
         <span class="formSpan">保证金类型:</span>
-        <el-select v-model="queryParams.costType" clearable>
+        <el-select v-model="costType" clearable multiple collapse-tags>
           <el-option label="履约保证金" value="1401" />
           <el-option label="投标保证金" value="1402" />
           <el-option label="押金" value="1403" />
@@ -184,7 +184,7 @@ const queryParams = reactive({
   deptId: userDeptId,
   applyTime: [],
   projectDeptId: undefined,
-  costType: undefined,
+  costType: [],
   status: undefined,
   totalAmount: undefined,
   applyOn: '',
@@ -240,7 +240,7 @@ const changeWriteOffTime = (value, data) => {
 }
 const applyDate = ref()
 const writeOffTime = ref()
-
+const costType = ref()
 /** 查询列表 */
 const getList = async () => {
   loading.value = true
@@ -253,6 +253,9 @@ const getList = async () => {
       queryParams.writeOn = moment(writeOffTime.value[0]).format('YYYY-MM-DD')
       queryParams.writeOff = moment(writeOffTime.value[1]).format('YYYY-MM-DD')
     }
+    if (costType.value) {
+      queryParams.costType = costType.value.join(',')
+    }
     const data = await UseMoneyApi.getUseMoneyEarnestDeptPage(queryParams)
     list.value = data.list
     total.value = data.total
@@ -270,6 +273,9 @@ const getOverview = async () => {
     queryParams.writeOn = moment(writeOffTime.value[0]).format('YYYY-MM-DD')
     queryParams.writeOff = moment(writeOffTime.value[1]).format('YYYY-MM-DD')
   }
+  if (costType.value) {
+    queryParams.costType = costType.value.join(',')
+  }
   const data = await UseMoneyApi.getUseMoneyOverviewHx(queryParams)
   if (data) {
     infoList.value[0].num = data.totalAmount

+ 9 - 2
client/src/views/OaSystem/financialManagement/bzjglPage/index.vue

@@ -3,7 +3,7 @@
     <div class="searchBox">
       <div class="form">
         <span class="formSpan">保证金类型:</span>
-        <el-select v-model="queryParams.costType" clearable>
+        <el-select v-model="costType" clearable multiple collapse-tags>
           <el-option label="履约保证金" value="1401" />
           <el-option label="投标保证金" value="1402" />
           <el-option label="押金" value="1403" />
@@ -187,7 +187,7 @@ const queryParams = reactive({
   userId: undefined,
   deptId: undefined,
   projectDeptId: undefined,
-  costType: undefined,
+  costType: '',
   status: undefined,
   totalAmount: undefined,
   useMoneyNo: undefined,
@@ -243,6 +243,7 @@ const changeWriteOffTime = (value, data) => {
   }
 }
 const applyDate = ref()
+const costType = ref()
 const writeOffTime = ref()
 /** 查询列表 */
 const getList = async () => {
@@ -256,6 +257,9 @@ const getList = async () => {
       queryParams.writeOn = moment(writeOffTime.value[0]).format('YYYY-MM-DD')
       queryParams.writeOff = moment(writeOffTime.value[1]).format('YYYY-MM-DD')
     }
+    if (costType.value) {
+      queryParams.costType = costType.value.join(',')
+    }
     const data = await UseMoneyApi.getUseMoneyEarnestPage(queryParams)
     list.value = data.list
     total.value = data.total
@@ -273,6 +277,9 @@ const getOverview = async () => {
     queryParams.writeOn = moment(writeOffTime.value[0]).format('YYYY-MM-DD')
     queryParams.writeOff = moment(writeOffTime.value[1]).format('YYYY-MM-DD')
   }
+  if (costType.value) {
+    queryParams.costType = costType.value.join(',')
+  }
   const data = await UseMoneyApi.getUseMoneyOverviewHx(queryParams)
   infoList.value[0].num = data.totalAmount
   infoList.value[1].num = data.totalUseAmount

+ 3 - 0
zjugis-business/src/main/java/com/zjugis/business/flow/usemoney/controller/vo/UseMoneyPageReqVO.java

@@ -43,6 +43,9 @@ public class UseMoneyPageReqVO extends PageParam {
     @Schema(description = "费用类型")
     private String costType;
 
+    @Schema(description = "费用类型")
+    private List<String> costTypeList;
+
     @Schema(description = "状态")
     private String status;
 

+ 9 - 0
zjugis-business/src/main/java/com/zjugis/business/flow/usemoney/service/UseMoneyServiceImpl.java

@@ -207,6 +207,9 @@ public class UseMoneyServiceImpl implements UseMoneyService {
             pageReqVO.setUserDeptList(dept);
             pageReqVO.setDeptId(null);
         }
+        if(pageReqVO.getCostType()!=null&&!"".equals(pageReqVO.getCostType())){
+            pageReqVO.setCostTypeList(Arrays.asList(pageReqVO.getCostType().split(",")));
+        }
         // MyBatis Plus 查询
         IPage<UseMoneyEarnestRespVO> mpPage = MyBatisUtils.buildPage(pageReqVO);
         useMoneyDao.getUseMoneyEarnestPage(mpPage, pageReqVO);
@@ -237,6 +240,9 @@ public class UseMoneyServiceImpl implements UseMoneyService {
             pageReqVO.setUserDeptList(dept);
             pageReqVO.setDeptId(null);
         }
+        if(pageReqVO.getCostType()!=null&&!"".equals(pageReqVO.getCostType())){
+            pageReqVO.setCostTypeList(Arrays.asList(pageReqVO.getCostType().split(",")));
+        }
         // MyBatis Plus 查询
         IPage<UseMoneyEarnestRespVO> mpPage = MyBatisUtils.buildPage(pageReqVO);
         useMoneyDao.getUseMoneyEarnestDeptPage(mpPage, pageReqVO, deptProjectIds);
@@ -314,6 +320,9 @@ public class UseMoneyServiceImpl implements UseMoneyService {
             pageReqVO.setUserDeptList(dept);
             pageReqVO.setDeptId(null);
         }
+        if(pageReqVO.getCostType()!=null&&!"".equals(pageReqVO.getCostType())){
+            pageReqVO.setCostTypeList(Arrays.asList(pageReqVO.getCostType().split(",")));
+        }
         return useMoneyDao.getUseMoneyOverviewHx(pageReqVO);
     }
     @Override

+ 48 - 12
zjugis-business/src/main/resources/mapper/oracle/UseMoneyMapper.xml

@@ -38,8 +38,14 @@
                 <bind name="REMARK" value="'%'+params.REMARK+'%'"/>
                 AND T1.REMARK like #{REMARK}
             </if>
-            <if test="params != null and params.costType != null and params.costType != ''">
-                AND T1.COST_TYPE = #{params.costType}
+<!--            <if test="params != null and params.costType != null and params.costType != ''">-->
+<!--                AND T1.COST_TYPE in (#{params.costType})-->
+<!--            </if>-->
+            <if test="params != null and params.costTypeList != null and params.costTypeList.size > 0">
+                AND T1.COST_TYPE in
+                <foreach collection="params.costTypeList" item="item" open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
             </if>
             <if test="params != null and params.useMoneyNo != null and params.useMoneyNo != ''">
                 AND T2.USE_MONEY_NO = #{params.useMoneyNo}
@@ -111,8 +117,14 @@
                 <bind name="REMARK" value="'%'+params.REMARK+'%'"/>
                 AND T1.BZ1 like #{REMARK}
             </if>
-            <if test="params != null and params.costType != null and params.costType != ''">
-                AND T1.COST_TYPE = #{params.costType}
+<!--            <if test="params != null and params.costType != null and params.costType != ''">-->
+<!--                AND T1.COST_TYPE in (#{params.costType})-->
+<!--            </if>-->
+            <if test="params != null and params.costTypeList != null and params.costTypeList.size > 0">
+                AND T1.COST_TYPE in
+                <foreach collection="params.costTypeList" item="item" open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
             </if>
             <if test="params != null and params.useMoneyNo != null and params.useMoneyNo != ''">
                 AND T2.COMMON_COST_NO = #{params.useMoneyNo}
@@ -204,8 +216,14 @@
                 <bind name="REMARK" value="'%'+params.REMARK+'%'"/>
                 AND T1.REMARK like #{REMARK}
             </if>
-            <if test="params != null and params.costType != null and params.costType != ''">
-                AND T1.COST_TYPE = #{params.costType}
+<!--            <if test="params != null and params.costType != null and params.costType != ''">-->
+<!--                AND T1.COST_TYPE in (#{params.costType})-->
+<!--            </if>-->
+            <if test="params != null and params.costTypeList != null and params.costTypeList.size > 0">
+                AND T1.COST_TYPE in
+                <foreach collection="params.costTypeList" item="item" open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
             </if>
             <if test="params != null and params.totalAmount != null and params.totalAmount != ''">
                 AND T2.TOTAL_AMOUNT = #{params.totalAmount}
@@ -280,8 +298,14 @@
                 <bind name="REMARK" value="'%'+params.REMARK+'%'"/>
                 AND T1.BZ1 like #{REMARK}
             </if>
-            <if test="params != null and params.costType != null and params.costType != ''">
-                AND T1.COST_TYPE = #{params.costType}
+<!--            <if test="params != null and params.costType != null and params.costType != ''">-->
+<!--                AND T1.COST_TYPE in (#{params.costType})-->
+<!--            </if>-->
+            <if test="params != null and params.costTypeList != null and params.costTypeList.size > 0">
+                AND T1.COST_TYPE in
+                <foreach collection="params.costTypeList" item="item" open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
             </if>
 <!--            <if test="params != null and params.useMoneyNo != null and params.useMoneyNo != ''">-->
 <!--                AND T2.COMMON_COST_NO = #{params.useMoneyNo}-->
@@ -365,8 +389,14 @@ select sum(num) from (
                 <bind name="REMARK" value="'%'+params.REMARK+'%'"/>
                 AND T1.REMARK like #{REMARK}
             </if>
-            <if test="params != null and params.costType != null and params.costType != ''">
-                AND T1.COST_TYPE = #{params.costType}
+<!--            <if test="params != null and params.costType != null and params.costType != ''">-->
+<!--                AND T1.COST_TYPE in (#{params.costType})-->
+<!--            </if>-->
+            <if test="params != null and params.costTypeList != null and params.costTypeList.size > 0">
+                AND T1.COST_TYPE in
+                <foreach collection="params.costTypeList" item="item" open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
             </if>
             <if test="params != null and params.useMoneyNo != null and params.useMoneyNo != ''">
                 AND T2.USE_MONEY_NO = #{params.useMoneyNo}
@@ -437,8 +467,14 @@ select sum(num) from (
                 <bind name="REMARK" value="'%'+params.REMARK+'%'"/>
                 AND T1.BZ1 like #{REMARK}
             </if>
-            <if test="params != null and params.costType != null and params.costType != ''">
-                AND T1.COST_TYPE = #{params.costType}
+<!--            <if test="params != null and params.costType != null and params.costType != ''">-->
+<!--                AND T1.COST_TYPE in (#{params.costType})-->
+<!--            </if>-->
+            <if test="params != null and params.costTypeList != null and params.costTypeList.size > 0">
+                AND T1.COST_TYPE in
+                <foreach collection="params.costTypeList" item="item" open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
             </if>
             <if test="params != null and params.useMoneyNo != null and params.useMoneyNo != ''">
                 AND T2.COMMON_COST_NO = #{params.useMoneyNo}