Browse Source

1.控制台财务应收详情 数据问题

wuhp 1 năm trước cách đây
mục cha
commit
b2916ab42d

+ 4 - 4
src/main/java/com/ydtech/modules/fnc/service/impl/InsPlyIncomeServiceImpl.java

@@ -3466,11 +3466,11 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
             throw new SystemException("月份不能为空");
         }
         String yearAndMonth = financialReceivablesQueryVo.getYearAndMonth();
-        int year = Integer.parseInt(yearAndMonth.split("-")[0]);
-        int month = Integer.parseInt(yearAndMonth.split("-")[1]);
+//        int year = Integer.parseInt(yearAndMonth.split("-")[0]);
+//        int month = Integer.parseInt(yearAndMonth.split("-")[1]);
 
-        financialReceivablesQueryVo.setBeginDate(SliceUpDateUtil.getStartOfMonth(year, month));
-        financialReceivablesQueryVo.setEndDate(SliceUpDateUtil.getEndOfMonth(year, month));
+//        financialReceivablesQueryVo.setBeginDate(SliceUpDateUtil.getStartOfMonth(year, month));
+//        financialReceivablesQueryVo.setEndDate(SliceUpDateUtil.getEndOfMonth(year, month));
         //查询总数
         FinancialReceivablesAllMonthVo vo = baseMapper.queryDateByTypeByMonth(financialReceivablesQueryVo);
         if(vo!= null){

+ 8 - 8
src/main/resources/mapper/modules/fnc/InsPlyIncomeMapper.xml

@@ -2597,8 +2597,8 @@
             <if test="vo.type !=null  and  vo.type  !=''">
                 and pa.agreement_type =#{vo.type}
             </if>
-            <if test="vo.beginDate  != null  and  vo.beginDate!=''  and vo.endDate  != null  and  vo.endDate!=''">
-                AND  a.signdate  BETWEEN #{vo.beginDate} AND #{vo.endDate}
+            <if test="vo.yearAndMonth  != null  and  vo.yearAndMonth!=''  ">
+                AND   DATE_FORMAT(a.signdate, '%Y-%m' )  =#{vo.yearAndMonth}
             </if>
            <if test="vo.yearAndMonth  != null  and  vo.yearAndMonth!=''">
                 AND   DATE_FORMAT(a.signdate, '%Y-%m') =#{vo.yearAndMonth}
@@ -2749,8 +2749,8 @@
                 LEFT JOIN esm_ins_company eic ON eic.id = a.company_id
         <where>
             pa.agreement_type = '1'
-            <if test="vo.beginDate  != null  and  vo.beginDate!=''  and vo.endDate  != null  and  vo.endDate!=''">
-                AND  a.signdate  BETWEEN #{vo.beginDate} AND #{vo.endDate}
+            <if test="vo.yearAndMonth  != null  and  vo.yearAndMonth!=''  ">
+                AND   DATE_FORMAT(a.signdate, '%Y-%m' )  =#{vo.yearAndMonth}
             </if>
             <if test="vo.isNoCar !=null  and  vo.isNoCar  !=''">
                 and a.is_not_car =#{vo.isNoCar}
@@ -2779,8 +2779,8 @@
                 LEFT JOIN esm_ins_company eic ON eic.id = a.company_id
         <where>
             pa.agreement_type = '1'
-            <if test="vo.beginDate  != null  and  vo.beginDate!=''  and vo.endDate  != null  and  vo.endDate!=''">
-                AND  a.signdate  BETWEEN #{vo.beginDate} AND #{vo.endDate}
+            <if test="vo.yearAndMonth  != null  and  vo.yearAndMonth!=''  ">
+                AND   DATE_FORMAT(a.signdate, '%Y-%m' )  =#{vo.yearAndMonth}
             </if>
             <if test="vo.isNoCar !=null  and  vo.isNoCar  !=''">
                 and a.is_not_car =#{vo.isNoCar}
@@ -2807,8 +2807,8 @@
                 LEFT JOIN esm_ins_company eic ON eic.id = a.company_id
         <where>
             pa.agreement_type = '1'
-            <if test="vo.beginDate  != null  and  vo.beginDate!=''  and vo.endDate  != null  and  vo.endDate!=''">
-                AND  a.signdate  BETWEEN #{vo.beginDate} AND #{vo.endDate}
+            <if test="vo.yearAndMonth  != null  and  vo.yearAndMonth!=''  ">
+                AND   DATE_FORMAT(a.signdate, '%Y-%m' )  =#{vo.yearAndMonth}
             </if>
             <if test="vo.isNoCar !=null  and  vo.isNoCar  !=''">
                 and a.is_not_car =#{vo.isNoCar}