Tiroble hace 3 años
padre
commit
c76b3faeb9

+ 1 - 1
pom.xml

@@ -117,7 +117,7 @@
 <!--                        <param>WMSP_INBOUND_CORRECT_RESULT</param>-->
 <!--                        <param>WMSP_INBOUND_DRIVING_RESULT</param>-->
 <!--                        <param>WMSP_GRID_MATERIAL</param>-->
-                        <param>RMS_STACKING</param>
+                        <param>WMSP_OUTBOUND_RESULT_MATERIAL</param>
                     </tables>
                 </configuration>
                 <executions>

+ 17 - 103
src/main/java/com/steerinfo/dil/controller/WmspOutboundResultController.java

@@ -5,6 +5,7 @@ import com.steerinfo.dil.mapper.CommonSeq;
 import com.steerinfo.dil.mapper.WmspInboundScanResultMapper;
 import com.steerinfo.dil.model.WmspOutboundResult;
 import com.steerinfo.dil.model.WmspOutboundScanResult;
+import com.steerinfo.dil.service.IWmspOutboundResultMaterialService;
 import com.steerinfo.dil.service.IWmspOutboundResultService;
 import com.steerinfo.dil.service.impl.WmspOutboundResultServiceImpl;
 import com.steerinfo.dil.util.BaseRESTfulController;
