浏览代码

Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/DAL-DAZHOU-API

Your Name 3 年之前
父节点
当前提交
af777d149d

+ 29 - 4
src/main/java/com/steerinfo/dil/controller/AMScontroller.java

@@ -1101,8 +1101,8 @@ public class AMScontroller{
                                                            Integer apiId,
                                                            Integer pageNum,
                                                            Integer pageSize,
-                                                           Integer carrierId){
-        return  amsFeign.selectDispatchSaleOrderList(mapValue==null ?new HashMap<>():mapValue, apiId, pageNum, pageSize,carrierId);
+                                                           String carrierSSOId){
+        return  amsFeign.selectDispatchSaleOrderList(mapValue==null ?new HashMap<>():mapValue, apiId, pageNum, pageSize,carrierSSOId);
     }
 
     //获取到站名称
@@ -1498,11 +1498,36 @@ public class AMScontroller{
 
 
     //*******************************下拉框************************
-
-
     @GetMapping("getNoticeTypeId")
     @ApiOperation(value = "得到公告类型Id")
     public Map<String,Object> getNoticeTypeId(){
         return amsFeign.getNoticeTypeId();
     }
+
+
+    @ApiOperation(value = "展示车序号下的物资详情")
+    @PostMapping(value = "/getTruckNoMaterialList")
+    public RESTfulResult getTruckNoMaterialList(@RequestParam Integer saleOrderMaterialId) {
+        return amsFeign.getTruckNoMaterialList(saleOrderMaterialId);
+    }
+
+    @ApiOperation(value = "展示销售派单下的物资详情")
+    @PostMapping(value = "/getDispatchMaterialList")
+    public RESTfulResult getDispatchMaterialList(@RequestParam Integer dispatchId) {
+        return amsFeign.getDispatchMaterialList(dispatchId);
+    }
+
+
+    /**
+     * 展示销售订单下的物资详情
+     * @param saleOrderId
+     * @return
+     */
+    @ApiOperation(value="展示销售订单下的物资详情")
+    @PostMapping(value = "/getSaleMaterialList")
+    public RESTfulResult getSaleMaterialList(@RequestParam Integer saleOrderId){
+        return amsFeign.getSaleMaterialList(saleOrderId);
+    }
+
+
 }

+ 10 - 4
src/main/java/com/steerinfo/dil/controller/DilVersionController.java

