Jelajahi Sumber

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

luobang 3 tahun lalu
induk
melakukan
0530045d92

+ 12 - 3
src/main/java/com/steerinfo/dil/controller/RmsCapacityController.java

@@ -61,7 +61,7 @@ public class RmsCapacityController extends BaseRESTfulController {
 
     /**
      * 根据id更新运力信息
-     * @param rmsCapacity
+     * @param map
      * @return
      */
     @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的rmsCapacity信息来更新详细信息")
@@ -70,8 +70,8 @@ public class RmsCapacityController extends BaseRESTfulController {
             @ApiImplicitParam(name = "rmsCapacity", value = "详细实体rmsCapacity", required = true, dataType = "RmsCapacity")
     })
     @PostMapping(value = "/updateCapacity", produces  = "application/json;charset=UTF-8")
-    public RESTfulResult updateCapacity( @RequestBody RmsCapacity rmsCapacity){
-        int result = rmsCapacityService.updateCapacity(rmsCapacity);
+    public RESTfulResult updateCapacity( @RequestBody Map<String,Object> map){
+        int result = rmsCapacityService.updateCapacity(map);
         return success(result);
     }
 
@@ -109,6 +109,15 @@ public class RmsCapacityController extends BaseRESTfulController {
         return success(resultList);
     }
 
+
+    @ApiOperation(value="获取运力详细信息", notes="根据url的id来获取详细信息")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "BigDecimal")
+    @PostMapping(value = "/getCapacityInfoById/{id}")
+    public RESTfulResult getCapacityInfoById(@PathVariable("id") Integer id) throws Exception {
+        List<Map<String,Object>> list= rmsCapacityService.getCapacityByCapacityId(id);
+        return success(list);
+    }
+
     /*
     * 运力类型下拉框
     * */

+ 2 - 0
src/main/java/com/steerinfo/dil/mapper/RmsCapacityMapper.java

@@ -39,4 +39,6 @@ public interface RmsCapacityMapper extends IBaseMapper<RmsCapacity, BigDecimal>
 
  //逻辑删除
  int updateCapacityCarrier(@Param("capacityId") String capacityId,@Param("carrierSSOId")  String carrierSSOId);
+
+ List<Map<String, Object>> getCapacityByCapacityId(Integer id);
 }

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