@@ -46,6 +47,8 @@ public class WmspOutboundResultController extends BaseRESTfulController {
     @Autowired
     WmspInboundScanResultMapper wmspInboundScanResultMapper;
     @Autowired
+    IWmspOutboundResultMaterialService wmspOutboundResultMaterialService;
+    @Autowired
     CommonSeq commonSeq;
     @Autowired
     ESFeign esFeign;
@@ -126,113 +129,24 @@ public class WmspOutboundResultController extends BaseRESTfulController {
         BigDecimal orderId = (BigDecimal) order.get("orderId");
 //        根据该运输订单Id判断当前订单是否已经完成出厂,若完成直接返回null
         if (wmspOutboundResultService.getOutboundStatus(orderId)==0){
-            /**根据运输订单号,查询出该订单还没有装货的物资*/
-            List<Map<String,Object>> orderList = wmspOutboundResultService.getMaterial(orderId.intValue());
-            //拿到还没装货的物资的物资编码
-            String materialCode = (String) orderList.get(0).get("materialCode");
-            //拿到还没装货的物资的物资名称
-            String materialName = (String) orderList.get(0).get("materialName");
-            //拿到还没装货的物资的规格
-            String materialSpecification = (String) orderList.get(0).get("materialSpecification");
-            //拿到还没装货的物资的型号
-            String materialModel = (String) orderList.get(0).get("materialModel");
-            //拿到还没装货的物资的物资理重
-            BigDecimal materialTheoreticalWeight = (BigDecimal) orderList.get(0).get("materialTheoreticalWeight");
-            //获取装卸工工号
-            //String personnelJobNumber = mapval.get("personnelJobNumber").toString();
-            //通过装卸工工号查询装卸工名称
-            //String personnelName = wmspOutboundResultService.getPersonnelNameByJobnumber(personnelJobNumber);
-
-        //拿到还没装货的物资id的第一条
-        BigDecimal materialId = (BigDecimal) orderList.get(0).get("materialId");
-        /**根据运输订单ID和物资id查询出库单(没有逻辑删除)
-         *          若orderNum大于0,则不是第一次扫描,已经新增出库单,返回详情信息
-         *          若orderNum等于0,则是第一次扫描,需要增加出库单,再返回详情信息
-         * */
-        Map<String,Object> map = new HashMap<>();
-        map.put("orderId",orderId);
-        map.put("materialId",materialId);
-        //初始化出库单详情信息
-        Map<String, Object> outBoundDetailedInfo=null;
+            /**根据运输订单ID和物资id查询出库单(没有逻辑删除)
+             *若orderNum大于0,则不是第一次扫描,已经新增出库单,返回详情信息
+             *若orderNum等于0,则是第一次扫描,需要增加出库单,再返回详情信息
+             * */
+            Map<String,Object> map = new HashMap<>();
+            map.put("orderId",orderId);
+            //初始化出库单详情信息
+            Map<String, Object> outBoundDetailedInfo=null;
             int orderNum = wmspOutboundResultService.ExistWmspOutboundResult(map);
             if(orderNum == 0){
-                /**创建出库单实体*/
-                WmspOutboundResult wmspOutboundResult = new WmspOutboundResult();
-                /**使用序列号增加生成主键id*/
-                int seq_wmspoutboundresult = commonSeq.getSeqNumber("seq__WMSP_OUTBOUND_RESULT");
-                /**获取到当前时间*/
-                SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
-                /**生成出库单编号*/
-                String resultNumber = "XSCK" + sdf.format(new Date());
-                if(seq_wmspoutboundresult < 10){
-                    resultNumber += "0000000" + seq_wmspoutboundresult;
-                }else if(seq_wmspoutboundresult < 100){
-                    resultNumber += "000000" + seq_wmspoutboundresult;
-                }else if(seq_wmspoutboundresult < 1000){
-                    resultNumber += "00000" + seq_wmspoutboundresult;
-                }else if(seq_wmspoutboundresult < 10000){
-                    resultNumber += "0000" + seq_wmspoutboundresult;
-                }else  if(seq_wmspoutboundresult < 100000){
-                    resultNumber += "000" + seq_wmspoutboundresult;
-                }else if(seq_wmspoutboundresult < 1000000){
-                    resultNumber += "00" + seq_wmspoutboundresult;
-                }else if(seq_wmspoutboundresult < 10000000){
-                    resultNumber += "0" + seq_wmspoutboundresult;
-                }else{
-                    resultNumber += seq_wmspoutboundresult;
-                }
-                /**拿到运输订单类型*/
-                BigDecimal orderType = (BigDecimal) order.get("orderType");
-                /**运输订单类型判断
-                 *    orderType : 1 为普通出库
-                 *    orderType : 4 为调拨出库
-                 * */
-                String resultOutboundType = "普通出库";
-                if(orderType.intValue() == 4){
-                    resultOutboundType = "调拨出库";
-                }
-                /**把出库单主键id添加到出库单实体中*/
-                wmspOutboundResult.setResultId(new BigDecimal(seq_wmspoutboundresult));
-                /**把出库单编号添加到出库单实体中*/
-                wmspOutboundResult.setResultNumber(resultNumber);
-                /**把运输订单主键添加到出库单实体中*/
-                wmspOutboundResult.setBillLadingId(orderId);
-                /**把出库类型添加到出库单实体中*/
-                wmspOutboundResult.setResultOutboundType(resultOutboundType);
-                /**第一次添加为待出库*/
-                wmspOutboundResult.setResultStatus(new BigDecimal(0));
-                //常规字段
-                wmspOutboundResult.setInsertUsername("admin");
-                wmspOutboundResult.setInsertTime(new Date());
-                wmspOutboundResult.setUpdateUsername("admin");
-                wmspOutboundResult.setUpdateTime(new Date());
-                wmspOutboundResult.setInsertUpdateRemark("无");
-                wmspOutboundResult.setDeleted(new BigDecimal(0));
-                //还没装货的物资id的第一条添加到出库单实体中
-                wmspOutboundResult.setMaterialId(materialId);
-                Integer res = wmspOutboundResultService.insertSelective(wmspOutboundResult);
-                if(res == 1){
+                //创建出货单
+                WmspOutboundResult wmspOutboundResult=wmspOutboundResultService.createOutboundResult(orderId,new BigDecimal(order.get("orderType").toString()));
+                if (wmspOutboundResult!=null){
+                    /**根据运输订单号,查询出该订单还没有装货的物资*/
+                    List<Map<String,Object>> orderList = wmspOutboundResultService.getMaterial(orderId.intValue());
+                    int status= wmspOutboundResultMaterialService.insertOutboundMaterial(orderId,orderList);
 
-                    //返回出库单详情信息
-                    outBoundDetailedInfo = wmspOutboundResultService.getOutBoundDetailedInfo(orderId);
-                    outBoundDetailedInfo.put("orderNumber",orderNumber);
-//                outBoundDetailedInfo.put("personnelName",personnelName);
-                    outBoundDetailedInfo.put("materialCode",materialCode);
-                    outBoundDetailedInfo.put("materialName",materialName);
-                    outBoundDetailedInfo.put("materialSpecification",materialSpecification);
-                    outBoundDetailedInfo.put("materialModel",materialModel);
-                    outBoundDetailedInfo.put("materialTheoreticalWeight",materialTheoreticalWeight);
                 }
-            }else{
-                //返回出库单详情信息
-                outBoundDetailedInfo = wmspOutboundResultService.getOutBoundDetailedInfo(orderId);
-                outBoundDetailedInfo.put("orderNumber",orderNumber);
-//            outBoundDetailedInfo.put("personnelName",personnelName);
-                outBoundDetailedInfo.put("materialCode",materialCode);
-                outBoundDetailedInfo.put("materialName",materialName);
-                outBoundDetailedInfo.put("materialSpecification",materialSpecification);
-                outBoundDetailedInfo.put("materialModel",materialModel);
-                outBoundDetailedInfo.put("materialTheoreticalWeight",materialTheoreticalWeight);
             }
             return outBoundDetailedInfo;
         }

+ 107 - 0
src/main/java/com/steerinfo/dil/controller/WmspOutboundResultMaterialController.java

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

+ 17 - 0
src/main/java/com/steerinfo/dil/mapper/WmspOutboundResultMaterialMapper.java

@@ -0,0 +1,17 @@
+package com.steerinfo.dil.mapper;
+
+import com.steerinfo.dil.model.WmspOutboundResultMaterial;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+@Mapper
+public interface WmspOutboundResultMaterialMapper extends IBaseMapper<WmspOutboundResultMaterial, BigDecimal> {
+
+    int insertOutboundMaterial(@Param("orderId") BigDecimal orderId, @Param("orderList") List<Map<String, Object>> orderList, @Param("nowDate") Date nowDate, @Param("user") String user);
+}

+ 169 - 0
src/main/java/com/steerinfo/dil/model/WmspOutboundResultMaterial.java

@@ -0,0 +1,169 @@
+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 WmspOutboundResultMaterial implements IBasePO<BigDecimal> {
+    /**
+     * 实绩与物资ID中间表(RESULT_MATERIAL_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="实绩与物资ID中间表",required=true)
+    private BigDecimal resultMaterialId;
+
+    /**
+     * 出库实绩ID(OUTBOUND_RESULT_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="出库实绩ID",required=false)
+    private BigDecimal outboundResultId;
+
+    /**
+     * 记录创建人(INSERT_USERNAME,VARCHAR,200)
+     */
+    @ApiModelProperty(value="记录创建人",required=false)
+    private String insertUsername;
+
+    /**
+     * 记录创建时间(INSERT_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="记录创建时间",required=false)
+    private Date insertTime;
+
+    /**
+     * 记录修改人(UPDATE_USERNAME,VARCHAR,200)
+     */
+    @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;
+
+    /**
+     * 逻辑删除(DELETED,DECIMAL,0)
+     */
+    @ApiModelProperty(value="逻辑删除",required=false)
+    private Short deleted;
+
+    /**
+     * 物资ID(MATERIAL_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="物资ID",required=false)
+    private BigDecimal materialId;
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public BigDecimal getId() {
+        return this.resultMaterialId;
+    }
+
+    @Override
+    public void setId(BigDecimal resultMaterialId) {
+        this.resultMaterialId = resultMaterialId;
+    }
+
+    public BigDecimal getResultMaterialId() {
+        return resultMaterialId;
+    }
+
+    public void setResultMaterialId(BigDecimal resultMaterialId) {
+        this.resultMaterialId = resultMaterialId;
+    }
+
+    public BigDecimal getOutboundResultId() {
+        return outboundResultId;
+    }
+
+    public void setOutboundResultId(BigDecimal outboundResultId) {
+        this.outboundResultId = outboundResultId;
+    }
+
+    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();
+    }
+
+    public Short getDeleted() {
+        return deleted;
+    }
+
+    public void setDeleted(Short deleted) {
+        this.deleted = deleted;
+    }
+
+    public BigDecimal getMaterialId() {
+        return materialId;
+    }
+
+    public void setMaterialId(BigDecimal materialId) {
+        this.materialId = materialId;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", resultMaterialId=").append(resultMaterialId);
+        sb.append(", outboundResultId=").append(outboundResultId);
+        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(", deleted=").append(deleted);
+        sb.append(", materialId=").append(materialId);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 26 - 0
src/main/java/com/steerinfo/dil/service/IWmspOutboundResultMaterialService.java

@@ -0,0 +1,26 @@
+package com.steerinfo.dil.service;
+
+import com.steerinfo.dil.model.WmspOutboundResultMaterial;
+import com.steerinfo.framework.service.IBaseService;
+
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * WmspOutboundResultMaterial服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-01-25 03:23
+ * 类描述
+ * 修订历史:
+ * 日期:2022-01-25
+ * 作者:generator
+ * 参考:
+ * 描述:WmspOutboundResultMaterial服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface IWmspOutboundResultMaterialService extends IBaseService<WmspOutboundResultMaterial, BigDecimal>{
+
+    int insertOutboundMaterial(BigDecimal orderId, List<Map<String, Object>> orderList);
+}

+ 2 - 0
src/main/java/com/steerinfo/dil/service/IWmspOutboundResultService.java

@@ -76,4 +76,6 @@ public interface IWmspOutboundResultService {
     int EqualMaterialsNumber(BigDecimal resultId);
 //    根据orderId判断当前运输订单的状态
     int getOutboundStatus(BigDecimal orderId);
+
+    WmspOutboundResult createOutboundResult(BigDecimal orderId, BigDecimal orderType);
 }

+ 54 - 0
src/main/java/com/steerinfo/dil/service/impl/WmspOutboundResultMaterialServiceImpl.java

@@ -0,0 +1,54 @@
+package com.steerinfo.dil.service.impl;
+
+import com.steerinfo.dil.mapper.WmspOutboundResultMaterialMapper;
+import com.steerinfo.dil.model.WmspOutboundResultMaterial;
+import com.steerinfo.dil.service.IWmspOutboundResultMaterialService;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import com.steerinfo.framework.service.impl.BaseServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.xml.crypto.Data;
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * WmspOutboundResultMaterial服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-01-25 03:23
+ * 类描述
+ * 修订历史:
+ * 日期:2022-01-25
+ * 作者:generator
+ * 参考:
+ * 描述:WmspOutboundResultMaterial服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "wmspOutboundResultMaterialService")
+public class WmspOutboundResultMaterialServiceImpl extends BaseServiceImpl<WmspOutboundResultMaterial, BigDecimal> implements IWmspOutboundResultMaterialService {
+
+    @Autowired
+    private WmspOutboundResultMaterialMapper wmspOutboundResultMaterialMapper;
+    @Autowired
+    CommonServiceImpl commonService;
+
+    @Override
+    protected IBaseMapper<WmspOutboundResultMaterial, BigDecimal> getMapper() {
+        return wmspOutboundResultMaterialMapper;
+    }
+
+    @Override
+    public int insertOutboundMaterial(BigDecimal orderId, List<Map<String, Object>> orderList) {
+        //为集合创建个个主键
+        List<Map<String, Object>> list = orderList.stream().map(item -> {
+            item.put("resultMaterialId", commonService.getSeqCount("seq__WMSP_OUTBOUND_RESUL_TMATRIAL"));
+            return item;
+        }).collect(Collectors.toList());
+        //创建出库类型
+        return wmspOutboundResultMaterialMapper.insertOutboundMaterial(orderId,list,new Date(),"admin");
+    }
+}

+ 69 - 1
src/main/java/com/steerinfo/dil/service/impl/WmspOutboundResultServiceImpl.java

@@ -1,6 +1,7 @@
 package com.steerinfo.dil.service.impl;
 
 import com.steerinfo.dil.feign.TmstruckFeign;
+import com.steerinfo.dil.mapper.CommonSeq;
 import com.steerinfo.dil.mapper.WmspOutboundResultMapper;
 import com.steerinfo.dil.mapper.WmspOutboundScanResultMapper;
 import com.steerinfo.dil.model.WmspInboundResult;
@@ -13,6 +14,8 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.math.BigDecimal;
+import java.text.SimpleDateFormat;
+import java.util.Date;
 import java.util.List;
 import java.util.Map;
 
@@ -39,7 +42,10 @@ public class WmspOutboundResultServiceImpl  implements IWmspOutboundResultServic
     private WmspOutboundScanResultMapper wmspOutboundScanResultMapper;
     @Autowired
     private WmsInboundResultServiceImpl wmsInboundResultService;
-
+    @Autowired
+    WmspOutboundResultServiceImpl wmspOutboundResultService;
+    @Autowired
+    CommonSeq commonSeq;
     @Autowired
     private TmstruckFeign tmstruckFeign;
     @Override
@@ -224,4 +230,66 @@ public class WmspOutboundResultServiceImpl  implements IWmspOutboundResultServic
     public int getOutboundStatus(BigDecimal orderId) {
         return wmspOutboundResultMapper.getOutboundStatus(orderId);
     }
+
+    @Override
+    public WmspOutboundResult createOutboundResult(BigDecimal orderId, BigDecimal orderType) {
+        /**创建出库单实体*/
+        WmspOutboundResult wmspOutboundResult = new WmspOutboundResult();
+        /**使用序列号增加生成主键id*/
+        int seq_wmspoutboundresult = commonSeq.getSeqNumber("seq__WMSP_OUTBOUND_RESULT");
+        /**获取到当前时间*/
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
+        /**生成出库单编号*/
+        String resultNumber = "XSCK" + sdf.format(new Date());
+        if(seq_wmspoutboundresult < 10){
+            resultNumber += "0000000" + seq_wmspoutboundresult;
+        }else if(seq_wmspoutboundresult < 100){
+            resultNumber += "000000" + seq_wmspoutboundresult;
+        }else if(seq_wmspoutboundresult < 1000){
+            resultNumber += "00000" + seq_wmspoutboundresult;
+        }else if(seq_wmspoutboundresult < 10000){
+            resultNumber += "0000" + seq_wmspoutboundresult;
+        }else  if(seq_wmspoutboundresult < 100000){
+            resultNumber += "000" + seq_wmspoutboundresult;
+        }else if(seq_wmspoutboundresult < 1000000){
+            resultNumber += "00" + seq_wmspoutboundresult;
+        }else if(seq_wmspoutboundresult < 10000000){
+            resultNumber += "0" + seq_wmspoutboundresult;
+        }else{
+            resultNumber += seq_wmspoutboundresult;
+        }
+
+        /**运输订单类型判断
+         *    orderType : 1 为普通出库
+         *    orderType : 4 为调拨出库
+         * */
+        String resultOutboundType = "普通出库";
+        if(orderType.intValue() == 4){
+            resultOutboundType = "调拨出库";
+        }
+        /**把出库单主键id添加到出库单实体中*/
+        wmspOutboundResult.setResultId(new BigDecimal(seq_wmspoutboundresult));
+        /**把出库单编号添加到出库单实体中*/
+        wmspOutboundResult.setResultNumber(resultNumber);
+        /**把运输订单主键添加到出库单实体中*/
+        wmspOutboundResult.setBillLadingId(orderId);
+        /**把出库类型添加到出库单实体中*/
+        wmspOutboundResult.setResultOutboundType(resultOutboundType);
+        /**第一次添加为待出库*/
+        wmspOutboundResult.setResultStatus(new BigDecimal(0));
+        //常规字段
+        wmspOutboundResult.setInsertUsername("admin");
+        wmspOutboundResult.setInsertTime(new Date());
+        wmspOutboundResult.setUpdateUsername("admin");
+        wmspOutboundResult.setUpdateTime(new Date());
+        wmspOutboundResult.setInsertUpdateRemark("无");
+        wmspOutboundResult.setDeleted(new BigDecimal(0));
+        //还没装货的物资id的第一条添加到出库单实体中
+        //wmspOutboundResult.setMaterialId(materialId);
+        Integer res = wmspOutboundResultService.insertSelective(wmspOutboundResult);
+        if (res>0){
+            return wmspOutboundResult;
+        }
+        return null;
+    }
 }

+ 9 - 0
src/main/java/com/steerinfo/dil/vo/OutBoundDetailed.java

@@ -0,0 +1,9 @@
+package com.steerinfo.dil.vo;
+
+import java.util.List;
+
+public class OutBoundDetailed {
+    private String orderNumber;
+    private Integer totalNumber;
+    private List<OutBoundDetailedInfo> outBoundDetailedInfos;
+}

+ 14 - 0
src/main/java/com/steerinfo/dil/vo/OutBoundDetailedInfo.java

@@ -0,0 +1,14 @@
+package com.steerinfo.dil.vo;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+@Data
+public class OutBoundDetailedInfo {
+
+    private String materialCode;
+    private String materialName;
+    private String materialSpecification;
+    private String materialModel;
+    private BigDecimal materialTheoreticalWeight;
+}

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

@@ -1001,7 +1001,7 @@ where wisr.result_id = #{stackResultId}
         left join  WMSP_INBOUND_GROUP wig
         on wisr.inbound_Group_Id=wig.inbound_Group_Id
         where ((wig.USER_NAME_ONE ='${userName}' or wig.USER_NAME_TWO ='${userName}') and wig.state=1 and wisr.INSERT_USERNAME=#{userName}
-        and wisr.result_material=#{resultMaterial} )
+        and wisr.result_material=#{resultMaterial} ) wisr
     </select>
     <!--查询已经扫描但是没有下发的-->
     <select id="noIssueScanResult" resultMap="BaseResultMap">

+ 326 - 0
src/main/resources/com/steerinfo/dil/mapper/WmspOutboundResultMaterialMapper.xml

@@ -0,0 +1,326 @@
+<?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.WmspOutboundResultMaterialMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.WmspOutboundResultMaterial">
+    <id column="RESULT_MATERIAL_ID" jdbcType="DECIMAL" property="resultMaterialId" />
+    <result column="OUTBOUND_RESULT_ID" jdbcType="DECIMAL" property="outboundResultId" />
+    <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="MATERIAL_ID" jdbcType="DECIMAL" property="materialId" />
+  </resultMap>
+  <sql id="columns">
+    RESULT_MATERIAL_ID, OUTBOUND_RESULT_ID, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, 
+    UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED, MATERIAL_ID
+  </sql>
+  <sql id="columns_alias">
+    t.RESULT_MATERIAL_ID, t.OUTBOUND_RESULT_ID, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, 
+    t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED, t.MATERIAL_ID
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns" /> FROM WMSP_OUTBOUND_RESULT_MATERIAL
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias" /> FROM WMSP_OUTBOUND_RESULT_MATERIAL t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="resultMaterialId != null">
+        and RESULT_MATERIAL_ID = #{resultMaterialId}
+      </if>
+      <if test="outboundResultId != null">
+        and OUTBOUND_RESULT_ID = #{outboundResultId}
+      </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>
+      <if test="deleted != null">
+        and DELETED = #{deleted}
+      </if>
+      <if test="materialId != null">
+        and MATERIAL_ID = #{materialId}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where> 
+      <if test="resultMaterialId != null">
+        and RESULT_MATERIAL_ID = #{resultMaterialId}
+      </if>
+      <if test="outboundResultId != null">
+        and OUTBOUND_RESULT_ID = #{outboundResultId}
+      </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>
+      <if test="deleted != null">
+        and DELETED = #{deleted}
+      </if>
+      <if test="materialId != null">
+        and MATERIAL_ID = #{materialId}
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
+    delete from WMSP_OUTBOUND_RESULT_MATERIAL
+    where RESULT_MATERIAL_ID = #{resultMaterialId,jdbcType=DECIMAL}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from WMSP_OUTBOUND_RESULT_MATERIAL
+    where 1!=1 
+      <if test="outboundResultId != null">
+        or OUTBOUND_RESULT_ID = #{outboundResultId}
+      </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="materialId != null">
+        or MATERIAL_ID = #{materialId}
+      </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.dil.model.WmspOutboundResultMaterial">
+    insert into WMSP_OUTBOUND_RESULT_MATERIAL (RESULT_MATERIAL_ID, OUTBOUND_RESULT_ID, 
+      INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, 
+      UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED, 
+      MATERIAL_ID)
+    values (#{resultMaterialId,jdbcType=DECIMAL}, #{outboundResultId,jdbcType=DECIMAL}, 
+      #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, 
+      #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, #{deleted,jdbcType=DECIMAL}, 
+      #{materialId,jdbcType=DECIMAL})
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.dil.model.WmspOutboundResultMaterial">
+    insert into WMSP_OUTBOUND_RESULT_MATERIAL
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="resultMaterialId != null">
+        RESULT_MATERIAL_ID,
+      </if>
+      <if test="outboundResultId != null">
+        OUTBOUND_RESULT_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>
+      <if test="deleted != null">
+        DELETED,
+      </if>
+      <if test="materialId != null">
+        MATERIAL_ID,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="resultMaterialId != null">
+        #{resultMaterialId,jdbcType=DECIMAL},
+      </if>
+      <if test="outboundResultId != null">
+        #{outboundResultId,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>
+      <if test="deleted != null">
+        #{deleted,jdbcType=DECIMAL},
+      </if>
+      <if test="materialId != null">
+        #{materialId,jdbcType=DECIMAL},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.WmspOutboundResultMaterial">
+    update WMSP_OUTBOUND_RESULT_MATERIAL
+    set OUTBOUND_RESULT_ID = #{outboundResultId,jdbcType=DECIMAL},
+      INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
+      INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
+      UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
+      UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+      INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
+      DELETED = #{deleted,jdbcType=DECIMAL},
+      MATERIAL_ID = #{materialId,jdbcType=DECIMAL}
+    where RESULT_MATERIAL_ID = #{resultMaterialId,jdbcType=DECIMAL}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.WmspOutboundResultMaterial">
+    update WMSP_OUTBOUND_RESULT_MATERIAL
+    <set>
+      <if test="outboundResultId != null">
+        OUTBOUND_RESULT_ID = #{outboundResultId,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>
+      <if test="deleted != null">
+        DELETED = #{deleted,jdbcType=DECIMAL},
+      </if>
+      <if test="materialId != null">
+        MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
+      </if>
+    </set>
+    where RESULT_MATERIAL_ID = #{resultMaterialId,jdbcType=DECIMAL}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
+    <include refid="select" />
+    where RESULT_MATERIAL_ID = #{resultMaterialId,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 WMSP_OUTBOUND_RESULT_MATERIAL 
+      (RESULT_MATERIAL_ID, 
+      OUTBOUND_RESULT_ID, INSERT_USERNAME, 
+      INSERT_TIME, UPDATE_USERNAME, 
+      UPDATE_TIME, INSERT_UPDATE_REMARK, 
+      DELETED, MATERIAL_ID)
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.resultMaterialId,jdbcType=DECIMAL}, 
+      #{item.outboundResultId,jdbcType=DECIMAL}, #{item.insertUsername,jdbcType=VARCHAR}, 
+      #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR}, 
+      #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR}, 
+      #{item.deleted,jdbcType=DECIMAL}, #{item.materialId,jdbcType=DECIMAL} from dual  
+   </foreach> )
+  </insert>
+  
+  <update id="batchUpdate" parameterType="java.util.List">
+     update WMSP_OUTBOUND_RESULT_MATERIAL
+     set
+       RESULT_MATERIAL_ID=
+       <foreach close="end" collection="list" index="index" item="item" open="case RESULT_MATERIAL_ID" separator=" ">
+          when #{item.resultMaterialId,jdbcType=DECIMAL} then #{item.resultMaterialId,jdbcType=DECIMAL}
+       </foreach>
+       ,OUTBOUND_RESULT_ID=
+       <foreach close="end" collection="list" index="index" item="item" open="case RESULT_MATERIAL_ID" separator=" ">
+          when #{item.resultMaterialId,jdbcType=DECIMAL} then #{item.outboundResultId,jdbcType=DECIMAL}
+       </foreach>
+       ,INSERT_USERNAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case RESULT_MATERIAL_ID" separator=" ">
+          when #{item.resultMaterialId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
+       </foreach>
+       ,INSERT_TIME=
+       <foreach close="end" collection="list" index="index" item="item" open="case RESULT_MATERIAL_ID" separator=" ">
+          when #{item.resultMaterialId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,UPDATE_USERNAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case RESULT_MATERIAL_ID" separator=" ">
+          when #{item.resultMaterialId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
+       </foreach>
+       ,UPDATE_TIME=
+       <foreach close="end" collection="list" index="index" item="item" open="case RESULT_MATERIAL_ID" separator=" ">
+          when #{item.resultMaterialId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,INSERT_UPDATE_REMARK=
+       <foreach close="end" collection="list" index="index" item="item" open="case RESULT_MATERIAL_ID" separator=" ">
+          when #{item.resultMaterialId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
+       </foreach>
+       ,DELETED=
+       <foreach close="end" collection="list" index="index" item="item" open="case RESULT_MATERIAL_ID" separator=" ">
+          when #{item.resultMaterialId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
+       </foreach>
+       ,MATERIAL_ID=
+       <foreach close="end" collection="list" index="index" item="item" open="case RESULT_MATERIAL_ID" separator=" ">
+          when #{item.resultMaterialId,jdbcType=DECIMAL} then #{item.materialId,jdbcType=DECIMAL}
+       </foreach>
+     where RESULT_MATERIAL_ID in 
+     <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
+    #{item.resultMaterialId,jdbcType=DECIMAL}
+     </foreach> 
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from WMSP_OUTBOUND_RESULT_MATERIAL
+    where RESULT_MATERIAL_ID in 
+    <foreach close=")" collection="list" item="id" open="(" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+
+  <insert id="insertOutboundMaterial">
+    insert into WMSP_OUTBOUND_RESULT_MATERIAL(RESULT_MATERIAL_ID,OUTBOUND_RESULT_ID,MATERIAL_ID,INSERT_USERNAME,INSERT_TIME)
+    <foreach collection="orderList" index="index" item="item" separator="union all" close=";">
+      select #{item.resultMaterialId},#{orderId},#{item.materialId},#{user},#{nowDate} from dual
+    </foreach>
+  </insert>
+  
+</mapper>