Kaynağa Gözat

Merge branch 'master' of https://gitee.com/antai-wuliu/ANTAI-API

dengpan 1 yıl önce
ebeveyn
işleme
2ff8e76e08

+ 2 - 0
src/main/java/com/steerinfo/dil/controller/RMScontroller.java

@@ -499,6 +499,7 @@ public class RMScontroller extends BaseRESTfulController {
         Map<String, Object> map = new HashMap<>();
         //获取Excel中包含的对象数组
         List<Map<String, Object>> list = ExcelToolUtils.getExcelList(file, 0);
+        map.put("list", list);
         Set<String> set = new HashSet<>();
         for (Map<String, Object> item : list) {
             //校验行
@@ -694,6 +695,7 @@ public class RMScontroller extends BaseRESTfulController {
             ){
                 throw new Exception("单元格数据异常,请检查模板或数据是否正确!");
             }
+            item.put("车号",item.get("车号").toString().toUpperCase());
             //隔开用于查询是否数据库存在
             set.add(item.get("车号").toString());
             //key-value结构方便数据库去重后获取值

+ 3 - 0
src/main/java/com/steerinfo/dil/util/ExcelToolUtils.java

@@ -494,6 +494,9 @@ public class ExcelToolUtils {
                 //遍历除表头外的所有行
                 for (int rowNum = startRow+1; rowNum <= lastRowNum; rowNum++) {
                     row = sheet.getRow(rowNum);
+                    if(row == null){
+                        continue;
+                    }
                     //遍历行的所有列
                     Map<String,Object> item = new HashMap<>();
                     for (int cellNum = firstCellNum; cellNum < lastCellNum; cellNum++) {

+ 5 - 3
src/main/resources/application-prod.yml

@@ -26,16 +26,18 @@ openfeign:
   ColumnDataFeign:
     url: ${COLUMNDATAFEIGN_URL:172.16.90.202:80}
   AmsFeign:
-    url: ${AMSFEIGN_URL:172.16.90.202:8079}
+    url: ${AMSFEIGN_URL:172.16.90.202:80}
+#    url: ${RMSFEIGN_URL:localhost:8079}
   TmsFeign:
     url: ${TMSFEIGN_URL:172.16.90.202:80}
+#    url: ${RMSFEIGN_URL:localhost:8086}
   WMSFeign:
     url: ${WMSFEIGN_URL:172.16.90.202:80}
   RmsFeign:
-    url: ${RMSFEIGN_URL:172.16.90.202:8060}
+    url: ${RMSFEIGN_URL:172.16.90.202:80}
 #    url: ${RMSFEIGN_URL:localhost:8060}
   EmsFeign:
-    url: ${EMSFEIGN_URL:172.16.90.202:8000}
+    url: ${EMSFEIGN_URL:172.16.90.202:80}
   SSOFeign:
     url: ${SSOFEIGN_URL:172.16.90.202:80}
   WebSocketFeign:

+ 6 - 34
src/main/resources/com/steerinfo/dil/mapper/CommonMapper.xml

@@ -2,41 +2,13 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.steerinfo.dil.mapper.CommonMapper">
     <sql id="orderBy">
-        <if test="orderField != null and orderField != ''">
-            order by "${orderField}"
-            <if test="orderType != null and orderType != ''">
-                ${orderType}
+        <if test="orderByField!=null and orderByField !=''">
+            order by "${orderByField}"
+            <if test="orderByType == 'desc'">
+                desc
             </if>
-        </if>
-    </sql>
-    <sql id="timeFilter">
-        <if test="oneDate != null">
-            and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= ${timeFilterProp}
-        </if>
-        <if test="startDate != null">
-            and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= ${timeFilterProp}
-            and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= ${timeFilterProp}
-        </if>
-    </sql>
-    <sql id="companyFilter">
-        <if test="${companyType} != null">
-            <if test="!roleCodes.contains('admin') and dilCompanyList != null and dilCompanyList.size > 0">
-                AND ${prop}
-                in
-                <foreach collection="dilCompanyList" item="item" open="(" close=")" separator=",">
-                    <if test="item.companyType == ${companyType}">
-                        #{item.companyId}
-                    </if>
-                </foreach>
-            </if>
-        </if>
-        <if test="${companyType} == null">
-            <if test="!roleCodes.contains('admin') and dilCompanyList != null and dilCompanyList.size > 0">
-                AND ${prop}
-                in
-                <foreach collection="dilCompanyList" item="item" open="(" close=")" separator=",">
-                    #{item.companyId}
-                </foreach>
+            <if test="orderByType == 'asc'">
+                asc
             </if>
         </if>
     </sql>

+ 15 - 25
src/main/resources/com/steerinfo/dil/mapper/OmstruckOrderMapper.xml

@@ -806,16 +806,6 @@
     <!-- 友情提示!!!-->
     <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
 
-    <!--  根据插入时间排序  -->
-    <sql id="orderBy">
-        <if test="orderField != null and orderField != ''">
-            order by "${orderField}"
-            <if test="orderType != null and orderType != ''">
-                ${orderType}
-            </if>
-        </if>
-    </sql>
-
     <!--  查询运输订单 -->
     <select id="getAllTruckOrder" parameterType="java.util.Map" resultType="java.util.LinkedHashMap">
         select
@@ -988,7 +978,7 @@
                 </foreach>
             </if>
         </where>
-        <include refid="orderBy">
+        <include refid="com.steerinfo.dil.mapper.CommonMapper.orderBy">
         </include>
         <if test="orderField == null  ">
             order by "insertTime" desc
@@ -1065,7 +1055,7 @@
                 </foreach>
             </if>
         </where>
-        <include refid="orderBy">
+        <include refid="com.steerinfo.dil.mapper.CommonMapper.orderBy">
         </include>
         <if test="orderField == null  ">
             order by "insertTime" desc
@@ -1205,7 +1195,7 @@
                 </foreach>
             </if>
         </where>
-        <include refid="orderBy">
+        <include refid="com.steerinfo.dil.mapper.CommonMapper.orderBy">
         </include>
         <if test="orderField == null  ">
             order by "orderReceiveRefuseTime" desc
@@ -1321,7 +1311,7 @@
                 </foreach>
             </if>
         </where>
-        <include refid="orderBy">
+        <include refid="com.steerinfo.dil.mapper.CommonMapper.orderBy">
         </include>
         <if test="orderField == null  ">
             order by "insertTime" desc
@@ -1635,7 +1625,7 @@
                 </foreach>
             </if>
         </where>
-        <include refid="orderBy">
+        <include refid="com.steerinfo.dil.mapper.CommonMapper.orderBy">
         </include>
         <if test="orderField == null  ">
             order by "orderReceiveRefuseTime" desc
@@ -1996,7 +1986,7 @@
                 </foreach>
             </if>
         </where>
-        <include refid="orderBy">
+        <include refid="com.steerinfo.dil.mapper.CommonMapper.orderBy">
         </include>
         <if test="orderField == null  ">
             order by "orderNumber" desc
@@ -2120,7 +2110,7 @@
                 </foreach>
             </if>
         </where>
-        <include refid="orderBy">
+        <include refid="com.steerinfo.dil.mapper.CommonMapper.orderBy">
         </include>
         <if test="orderField == null  ">
             order by "orderNumber" desc
@@ -2185,7 +2175,7 @@
         LEFT JOIN RMS_RECEIVE_ADDRESS RRA ON ASOM.SALE_SHIPPING_ADDRESS_ID = RRA.ADDRESS_ID
         WHERE
         ASOM.SALE_ORDER_MATERIAL_ID=#{saleOrderMaterialId}
-        <include refid="orderBy"></include>
+        <include refid="com.steerinfo.dil.mapper.CommonMapper.orderBy"></include>
     </select>
 
 
@@ -2275,7 +2265,7 @@
         <!--    </if>-->
         <!--  </if>-->
         <!--</where>-->
-        <!--    <include refid="orderBy">-->
+        <!--    <include refid="com.steerinfo.dil.mapper.CommonMapper.orderBy">-->
         <!--    </include>-->
         <!--    <if test="orderField == null  ">-->
         <!--      order by "insertTime" desc-->
@@ -2337,7 +2327,7 @@
         <!--    </if>-->
         <!--  </if>-->
         <!--</where>-->
-        <include refid="orderBy"></include>
+        <include refid="com.steerinfo.dil.mapper.CommonMapper.orderBy"></include>
     </select>
 
 
@@ -2421,7 +2411,7 @@
                 and OO.ORDER_TYPE = #{orderTypee}
             </if>
         </where>
-        <include refid="orderBy"></include>
+        <include refid="com.steerinfo.dil.mapper.CommonMapper.orderBy"></include>
     </select>
     <!--销售查询已经形成水渣日计划  -->
     <select id="selectWaterSlagForOrder" resultType="java.util.Map" parameterType="java.util.Map">
@@ -2464,7 +2454,7 @@
             </if>
         </where>
         )
-        <include refid="orderBy"></include>
+        <include refid="com.steerinfo.dil.mapper.CommonMapper.orderBy"></include>
     </select>
     <!--销售查询已经形成订单得水渣日计划-->
     <select id="selectCokeRailPlanForOrder" resultType="java.util.Map" parameterType="java.util.Map">
@@ -2509,7 +2499,7 @@
             </if>
         </where>
         )
-        <include refid="orderBy"></include>
+        <include refid="com.steerinfo.dil.mapper.CommonMapper.orderBy"></include>
     </select>
     <!-- 根据承运商查找销售订单-->
     <select id="selectSteelSaleForCarrier" resultType="java.util.LinkedHashMap" parameterType="java.lang.Integer">
@@ -2880,7 +2870,7 @@
                 </foreach>
             </if>
         </where>
-        <include refid="orderBy"></include>
+        <include refid="com.steerinfo.dil.mapper.CommonMapper.orderBy"></include>
     </select>
 
     <select id="getResultList" parameterType="DECIMAL" resultType="java.util.Map">
@@ -3678,7 +3668,7 @@
                 </foreach>
             </if>
         </where>
-        <include refid="orderBy">
+        <include refid="com.steerinfo.dil.mapper.CommonMapper.orderBy">
         </include>
     </select>
 

+ 5 - 2
src/main/resources/com/steerinfo/dil/mapper/UniversalMapper.xml

@@ -132,7 +132,7 @@
             <where>
                 DELETED = 0
                 <if test="companyType!=null and companyType!=''">
-                    AND RC.COMPANY_TYPE = #{companyType}
+                    AND REGEXP_LIKE(RC.COMPANY_TYPE, #{companyType})
                 </if>
                 <if test="companyId!=null and companyId!=''">
                     AND RC.COMPANY_ID = #{companyId}
@@ -300,7 +300,6 @@
         OPERATION_POINT_ID "value",
         OPERATION_POINT_CODE || '-' || OPERATION_POINT_NAME "label",
         OPERATION_POINT_CODE || '-' || OPERATION_POINT_NAME "text"
-
         from RMS_OPERATION_POINT
         <where>
             DELETED = 0
@@ -320,6 +319,7 @@
                 AND ALTERNATE_FIELDS1 = #{sourceFlag}
             </if>
         </where>
+        order by LENGTH(OPERATION_POINT_CODE || '-' || OPERATION_POINT_NAME)
         FETCH NEXT 10 ROWS ONLY
     )
     <if test="id!=null and id.size>0">
@@ -388,6 +388,9 @@
             <if test="index!=null and index!=''">
                 AND REGEXP_LIKE("label", #{index})
             </if>
+            <if test="personnelName!=null and personnelName!=''">
+                AND REGEXP_LIKE("label", #{personnelName})
+            </if>
             <if test="lastIndex!=null">
                 and "personnelId" &lt; #{lastIndex}
             </if>