Browse Source

提交货权转移新增批次

zx 3 years ago
parent
commit
7943585cd2

+ 4 - 4
pom.xml

@@ -107,9 +107,9 @@
                 <artifactId>generator-maven-plugin</artifactId>
                 <version>3.0</version>
                 <configuration>
-                    <connUrl>jdbc:oracle:thin:@192.168.1.51:1521:steerinfo</connUrl>
-                    <user>dilusr</user>
-                    <password>stinf#0420</password>
+                    <connUrl> jdbc:oracle:thin:@172.16.33.163:1521:ilsdbpri</connUrl>
+                    <user>dil</user>
+                    <password>Dil123789</password>
                     <!--包名-->
                     <targetPackage>com.steerinfo.dil</targetPackage>
                     <tables>
@@ -132,7 +132,7 @@
                         <!--<table>TRANSPORT_ORDER_PROGRESS</table>-->
 <!--                        <table>TMSSHIP_WATER_QUALITY_RESULT</table>-->
 <!--                        <table>OMSSHIP_INSTRUCTIONS_CAPACITY</table>-->
-                        <table>WMSH_OUTBOUND_RESULT</table>
+                        <param>AMSSHIP_CARGO_TRANSFER_RESULT</param>
 <!--                        <table>TMSSHIP_BARGE_OPERATION</table>-->
 <!--                        <table>TMSSHIP_LOAD_SHIP_RESULT</table>-->
 <!--                        <table>TMSSHIP_SHIP_LOCATION</table>-->

+ 10 - 2
src/main/java/com/steerinfo/dil/controller/AmsshipCargoTransferResultController.java

@@ -63,8 +63,8 @@ public class AmsshipCargoTransferResultController extends BaseRESTfulController
     @ApiOperation(value="新增", notes="根据amsshipCargoTransferResult对象创建")
     @ApiImplicitParam(name = "amsshipCargoTransferResult", value = "详细实体amsshipCargoTransferResult", required = true, dataType = "amsshipCargoTransferResult", paramType = "java.util.Map")
     @PostMapping(value = "/insertamsshipCargoTransferResult")
-    public RESTfulResult insertamsshipCargoTransferResult(@RequestBody AmsshipCargoTransferResult amsshipCargoTransferResult){
-        int code=amsshipCargoTransferResultService.insertSelective(amsshipCargoTransferResult);
+    public RESTfulResult insertamsshipCargoTransferResult(@RequestBody(required = false) Map<String,Object> map){
+        int code=amsshipCargoTransferResultService.addCargoTransferResult(map);
         System.out.println(code);
         return success(code);
     }
@@ -127,4 +127,12 @@ public class AmsshipCargoTransferResultController extends BaseRESTfulController
         List<Map<String,Object>> list= amsshipCargoTransferResultService.insertBetchId();
         return success(list);
     }
+    //获取物资id
+    @ApiOperation(value="获取详细信息", notes="根据url的id来获取详细信息")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "BigDecimal")
+    @GetMapping(value = "/getMaterialId")
+    public RESTfulResult getMaterialId(){
+        List<Map<String,Object>> list= amsshipCargoTransferResultService.selectMaterialIdByMaterialTypeId();
+        return success(list);
+    }
 }

+ 110 - 0
src/main/java/com/steerinfo/dil/controller/DilBatchController.java

@@ -0,0 +1,110 @@
+package com.steerinfo.dil.controller;
+
+import com.steerinfo.framework.controller.BaseRESTfulController;
+import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.service.pagehelper.PageList;
+import com.steerinfo.framework.utils.collection.ListUtils;
+import com.steerinfo.dil.model.DilBatch;
+import com.steerinfo.dil.service.IDilBatchService;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.ArrayList;
+import java.math.BigDecimal;
+
+/**
+ * DilBatch RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-11-06 10:22
+ * 类描述
+ * 修订历史:
+ * 日期:2021-11-06
+ * 作者:generator
+ * 参考:
+ * 描述:DilBatch RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/dilbatchs")
+public class DilBatchController extends BaseRESTfulController {
+
+    @Autowired
+    IDilBatchService dilBatchService;
+
+    @ApiOperation(value="获取列表", notes="分页查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("dilbatch:view")
+    @GetMapping(value = "/")
+    public RESTfulResult list(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<DilBatch> list = dilBatchService.queryForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+
+    @ApiOperation(value="获取列表", notes="分页模糊查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("dilbatch:view")
+    @GetMapping(value = "/like/")
+    public RESTfulResult listLike(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<DilBatch> list = dilBatchService.queryLikeForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+    
+    @ApiOperation(value="创建", notes="根据DilBatch对象创建")
+    @ApiImplicitParam(name = "dilBatch", value = "详细实体dilBatch", required = true, dataType = "DilBatch")
+    //@RequiresPermissions("dilbatch:create")
+    @PostMapping(value = "/")
+    public RESTfulResult add(@ModelAttribute DilBatch model){
+        DilBatch dilBatch = dilBatchService.add(model);
+        return success(dilBatch);
+    }
+
+    @ApiOperation(value="获取详细信息", notes="根据url的id来获取详细信息")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "Short")
+    //@RequiresPermissions("dilbatch:view")
+    @GetMapping(value = "/{id}")
+    public RESTfulResult get(@PathVariable Short id){
+        DilBatch dilBatch = dilBatchService.getById(id);
+        return success(dilBatch);
+    }
+
+    @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的dilBatch信息来更新详细信息")
+    @ApiImplicitParams({
+        @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "Short"),
+        @ApiImplicitParam(name = "dilBatch", value = "详细实体dilBatch", required = true, dataType = "DilBatch")
+    })
+    //@RequiresPermissions("dilbatch:update")
+    @PutMapping(value = "/{id}", produces  = "application/json;charset=UTF-8")
+    public RESTfulResult update(@PathVariable Short id, @RequestBody DilBatch model){
+        model.setId(id);
+        DilBatch dilBatch = dilBatchService.modify(model);
+        return success(dilBatch);
+    }
+
+    @ApiOperation(value="删除", notes="根据url的id来指定删除对象")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "Short")
+    //@RequiresPermissions("dilbatch:delete")
+    @DeleteMapping(value = "/{id}")//Short
+    public RESTfulResult delete(@PathVariable String id){
+    	List<String> list = Arrays.asList(id.split(","));
+    	if(ListUtils.isNotEmpty(list)) {
+	    	List<Short> ids = ListUtils.convertList(list);
+			  dilBatchService.delete(ids);
+    	}
+      return success();
+    }
+}

+ 4 - 1
src/main/java/com/steerinfo/dil/mapper/AmsshipCargoTransferResultMapper.java

@@ -28,10 +28,13 @@ public interface AmsshipCargoTransferResultMapper extends IBaseMapper<AmsshipCar
     List<Map<String,Object>> getCargoId();
     List<Map<String,Object>> selectByOrder(Integer cargoTransferResultId);
     //    List<Map<String,Object>>  updateByBatchId(Integer betchId);
+    //插入批次
     List<Map<String,Object>>  insertBetchId( );
-
+    //通过
     BigDecimal selectPortId(BigDecimal pierId);
 
     @Select("select seq_AMSSHIP_CARGO.nextval from dual")
     BigDecimal selectCargoId();
+    //获取船运物资id
+    List<Map<String,Object>> selectMaterialIdByMaterialTypeId();
 }

+ 14 - 0
src/main/java/com/steerinfo/dil/mapper/DilBatchMapper.java

@@ -0,0 +1,14 @@
+package com.steerinfo.dil.mapper;
+
+import com.steerinfo.dil.model.DilBatch;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import java.math.*;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Select;
+
+@Mapper
+public interface DilBatchMapper extends IBaseMapper<DilBatch, Short> {
+    //获取当前序列值+1
+    @Select("select seq_DIL_BATCH.nextval from dual")
+    BigDecimal selectBatchId();
+}

+ 19 - 3
src/main/java/com/steerinfo/dil/model/AmsshipCargoTransferResult.java

@@ -3,13 +3,14 @@ package com.steerinfo.dil.model;
 import com.steerinfo.framework.model.IBasePO;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
+
 import java.math.BigDecimal;
 import java.util.Date;
 
 @ApiModel(value="货权转移实绩")
 public class AmsshipCargoTransferResult implements IBasePO<BigDecimal> {
     /**
-     * 实绩ID(CARGO_TRANSFER_RESULT_ID,DECIMAL,38)
+     * 实绩ID(CARGO_TRANSFER_RESULT_ID,DECIMAL,0)
      */
     @ApiModelProperty(value="实绩ID",required=true)
     private BigDecimal cargoTransferResultId;