@@ -20,13 +20,19 @@ public class DilVersionController {
     @Autowired
     DilVersionServiceImpl dilVersionService;
 
-    @ApiOperation(value = "查询版本号")
+    @ApiOperation(value = "查询APP版本号")
     @PostMapping("/checkVersion")
-    public String deleteTruckRailDayPlan() {
-        return dilVersionService.compareAppVersion();
+    public String getAppVersion() {
+        return dilVersionService.getAppVersion();
     }
 
-    @ApiOperation(value = "新增版本号")
+    @ApiOperation(value = "查询PDA版本号")
+    @PostMapping("/getPDAVersion")
+    public String getPDAVersion() {
+        return dilVersionService.getPDAVersion();
+    }
+
+    @ApiOperation(value = "新增APP版本号")
     @PostMapping("/addAppVersion/{version}")
     public String addAppVersion(@PathVariable("version") String version) {
         return dilVersionService.addAppVersion(version);

+ 38 - 3
src/main/java/com/steerinfo/dil/controller/RMScontroller.java

@@ -420,9 +420,10 @@ public class RMScontroller {
                                                Integer pageNum,
                                                Integer pageSize,
                                                Integer apiId,
-                                               String con) {
+                                               String con,
+                                               String carrierSSOId) {
 
-        return rmsFeign.getCapacityList(mapValue==null?new HashMap<>():mapValue, pageNum, pageSize, apiId,con);
+        return rmsFeign.getCapacityList(mapValue==null?new HashMap<>():mapValue, pageNum, pageSize, apiId,con,carrierSSOId);
     }
 
     @ApiOperation(value="新增汽车衡信息", notes="根据rmsCapacity对象创建")
@@ -986,6 +987,41 @@ public class RMScontroller {
         return rmsFeign.upLoadPhoto(file);
     }
 
+    /**
+     * 得到二级部门的下拉
+     * @return
+     */
+    @GetMapping("/getSecondShipper")
+    public Map<String,Object> getSecondShipper() {
+        return  rmsFeign.getSecondShipper();
+    }
+
+    /**
+     * 得到三级部门的下拉
+     * @return
+     */
+    @GetMapping("/getThirdShipper")
+    public Map<String,Object> getThirdShipper(@RequestParam Integer shipperId) {
+        return  rmsFeign.getThirdShipper(shipperId);
+    }
+
+    /**
+     * 新增人员权限
+     * @return
+     */
+    @PostMapping("/addPersonnel")
+    public Map<String,Object> addPersonnel(@RequestBody Map<String,Object> map) {
+        return  rmsFeign.addPersonnel(map);
+    }
+
+    /**
+     * 查询SSO主键和机构编码
+     * @return
+     */
+    @PostMapping("/getShipperMap")
+    public Map<String,Object> getShipperMap(@RequestParam Integer shipperId) {
+        return  rmsFeign.getShipperMap(shipperId);
+    }
     //根据运力id查询承运商
     @PostMapping(value = "getCarrierNameById/{id}")
     public Map<String,Object> getCarrierNameById(@PathVariable("id") BigDecimal id){
@@ -1019,5 +1055,4 @@ public class RMScontroller {
     public Map<String,Object>  deleteShipperResult(@RequestBody(required = false) Map<String, Object> map){
         return rmsFeign.deleteShipperResult(map);
     }
-
 }

+ 31 - 0
src/main/java/com/steerinfo/dil/controller/UniversalController.java

@@ -411,4 +411,35 @@ public class UniversalController extends BaseRESTfulController {
         return success(data);
     }
 
+    @ApiModelProperty(value = "模糊查询收货单位")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "apiId", value = "418", required = false, dataType = "BigDecimal")
+    })
+    @PostMapping("/getConsigneeListByLike")
+    public RESTfulResult getConsigneeListByLike(@RequestBody(required = false) Map<String,Object> mapValue,
+                                              Integer apiId,
+                                              Integer pageNum,
+                                              Integer pageSize,
+                                              String index) {
+        if(index != null){
+            if(index.length() == 0){
+                index = null;
+            }else {
+                index = "%" + index + "%";
+            }
+        }
+        if (mapValue == null) {
+            mapValue = new HashMap<>();
+        }
+        mapValue.put("index",index);
+        List<Map<String, Object>> list = universalMapper.getConsigneeListByLike(mapValue);
+        PageHelper.startPage(pageNum, pageSize);
+        //分页查询数据
+        List<Map<String, Object>> columnList = universalMapper.getConsigneeListByLike(mapValue);
+        PageListAdd data = columnDataUtil.tableColumnData(apiId, list, columnList);
+        return success(data);
+    }
+
 }

+ 9 - 1
src/main/java/com/steerinfo/dil/feign/AmsFeign.java