@@ -62,6 +62,12 @@ public class RmsCapacityCarrier implements IBasePO<BigDecimal> {
     @ApiModelProperty(value="逻辑删除0:未删除;1:已删除",required=false)
     private BigDecimal deleted;
 
+    /**
+     * 使用单位(CAPACITY_USER_DEP,VARCHAR,255)
+     */
+    @ApiModelProperty(value="使用单位",required=false)
+    private String capacityUserDep;
+
     private static final long serialVersionUID = 1L;
 
     @Override
@@ -146,6 +152,14 @@ public class RmsCapacityCarrier implements IBasePO<BigDecimal> {
         this.deleted = deleted;
     }
 
+    public String getCapacityUserDep() {
+        return capacityUserDep;
+    }
+
+    public void setCapacityUserDep(String capacityUserDep) {
+        this.capacityUserDep = capacityUserDep == null ? null : capacityUserDep.trim();
+    }
+
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
@@ -161,6 +175,7 @@ public class RmsCapacityCarrier implements IBasePO<BigDecimal> {
         sb.append(", updateTime=").append(updateTime);
         sb.append(", insertUpdateRemark=").append(insertUpdateRemark);
         sb.append(", deleted=").append(deleted);
+        sb.append(", capacityUserDep=").append(capacityUserDep);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();

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

@@ -26,7 +26,7 @@ public interface IRmsCapacityService{
 
     int insertCapacity(Map<String,Object> mapValue);
 
-    int updateCapacity(RmsCapacity rmsCapacity);
+    int updateCapacity(Map<String,Object> map);
 
     int deleteCapacity(BigDecimal id);
 
@@ -39,4 +39,6 @@ public interface IRmsCapacityService{
     Map<String,Object> getCarrierNameBySSOId(String carrierSSOId);
 
     int deleteCapacityCarrier(String capacityId, String carrierId);
+
+    List<Map<String, Object>> getCapacityByCapacityId(Integer id);
 }

+ 16 - 4
src/main/java/com/steerinfo/dil/service/impl/RmsCapacityServiceImpl.java

@@ -113,10 +113,15 @@ public class RmsCapacityServiceImpl implements IRmsCapacityService {
     * 修改运力信息
     * */
     @Override
-    public int updateCapacity(RmsCapacity rmsCapacity) {
-        rmsCapacity.setUpdateTime(new Date());
-        rmsCapacity.setUpdateUsername("admin");
-        return rmsCapacityMapper.updateByPrimaryKeySelective(rmsCapacity);
+    public int updateCapacity(Map<String,Object> map) {
+        String remark = (String) map.get("remark");
+        String userDep =(String) map.get("userDep");
+        BigDecimal capacityCarrierId =DataChange.dataToBigDecimal(map.get("capacityCarrierId"));
+        RmsCapacityCarrier rmsCapacityCarrier=new RmsCapacityCarrier();
+        rmsCapacityCarrier.setCapacityCarrierId(capacityCarrierId);
+        rmsCapacityCarrier.setInsertUpdateRemark(remark);
+        rmsCapacityCarrier.setCapacityUserDep(userDep);
+        return rmsCapacityCarrierMapper.updateByPrimaryKeySelective(rmsCapacityCarrier);
     }
 
     /*
@@ -165,6 +170,13 @@ public class RmsCapacityServiceImpl implements IRmsCapacityService {
         return rmsCapacityMapper.updateCapacityCarrier(capacityId,carrierSSOId);
     }
 
+
+    //
+    @Override
+    public List<Map<String, Object>> getCapacityByCapacityId(Integer id) {
+        return rmsCapacityMapper.getCapacityByCapacityId(id);
+    }
+
     //获取承运商id
     @Override
     public List<Map<String, Object>> getCarrierId() {

+ 130 - 104
src/main/resources/com/steerinfo/dil/mapper/RmsCapacityCarrierMapper.xml

@@ -11,14 +11,15 @@
     <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
     <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
     <result column="DELETED" jdbcType="DECIMAL" property="deleted" />
+    <result column="CAPACITY_USER_DEP" jdbcType="VARCHAR" property="capacityUserDep" />
   </resultMap>
   <sql id="columns">
-    CAPACITY_CARRIER_ID, CAPACITY_ID, CARRIER_ID, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, 
-    UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED
+    CAPACITY_CARRIER_ID, CAPACITY_ID, CARRIER_ID, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
+    UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED, CAPACITY_USER_DEP
   </sql>
   <sql id="columns_alias">
-    t.CAPACITY_CARRIER_ID, t.CAPACITY_ID, t.CARRIER_ID, t.INSERT_USERNAME, t.INSERT_TIME, 
-    t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED
+    t.CAPACITY_CARRIER_ID, t.CAPACITY_ID, t.CARRIER_ID, t.INSERT_USERNAME, t.INSERT_TIME,
+    t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED, t.CAPACITY_USER_DEP
   </sql>
   <sql id="select">
     SELECT <include refid="columns" /> FROM RMS_CAPACITY_CARRIER
@@ -27,7 +28,7 @@
     SELECT <include refid="columns_alias" /> FROM RMS_CAPACITY_CARRIER t
   </sql>
   <sql id="where">
-    <where> 
+    <where>
       <if test="capacityCarrierId != null">
         and CAPACITY_CARRIER_ID = #{capacityCarrierId}
       </if>
@@ -55,10 +56,13 @@
       <if test="deleted != null">
         and DELETED = #{deleted}
       </if>
+      <if test="capacityUserDep != null and capacityUserDep != ''">
+        and CAPACITY_USER_DEP = #{capacityUserDep}
+      </if>
     </where>
   </sql>
   <sql id="whereLike">
-    <where> 
+    <where>
       <if test="capacityCarrierId != null">
         and CAPACITY_CARRIER_ID = #{capacityCarrierId}
       </if>
@@ -86,6 +90,9 @@
       <if test="deleted != null">
         and DELETED = #{deleted}
       </if>
+      <if test="capacityUserDep != null and capacityUserDep != ''">
+        and CAPACITY_USER_DEP LIKE '%${capacityUserDep}%'
+      </if>
     </where>
   </sql>
   <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
@@ -94,41 +101,44 @@
   </delete>
   <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
     delete from RMS_CAPACITY_CARRIER
-    where 1!=1 
-      <if test="capacityId != null">
-        or CAPACITY_ID = #{capacityId}
-      </if>
-      <if test="carrierId != null">
-        or CARRIER_ID = #{carrierId}
-      </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="deleted != null">
-        or DELETED = #{deleted}
-      </if>
+    where 1!=1
+    <if test="capacityId != null">
+      or CAPACITY_ID = #{capacityId}
+    </if>
+    <if test="carrierId != null">
+      or CARRIER_ID = #{carrierId}
+    </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="deleted != null">
+      or DELETED = #{deleted}
+    </if>
+    <if test="capacityUserDep != null and capacityUserDep != ''">
+      or CAPACITY_USER_DEP = #{capacityUserDep}
+    </if>
   </delete>
   <insert id="insert" parameterType="com.steerinfo.dil.model.RmsCapacityCarrier">
-    insert into RMS_CAPACITY_CARRIER (CAPACITY_CARRIER_ID, CAPACITY_ID, CARRIER_ID, 
-      INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, 
-      UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED
-      )
-    values (#{capacityCarrierId,jdbcType=DECIMAL}, #{capacityId,jdbcType=DECIMAL}, #{carrierId,jdbcType=DECIMAL}, 
-      #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, 
-      #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, #{deleted,jdbcType=DECIMAL}
-      )
+    insert into RMS_CAPACITY_CARRIER (CAPACITY_CARRIER_ID, CAPACITY_ID, CARRIER_ID,
+                                      INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
+                                      UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED,
+                                      CAPACITY_USER_DEP)
+    values (#{capacityCarrierId,jdbcType=DECIMAL}, #{capacityId,jdbcType=DECIMAL}, #{carrierId,jdbcType=DECIMAL},
+            #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR},
+            #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, #{deleted,jdbcType=DECIMAL},
+            #{capacityUserDep,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.steerinfo.dil.model.RmsCapacityCarrier">
     insert into RMS_CAPACITY_CARRIER
@@ -160,6 +170,9 @@
       <if test="deleted != null">
         DELETED,
       </if>
+      <if test="capacityUserDep != null">
+        CAPACITY_USER_DEP,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="capacityCarrierId != null">
@@ -189,18 +202,22 @@
       <if test="deleted != null">
         #{deleted,jdbcType=DECIMAL},
       </if>
+      <if test="capacityUserDep != null">
+        #{capacityUserDep,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.RmsCapacityCarrier">
     update RMS_CAPACITY_CARRIER
     set CAPACITY_ID = #{capacityId,jdbcType=DECIMAL},
-      CARRIER_ID = #{carrierId,jdbcType=DECIMAL},
-      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},
-      DELETED = #{deleted,jdbcType=DECIMAL}
+        CARRIER_ID = #{carrierId,jdbcType=DECIMAL},
+        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},
+        DELETED = #{deleted,jdbcType=DECIMAL},
+        CAPACITY_USER_DEP = #{capacityUserDep,jdbcType=VARCHAR}
     where CAPACITY_CARRIER_ID = #{capacityCarrierId,jdbcType=DECIMAL}
   </update>
   <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.RmsCapacityCarrier">
@@ -230,6 +247,9 @@
       <if test="deleted != null">
         DELETED = #{deleted,jdbcType=DECIMAL},
       </if>
+      <if test="capacityUserDep != null">
+        CAPACITY_USER_DEP = #{capacityUserDep,jdbcType=VARCHAR},
+      </if>
     </set>
     where CAPACITY_CARRIER_ID = #{capacityCarrierId,jdbcType=DECIMAL}
   </update>
@@ -246,68 +266,72 @@
     <include refid="whereLike" />
   </select>
   <insert id="batchInsert" parameterType="java.util.List">
-    insert into RMS_CAPACITY_CARRIER 
-      (CAPACITY_CARRIER_ID, 
-      CAPACITY_ID, CARRIER_ID, INSERT_USERNAME, 
-      INSERT_TIME, UPDATE_USERNAME, 
-      UPDATE_TIME, INSERT_UPDATE_REMARK, 
-      DELETED)
-    ( <foreach collection="list" item="item" separator="union all"> 
-   select  
-      #{item.capacityCarrierId,jdbcType=DECIMAL}, 
-      #{item.capacityId,jdbcType=DECIMAL}, #{item.carrierId,jdbcType=DECIMAL}, #{item.insertUsername,jdbcType=VARCHAR}, 
-      #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR}, 
-      #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR}, 
-      #{item.deleted,jdbcType=DECIMAL} from dual  
-   </foreach> )
+    insert into RMS_CAPACITY_CARRIER
+    (CAPACITY_CARRIER_ID,
+    CAPACITY_ID, CARRIER_ID, INSERT_USERNAME,
+    INSERT_TIME, UPDATE_USERNAME,
+    UPDATE_TIME, INSERT_UPDATE_REMARK,
+    DELETED, CAPACITY_USER_DEP)
+    ( <foreach collection="list" item="item" separator="union all">
+    select
+    #{item.capacityCarrierId,jdbcType=DECIMAL},
+    #{item.capacityId,jdbcType=DECIMAL}, #{item.carrierId,jdbcType=DECIMAL}, #{item.insertUsername,jdbcType=VARCHAR},
+    #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
+    #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR},
+    #{item.deleted,jdbcType=DECIMAL}, #{item.capacityUserDep,jdbcType=VARCHAR} from dual
+  </foreach> )
   </insert>
   <update id="batchUpdate" parameterType="java.util.List">
-     update RMS_CAPACITY_CARRIER
-     set
-       CAPACITY_CARRIER_ID=
-       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_CARRIER_ID" separator=" ">
-          when #{item.capacityCarrierId,jdbcType=DECIMAL} then #{item.capacityCarrierId,jdbcType=DECIMAL}
-       </foreach>
-       ,CAPACITY_ID=
-       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_CARRIER_ID" separator=" ">
-          when #{item.capacityCarrierId,jdbcType=DECIMAL} then #{item.capacityId,jdbcType=DECIMAL}
-       </foreach>
-       ,CARRIER_ID=
-       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_CARRIER_ID" separator=" ">
-          when #{item.capacityCarrierId,jdbcType=DECIMAL} then #{item.carrierId,jdbcType=DECIMAL}
-       </foreach>
-       ,INSERT_USERNAME=
-       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_CARRIER_ID" separator=" ">
-          when #{item.capacityCarrierId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
-       </foreach>
-       ,INSERT_TIME=
-       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_CARRIER_ID" separator=" ">
-          when #{item.capacityCarrierId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
-       </foreach>
-       ,UPDATE_USERNAME=
-       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_CARRIER_ID" separator=" ">
-          when #{item.capacityCarrierId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
-       </foreach>
-       ,UPDATE_TIME=
-       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_CARRIER_ID" separator=" ">
-          when #{item.capacityCarrierId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
-       </foreach>
-       ,INSERT_UPDATE_REMARK=
-       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_CARRIER_ID" separator=" ">
-          when #{item.capacityCarrierId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
-       </foreach>
-       ,DELETED=
-       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_CARRIER_ID" separator=" ">
-          when #{item.capacityCarrierId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
-       </foreach>
-     where CAPACITY_CARRIER_ID in 
-     <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
-    #{item.capacityCarrierId,jdbcType=DECIMAL}
-     </foreach> 
+    update RMS_CAPACITY_CARRIER
+    set
+    CAPACITY_CARRIER_ID=
+    <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_CARRIER_ID" separator=" ">
+      when #{item.capacityCarrierId,jdbcType=DECIMAL} then #{item.capacityCarrierId,jdbcType=DECIMAL}
+    </foreach>
+    ,CAPACITY_ID=
+    <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_CARRIER_ID" separator=" ">
+      when #{item.capacityCarrierId,jdbcType=DECIMAL} then #{item.capacityId,jdbcType=DECIMAL}
+    </foreach>
+    ,CARRIER_ID=
+    <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_CARRIER_ID" separator=" ">
+      when #{item.capacityCarrierId,jdbcType=DECIMAL} then #{item.carrierId,jdbcType=DECIMAL}
+    </foreach>
+    ,INSERT_USERNAME=
+    <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_CARRIER_ID" separator=" ">
+      when #{item.capacityCarrierId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
+    </foreach>
+    ,INSERT_TIME=
+    <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_CARRIER_ID" separator=" ">
+      when #{item.capacityCarrierId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
+    </foreach>
+    ,UPDATE_USERNAME=
+    <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_CARRIER_ID" separator=" ">
+      when #{item.capacityCarrierId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
+    </foreach>
+    ,UPDATE_TIME=
+    <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_CARRIER_ID" separator=" ">
+      when #{item.capacityCarrierId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
+    </foreach>
+    ,INSERT_UPDATE_REMARK=
+    <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_CARRIER_ID" separator=" ">
+      when #{item.capacityCarrierId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
+    </foreach>
+    ,DELETED=
+    <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_CARRIER_ID" separator=" ">
+      when #{item.capacityCarrierId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
+    </foreach>
+    ,CAPACITY_USER_DEP=
+    <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_CARRIER_ID" separator=" ">
+      when #{item.capacityCarrierId,jdbcType=DECIMAL} then #{item.capacityUserDep,jdbcType=VARCHAR}
+    </foreach>
+    where CAPACITY_CARRIER_ID in
+    <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
+      #{item.capacityCarrierId,jdbcType=DECIMAL}
+    </foreach>
   </update>
   <delete id="batchDelete" parameterType="java.util.List">
     delete from RMS_CAPACITY_CARRIER
-    where CAPACITY_CARRIER_ID in 
+    where CAPACITY_CARRIER_ID in
     <foreach close=")" collection="list" item="id" open="(" separator=",">
       #{id}
     </foreach>
@@ -315,5 +339,7 @@
   <!-- 友情提示!!!-->
   <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
 
-  
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+
 </mapper>

+ 16 - 2
src/main/resources/com/steerinfo/dil/mapper/RmsCapacityMapper.xml

@@ -743,7 +743,8 @@
     RC.CAPACITY_VIP AS "capacityVip",
     RC.CAPACITY_BLACKLIST AS "capacityBlacklist",
     RCA.CARRIER_NAME AS "carrierName",
-    RC.INSERT_UPDATE_REMARK "insertRemark"
+    RCC.INSERT_UPDATE_REMARK "insertRemark",
+    RCC.CAPACITY_CARRIER_ID "capacityCarrierId"
     FROM RMS_CAPACITY RC
     LEFT JOIN RMS_CAPACITY_TYPE RCT
     ON RC.CAPACITY_TYPE_ID = RCT.CAPACITY_TYPE_ID
@@ -885,7 +886,20 @@
     from RMS_CAPACITY RC
     where  RC.CAPACITY_ID=#{id}
   </select>
-  <update id="updateCapacityCarrier">
+    <select id="getCapacityByCapacityId" resultType="java.util.Map" parameterType="java.lang.Integer">
+      select  RCC.INSERT_UPDATE_REMARK "remark",
+              RCC.CAPACITY_USER_DEP "userDep",
+              RC.CAPACITY_NUMBER "capacityNumber",
+              RC.CAPACITY_ID "capacityId",
+              RC2.CARRIER_NAME "carrierName"
+      from RMS_CAPACITY RC
+      left join RMS_CARRIER RC2
+       ON RC2.CARRIER_ID=RC.CARRIER_ID
+      LEFT JOIN RMS_CAPACITY_CARRIER RCC
+      ON RC.CAPACITY_ID =RCC.CAPACITY_ID
+      WHERE  RCC.CAPACITY_CARRIER_ID=#{id}
+    </select>
+    <update id="updateCapacityCarrier">
     update RMS_CAPACITY_CARRIER set DELETED=1 ,UPDATE_TIME=sysDate  where CAPACITY_ID=#{capacityId} and CARRIER_ID in(
         select RC.CARRIER_ID from RMS_CARRIER RC
         where RC.CARRIER_SSO_ID = #{carrierSSOId}