Kaynağa Gözat

修改提货委托”

liyg 2 yıl önce
ebeveyn
işleme
f0e335977c

+ 7 - 5
src/main/java/com/steerinfo/dil/controller/AmsshipDeliveryNoticeController.java

@@ -8,10 +8,7 @@ import com.steerinfo.dil.model.AmsshipDeliveryNotice;
 import com.steerinfo.dil.model.OmsshipShipmentInstructions;
 import com.steerinfo.dil.service.IAmsshipDeliveryNoticeService;
 
-import com.steerinfo.dil.util.BaseRESTfulController;
-import com.steerinfo.dil.util.ColumnDataUtil;
-import com.steerinfo.dil.util.ImageFileUtils;
-import com.steerinfo.dil.util.PageListAdd;
+import com.steerinfo.dil.util.*;
 
 import com.steerinfo.framework.controller.RESTfulResult;
 import com.steerinfo.framework.service.pagehelper.PageHelper;
@@ -25,6 +22,7 @@ import org.springframework.http.MediaType;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
+import java.text.SimpleDateFormat;
 import java.util.*;
 import java.math.BigDecimal;
 
@@ -55,6 +53,7 @@ public class AmsshipDeliveryNoticeController extends BaseRESTfulController {
     ImageFileUtils imageFileUtils;
     @Autowired
     ESFeign esFeign;
+    private final SimpleDateFormat sdfDateTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
     @ApiOperation(value="展示发货通知单表", notes="分页查询")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
@@ -67,7 +66,10 @@ public class AmsshipDeliveryNoticeController extends BaseRESTfulController {
                                                    Integer pageSize,
                                                    Integer apiId,
                                                    Integer status,
-                                                   String con){
+                                                   String con,
+                                                   String startTime,
+                                                   String endTime){
+        DataChange.queryDataByDateTime(startTime, endTime, mapVal, sdfDateTime);//根据时间段查询数据
         //判断状态值是否为空
         if (status!=null){
             mapVal.put("status",status);

+ 17 - 2
src/main/java/com/steerinfo/dil/model/AmsshipDeliveryAttorney.java

@@ -129,6 +129,12 @@ public class AmsshipDeliveryAttorney implements IBasePO<BigDecimal> {
     @ApiModelProperty(value="下发状态(0:为下发,1为未下发)",required=false)
     private Short attorneyDistributionStatus;
 
+    /**
+     * 真外轮船名(提货委托书上的外轮船名)(REAL_FOREIGN_SHIP_NAME,VARCHAR,50)
+     */
+    @ApiModelProperty(value="真外轮船名(提货委托书上的外轮船名)",required=false)
+    private String realForeignShipName;
+
     private static final long serialVersionUID = 1L;
 
     public BigDecimal getAttorneyId() {
@@ -291,6 +297,14 @@ public class AmsshipDeliveryAttorney implements IBasePO<BigDecimal> {
         this.attorneyDistributionStatus = attorneyDistributionStatus;
     }
 
+    public String getRealForeignShipName() {
+        return realForeignShipName;
+    }
+
+    public void setRealForeignShipName(String realForeignShipName) {
+        this.realForeignShipName = realForeignShipName == null ? null : realForeignShipName.trim();
+    }
+
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
@@ -317,6 +331,7 @@ public class AmsshipDeliveryAttorney implements IBasePO<BigDecimal> {
         sb.append(", insertUpdateRemark=").append(insertUpdateRemark);
         sb.append(", deleted=").append(deleted);
         sb.append(", attorneyDistributionStatus=").append(attorneyDistributionStatus);
+        sb.append(", realForeignShipName=").append(realForeignShipName);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();
@@ -328,8 +343,8 @@ public class AmsshipDeliveryAttorney implements IBasePO<BigDecimal> {
     }
 
     @Override
-    public void setId(BigDecimal bigDecimal) {
-
+    public void setId(BigDecimal attorneyId) {
+        this.attorneyId = attorneyId;
     }
 
 

+ 3 - 0
src/main/java/com/steerinfo/dil/service/impl/AmsshipDeliveryAttorneyServiceImpl.java

@@ -75,6 +75,7 @@ public class AmsshipDeliveryAttorneyServiceImpl implements IAmsshipDeliveryAttor
         amsshipDeliveryAttorney.setInsertUsername(userName);
         amsshipDeliveryAttorney.setUpdateTime(new Date());
         amsshipDeliveryAttorney.setDeleted((short) 0);
+        amsshipDeliveryAttorney.setRealForeignShipName(map.get("realForeignShipName")+"");
         return amsshipDeliveryAttorneyMapper.insertSelective(amsshipDeliveryAttorney);
     }
 
@@ -165,6 +166,7 @@ public class AmsshipDeliveryAttorneyServiceImpl implements IAmsshipDeliveryAttor
         String attorneyPickupContactPerson=(String)amsshipDeliveryAttorney.get("attorneyPickupContactPerson");
         BigDecimal downSwimPortId =DataChange.dataToBigDecimal(amsshipDeliveryAttorney.get("downSwimPortId"));
         long attorneyTime = (long)amsshipDeliveryAttorney.get("attorneyTime");
+        String realForeignShipName=amsshipDeliveryAttorney.get("realForeignShipName")+"";
         AmsshipDeliveryAttorney amsshipDeliveryAttorney1=new AmsshipDeliveryAttorney();
         amsshipDeliveryAttorney1.setAttorneyId(resultId);
         amsshipDeliveryAttorney1.setRequesterGroupId(requesterGroupId);
@@ -175,6 +177,7 @@ public class AmsshipDeliveryAttorneyServiceImpl implements IAmsshipDeliveryAttor
         amsshipDeliveryAttorney1.setAttorenyPickupIdcard(attorenyPickupIdcard);
         amsshipDeliveryAttorney1.setDownSwimPortId(downSwimPortId);
         amsshipDeliveryAttorney1.setAttorneyTime(new Date(attorneyTime));
+        amsshipDeliveryAttorney1.setRealForeignShipName(realForeignShipName);
         int i = amsshipDeliveryAttorneyMapper.updateByPrimaryKeySelective(amsshipDeliveryAttorney1);
         return i;
     }

+ 243 - 214
src/main/resources/com/steerinfo/dil/mapper/AmsshipDeliveryAttorneyMapper.xml

@@ -22,19 +22,21 @@
     <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
     <result column="DELETED" jdbcType="DECIMAL" property="deleted" />
     <result column="ATTORNEY_DISTRIBUTION_STATUS" jdbcType="DECIMAL" property="attorneyDistributionStatus" />
+    <result column="REAL_FOREIGN_SHIP_NAME" jdbcType="VARCHAR" property="realForeignShipName" />
   </resultMap>
   <sql id="columns">
-    ATTORNEY_ID, BATCH_ID, REQUESTER_GROUP_ID, CARRIER_ID, PORT_ID, DOWN_SWIM_PORT_ID, 
-    ATTORNEY_PICKUP_CONTACT_PERSON, ATTORENY_PICKUP_IDCARD, ATTORNEY_CONTACT_TELEPHONE, 
-    ATTORNEY_TIME, ATTORNEY_PDFFILE, DELETE_NAME, DELETE_TIME, INSERT_USERNAME, INSERT_TIME, 
-    UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED, ATTORNEY_DISTRIBUTION_STATUS
+    ATTORNEY_ID, BATCH_ID, REQUESTER_GROUP_ID, CARRIER_ID, PORT_ID, DOWN_SWIM_PORT_ID,
+    ATTORNEY_PICKUP_CONTACT_PERSON, ATTORENY_PICKUP_IDCARD, ATTORNEY_CONTACT_TELEPHONE,
+    ATTORNEY_TIME, ATTORNEY_PDFFILE, DELETE_NAME, DELETE_TIME, INSERT_USERNAME, INSERT_TIME,
+    UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED, ATTORNEY_DISTRIBUTION_STATUS,
+    REAL_FOREIGN_SHIP_NAME
   </sql>
   <sql id="columns_alias">
-    t.ATTORNEY_ID, t.BATCH_ID, t.REQUESTER_GROUP_ID, t.CARRIER_ID, t.PORT_ID, t.DOWN_SWIM_PORT_ID, 
-    t.ATTORNEY_PICKUP_CONTACT_PERSON, t.ATTORENY_PICKUP_IDCARD, t.ATTORNEY_CONTACT_TELEPHONE, 
-    t.ATTORNEY_TIME, t.ATTORNEY_PDFFILE, t.DELETE_NAME, t.DELETE_TIME, t.INSERT_USERNAME, 
-    t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED, 
-    t.ATTORNEY_DISTRIBUTION_STATUS
+    t.ATTORNEY_ID, t.BATCH_ID, t.REQUESTER_GROUP_ID, t.CARRIER_ID, t.PORT_ID, t.DOWN_SWIM_PORT_ID,
+    t.ATTORNEY_PICKUP_CONTACT_PERSON, t.ATTORENY_PICKUP_IDCARD, t.ATTORNEY_CONTACT_TELEPHONE,
+    t.ATTORNEY_TIME, t.ATTORNEY_PDFFILE, t.DELETE_NAME, t.DELETE_TIME, t.INSERT_USERNAME,
+    t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED,
+    t.ATTORNEY_DISTRIBUTION_STATUS, t.REAL_FOREIGN_SHIP_NAME
   </sql>
   <sql id="select">
     SELECT <include refid="columns" /> FROM AMSSHIP_DELIVERY_ATTORNEY
@@ -43,7 +45,7 @@
     SELECT <include refid="columns_alias" /> FROM AMSSHIP_DELIVERY_ATTORNEY t
   </sql>
   <sql id="where">
-    <where> 
+    <where>
       <if test="attorneyId != null">
         and ATTORNEY_ID = #{attorneyId}
       </if>
@@ -104,10 +106,13 @@
       <if test="attorneyDistributionStatus != null">
         and ATTORNEY_DISTRIBUTION_STATUS = #{attorneyDistributionStatus}
       </if>
+      <if test="realForeignShipName != null and realForeignShipName != ''">
+        and REAL_FOREIGN_SHIP_NAME = #{realForeignShipName}
+      </if>
     </where>
   </sql>
   <sql id="whereLike">
-    <where> 
+    <where>
       <if test="attorneyId != null">
         and ATTORNEY_ID = #{attorneyId}
       </if>
@@ -168,6 +173,9 @@
       <if test="attorneyDistributionStatus != null">
         and ATTORNEY_DISTRIBUTION_STATUS = #{attorneyDistributionStatus}
       </if>
+      <if test="realForeignShipName != null and realForeignShipName != ''">
+        and REAL_FOREIGN_SHIP_NAME LIKE '%${realForeignShipName}%'
+      </if>
     </where>
   </sql>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
@@ -176,82 +184,87 @@
   </delete>
   <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
     delete from AMSSHIP_DELIVERY_ATTORNEY
-    where 1!=1 
-      <if test="batchId != null">
-        or BATCH_ID = #{batchId}
-      </if>
-      <if test="requesterGroupId != null">
-        or REQUESTER_GROUP_ID = #{requesterGroupId}
-      </if>
-      <if test="carrierId != null">
-        or CARRIER_ID = #{carrierId}
-      </if>
-      <if test="portId != null">
-        or PORT_ID = #{portId}
-      </if>
-      <if test="downSwimPortId != null">
-        or DOWN_SWIM_PORT_ID = #{downSwimPortId}
-      </if>
-      <if test="attorneyPickupContactPerson != null and attorneyPickupContactPerson != ''">
-        or ATTORNEY_PICKUP_CONTACT_PERSON = #{attorneyPickupContactPerson}
-      </if>
-      <if test="attorenyPickupIdcard != null and attorenyPickupIdcard != ''">
-        or ATTORENY_PICKUP_IDCARD = #{attorenyPickupIdcard}
-      </if>
-      <if test="attorneyContactTelephone != null and attorneyContactTelephone != ''">
-        or ATTORNEY_CONTACT_TELEPHONE = #{attorneyContactTelephone}
-      </if>
-      <if test="attorneyTime != null">
-        or TO_CHAR(ATTORNEY_TIME,'yyyy-MM-dd') = '#{attorneyTime}'
-      </if>
-      <if test="attorneyPdffile != null and attorneyPdffile != ''">
-        or ATTORNEY_PDFFILE = #{attorneyPdffile}
-      </if>
-      <if test="deleteName != null and deleteName != ''">
-        or DELETE_NAME = #{deleteName}
-      </if>
-      <if test="deleteTime != null and deleteTime != ''">
-        or DELETE_TIME = #{deleteTime}
-      </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="attorneyDistributionStatus != null">
-        or ATTORNEY_DISTRIBUTION_STATUS = #{attorneyDistributionStatus}
-      </if>
+    where 1!=1
+    <if test="batchId != null">
+      or BATCH_ID = #{batchId}
+    </if>
+    <if test="requesterGroupId != null">
+      or REQUESTER_GROUP_ID = #{requesterGroupId}
+    </if>
+    <if test="carrierId != null">
+      or CARRIER_ID = #{carrierId}
+    </if>
+    <if test="portId != null">
+      or PORT_ID = #{portId}
+    </if>
+    <if test="downSwimPortId != null">
+      or DOWN_SWIM_PORT_ID = #{downSwimPortId}
+    </if>
+    <if test="attorneyPickupContactPerson != null and attorneyPickupContactPerson != ''">
+      or ATTORNEY_PICKUP_CONTACT_PERSON = #{attorneyPickupContactPerson}
+    </if>
+    <if test="attorenyPickupIdcard != null and attorenyPickupIdcard != ''">
+      or ATTORENY_PICKUP_IDCARD = #{attorenyPickupIdcard}
+    </if>
+    <if test="attorneyContactTelephone != null and attorneyContactTelephone != ''">
+      or ATTORNEY_CONTACT_TELEPHONE = #{attorneyContactTelephone}
+    </if>
+    <if test="attorneyTime != null">
+      or TO_CHAR(ATTORNEY_TIME,'yyyy-MM-dd') = '#{attorneyTime}'
+    </if>
+    <if test="attorneyPdffile != null and attorneyPdffile != ''">
+      or ATTORNEY_PDFFILE = #{attorneyPdffile}
+    </if>
+    <if test="deleteName != null and deleteName != ''">
+      or DELETE_NAME = #{deleteName}
+    </if>
+    <if test="deleteTime != null and deleteTime != ''">
+      or DELETE_TIME = #{deleteTime}
+    </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="attorneyDistributionStatus != null">
+      or ATTORNEY_DISTRIBUTION_STATUS = #{attorneyDistributionStatus}
+    </if>
+    <if test="realForeignShipName != null and realForeignShipName != ''">
+      or REAL_FOREIGN_SHIP_NAME = #{realForeignShipName}
+    </if>
   </delete>
   <insert id="insert" parameterType="com.steerinfo.dil.model.AmsshipDeliveryAttorney">
-    insert into AMSSHIP_DELIVERY_ATTORNEY (ATTORNEY_ID, BATCH_ID, REQUESTER_GROUP_ID, 
-      CARRIER_ID, PORT_ID, DOWN_SWIM_PORT_ID, 
-      ATTORNEY_PICKUP_CONTACT_PERSON, ATTORENY_PICKUP_IDCARD, 
-      ATTORNEY_CONTACT_TELEPHONE, ATTORNEY_TIME, 
-      ATTORNEY_PDFFILE, DELETE_NAME, DELETE_TIME, 
-      INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, 
-      UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED, 
-      ATTORNEY_DISTRIBUTION_STATUS)
-    values (#{attorneyId,jdbcType=DECIMAL}, #{batchId,jdbcType=DECIMAL}, #{requesterGroupId,jdbcType=DECIMAL}, 
-      #{carrierId,jdbcType=DECIMAL}, #{portId,jdbcType=DECIMAL}, #{downSwimPortId,jdbcType=DECIMAL}, 
-      #{attorneyPickupContactPerson,jdbcType=VARCHAR}, #{attorenyPickupIdcard,jdbcType=VARCHAR}, 
-      #{attorneyContactTelephone,jdbcType=VARCHAR}, #{attorneyTime,jdbcType=TIMESTAMP}, 
-      #{attorneyPdffile,jdbcType=VARCHAR}, #{deleteName,jdbcType=VARCHAR}, #{deleteTime,jdbcType=VARCHAR}, 
-      #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, 
-      #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, #{deleted,jdbcType=DECIMAL}, 
-      #{attorneyDistributionStatus,jdbcType=DECIMAL})
+    insert into AMSSHIP_DELIVERY_ATTORNEY (ATTORNEY_ID, BATCH_ID, REQUESTER_GROUP_ID,
+                                           CARRIER_ID, PORT_ID, DOWN_SWIM_PORT_ID,
+                                           ATTORNEY_PICKUP_CONTACT_PERSON, ATTORENY_PICKUP_IDCARD,
+                                           ATTORNEY_CONTACT_TELEPHONE, ATTORNEY_TIME,
+                                           ATTORNEY_PDFFILE, DELETE_NAME, DELETE_TIME,
+                                           INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
+                                           UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED,
+                                           ATTORNEY_DISTRIBUTION_STATUS, REAL_FOREIGN_SHIP_NAME
+    )
+    values (#{attorneyId,jdbcType=DECIMAL}, #{batchId,jdbcType=DECIMAL}, #{requesterGroupId,jdbcType=DECIMAL},
+            #{carrierId,jdbcType=DECIMAL}, #{portId,jdbcType=DECIMAL}, #{downSwimPortId,jdbcType=DECIMAL},
+            #{attorneyPickupContactPerson,jdbcType=VARCHAR}, #{attorenyPickupIdcard,jdbcType=VARCHAR},
+            #{attorneyContactTelephone,jdbcType=VARCHAR}, #{attorneyTime,jdbcType=TIMESTAMP},
+            #{attorneyPdffile,jdbcType=VARCHAR}, #{deleteName,jdbcType=VARCHAR}, #{deleteTime,jdbcType=VARCHAR},
+            #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR},
+            #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, #{deleted,jdbcType=DECIMAL},
+            #{attorneyDistributionStatus,jdbcType=DECIMAL}, #{realForeignShipName,jdbcType=VARCHAR}
+           )
   </insert>
   <insert id="insertSelective" parameterType="com.steerinfo.dil.model.AmsshipDeliveryAttorney">
     insert into AMSSHIP_DELIVERY_ATTORNEY
@@ -316,6 +329,9 @@
       <if test="attorneyDistributionStatus != null">
         ATTORNEY_DISTRIBUTION_STATUS,
       </if>
+      <if test="realForeignShipName != null">
+        REAL_FOREIGN_SHIP_NAME,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="attorneyId != null">
@@ -378,29 +394,33 @@
       <if test="attorneyDistributionStatus != null">
         #{attorneyDistributionStatus,jdbcType=DECIMAL},
       </if>
+      <if test="realForeignShipName != null">
+        #{realForeignShipName,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.AmsshipDeliveryAttorney">
     update AMSSHIP_DELIVERY_ATTORNEY
     set BATCH_ID = #{batchId,jdbcType=DECIMAL},
-      REQUESTER_GROUP_ID = #{requesterGroupId,jdbcType=DECIMAL},
-      CARRIER_ID = #{carrierId,jdbcType=DECIMAL},
-      PORT_ID = #{portId,jdbcType=DECIMAL},
-      DOWN_SWIM_PORT_ID = #{downSwimPortId,jdbcType=DECIMAL},
-      ATTORNEY_PICKUP_CONTACT_PERSON = #{attorneyPickupContactPerson,jdbcType=VARCHAR},
-      ATTORENY_PICKUP_IDCARD = #{attorenyPickupIdcard,jdbcType=VARCHAR},
-      ATTORNEY_CONTACT_TELEPHONE = #{attorneyContactTelephone,jdbcType=VARCHAR},
-      ATTORNEY_TIME = #{attorneyTime,jdbcType=TIMESTAMP},
-      ATTORNEY_PDFFILE = #{attorneyPdffile,jdbcType=VARCHAR},
-      DELETE_NAME = #{deleteName,jdbcType=VARCHAR},
-      DELETE_TIME = #{deleteTime,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},
-      DELETED = #{deleted,jdbcType=DECIMAL},
-      ATTORNEY_DISTRIBUTION_STATUS = #{attorneyDistributionStatus,jdbcType=DECIMAL}
+        REQUESTER_GROUP_ID = #{requesterGroupId,jdbcType=DECIMAL},
+        CARRIER_ID = #{carrierId,jdbcType=DECIMAL},
+        PORT_ID = #{portId,jdbcType=DECIMAL},
+        DOWN_SWIM_PORT_ID = #{downSwimPortId,jdbcType=DECIMAL},
+        ATTORNEY_PICKUP_CONTACT_PERSON = #{attorneyPickupContactPerson,jdbcType=VARCHAR},
+        ATTORENY_PICKUP_IDCARD = #{attorenyPickupIdcard,jdbcType=VARCHAR},
+        ATTORNEY_CONTACT_TELEPHONE = #{attorneyContactTelephone,jdbcType=VARCHAR},
+        ATTORNEY_TIME = #{attorneyTime,jdbcType=TIMESTAMP},
+        ATTORNEY_PDFFILE = #{attorneyPdffile,jdbcType=VARCHAR},
+        DELETE_NAME = #{deleteName,jdbcType=VARCHAR},
+        DELETE_TIME = #{deleteTime,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},
+        DELETED = #{deleted,jdbcType=DECIMAL},
+        ATTORNEY_DISTRIBUTION_STATUS = #{attorneyDistributionStatus,jdbcType=DECIMAL},
+        REAL_FOREIGN_SHIP_NAME = #{realForeignShipName,jdbcType=VARCHAR}
     where ATTORNEY_ID = #{attorneyId,jdbcType=DECIMAL}
   </update>
   <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.AmsshipDeliveryAttorney">
@@ -463,6 +483,9 @@
       <if test="attorneyDistributionStatus != null">
         ATTORNEY_DISTRIBUTION_STATUS = #{attorneyDistributionStatus,jdbcType=DECIMAL},
       </if>
+      <if test="realForeignShipName != null">
+        REAL_FOREIGN_SHIP_NAME = #{realForeignShipName,jdbcType=VARCHAR},
+      </if>
     </set>
     where ATTORNEY_ID = #{attorneyId,jdbcType=DECIMAL}
   </update>
@@ -479,122 +502,126 @@
     <include refid="whereLike" />
   </select>
   <insert id="batchInsert" parameterType="java.util.List">
-    insert into AMSSHIP_DELIVERY_ATTORNEY 
-      (ATTORNEY_ID, 
-      BATCH_ID, REQUESTER_GROUP_ID, CARRIER_ID, 
-      PORT_ID, DOWN_SWIM_PORT_ID, ATTORNEY_PICKUP_CONTACT_PERSON, 
-      ATTORENY_PICKUP_IDCARD, ATTORNEY_CONTACT_TELEPHONE, 
-      ATTORNEY_TIME, ATTORNEY_PDFFILE, 
-      DELETE_NAME, DELETE_TIME, INSERT_USERNAME, 
-      INSERT_TIME, UPDATE_USERNAME, 
-      UPDATE_TIME, INSERT_UPDATE_REMARK, 
-      DELETED, ATTORNEY_DISTRIBUTION_STATUS
-      )
-    ( <foreach collection="list" item="item" separator="union all"> 
-   select  
-      #{item.attorneyId,jdbcType=DECIMAL}, 
-      #{item.batchId,jdbcType=DECIMAL}, #{item.requesterGroupId,jdbcType=DECIMAL}, #{item.carrierId,jdbcType=DECIMAL}, 
-      #{item.portId,jdbcType=DECIMAL}, #{item.downSwimPortId,jdbcType=DECIMAL}, #{item.attorneyPickupContactPerson,jdbcType=VARCHAR}, 
-      #{item.attorenyPickupIdcard,jdbcType=VARCHAR}, #{item.attorneyContactTelephone,jdbcType=VARCHAR}, 
-      #{item.attorneyTime,jdbcType=TIMESTAMP}, #{item.attorneyPdffile,jdbcType=VARCHAR}, 
-      #{item.deleteName,jdbcType=VARCHAR}, #{item.deleteTime,jdbcType=VARCHAR}, #{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.attorneyDistributionStatus,jdbcType=DECIMAL}
-       from dual  
-   </foreach> )
+    insert into AMSSHIP_DELIVERY_ATTORNEY
+    (ATTORNEY_ID,
+    BATCH_ID, REQUESTER_GROUP_ID, CARRIER_ID,
+    PORT_ID, DOWN_SWIM_PORT_ID, ATTORNEY_PICKUP_CONTACT_PERSON,
+    ATTORENY_PICKUP_IDCARD, ATTORNEY_CONTACT_TELEPHONE,
+    ATTORNEY_TIME, ATTORNEY_PDFFILE,
+    DELETE_NAME, DELETE_TIME, INSERT_USERNAME,
+    INSERT_TIME, UPDATE_USERNAME,
+    UPDATE_TIME, INSERT_UPDATE_REMARK,
+    DELETED, ATTORNEY_DISTRIBUTION_STATUS,
+    REAL_FOREIGN_SHIP_NAME)
+    ( <foreach collection="list" item="item" separator="union all">
+    select
+    #{item.attorneyId,jdbcType=DECIMAL},
+    #{item.batchId,jdbcType=DECIMAL}, #{item.requesterGroupId,jdbcType=DECIMAL}, #{item.carrierId,jdbcType=DECIMAL},
+    #{item.portId,jdbcType=DECIMAL}, #{item.downSwimPortId,jdbcType=DECIMAL}, #{item.attorneyPickupContactPerson,jdbcType=VARCHAR},
+    #{item.attorenyPickupIdcard,jdbcType=VARCHAR}, #{item.attorneyContactTelephone,jdbcType=VARCHAR},
+    #{item.attorneyTime,jdbcType=TIMESTAMP}, #{item.attorneyPdffile,jdbcType=VARCHAR},
+    #{item.deleteName,jdbcType=VARCHAR}, #{item.deleteTime,jdbcType=VARCHAR}, #{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.attorneyDistributionStatus,jdbcType=DECIMAL},
+    #{item.realForeignShipName,jdbcType=VARCHAR} from dual
+  </foreach> )
   </insert>
   <update id="batchUpdate" parameterType="java.util.List">
-     update AMSSHIP_DELIVERY_ATTORNEY
-     set
-       ATTORNEY_ID=
-       <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
-          when #{item.attorneyId,jdbcType=DECIMAL} then #{item.attorneyId,jdbcType=DECIMAL}
-       </foreach>
-       ,BATCH_ID=
-       <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
-          when #{item.attorneyId,jdbcType=DECIMAL} then #{item.batchId,jdbcType=DECIMAL}
-       </foreach>
-       ,REQUESTER_GROUP_ID=
-       <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
-          when #{item.attorneyId,jdbcType=DECIMAL} then #{item.requesterGroupId,jdbcType=DECIMAL}
-       </foreach>
-       ,CARRIER_ID=
-       <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
-          when #{item.attorneyId,jdbcType=DECIMAL} then #{item.carrierId,jdbcType=DECIMAL}
-       </foreach>
-       ,PORT_ID=
-       <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
-          when #{item.attorneyId,jdbcType=DECIMAL} then #{item.portId,jdbcType=DECIMAL}
-       </foreach>
-       ,DOWN_SWIM_PORT_ID=
-       <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
-          when #{item.attorneyId,jdbcType=DECIMAL} then #{item.downSwimPortId,jdbcType=DECIMAL}
-       </foreach>
-       ,ATTORNEY_PICKUP_CONTACT_PERSON=
-       <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
-          when #{item.attorneyId,jdbcType=DECIMAL} then #{item.attorneyPickupContactPerson,jdbcType=VARCHAR}
-       </foreach>
-       ,ATTORENY_PICKUP_IDCARD=
-       <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
-          when #{item.attorneyId,jdbcType=DECIMAL} then #{item.attorenyPickupIdcard,jdbcType=VARCHAR}
-       </foreach>
-       ,ATTORNEY_CONTACT_TELEPHONE=
-       <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
-          when #{item.attorneyId,jdbcType=DECIMAL} then #{item.attorneyContactTelephone,jdbcType=VARCHAR}
-       </foreach>
-       ,ATTORNEY_TIME=
-       <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
-          when #{item.attorneyId,jdbcType=DECIMAL} then #{item.attorneyTime,jdbcType=TIMESTAMP}
-       </foreach>
-       ,ATTORNEY_PDFFILE=
-       <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
-          when #{item.attorneyId,jdbcType=DECIMAL} then #{item.attorneyPdffile,jdbcType=VARCHAR}
-       </foreach>
-       ,DELETE_NAME=
-       <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
-          when #{item.attorneyId,jdbcType=DECIMAL} then #{item.deleteName,jdbcType=VARCHAR}
-       </foreach>
-       ,DELETE_TIME=
-       <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
-          when #{item.attorneyId,jdbcType=DECIMAL} then #{item.deleteTime,jdbcType=VARCHAR}
-       </foreach>
-       ,INSERT_USERNAME=
-       <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
-          when #{item.attorneyId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
-       </foreach>
-       ,INSERT_TIME=
-       <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
-          when #{item.attorneyId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
-       </foreach>
-       ,UPDATE_USERNAME=
-       <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
-          when #{item.attorneyId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
-       </foreach>
-       ,UPDATE_TIME=
-       <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
-          when #{item.attorneyId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
-       </foreach>
-       ,INSERT_UPDATE_REMARK=
-       <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
-          when #{item.attorneyId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
-       </foreach>
-       ,DELETED=
-       <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
-          when #{item.attorneyId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
-       </foreach>
-       ,ATTORNEY_DISTRIBUTION_STATUS=
-       <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
-          when #{item.attorneyId,jdbcType=DECIMAL} then #{item.attorneyDistributionStatus,jdbcType=DECIMAL}
-       </foreach>
-     where ATTORNEY_ID in 
-     <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
-    #{item.attorneyId,jdbcType=DECIMAL}
-     </foreach> 
+    update AMSSHIP_DELIVERY_ATTORNEY
+    set
+    ATTORNEY_ID=
+    <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
+      when #{item.attorneyId,jdbcType=DECIMAL} then #{item.attorneyId,jdbcType=DECIMAL}
+    </foreach>
+    ,BATCH_ID=
+    <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
+      when #{item.attorneyId,jdbcType=DECIMAL} then #{item.batchId,jdbcType=DECIMAL}
+    </foreach>
+    ,REQUESTER_GROUP_ID=
+    <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
+      when #{item.attorneyId,jdbcType=DECIMAL} then #{item.requesterGroupId,jdbcType=DECIMAL}
+    </foreach>
+    ,CARRIER_ID=
+    <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
+      when #{item.attorneyId,jdbcType=DECIMAL} then #{item.carrierId,jdbcType=DECIMAL}
+    </foreach>
+    ,PORT_ID=
+    <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
+      when #{item.attorneyId,jdbcType=DECIMAL} then #{item.portId,jdbcType=DECIMAL}
+    </foreach>
+    ,DOWN_SWIM_PORT_ID=
+    <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
+      when #{item.attorneyId,jdbcType=DECIMAL} then #{item.downSwimPortId,jdbcType=DECIMAL}
+    </foreach>
+    ,ATTORNEY_PICKUP_CONTACT_PERSON=
+    <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
+      when #{item.attorneyId,jdbcType=DECIMAL} then #{item.attorneyPickupContactPerson,jdbcType=VARCHAR}
+    </foreach>
+    ,ATTORENY_PICKUP_IDCARD=
+    <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
+      when #{item.attorneyId,jdbcType=DECIMAL} then #{item.attorenyPickupIdcard,jdbcType=VARCHAR}
+    </foreach>
+    ,ATTORNEY_CONTACT_TELEPHONE=
+    <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
+      when #{item.attorneyId,jdbcType=DECIMAL} then #{item.attorneyContactTelephone,jdbcType=VARCHAR}
+    </foreach>
+    ,ATTORNEY_TIME=
+    <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
+      when #{item.attorneyId,jdbcType=DECIMAL} then #{item.attorneyTime,jdbcType=TIMESTAMP}
+    </foreach>
+    ,ATTORNEY_PDFFILE=
+    <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
+      when #{item.attorneyId,jdbcType=DECIMAL} then #{item.attorneyPdffile,jdbcType=VARCHAR}
+    </foreach>
+    ,DELETE_NAME=
+    <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
+      when #{item.attorneyId,jdbcType=DECIMAL} then #{item.deleteName,jdbcType=VARCHAR}
+    </foreach>
+    ,DELETE_TIME=
+    <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
+      when #{item.attorneyId,jdbcType=DECIMAL} then #{item.deleteTime,jdbcType=VARCHAR}
+    </foreach>
+    ,INSERT_USERNAME=
+    <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
+      when #{item.attorneyId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
+    </foreach>
+    ,INSERT_TIME=
+    <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
+      when #{item.attorneyId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
+    </foreach>
+    ,UPDATE_USERNAME=
+    <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
+      when #{item.attorneyId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
+    </foreach>
+    ,UPDATE_TIME=
+    <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
+      when #{item.attorneyId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
+    </foreach>
+    ,INSERT_UPDATE_REMARK=
+    <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
+      when #{item.attorneyId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
+    </foreach>
+    ,DELETED=
+    <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
+      when #{item.attorneyId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
+    </foreach>
+    ,ATTORNEY_DISTRIBUTION_STATUS=
+    <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
+      when #{item.attorneyId,jdbcType=DECIMAL} then #{item.attorneyDistributionStatus,jdbcType=DECIMAL}
+    </foreach>
+    ,REAL_FOREIGN_SHIP_NAME=
+    <foreach close="end" collection="list" index="index" item="item" open="case ATTORNEY_ID" separator=" ">
+      when #{item.attorneyId,jdbcType=DECIMAL} then #{item.realForeignShipName,jdbcType=VARCHAR}
+    </foreach>
+    where ATTORNEY_ID in
+    <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
+      #{item.attorneyId,jdbcType=DECIMAL}
+    </foreach>
   </update>
   <delete id="batchDelete" parameterType="java.util.List">
     delete from AMSSHIP_DELIVERY_ATTORNEY
-    where ATTORNEY_ID in 
+    where ATTORNEY_ID in
     <foreach close=")" collection="list" item="id" open="(" separator=",">
       #{id}
     </foreach>
@@ -608,6 +635,7 @@
     RP.PORT_ALL_NAME "carrierName",
     dbi.INFACTORY_SHIP_NAME as "infactoryShipName",--进厂船名
     t6.RESULT_FOREIGN_SHIP_NAME "resultForeignShipName",
+    t1.REAL_FOREIGN_SHIP_NAME         "realForeignShipName",
     t8.MATERIAL_NAME "materialName",
     RP2.PORT_NAME "portName",
     RP2.PORT_ALL_NAME "pickupAllName",
@@ -708,6 +736,7 @@
       t1.REQUESTER_GROUP_ID "requesterGroupId",
       t1.CARRIER_ID  "carrierId",
       t1.DOWN_SWIM_PORT_ID              "downSwimPortId",
+      t1.REAL_FOREIGN_SHIP_NAME         "realForeignShipName",
       t1.ATTORNEY_PICKUP_CONTACT_PERSON "attorneyPickupContactPerson",
       t1.ATTORENY_PICKUP_IDCARD         "attorenyPickupIdcard",
       t1.ATTORNEY_CONTACT_TELEPHONE     "attorneyContactTelephone",

+ 4 - 1
src/main/resources/com/steerinfo/dil/mapper/AmsshipDeliveryNoticeMapper.xml

@@ -1118,7 +1118,6 @@
     ON t1.BATCH_ID= DBI.BATCH_INFACOTRY_ID
     left join  DIL_BATCH t7
     on DBI.BATCH_ID=t7.BATCH_ID
-
     left join RMS_MATERIAL t8
     on t7.MATERIAL_ID=t8.MATERIAL_ID
     where  t1.deleted = 0
@@ -1126,6 +1125,10 @@
     <if test="con != null" >
       and dbi.INFACTORY_SHIP_NAME || t7.RESULT_FOREIGN_SHIP_NAME || t8.MATERIAL_NAME || t1.RESULT_NUMBER_OF_LOANS  like #{con}
     </if>
+    <if test="startDate != null">
+      and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;=  t1.NOTICE_DELIVERY_TIME
+      and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >=  t1.NOTICE_DELIVERY_TIME
+    </if>
     )
     <where>
       <if test="materialCapacityName!= null">

+ 7 - 1
src/main/resources/com/steerinfo/dil/mapper/TmsshipLoadShipResultMapper.xml

@@ -625,7 +625,11 @@
         rpe.PORT_NAME as "arrivePortName",
         tlsr.RESULT_LOAD_SHIP_DATE as "loadTime",
         tlsr.RESULT_ISCLEAR as "isClear",
-        tlsr.INSERT_UPDATE_REMARK as "memo"
+        tlsr.INSERT_UPDATE_REMARK as "memo",
+        TWQR.RESULT_INSPECTION_FEES "resultInspectionFee",
+        TWQR.RESULT_MOISTURE_CONTENT "resultMoistureContent",
+        ADN.PURCHASE_CONTRACT_MOISTURE "purchaseContractMoisture",
+        TWQR.RESULT_WATER_TONNAGE "resultWaterTonnage"
         FROM TMSSHIP_LOAD_SHIP_RESULT tlsr
         LEFT JOIN TMSSHIP_TOTAL_RESULT ttr
         ON tlsr.TOTAL_RESULT_ID = ttr.RESULT_ID
@@ -657,6 +661,8 @@
         ON ada.DOWN_SWIM_PORT_ID = rps.PORT_ID
         LEFT JOIN RMS_PORT rpe
         ON ada.PORT_ID = rpe.PORT_ID
+        LEFT JOIN TMSSHIP_WATER_QUALITY_RESULT TWQR
+        ON TWQR.TOTAL_RESULT_ID=ttr.RESULT_ID
         WHERE tlsr.DELETED = 0 AND  adn.DELETED=0 AND ada.DELETED=0
         <if test="con != null" >
             and dbi.INFACTORY_SHIP_NAME || rm.MATERIAL_NAME || db.RESULT_FOREIGN_SHIP_NAME like #{con}