@@ -596,7 +596,7 @@ public interface AmsFeign {
                                                    @RequestParam("apiId") Integer apiId,
                                                    @RequestParam("pageNum") Integer pageNum,
                                                    @RequestParam("pageSize") Integer pageSize,
-                                                   @RequestParam("carrierId") Integer carrierId);
+                                                   @RequestParam("carrierSSOId") String carrierSSOId);
 
     /**
      * 新增销售订单物资信息
@@ -1406,4 +1406,12 @@ public interface AmsFeign {
     @GetMapping(value = "api/v1/ams/dilnotices/getNoticeTypeId")
     Map<String,Object> getNoticeTypeId();
 
+    @PostMapping(value = "api/v1/ams/amssaleordermaterials/getTruckNoMaterialList")
+    RESTfulResult getTruckNoMaterialList(@RequestParam Integer saleOrderMaterialId);
+
+    @PostMapping(value = "api/v1/ams/amssaleordermaterials/getSaleMaterialList")
+    RESTfulResult getSaleMaterialList(@RequestParam Integer saleOrderId);
+
+    @PostMapping(value = "api/v1/ams/amsdispatchsaleorders/getDispatchMaterialList")
+    RESTfulResult getDispatchMaterialList(@RequestParam Integer dispatchId);
 }

+ 17 - 1
src/main/java/com/steerinfo/dil/feign/RmsFeign.java

@@ -217,7 +217,8 @@ public interface RmsFeign {
                                         @RequestParam Integer pageNum,
                                         @RequestParam Integer pageSize,
                                         @RequestParam Integer apiId,
-                                        @RequestParam String con);
+                                        @RequestParam String con,
+                                        @RequestParam String carrierSSOId);
 
     //根据id获取运力详细信息
     @PostMapping(value = "api/v1/rms/rmscapacity/getCapacityById/{id}")
@@ -535,6 +536,21 @@ public interface RmsFeign {
     @PostMapping(value = "api/v1/rms/rmscardriver/upload")
     Map<String,Object> upLoadPhoto(@RequestParam("file") MultipartFile file);
 
+    // 得到二级部门的下拉
+    @GetMapping(value = "api/v1/rms/rmspersonnel/getSecondShipper")
+    Map<String, Object> getSecondShipper();
+
+    // 得到三级部门的下拉
+    @GetMapping(value = "api/v1/rms/rmspersonnel/getThirdShipper")
+    Map<String, Object> getThirdShipper(@RequestParam Integer shipperId);
+
+    // 新增人员权限
+    @PostMapping(value = "api/v1/rms/rmspersonnel/addPersonnel")
+    Map<String, Object> addPersonnel(@RequestBody Map<String, Object> map);
+
+    // 查询SSO主键和机构编码
+    @PostMapping(value = "api/v1/rms/rmspersonnel/getShipperMap")
+    Map<String, Object> getShipperMap(@RequestParam Integer shipperId);
     //根据运力id查询承运商名称
     @PostMapping(value = "api/v1/rms/rmscarrier/getCarrierNameById/{id}")
     Map<String,Object> getCarrierNameById(@PathVariable("id") BigDecimal id);

+ 5 - 2
src/main/java/com/steerinfo/dil/mapper/DilVersionMapper.java

@@ -14,8 +14,11 @@ public interface DilVersionMapper extends IBaseMapper<DilVersion, BigDecimal> {
     @Select("select max(DV.VERSION_ID) + 1 from DIL_VERSION")
     BigDecimal selectMaxId();
 
-    //查询最新的版本号
-    String compareVersion();
+    //查询最新的APP版本号
+    String getAppVersion();
+
+    //查询最新的PDA版本号
+    String getPDAVersion();
 
     //查询版本号是否已存在
     Integer getVersionId(String version);

+ 3 - 0
src/main/java/com/steerinfo/dil/mapper/UniversalMapper.java

@@ -61,4 +61,7 @@ public interface UniversalMapper {
 
     //边输边查卸货点
     List<Map<String, Object>> selectUnloadingPoint(String index);
+
+    // 模糊查询收货单位
+    List<Map<String, Object>> getConsigneeListByLike(Map<String, Object> mapValue);
 }

+ 15 - 0
src/main/java/com/steerinfo/dil/model/DilVersion.java

@@ -50,6 +50,12 @@ public class DilVersion implements IBasePO<BigDecimal> {
     @ApiModelProperty(value="记录创建或修改备注",required=false)
     private String insertUpdateRemark;
 
+    /**
+     * 版本类型(0:APP   1:PDA)(VERSION_TYPE,DECIMAL,0)
+     */
+    @ApiModelProperty(value="版本类型(0:APP   1:PDA)",required=false)
+    private Short versionType;
+
     private static final long serialVersionUID = 1L;
 
     @Override
@@ -118,6 +124,14 @@ public class DilVersion implements IBasePO<BigDecimal> {
         this.insertUpdateRemark = insertUpdateRemark == null ? null : insertUpdateRemark.trim();
     }
 