@@ -21,7 +22,7 @@ public class AmsshipCargoTransferResult implements IBasePO<BigDecimal> {
     private String resultNumber;
 
     /**
-     * 货权转移送达单位(CARRIER_ID,DECIMAL,38)
+     * 货权转移送达单位(CARRIER_ID,DECIMAL,0)
      */
     @ApiModelProperty(value="货权转移送达单位",required=false)
     private BigDecimal carrierId;
@@ -39,7 +40,7 @@ public class AmsshipCargoTransferResult implements IBasePO<BigDecimal> {
     private String resultTelephoneFax;
 
     /**
-     * 收货人ID(GROUP_ID,DECIMAL,38)
+     * 收货人ID(GROUP_ID,DECIMAL,0)
      */
     @ApiModelProperty(value="收货人ID",required=false)
     private BigDecimal groupId;
@@ -116,6 +117,12 @@ public class AmsshipCargoTransferResult implements IBasePO<BigDecimal> {
     @ApiModelProperty(value="是否删除",required=false)
     private BigDecimal deleted;
 
+    /**
+     * 放货日期(RESULT_DATE_OF_LOANS,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="放货日期",required=false)
+    private Date resultDateOfLoans;
+
     private static final long serialVersionUID = 1L;
 
     @Override
@@ -272,6 +279,14 @@ public class AmsshipCargoTransferResult implements IBasePO<BigDecimal> {
         this.deleted = deleted;
     }
 
+    public Date getResultDateOfLoans() {
+        return resultDateOfLoans;
+    }
+
+    public void setResultDateOfLoans(Date resultDateOfLoans) {
+        this.resultDateOfLoans = resultDateOfLoans;
+    }
+
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
@@ -296,6 +311,7 @@ public class AmsshipCargoTransferResult implements IBasePO<BigDecimal> {
         sb.append(", updateTime=").append(updateTime);
         sb.append(", insertUpdateRemark=").append(insertUpdateRemark);
         sb.append(", deleted=").append(deleted);
+        sb.append(", resultDateOfLoans=").append(resultDateOfLoans);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();

+ 155 - 0
src/main/java/com/steerinfo/dil/model/DilBatch.java

@@ -0,0 +1,155 @@
+package com.steerinfo.dil.model;
+
+import com.steerinfo.framework.model.IBasePO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@ApiModel(value="采购批次表")
+public class DilBatch implements IBasePO<Short> {
+    /**
+     * 批次ID(BATCH_ID,DECIMAL,0)
+     */
+    @ApiModelProperty(value="批次ID",required=true)
+    private BigDecimal batchId;
+
+    /**
+     * 外轮船名(RESULT_FOREIGN_SHIP_NAME,VARCHAR,20)
+     */
+    @ApiModelProperty(value="外轮船名",required=false)
+    private String resultForeignShipName;
+
+    /**
+     * 物资ID(MATERIAL_ID,DECIMAL,0)
+     */
+    @ApiModelProperty(value="物资ID",required=false)
+    private BigDecimal materialId;
+
+    /**
+     * 记录创建人(INSERT_USERNAME,VARCHAR,20)
+     */
+    @ApiModelProperty(value="记录创建人",required=false)
+    private String insertUsername;
+
+    /**
+     * 记录创建时间(INSERT_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="记录创建时间",required=false)
+    private Date insertTime;
+
+    /**
+     * 记录修改人(UPDATE_USERNAME,VARCHAR,20)
+     */
+    @ApiModelProperty(value="记录修改人",required=false)
+    private String updateUsername;
+
+    /**
+     * 记录修改时间(UPDATE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="记录修改时间",required=false)
+    private Date updateTime;
+
+    /**
+     * 记录创建或修改备注(INSERT_UPDATE_REMARK,VARCHAR,100)
+     */
+    @ApiModelProperty(value="记录创建或修改备注",required=false)
+    private String insertUpdateRemark;
+
+    private static final long serialVersionUID = 1L;
+
+    public BigDecimal getBatchId() {
+        return batchId;
+    }
+
+    public void setBatchId(BigDecimal batchId) {
+        this.batchId = batchId;
+    }
+
+    public void setMaterialId(BigDecimal materialId) {
+        this.materialId = materialId;
+    }
+
+    public String getResultForeignShipName() {
+        return resultForeignShipName;
+    }
+
+    public void setResultForeignShipName(String resultForeignShipName) {
+        this.resultForeignShipName = resultForeignShipName == null ? null : resultForeignShipName.trim();
+    }
+
+    public BigDecimal getMaterialId() {
+        return materialId;
+    }
+
+    public String getInsertUsername() {
+        return insertUsername;
+    }
+
+    public void setInsertUsername(String insertUsername) {
+        this.insertUsername = insertUsername == null ? null : insertUsername.trim();
+    }
+
+    public Date getInsertTime() {
+        return insertTime;
+    }
+
+    public void setInsertTime(Date insertTime) {
+        this.insertTime = insertTime;
+    }
+
+    public String getUpdateUsername() {
+        return updateUsername;
+    }
+
+    public void setUpdateUsername(String updateUsername) {
+        this.updateUsername = updateUsername == null ? null : updateUsername.trim();
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public String getInsertUpdateRemark() {
+        return insertUpdateRemark;
+    }
+
+    public void setInsertUpdateRemark(String insertUpdateRemark) {
+        this.insertUpdateRemark = insertUpdateRemark == null ? null : insertUpdateRemark.trim();
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", batchId=").append(batchId);
+        sb.append(", resultForeignShipName=").append(resultForeignShipName);
+        sb.append(", materialId=").append(materialId);
+        sb.append(", insertUsername=").append(insertUsername);
+        sb.append(", insertTime=").append(insertTime);
+        sb.append(", updateUsername=").append(updateUsername);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append(", insertUpdateRemark=").append(insertUpdateRemark);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+
+
+    @Override
+    public Short getId() {
+        return null;
+    }
+
+    @Override
+    public void setId(Short aShort) {
+
+    }
+}

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

@@ -24,7 +24,7 @@ import java.util.Map;
 public interface IAmsshipCargoTransferResultService{
     List<Map<String,Object>> seletCargoTransfer(Map<String,Object> mapVal);
     //添加货权转移信息
-    int insertSelective(AmsshipCargoTransferResult amsshipCargoTransferResult);
+    int addCargoTransferResult(Map<String,Object> map);
     //删除货权转移信息
     int deleteByPrimaryKey(BigDecimal cargoTransferResultId);
     //修改货权转移信息
@@ -37,5 +37,7 @@ public interface IAmsshipCargoTransferResultService{
     int updateByPrimaryKeySelective(AmsshipCargoTransferResult amsshipCargoTransferResult);
     List<Map<String,Object>> selectByOrder(Integer cargoTransferResultId);
     List<Map<String,Object>>  insertBetchId();
+    //查询船运物资id
+    List<Map<String,Object>> selectMaterialIdByMaterialTypeId();
 
 }

+ 23 - 0
src/main/java/com/steerinfo/dil/service/IDilBatchService.java

@@ -0,0 +1,23 @@
+package com.steerinfo.dil.service;
+
+import com.steerinfo.framework.service.IBaseService;
+import com.steerinfo.dil.model.DilBatch;
+import java.util.Date;
+import java.math.BigDecimal;
+
+/**
+ * DilBatch服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-11-06 10:22
+ * 类描述
+ * 修订历史:
+ * 日期:2021-11-06
+ * 作者:generator
+ * 参考:
+ * 描述:DilBatch服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface IDilBatchService extends IBaseService<DilBatch, Short>{
+
+}

+ 58 - 12
src/main/java/com/steerinfo/dil/service/impl/AmsshipCargoTransferResultServiceImpl.java

@@ -1,8 +1,10 @@
 package com.steerinfo.dil.service.impl;
 
 import com.steerinfo.dil.feign.WmshboundFeign;
+import com.steerinfo.dil.mapper.DilBatchMapper;
 import com.steerinfo.dil.model.AmsshipCargoTransferResult;
 import com.steerinfo.dil.mapper.AmsshipCargoTransferResultMapper;
+import com.steerinfo.dil.model.DilBatch;
 import com.steerinfo.dil.service.IAmsshipCargoTransferResultService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -35,6 +37,8 @@ public class AmsshipCargoTransferResultServiceImpl implements IAmsshipCargoTrans
     private AmsshipCargoTransferResultMapper amsshipCargoTransferResultMapper;
     @Autowired
     WmshboundFeign wmshboundFeign;
+    @Autowired
+    private DilBatchMapper dilBatchMapper;
 
     @Override
     public List<Map<String, Object>> seletCargoTransfer(Map<String, Object> mapVal) {
@@ -43,24 +47,62 @@ public class AmsshipCargoTransferResultServiceImpl implements IAmsshipCargoTrans
 
     @Override
     @Transactional
-    public int insertSelective(AmsshipCargoTransferResult amsshipCargoTransferResult) {
+    public int addCargoTransferResult(Map<String,Object> map) {
+        AmsshipCargoTransferResult amsshipCargoTransferResult=new AmsshipCargoTransferResult();
         //货权转移编号
         BigDecimal cargoTransferResultId = amsshipCargoTransferResultMapper.selectCargoId();
         amsshipCargoTransferResult.setCargoTransferResultId(cargoTransferResultId);
         SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
         String  date=sdf.format(new Date());
-        // 修改港存库实时库存
-        BigDecimal pierId = amsshipCargoTransferResult.getGroupId();
-        BigDecimal portId = amsshipCargoTransferResultMapper.selectPortId(pierId);
-        BigDecimal batchId = amsshipCargoTransferResult.getBatchId();
-        BigDecimal resultNumberOfLoans = amsshipCargoTransferResult.getResultNumberOfLoans();
-        Map<String,Object> map = new HashMap<>();
-        map.put("portId",portId);
-        map.put("batchId",batchId);
-        map.put("resultMaterialNumber",resultNumberOfLoans);
-        wmshboundFeign.addWarehousingResult(map);
+//        // 修改港存库实时库存
+//        BigDecimal pierId = amsshipCargoTransferResult.getGroupId();
+//        BigDecimal portId = amsshipCargoTransferResultMapper.selectPortId(pierId);
+//        BigDecimal batchId = amsshipCargoTransferResult.getBatchId();
+//        BigDecimal resultNumberOfLoans = amsshipCargoTransferResult.getResultNumberOfLoans();
+//        Map<String,Object> map1 = new HashMap<>();
+//        map.put("portId",portId);
+//        map.put("batchId",batchId);
+//        map.put("resultMaterialNumber",resultNumberOfLoans);
+//        wmshboundFeign.addWarehousingResult(map);
         String resultNumber="ZY"+date+"00"+cargoTransferResultId;
         amsshipCargoTransferResult.setResultNumber(resultNumber);
+        //同时新增批次
+        //获取外轮船名
+        String foreignShipName = (String)map.get("foreignShipName");
+        Integer materialId=(Integer)map.get("materialId");
+        //调用新增批次方法
+        DilBatch dilBatch=new DilBatch();
+        BigDecimal batchId1=dilBatchMapper.selectBatchId();
+        dilBatch.setBatchId(batchId1);
+        dilBatch.setInsertTime(new Date());
+        dilBatch.setResultForeignShipName(foreignShipName);
+        dilBatch.setMaterialId(new BigDecimal(materialId));
+        dilBatch.setInsertUsername("admin");
+        dilBatchMapper.insertSelective(dilBatch);
+        //获取批次id进行新增
+        amsshipCargoTransferResult.setBatchId(dilBatch.getBatchId());
+        //获取货权转移送达单位
+        Integer carrierId =(Integer)map.get("carrierId");
+        amsshipCargoTransferResult.setCarrierId(new BigDecimal(carrierId));
+        //获取联系人
+        String contactPerson =(String)map.get("contactPerson");
+        amsshipCargoTransferResult.setResultContactPerson(contactPerson);
+        //获取联系方式
+        String telephoneFax =(String)map.get("telephoneFax");
+        amsshipCargoTransferResult.setResultTelephoneFax(telephoneFax);
+        //获取收货人id
+        Integer groupId =(Integer)map.get("groupId");
+        amsshipCargoTransferResult.setGroupId(new BigDecimal(groupId));
+        //获取放货数量
+        Integer number =(Integer) map.get("number");
+        amsshipCargoTransferResult.setResultNumberOfLoans(new BigDecimal(number));
+        //获取货代信息
+        String forwaredingInfo = (String)map.get("forwaredingInfo");
+        amsshipCargoTransferResult.setResultFreightForwardingInfo(forwaredingInfo);
+        //获取备注
+        String remark =(String) map.get("remark");
+        amsshipCargoTransferResult.setInsertUpdateRemark(remark);
+        amsshipCargoTransferResult.setResultDateOfLoans(new Date());
         //  设置常规字段
         amsshipCargoTransferResult.setInsertTime(new Date());
         amsshipCargoTransferResult.setDeleteName(null);
@@ -70,7 +112,7 @@ public class AmsshipCargoTransferResultServiceImpl implements IAmsshipCargoTrans
         amsshipCargoTransferResult.setInsertUpdateRemark("无");
         amsshipCargoTransferResult.setUpdateUsername("admin");
         amsshipCargoTransferResult.setDeleted(new BigDecimal(0));
-        return amsshipCargoTransferResultMapper.insert(amsshipCargoTransferResult);
+        return amsshipCargoTransferResultMapper.insertSelective(amsshipCargoTransferResult);
     }
 
     @Override
@@ -118,6 +160,10 @@ public class AmsshipCargoTransferResultServiceImpl implements IAmsshipCargoTrans
         return amsshipCargoTransferResultMapper.insertBetchId();
     }
 
+    @Override
+    public List<Map<String, Object>> selectMaterialIdByMaterialTypeId() {
+        return amsshipCargoTransferResultMapper.selectMaterialIdByMaterialTypeId();
+    }
 
 
 }

+ 36 - 0
src/main/java/com/steerinfo/dil/service/impl/DilBatchServiceImpl.java

@@ -0,0 +1,36 @@
+package com.steerinfo.dil.service.impl;
+
+import com.steerinfo.framework.mapper.IBaseMapper;
+import com.steerinfo.framework.service.impl.BaseServiceImpl;
+import com.steerinfo.dil.model.DilBatch;
+import com.steerinfo.dil.mapper.DilBatchMapper;
+import com.steerinfo.dil.service.IDilBatchService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import java.util.Date;
+import java.math.BigDecimal;
+
+/**
+ * DilBatch服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-11-06 10:22
+ * 类描述
+ * 修订历史:
+ * 日期:2021-11-06
+ * 作者:generator
+ * 参考:
+ * 描述:DilBatch服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "dilBatchService")
+public class DilBatchServiceImpl extends BaseServiceImpl<DilBatch, Short> implements IDilBatchService {
+
+    @Autowired
+    private DilBatchMapper dilBatchMapper;
+
+    @Override
+    protected IBaseMapper<DilBatch, Short> getMapper() {
+        return dilBatchMapper;
+    }
+}

+ 119 - 107
src/main/resources/com/steerinfo/dil/mapper/AmsshipCargoTransferResultMapper.xml

@@ -2,46 +2,43 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.steerinfo.dil.mapper.AmsshipCargoTransferResultMapper">
     <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.AmsshipCargoTransferResult">
-        <id column="CARGO_TRANSFER_RESULT_ID" jdbcType="DECIMAL" property="cargoTransferResultId"/>
-        <result column="RESULT_NUMBER" jdbcType="VARCHAR" property="resultNumber"/>
-        <result column="CARRIER_ID" jdbcType="DECIMAL" property="carrierId"/>
-        <result column="RESULT_CONTACT_PERSON" jdbcType="VARCHAR" property="resultContactPerson"/>
-        <result column="RESULT_TELEPHONE_FAX" jdbcType="VARCHAR" property="resultTelephoneFax"/>
-        <result column="GROUP_ID" jdbcType="DECIMAL" property="groupId"/>
-        <result column="BATCH_ID" jdbcType="DECIMAL" property="batchId"/>
-        <result column="RESULT_NUMBER_OF_LOANS" jdbcType="DECIMAL" property="resultNumberOfLoans"/>
-        <result column="RESULT_FREIGHT_FORWARDING_INFO" jdbcType="VARCHAR" property="resultFreightForwardingInfo"/>
-        <result column="RESULT_MEMO" jdbcType="VARCHAR" property="resultMemo"/>
-        <result column="DELETE_NAME" jdbcType="VARCHAR" property="deleteName"/>
-        <result column="DELETE_TIME" jdbcType="VARCHAR" property="deleteTime"/>
-        <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername"/>
-        <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime"/>
-        <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="DELETED" jdbcType="DECIMAL" property="deleted"/>
+        <id column="CARGO_TRANSFER_RESULT_ID" jdbcType="DECIMAL" property="cargoTransferResultId" />
+        <result column="RESULT_NUMBER" jdbcType="VARCHAR" property="resultNumber" />
+        <result column="CARRIER_ID" jdbcType="DECIMAL" property="carrierId" />
+        <result column="RESULT_CONTACT_PERSON" jdbcType="VARCHAR" property="resultContactPerson" />
+        <result column="RESULT_TELEPHONE_FAX" jdbcType="VARCHAR" property="resultTelephoneFax" />
+        <result column="GROUP_ID" jdbcType="DECIMAL" property="groupId" />
+        <result column="BATCH_ID" jdbcType="DECIMAL" property="batchId" />
+        <result column="RESULT_NUMBER_OF_LOANS" jdbcType="DECIMAL" property="resultNumberOfLoans" />
+        <result column="RESULT_FREIGHT_FORWARDING_INFO" jdbcType="VARCHAR" property="resultFreightForwardingInfo" />
+        <result column="RESULT_MEMO" jdbcType="VARCHAR" property="resultMemo" />
+        <result column="DELETE_NAME" jdbcType="VARCHAR" property="deleteName" />
+        <result column="DELETE_TIME" jdbcType="VARCHAR" property="deleteTime" />
+        <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
+        <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
+        <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="DELETED" jdbcType="DECIMAL" property="deleted" />
+        <result column="RESULT_DATE_OF_LOANS" jdbcType="TIMESTAMP" property="resultDateOfLoans" />
     </resultMap>
     <sql id="columns">
-        CARGO_TRANSFER_RESULT_ID, RESULT_NUMBER, CARRIER_ID, RESULT_CONTACT_PERSON, RESULT_TELEPHONE_FAX,
-    GROUP_ID, BATCH_ID, RESULT_NUMBER_OF_LOANS, RESULT_FREIGHT_FORWARDING_INFO, RESULT_MEMO,
-    DELETE_NAME, DELETE_TIME, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME,
-    INSERT_UPDATE_REMARK, DELETED
+    CARGO_TRANSFER_RESULT_ID, RESULT_NUMBER, CARRIER_ID, RESULT_CONTACT_PERSON, RESULT_TELEPHONE_FAX,
+    GROUP_ID, BATCH_ID, RESULT_NUMBER_OF_LOANS, RESULT_FREIGHT_FORWARDING_INFO, RESULT_MEMO, 
+    DELETE_NAME, DELETE_TIME, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, 
+    INSERT_UPDATE_REMARK, DELETED, RESULT_DATE_OF_LOANS
     </sql>
     <sql id="columns_alias">
-        t.CARGO_TRANSFER_RESULT_ID, t.RESULT_NUMBER, t.CARRIER_ID, t.RESULT_CONTACT_PERSON,
-    t.RESULT_TELEPHONE_FAX, t.GROUP_ID, t.BATCH_ID, t.RESULT_NUMBER_OF_LOANS, t.RESULT_FREIGHT_FORWARDING_INFO,
-    t.RESULT_MEMO, 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.CARGO_TRANSFER_RESULT_ID, t.RESULT_NUMBER, t.CARRIER_ID, t.RESULT_CONTACT_PERSON, 
+    t.RESULT_TELEPHONE_FAX, t.GROUP_ID, t.BATCH_ID, t.RESULT_NUMBER_OF_LOANS, t.RESULT_FREIGHT_FORWARDING_INFO, 
+    t.RESULT_MEMO, 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.RESULT_DATE_OF_LOANS
     </sql>
     <sql id="select">
-        SELECT
-        <include refid="columns"/>
-        FROM AMSSHIP_CARGO_TRANSFER_RESULT
+        SELECT <include refid="columns" /> FROM AMSSHIP_CARGO_TRANSFER_RESULT
     </sql>
     <sql id="select_alias">
-        SELECT
-        <include refid="columns_alias"/>
-        FROM AMSSHIP_CARGO_TRANSFER_RESULT t
+        SELECT <include refid="columns_alias" /> FROM AMSSHIP_CARGO_TRANSFER_RESULT t
     </sql>
     <sql id="where">
         <where>
@@ -99,6 +96,9 @@
             <if test="deleted != null">
                 and DELETED = #{deleted}
             </if>
+            <if test="resultDateOfLoans != null">
+                and TO_CHAR(RESULT_DATE_OF_LOANS,'yyyy-MM-dd') = #{resultDateOfLoans}
+            </if>
         </where>
     </sql>
     <sql id="whereLike">
@@ -157,11 +157,13 @@
             <if test="deleted != null">
                 and DELETED = #{deleted}
             </if>
+            <if test="resultDateOfLoans != null">
+                and TO_CHAR(RESULT_DATE_OF_LOANS,'yyyy-MM-dd') = #{resultDateOfLoans}
+            </if>
         </where>
     </sql>
-    <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
-        delete
-        from AMSSHIP_CARGO_TRANSFER_RESULT
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
+        delete from AMSSHIP_CARGO_TRANSFER_RESULT
         where CARGO_TRANSFER_RESULT_ID = #{cargoTransferResultId,jdbcType=DECIMAL}
     </delete>
     <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
@@ -218,6 +220,9 @@
         <if test="deleted != null">
             or DELETED = #{deleted}
         </if>
+        <if test="resultDateOfLoans != null">
+            or TO_CHAR(RESULT_DATE_OF_LOANS,'yyyy-MM-dd') = '#{resultDateOfLoans}'
+        </if>
     </delete>
     <insert id="insert" parameterType="com.steerinfo.dil.model.AmsshipCargoTransferResult">
         insert into AMSSHIP_CARGO_TRANSFER_RESULT (CARGO_TRANSFER_RESULT_ID, RESULT_NUMBER,
@@ -226,15 +231,16 @@
                                                    RESULT_FREIGHT_FORWARDING_INFO, RESULT_MEMO,
                                                    DELETE_NAME, DELETE_TIME, INSERT_USERNAME,
                                                    INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME,
-                                                   INSERT_UPDATE_REMARK, DELETED)
+                                                   INSERT_UPDATE_REMARK, DELETED, RESULT_DATE_OF_LOANS
+        )
         values (#{cargoTransferResultId,jdbcType=DECIMAL}, #{resultNumber,jdbcType=VARCHAR},
-                #{carrierId,jdbcType=DECIMAL}, #{resultContactPerson,jdbcType=VARCHAR},
-                #{resultTelephoneFax,jdbcType=VARCHAR},
+                #{carrierId,jdbcType=DECIMAL}, #{resultContactPerson,jdbcType=VARCHAR}, #{resultTelephoneFax,jdbcType=VARCHAR},
                 #{groupId,jdbcType=DECIMAL}, #{batchId,jdbcType=DECIMAL}, #{resultNumberOfLoans,jdbcType=DECIMAL},
                 #{resultFreightForwardingInfo,jdbcType=VARCHAR}, #{resultMemo,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})
+                #{insertUpdateRemark,jdbcType=VARCHAR}, #{deleted,jdbcType=DECIMAL}, #{resultDateOfLoans,jdbcType=TIMESTAMP}
+               )
     </insert>
     <insert id="insertSelective" parameterType="com.steerinfo.dil.model.AmsshipCargoTransferResult">
         insert into AMSSHIP_CARGO_TRANSFER_RESULT
@@ -293,6 +299,9 @@
             <if test="deleted != null">
                 DELETED,
             </if>
+            <if test="resultDateOfLoans != null">
+                RESULT_DATE_OF_LOANS,
+            </if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="cargoTransferResultId != null">
@@ -349,27 +358,31 @@
             <if test="deleted != null">
                 #{deleted,jdbcType=DECIMAL},
             </if>
+            <if test="resultDateOfLoans != null">
+                #{resultDateOfLoans,jdbcType=TIMESTAMP},
+            </if>
         </trim>
     </insert>
     <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.AmsshipCargoTransferResult">
         update AMSSHIP_CARGO_TRANSFER_RESULT
-        set RESULT_NUMBER                  = #{resultNumber,jdbcType=VARCHAR},
-            CARRIER_ID                     = #{carrierId,jdbcType=DECIMAL},
-            RESULT_CONTACT_PERSON          = #{resultContactPerson,jdbcType=VARCHAR},
-            RESULT_TELEPHONE_FAX           = #{resultTelephoneFax,jdbcType=VARCHAR},
-            GROUP_ID                       = #{groupId,jdbcType=DECIMAL},
-            BATCH_ID                       = #{batchId,jdbcType=DECIMAL},
-            RESULT_NUMBER_OF_LOANS         = #{resultNumberOfLoans,jdbcType=DECIMAL},
+        set RESULT_NUMBER = #{resultNumber,jdbcType=VARCHAR},
+            CARRIER_ID = #{carrierId,jdbcType=DECIMAL},
+            RESULT_CONTACT_PERSON = #{resultContactPerson,jdbcType=VARCHAR},
+            RESULT_TELEPHONE_FAX = #{resultTelephoneFax,jdbcType=VARCHAR},
+            GROUP_ID = #{groupId,jdbcType=DECIMAL},
+            BATCH_ID = #{batchId,jdbcType=DECIMAL},
+            RESULT_NUMBER_OF_LOANS = #{resultNumberOfLoans,jdbcType=DECIMAL},
             RESULT_FREIGHT_FORWARDING_INFO = #{resultFreightForwardingInfo,jdbcType=VARCHAR},
-            RESULT_MEMO                    = #{resultMemo,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}
+            RESULT_MEMO = #{resultMemo,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},
+            RESULT_DATE_OF_LOANS = #{resultDateOfLoans,jdbcType=TIMESTAMP}
         where CARGO_TRANSFER_RESULT_ID = #{cargoTransferResultId,jdbcType=DECIMAL}
     </update>
     <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.AmsshipCargoTransferResult">
@@ -426,20 +439,23 @@
             <if test="deleted != null">
                 DELETED = #{deleted,jdbcType=DECIMAL},
             </if>
+            <if test="resultDateOfLoans != null">
+                RESULT_DATE_OF_LOANS = #{resultDateOfLoans,jdbcType=TIMESTAMP},
+            </if>
         </set>
         where CARGO_TRANSFER_RESULT_ID = #{cargoTransferResultId,jdbcType=DECIMAL}
     </update>
-    <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
-        <include refid="select"/>
+    <select id="selectByPrimaryKey" parameterType="java.lang.Short" resultMap="BaseResultMap">
+        <include refid="select" />
         where CARGO_TRANSFER_RESULT_ID = #{cargoTransferResultId,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 AMSSHIP_CARGO_TRANSFER_RESULT
@@ -451,130 +467,114 @@
         DELETE_NAME, DELETE_TIME, INSERT_USERNAME,
         INSERT_TIME, UPDATE_USERNAME,
         UPDATE_TIME, INSERT_UPDATE_REMARK,
-        DELETED)
+        DELETED, RESULT_DATE_OF_LOANS)
         ( <foreach collection="list" item="item" separator="union all">
         select
         #{item.cargoTransferResultId,jdbcType=DECIMAL},
-        #{item.resultNumber,jdbcType=VARCHAR}, #{item.carrierId,jdbcType=DECIMAL},
-        #{item.resultContactPerson,jdbcType=VARCHAR},
+        #{item.resultNumber,jdbcType=VARCHAR}, #{item.carrierId,jdbcType=DECIMAL}, #{item.resultContactPerson,jdbcType=VARCHAR},
         #{item.resultTelephoneFax,jdbcType=VARCHAR}, #{item.groupId,jdbcType=DECIMAL},
         #{item.batchId,jdbcType=DECIMAL}, #{item.resultNumberOfLoans,jdbcType=DECIMAL},
         #{item.resultFreightForwardingInfo,jdbcType=VARCHAR}, #{item.resultMemo,jdbcType=VARCHAR},
-        #{item.deleteName,jdbcType=VARCHAR}, #{item.deleteTime,jdbcType=VARCHAR},
-        #{item.insertUsername,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} from dual
+        #{item.deleted,jdbcType=DECIMAL}, #{item.resultDateOfLoans,jdbcType=TIMESTAMP} from dual
     </foreach> )
     </insert>
     <update id="batchUpdate" parameterType="java.util.List">
         update AMSSHIP_CARGO_TRANSFER_RESULT
         set
         CARGO_TRANSFER_RESULT_ID=
-        <foreach collection="list" item="item" index="index" separator=" " open="case CARGO_TRANSFER_RESULT_ID"
-                 close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case CARGO_TRANSFER_RESULT_ID" separator=" ">
             when #{item.cargoTransferResultId,jdbcType=DECIMAL} then #{item.cargoTransferResultId,jdbcType=DECIMAL}
         </foreach>
         ,RESULT_NUMBER=
-        <foreach collection="list" item="item" index="index" separator=" " open="case CARGO_TRANSFER_RESULT_ID"
-                 close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case CARGO_TRANSFER_RESULT_ID" separator=" ">
             when #{item.cargoTransferResultId,jdbcType=DECIMAL} then #{item.resultNumber,jdbcType=VARCHAR}
         </foreach>
         ,CARRIER_ID=
-        <foreach collection="list" item="item" index="index" separator=" " open="case CARGO_TRANSFER_RESULT_ID"
-                 close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case CARGO_TRANSFER_RESULT_ID" separator=" ">
             when #{item.cargoTransferResultId,jdbcType=DECIMAL} then #{item.carrierId,jdbcType=DECIMAL}
         </foreach>
         ,RESULT_CONTACT_PERSON=
-        <foreach collection="list" item="item" index="index" separator=" " open="case CARGO_TRANSFER_RESULT_ID"
-                 close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case CARGO_TRANSFER_RESULT_ID" separator=" ">
             when #{item.cargoTransferResultId,jdbcType=DECIMAL} then #{item.resultContactPerson,jdbcType=VARCHAR}
         </foreach>
         ,RESULT_TELEPHONE_FAX=
-        <foreach collection="list" item="item" index="index" separator=" " open="case CARGO_TRANSFER_RESULT_ID"
-                 close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case CARGO_TRANSFER_RESULT_ID" separator=" ">
             when #{item.cargoTransferResultId,jdbcType=DECIMAL} then #{item.resultTelephoneFax,jdbcType=VARCHAR}
         </foreach>
         ,GROUP_ID=
-        <foreach collection="list" item="item" index="index" separator=" " open="case CARGO_TRANSFER_RESULT_ID"
-                 close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case CARGO_TRANSFER_RESULT_ID" separator=" ">
             when #{item.cargoTransferResultId,jdbcType=DECIMAL} then #{item.groupId,jdbcType=DECIMAL}
         </foreach>
         ,BATCH_ID=
-        <foreach collection="list" item="item" index="index" separator=" " open="case CARGO_TRANSFER_RESULT_ID"
-                 close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case CARGO_TRANSFER_RESULT_ID" separator=" ">
             when #{item.cargoTransferResultId,jdbcType=DECIMAL} then #{item.batchId,jdbcType=DECIMAL}
         </foreach>
         ,RESULT_NUMBER_OF_LOANS=
-        <foreach collection="list" item="item" index="index" separator=" " open="case CARGO_TRANSFER_RESULT_ID"
-                 close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case CARGO_TRANSFER_RESULT_ID" separator=" ">
             when #{item.cargoTransferResultId,jdbcType=DECIMAL} then #{item.resultNumberOfLoans,jdbcType=DECIMAL}
         </foreach>
         ,RESULT_FREIGHT_FORWARDING_INFO=
-        <foreach collection="list" item="item" index="index" separator=" " open="case CARGO_TRANSFER_RESULT_ID"
-                 close="end">
-            when #{item.cargoTransferResultId,jdbcType=DECIMAL} then
-            #{item.resultFreightForwardingInfo,jdbcType=VARCHAR}
+        <foreach close="end" collection="list" index="index" item="item" open="case CARGO_TRANSFER_RESULT_ID" separator=" ">
+            when #{item.cargoTransferResultId,jdbcType=DECIMAL} then #{item.resultFreightForwardingInfo,jdbcType=VARCHAR}
         </foreach>
         ,RESULT_MEMO=
-        <foreach collection="list" item="item" index="index" separator=" " open="case CARGO_TRANSFER_RESULT_ID"
-                 close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case CARGO_TRANSFER_RESULT_ID" separator=" ">
             when #{item.cargoTransferResultId,jdbcType=DECIMAL} then #{item.resultMemo,jdbcType=VARCHAR}
         </foreach>
         ,DELETE_NAME=
-        <foreach collection="list" item="item" index="index" separator=" " open="case CARGO_TRANSFER_RESULT_ID"
-                 close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case CARGO_TRANSFER_RESULT_ID" separator=" ">
             when #{item.cargoTransferResultId,jdbcType=DECIMAL} then #{item.deleteName,jdbcType=VARCHAR}
         </foreach>
         ,DELETE_TIME=
-        <foreach collection="list" item="item" index="index" separator=" " open="case CARGO_TRANSFER_RESULT_ID"
-                 close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case CARGO_TRANSFER_RESULT_ID" separator=" ">
             when #{item.cargoTransferResultId,jdbcType=DECIMAL} then #{item.deleteTime,jdbcType=VARCHAR}
         </foreach>
         ,INSERT_USERNAME=
-        <foreach collection="list" item="item" index="index" separator=" " open="case CARGO_TRANSFER_RESULT_ID"
-                 close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case CARGO_TRANSFER_RESULT_ID" separator=" ">
             when #{item.cargoTransferResultId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
         </foreach>
         ,INSERT_TIME=
-        <foreach collection="list" item="item" index="index" separator=" " open="case CARGO_TRANSFER_RESULT_ID"
-                 close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case CARGO_TRANSFER_RESULT_ID" separator=" ">
             when #{item.cargoTransferResultId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
         </foreach>
         ,UPDATE_USERNAME=
-        <foreach collection="list" item="item" index="index" separator=" " open="case CARGO_TRANSFER_RESULT_ID"
-                 close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case CARGO_TRANSFER_RESULT_ID" separator=" ">
             when #{item.cargoTransferResultId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
         </foreach>
         ,UPDATE_TIME=
-        <foreach collection="list" item="item" index="index" separator=" " open="case CARGO_TRANSFER_RESULT_ID"
-                 close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case CARGO_TRANSFER_RESULT_ID" separator=" ">
             when #{item.cargoTransferResultId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
         </foreach>
         ,INSERT_UPDATE_REMARK=
-        <foreach collection="list" item="item" index="index" separator=" " open="case CARGO_TRANSFER_RESULT_ID"
-                 close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case CARGO_TRANSFER_RESULT_ID" separator=" ">
             when #{item.cargoTransferResultId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
         </foreach>
         ,DELETED=
-        <foreach collection="list" item="item" index="index" separator=" " open="case CARGO_TRANSFER_RESULT_ID"
-                 close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case CARGO_TRANSFER_RESULT_ID" separator=" ">
             when #{item.cargoTransferResultId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
         </foreach>
+        ,RESULT_DATE_OF_LOANS=
+        <foreach close="end" collection="list" index="index" item="item" open="case CARGO_TRANSFER_RESULT_ID" separator=" ">
+            when #{item.cargoTransferResultId,jdbcType=DECIMAL} then #{item.resultDateOfLoans,jdbcType=TIMESTAMP}
+        </foreach>
         where CARGO_TRANSFER_RESULT_ID in
-        <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+        <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
             #{item.cargoTransferResultId,jdbcType=DECIMAL}
         </foreach>
     </update>
     <delete id="batchDelete" parameterType="java.util.List">
         delete from AMSSHIP_CARGO_TRANSFER_RESULT
         where CARGO_TRANSFER_RESULT_ID in
-        <foreach collection="list" item="id" open="(" close=")" separator=",">
+        <foreach close=")" collection="list" item="id" open="(" separator=",">
             #{id}
         </foreach>
     </delete>
     <!-- 友情提示!!!-->
     <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+
     <select id="seletCargoTransfer" resultType="java.util.Map">
         select *
         from
@@ -716,5 +716,17 @@
         FROM RMS_PIER
         WHERE PIER_ID = #{pierId}
     </select>
+    <!-- 查询船运物资id-->
+    <select id="selectMaterialIdByMaterialTypeId" resultType="java.util.LinkedHashMap">
+        select  RM.MATERIAL_ID "id",
+                RM.MATERIAL_ID "value",
+                RM.MATERIAL_NAME  "label"
+
+        from RMS_MATERIAL RM
+                 left join RMS_MATERIAL_TYPE RMT
+                           on RM.MATERIAL_TYPE_ID=RMT.MATERIAL_TYPE_ID
+        where RM.MATERIAL_LENGTH is NULL  and RM.MATERIAL_SPECIFICATION is NULL
+          and   RMT.MATERIAL_TYPE_ID=1
+    </select>
 
 </mapper>

+ 293 - 0
src/main/resources/com/steerinfo/dil/mapper/DilBatchMapper.xml

@@ -0,0 +1,293 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.steerinfo.dil.mapper.DilBatchMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.DilBatch">
+    <id column="BATCH_ID" jdbcType="DECIMAL" property="batchId" />
+    <result column="RESULT_FOREIGN_SHIP_NAME" jdbcType="VARCHAR" property="resultForeignShipName" />
+    <result column="MATERIAL_ID" jdbcType="DECIMAL" property="materialId" />
+    <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
+    <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
+    <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" />
+  </resultMap>
+  <sql id="columns">
+    BATCH_ID, RESULT_FOREIGN_SHIP_NAME, MATERIAL_ID, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, 
+    UPDATE_TIME, INSERT_UPDATE_REMARK
+  </sql>
+  <sql id="columns_alias">
+    t.BATCH_ID, t.RESULT_FOREIGN_SHIP_NAME, t.MATERIAL_ID, t.INSERT_USERNAME, t.INSERT_TIME, 
+    t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns" /> FROM DIL_BATCH
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias" /> FROM DIL_BATCH t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="batchId != null">
+        and BATCH_ID = #{batchId}
+      </if>
+      <if test="resultForeignShipName != null and resultForeignShipName != ''">
+        and RESULT_FOREIGN_SHIP_NAME = #{resultForeignShipName}
+      </if>
+      <if test="materialId != null">
+        and MATERIAL_ID = #{materialId}
+      </if>
+      <if test="insertUsername != null and insertUsername != ''">
+        and INSERT_USERNAME = #{insertUsername}
+      </if>
+      <if test="insertTime != null">
+        and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
+      </if>
+      <if test="updateUsername != null and updateUsername != ''">
+        and UPDATE_USERNAME = #{updateUsername}
+      </if>
+      <if test="updateTime != null">
+        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+      </if>
+      <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
+        and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where> 
+      <if test="batchId != null">
+        and BATCH_ID = #{batchId}
+      </if>
+      <if test="resultForeignShipName != null and resultForeignShipName != ''">
+        and RESULT_FOREIGN_SHIP_NAME LIKE '%${resultForeignShipName}%'
+      </if>
+      <if test="materialId != null">
+        and MATERIAL_ID = #{materialId}
+      </if>
+      <if test="insertUsername != null and insertUsername != ''">
+        and INSERT_USERNAME LIKE '%${insertUsername}%'
+      </if>
+      <if test="insertTime != null">
+        and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
+      </if>
+      <if test="updateUsername != null and updateUsername != ''">
+        and UPDATE_USERNAME LIKE '%${updateUsername}%'
+      </if>
+      <if test="updateTime != null">
+        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+      </if>
+      <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
+        and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
+    delete from DIL_BATCH
+    where BATCH_ID = #{batchId,jdbcType=DECIMAL}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from DIL_BATCH
+    where 1!=1 
+      <if test="resultForeignShipName != null and resultForeignShipName != ''">
+        or RESULT_FOREIGN_SHIP_NAME = #{resultForeignShipName}
+      </if>
+      <if test="materialId != null">
+        or MATERIAL_ID = #{materialId}
+      </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>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.dil.model.DilBatch">
+    insert into DIL_BATCH (BATCH_ID, RESULT_FOREIGN_SHIP_NAME, MATERIAL_ID, 
+      INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, 
+      UPDATE_TIME, INSERT_UPDATE_REMARK)
+    values (#{batchId,jdbcType=DECIMAL}, #{resultForeignShipName,jdbcType=VARCHAR}, #{materialId,jdbcType=DECIMAL}, 
+      #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, 
+      #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.dil.model.DilBatch">
+    insert into DIL_BATCH
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="batchId != null">
+        BATCH_ID,
+      </if>
+      <if test="resultForeignShipName != null">
+        RESULT_FOREIGN_SHIP_NAME,
+      </if>
+      <if test="materialId != null">
+        MATERIAL_ID,
+      </if>
+      <if test="insertUsername != null">
+        INSERT_USERNAME,
+      </if>
+      <if test="insertTime != null">
+        INSERT_TIME,
+      </if>
+      <if test="updateUsername != null">
+        UPDATE_USERNAME,
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME,
+      </if>
+      <if test="insertUpdateRemark != null">
+        INSERT_UPDATE_REMARK,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="batchId != null">
+        #{batchId,jdbcType=DECIMAL},
+      </if>
+      <if test="resultForeignShipName != null">
+        #{resultForeignShipName,jdbcType=VARCHAR},
+      </if>
+      <if test="materialId != null">
+        #{materialId,jdbcType=DECIMAL},
+      </if>
+      <if test="insertUsername != null">
+        #{insertUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="insertTime != null">
+        #{insertTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateUsername != null">
+        #{updateUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="insertUpdateRemark != null">
+        #{insertUpdateRemark,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.DilBatch">
+    update DIL_BATCH
+    set RESULT_FOREIGN_SHIP_NAME = #{resultForeignShipName,jdbcType=VARCHAR},
+      MATERIAL_ID = #{materialId,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}
+    where BATCH_ID = #{batchId,jdbcType=DECIMAL}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.DilBatch">
+    update DIL_BATCH
+    <set>
+      <if test="resultForeignShipName != null">
+        RESULT_FOREIGN_SHIP_NAME = #{resultForeignShipName,jdbcType=VARCHAR},
+      </if>
+      <if test="materialId != null">
+        MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
+      </if>
+      <if test="insertUsername != null">
+        INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="insertTime != null">
+        INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateUsername != null">
+        UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="insertUpdateRemark != null">
+        INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where BATCH_ID = #{batchId,jdbcType=DECIMAL}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Short" resultMap="BaseResultMap">
+    <include refid="select" />
+    where BATCH_ID = #{batchId,jdbcType=DECIMAL}
+  </select>
+  <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select" />
+    <include refid="where" />
+  </select>
+  <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select" />
+    <include refid="whereLike" />
+  </select>
+  <insert id="batchInsert" parameterType="java.util.List">
+    insert into DIL_BATCH 
+      (BATCH_ID, 
+      RESULT_FOREIGN_SHIP_NAME, MATERIAL_ID, 
+      INSERT_USERNAME, INSERT_TIME, 
+      UPDATE_USERNAME, UPDATE_TIME, 
+      INSERT_UPDATE_REMARK)
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.batchId,jdbcType=DECIMAL}, 
+      #{item.resultForeignShipName,jdbcType=VARCHAR}, #{item.materialId,jdbcType=DECIMAL}, 
+      #{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP}, 
+      #{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP}, 
+      #{item.insertUpdateRemark,jdbcType=VARCHAR} from dual  
+   </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+     update DIL_BATCH
+     set
+       BATCH_ID=
+       <foreach close="end" collection="list" index="index" item="item" open="case BATCH_ID" separator=" ">
+          when #{item.batchId,jdbcType=DECIMAL} then #{item.batchId,jdbcType=DECIMAL}
+       </foreach>
+       ,RESULT_FOREIGN_SHIP_NAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case BATCH_ID" separator=" ">
+          when #{item.batchId,jdbcType=DECIMAL} then #{item.resultForeignShipName,jdbcType=VARCHAR}
+       </foreach>
+       ,MATERIAL_ID=
+       <foreach close="end" collection="list" index="index" item="item" open="case BATCH_ID" separator=" ">
+          when #{item.batchId,jdbcType=DECIMAL} then #{item.materialId,jdbcType=DECIMAL}
+       </foreach>
+       ,INSERT_USERNAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case BATCH_ID" separator=" ">
+          when #{item.batchId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
+       </foreach>
+       ,INSERT_TIME=
+       <foreach close="end" collection="list" index="index" item="item" open="case BATCH_ID" separator=" ">
+          when #{item.batchId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,UPDATE_USERNAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case BATCH_ID" separator=" ">
+          when #{item.batchId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
+       </foreach>
+       ,UPDATE_TIME=
+       <foreach close="end" collection="list" index="index" item="item" open="case BATCH_ID" separator=" ">
+          when #{item.batchId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,INSERT_UPDATE_REMARK=
+       <foreach close="end" collection="list" index="index" item="item" open="case BATCH_ID" separator=" ">
+          when #{item.batchId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
+       </foreach>
+     where BATCH_ID in 
+     <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
+    #{item.batchId,jdbcType=DECIMAL}
+     </foreach> 
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from DIL_BATCH
+    where BATCH_ID in 
+    <foreach close=")" collection="list" item="id" open="(" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+
+  
+</mapper>