Quellcode durchsuchen

修改采购燃料报表

zx vor 3 Jahren
Ursprung
Commit
c46ec36b68

+ 5 - 1
src/main/java/com/steerinfo/dil/controller/StatisticalReportController.java

@@ -53,9 +53,13 @@ public class StatisticalReportController extends BaseRESTfulController {
                                                Integer pageSize,
                                                String startTime,
                                                String endTime,
-                                               Integer orderType
+                                               Integer orderType,
+                                               String con
     ){
         mapValue.put("orderTypee", orderType);
+        if (con!=null||!"null".equals(con)){
+            mapValue.put("con",con);
+        }
         DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDateTime);//根据时间段查询数据
         PageHelper.startPage(pageNum, pageSize);
         //分页数据

+ 8 - 0
src/main/resources/com/steerinfo/dil/mapper/StatisticalReportMapper.xml

@@ -96,6 +96,10 @@
                     and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') <= TWR.RESULT_TARE_WEIGHT_TIME
                     and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= TWR.RESULT_TARE_WEIGHT_TIME
                 </if>
+               <if test="con!=null">
+                and (instr(RM.MATERIAL_NAME, #{con}) > 0 or instr(RS.SUPPLIER_NAME, #{con}) > 0 or
+                   instr(RCON.CONSIGNEE_COMPANY_NAME, #{con}) > 0 or instr(RC.CAPACITY_NUMBER, #{con}) > 0)
+               </if>
              )
         <where>
             <if test="capacityNumber != null">
@@ -246,6 +250,10 @@
             and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= TWR.RESULT_TARE_WEIGHT_TIME
             and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= TWR.RESULT_TARE_WEIGHT_TIME
         </if>
+        <if test="con!=null">
+            and (instr(RM.MATERIAL_NAME, #{con}) > 0 or instr(RS.SUPPLIER_NAME, #{con}) > 0 or
+            instr(RCON.CONSIGNEE_COMPANY_NAME, #{con}) > 0 or instr(RC.CAPACITY_NUMBER, #{con}) > 0)
+        </if>
         )
         <where>
             <if test="capacityNumber != null">