+    public Short getVersionType() {
+        return versionType;
+    }
+
+    public void setVersionType(Short versionType) {
+        this.versionType = versionType;
+    }
+
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
@@ -131,6 +145,7 @@ public class DilVersion implements IBasePO<BigDecimal> {
         sb.append(", updateUsername=").append(updateUsername);
         sb.append(", updateTime=").append(updateTime);
         sb.append(", insertUpdateRemark=").append(insertUpdateRemark);
+        sb.append(", versionType=").append(versionType);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();

+ 1 - 1
src/main/java/com/steerinfo/dil/service/IDilVersionService.java

@@ -20,7 +20,7 @@ import java.math.BigDecimal;
  */
 public interface IDilVersionService{
 
-    String compareAppVersion();
+    String getAppVersion();
 
     String addAppVersion(String version);
 

+ 13 - 4
src/main/java/com/steerinfo/dil/service/impl/DilVersionServiceImpl.java

@@ -32,12 +32,21 @@ public class DilVersionServiceImpl implements IDilVersionService {
 
 
     /**
-     * 传入版本号查询是否为最新版本
-     * @return 0 不需要更新  1 需要更新
+     * 查询最新版本
+     * @return 版本号
      */
-    public String compareAppVersion(){
+    public String getAppVersion(){
         //查找当前最新版本号
-        return  dilVersionMapper.compareVersion();
+        return  dilVersionMapper.getAppVersion();
+    }
+
+    /**
+     * 查询PDA最新版本号
+     * @return
+     */
+    public String getPDAVersion(){
+        //查询PDA当前最新版本号
+        return dilVersionMapper.getPDAVersion();
     }
 
     /**

+ 129 - 93
src/main/resources/com/steerinfo/dil/mapper/DilVersionMapper.xml

@@ -9,23 +9,24 @@
     <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
     <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
     <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
+    <result column="VERSION_TYPE" jdbcType="DECIMAL" property="versionType" />
   </resultMap>
   <sql id="columns">
     VERSION_ID, VERSION_VALUE, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, 
-    INSERT_UPDATE_REMARK
+    INSERT_UPDATE_REMARK, VERSION_TYPE
   </sql>
   <sql id="columns_alias">
     t.VERSION_ID, t.VERSION_VALUE, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, 
-    t.UPDATE_TIME, t.INSERT_UPDATE_REMARK
+    t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.VERSION_TYPE
   </sql>
   <sql id="select">
-    SELECT <include refid="columns"/> FROM DIL_VERSION
+    SELECT <include refid="columns" /> FROM DIL_VERSION
   </sql>
   <sql id="select_alias">
-    SELECT <include refid="columns_alias"/> FROM DIL_VERSION t
+    SELECT <include refid="columns_alias" /> FROM DIL_VERSION t
   </sql>
   <sql id="where">
-    <where> 
+    <where>
       <if test="versionId != null">
         and VERSION_ID = #{versionId}
       </if>
@@ -47,10 +48,13 @@
       <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
         and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
       </if>
+      <if test="versionType != null">
+        and VERSION_TYPE = #{versionType}
+      </if>
     </where>
   </sql>
   <sql id="whereLike">
-    <where> 
+    <where>
       <if test="versionId != null">
         and VERSION_ID = #{versionId}
       </if>
@@ -72,6 +76,9 @@
       <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
         and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
       </if>
+      <if test="versionType != null">
+        and VERSION_TYPE = #{versionType}
+      </if>
     </where>
   </sql>
   <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
@@ -80,33 +87,36 @@
   </delete>
   <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
     delete from DIL_VERSION
-    where 1!=1 
-      <if test="versionValue != null and versionValue != ''">
-        or VERSION_VALUE = #{versionValue}
-      </if>
-      <if test="insertUsername != null and insertUsername != ''">
-        or INSERT_USERNAME = #{insertUsername}
-      </if>
-      <if test="insertTime != null">
-        or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
-      </if>
-      <if test="updateUsername != null and updateUsername != ''">
-        or UPDATE_USERNAME = #{updateUsername}
-      </if>
-      <if test="updateTime != null">
-        or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
-      </if>
-      <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
-        or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
-      </if>
+    where 1!=1
+    <if test="versionValue != null and versionValue != ''">
+      or VERSION_VALUE = #{versionValue}
+    </if>
+    <if test="insertUsername != null and insertUsername != ''">
+      or INSERT_USERNAME = #{insertUsername}
+    </if>
+    <if test="insertTime != null">
+      or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
+    </if>
+    <if test="updateUsername != null and updateUsername != ''">
+      or UPDATE_USERNAME = #{updateUsername}
+    </if>
+    <if test="updateTime != null">
+      or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
+    </if>
+    <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
+      or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
+    </if>
+    <if test="versionType != null">
+      or VERSION_TYPE = #{versionType}
+    </if>
   </delete>
   <insert id="insert" parameterType="com.steerinfo.dil.model.DilVersion">
-    insert into DIL_VERSION (VERSION_ID, VERSION_VALUE, INSERT_USERNAME, 
-      INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, 
-      INSERT_UPDATE_REMARK)
-    values (#{versionId,jdbcType=DECIMAL}, #{versionValue,jdbcType=VARCHAR}, #{insertUsername,jdbcType=VARCHAR}, 
-      #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, 
-      #{insertUpdateRemark,jdbcType=VARCHAR})
+    insert into DIL_VERSION (VERSION_ID, VERSION_VALUE, INSERT_USERNAME,
+                             INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME,
+                             INSERT_UPDATE_REMARK, VERSION_TYPE)
+    values (#{versionId,jdbcType=DECIMAL}, #{versionValue,jdbcType=VARCHAR}, #{insertUsername,jdbcType=VARCHAR},
+            #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
+            #{insertUpdateRemark,jdbcType=VARCHAR}, #{versionType,jdbcType=DECIMAL})
   </insert>
   <insert id="insertSelective" parameterType="com.steerinfo.dil.model.DilVersion">
     insert into DIL_VERSION
@@ -132,6 +142,9 @@
       <if test="insertUpdateRemark != null">
         INSERT_UPDATE_REMARK,
       </if>
+      <if test="versionType != null">
+        VERSION_TYPE,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="versionId != null">
@@ -155,16 +168,20 @@
       <if test="insertUpdateRemark != null">
         #{insertUpdateRemark,jdbcType=VARCHAR},
       </if>
+      <if test="versionType != null">
+        #{versionType,jdbcType=DECIMAL},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.DilVersion">
     update DIL_VERSION
     set VERSION_VALUE = #{versionValue,jdbcType=VARCHAR},
-      INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
-      INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
-      UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
-      UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
-      INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR}
+        INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
+        INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
+        UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
+        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+        INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
+        VERSION_TYPE = #{versionType,jdbcType=DECIMAL}
     where VERSION_ID = #{versionId,jdbcType=DECIMAL}
   </update>
   <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.DilVersion">
@@ -188,88 +205,95 @@
       <if test="insertUpdateRemark != null">
         INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
       </if>
+      <if test="versionType != null">
+        VERSION_TYPE = #{versionType,jdbcType=DECIMAL},
+      </if>
     </set>
     where VERSION_ID = #{versionId,jdbcType=DECIMAL}
   </update>
   <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
-    <include refid="select"/>
+    <include refid="select" />
     where VERSION_ID = #{versionId,jdbcType=DECIMAL}
   </select>
   <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
-    <include refid="select"/>
-    <include refid="where"/>
+    <include refid="select" />
+    <include refid="where" />
   </select>
   <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
-    <include refid="select"/>
-    <include refid="whereLike"/>
+    <include refid="select" />
+    <include refid="whereLike" />
   </select>
   <insert id="batchInsert" parameterType="java.util.List">
-    insert into DIL_VERSION 
-      (VERSION_ID, 
-      VERSION_VALUE, INSERT_USERNAME, 
-      INSERT_TIME, UPDATE_USERNAME, 
-      UPDATE_TIME, INSERT_UPDATE_REMARK
-      )
-    ( <foreach collection="list" item="item" separator="union all"> 
-   select  
-      #{item.versionId,jdbcType=DECIMAL}, 
-      #{item.versionValue,jdbcType=VARCHAR}, #{item.insertUsername,jdbcType=VARCHAR}, 
-      #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR}, 
-      #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR}
-       from dual  
-   </foreach> )
+    insert into DIL_VERSION
+    (VERSION_ID,
+    VERSION_VALUE, INSERT_USERNAME,
+    INSERT_TIME, UPDATE_USERNAME,
+    UPDATE_TIME, INSERT_UPDATE_REMARK,
+    VERSION_TYPE)
+    ( <foreach collection="list" item="item" separator="union all">
+    select
+    #{item.versionId,jdbcType=DECIMAL},
+    #{item.versionValue,jdbcType=VARCHAR}, #{item.insertUsername,jdbcType=VARCHAR},
+    #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
+    #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR},
+    #{item.versionType,jdbcType=DECIMAL} from dual
+  </foreach> )
   </insert>
   <update id="batchUpdate" parameterType="java.util.List">
-     update DIL_VERSION
-     set
-       VERSION_ID=
-       <foreach collection="list" item="item" index="index" separator=" " open="case VERSION_ID" close="end">
-          when #{item.versionId,jdbcType=DECIMAL} then #{item.versionId,jdbcType=DECIMAL}
-       </foreach>
-       ,VERSION_VALUE=
-       <foreach collection="list" item="item" index="index" separator=" " open="case VERSION_ID" close="end">
-          when #{item.versionId,jdbcType=DECIMAL} then #{item.versionValue,jdbcType=VARCHAR}
-       </foreach>
-       ,INSERT_USERNAME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case VERSION_ID" close="end">
-          when #{item.versionId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
-       </foreach>
-       ,INSERT_TIME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case VERSION_ID" close="end">
-          when #{item.versionId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
-       </foreach>
-       ,UPDATE_USERNAME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case VERSION_ID" close="end">
-          when #{item.versionId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
-       </foreach>
-       ,UPDATE_TIME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case VERSION_ID" close="end">
-          when #{item.versionId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
-       </foreach>
-       ,INSERT_UPDATE_REMARK=
-       <foreach collection="list" item="item" index="index" separator=" " open="case VERSION_ID" close="end">
-          when #{item.versionId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
-       </foreach>
-     where VERSION_ID in 
-     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
-    #{item.versionId,jdbcType=DECIMAL}
-     </foreach> 
+    update DIL_VERSION
+    set
+    VERSION_ID=
+    <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
+      when #{item.versionId,jdbcType=DECIMAL} then #{item.versionId,jdbcType=DECIMAL}
+    </foreach>
+    ,VERSION_VALUE=
+    <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
+      when #{item.versionId,jdbcType=DECIMAL} then #{item.versionValue,jdbcType=VARCHAR}
+    </foreach>
+    ,INSERT_USERNAME=
+    <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
+      when #{item.versionId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
+    </foreach>
+    ,INSERT_TIME=
+    <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
+      when #{item.versionId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
+    </foreach>
+    ,UPDATE_USERNAME=
+    <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
+      when #{item.versionId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
+    </foreach>
+    ,UPDATE_TIME=
+    <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
+      when #{item.versionId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
+    </foreach>
+    ,INSERT_UPDATE_REMARK=
+    <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
+      when #{item.versionId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
+    </foreach>
+    ,VERSION_TYPE=
+    <foreach close="end" collection="list" index="index" item="item" open="case VERSION_ID" separator=" ">
+      when #{item.versionId,jdbcType=DECIMAL} then #{item.versionType,jdbcType=DECIMAL}
+    </foreach>
+    where VERSION_ID in
+    <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
+      #{item.versionId,jdbcType=DECIMAL}
+    </foreach>
   </update>
   <delete id="batchDelete" parameterType="java.util.List">
     delete from DIL_VERSION
-    where VERSION_ID in 
-    <foreach collection="list" item="id" open="(" close=")" separator=",">
+    where VERSION_ID in
+    <foreach close=")" collection="list" item="id" open="(" separator=",">
       #{id}
     </foreach>
   </delete>
   <!-- 友情提示!!!-->
   <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
-
-  <select id="compareVersion" resultType="string">
+  <select id="getAppVersion" resultType="string">
     select *
     from (
            select DV.VERSION_VALUE
            from DIL_VERSION DV
+           where DV.VERSION_TYPE = 0
            order by DV.VERSION_ID desc
          )
     where ROWNUM = 1
@@ -281,4 +305,16 @@
     where DV.VERSION_VALUE = #{versionValue}
   </select>
 
+
+  <select id="getPDAVersion" resultType="java.lang.String">
+    select *
+    from (
+           select DV.VERSION_VALUE
+           from DIL_VERSION DV
+           where DV.VERSION_TYPE = 1
+           order by DV.VERSION_ID desc
+         )
+    where ROWNUM = 1
+  </select>
+
 </mapper>

+ 13 - 1
src/main/resources/com/steerinfo/dil/mapper/UniversalMapper.xml

@@ -314,7 +314,7 @@
                 RM.MATERIAL_CODE LIKE #{startNum}
             </if>
             <if test="startNum == null">
-                RM.MATERIAL_CODE LIKE '010%' OR RM.MATERIAL_CODE LIKE '0801%'
+                RM.MATERIAL_CODE LIKE '010%' OR RM.MATERIAL_CODE LIKE '080%'
             </if>
         </where>
         )
@@ -489,4 +489,16 @@
               </if>
         order by "warehouseName"
     </select>
+
+    <!-- 模糊查询收货单位 -->
+    <select id="getConsigneeListByLike" parameterType="java.util.Map" resultType="java.util.Map" >
+        SELECT
+        RC.CONSIGNEE_COMPANY_NAME AS "consigneeCompanyName"
+        FROM RMS_CONSIGNEE RC
+        WHERE
+        <if test="index != null">
+            RC.CONSIGNEE_COMPANY_NAME like #{index}
+        </if>
+        order by "consigneeCompanyName"
+    </select>
 </mapper>