工序处理接口修改
This commit is contained in:
		@@ -83,4 +83,15 @@ public class ProduceManageConstant {
 | 
			
		||||
     */
 | 
			
		||||
    public static final Integer REVIEW_STATUS_FAIL = 2;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 工序处理状态:0未处理
 | 
			
		||||
     */
 | 
			
		||||
    public static final Integer HANDLE_STATUS_FORHANDLE = 0;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 工序处理状态:1已处理
 | 
			
		||||
     */
 | 
			
		||||
    public static final Integer HANDLE_STATUS_FINISHED = 1;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -13,4 +13,6 @@ public interface MtAloneProcessMapper extends Mapper<MtAloneProcess> {
 | 
			
		||||
    List<MtAloneProcessVo> findProcessVoListByProductProcess(ProductProcessParams params);
 | 
			
		||||
 | 
			
		||||
    MtAloneProcessVo selectProcessVoByProcessId(MtAloneProcessParams params);
 | 
			
		||||
 | 
			
		||||
    void setNextProcessBeforeHandleStatus(MtAloneProcess currentProcess);
 | 
			
		||||
}
 | 
			
		||||
@@ -1,79 +1,87 @@
 | 
			
		||||
<?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.deer.wms.produce.manage.dao.MtAloneProcessMapper">
 | 
			
		||||
  <resultMap id="BaseResultMap" type="com.deer.wms.produce.manage.model.MtAloneProcess">
 | 
			
		||||
    <!--
 | 
			
		||||
      WARNING - @mbg.generated
 | 
			
		||||
    -->
 | 
			
		||||
    <id column="id" jdbcType="INTEGER" property="id" />
 | 
			
		||||
    <result column="operator_id" jdbcType="INTEGER" property="operatorId" />
 | 
			
		||||
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
 | 
			
		||||
    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
 | 
			
		||||
    <result column="version" jdbcType="VARCHAR" property="version" />
 | 
			
		||||
    <result column="status" jdbcType="INTEGER" property="status" />
 | 
			
		||||
    <result column="process_name" jdbcType="VARCHAR" property="processName" />
 | 
			
		||||
    <result column="product_process_id" jdbcType="INTEGER" property="productProcessId" />
 | 
			
		||||
    <result column="code" jdbcType="VARCHAR" property="code" />
 | 
			
		||||
    <result column="specification" jdbcType="VARCHAR" property="specification" />
 | 
			
		||||
    <result column="process_source" jdbcType="INTEGER" property="processSource" />
 | 
			
		||||
    <result column="process_price" jdbcType="REAL" property="processPrice" />
 | 
			
		||||
    <result column="process_unit_price" jdbcType="REAL" property="processUnitPrice" />
 | 
			
		||||
    <result column="original_len" jdbcType="REAL" property="originalLen" />
 | 
			
		||||
    <result column="loss" jdbcType="REAL" property="loss" />
 | 
			
		||||
    <result column="after_len" jdbcType="REAL" property="afterLen" />
 | 
			
		||||
    <result column="shrinkage" jdbcType="VARCHAR" property="shrinkage" />
 | 
			
		||||
    <result column="process_content" jdbcType="VARCHAR" property="processContent" />
 | 
			
		||||
    <result column="supplier_id" jdbcType="INTEGER" property="supplierId" />
 | 
			
		||||
    <result column="process_step" jdbcType="INTEGER" property="processStep" />
 | 
			
		||||
    <result column="merchandiser_id" jdbcType="INTEGER" property="merchandiserId" />
 | 
			
		||||
    <result column="product_bar_code" jdbcType="VARCHAR" property="productBarCode" />
 | 
			
		||||
    <result column="process_bom_id" jdbcType="INTEGER" property="processBomId" />
 | 
			
		||||
    <result column="process_bom_name" jdbcType="VARCHAR" property="processBomName" />
 | 
			
		||||
    <result column="product_annex_code" jdbcType="VARCHAR" property="productAnnexCode" />
 | 
			
		||||
    <result column="memo" jdbcType="VARCHAR" property="memo" />
 | 
			
		||||
    <result column="beg_date" jdbcType="TIMESTAMP" property="begDate" />
 | 
			
		||||
    <result column="end_date" jdbcType="TIMESTAMP" property="endDate" />
 | 
			
		||||
    <result column="company_id" jdbcType="INTEGER" property="companyId" />
 | 
			
		||||
  </resultMap>
 | 
			
		||||
 | 
			
		||||
    <resultMap id="MtAloneProcessVoResultMap" type="com.deer.wms.produce.manage.model.MtAloneProcessVo">
 | 
			
		||||
        <id column="id" jdbcType="INTEGER" property="id" />
 | 
			
		||||
        <result column="operator_id" jdbcType="INTEGER" property="operatorId" />
 | 
			
		||||
        <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
 | 
			
		||||
        <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
 | 
			
		||||
        <result column="version" jdbcType="VARCHAR" property="version" />
 | 
			
		||||
        <result column="status" jdbcType="INTEGER" property="status" />
 | 
			
		||||
        <result column="process_name" jdbcType="VARCHAR" property="processName" />
 | 
			
		||||
        <result column="product_process_id" jdbcType="INTEGER" property="productProcessId" />
 | 
			
		||||
        <result column="code" jdbcType="VARCHAR" property="code" />
 | 
			
		||||
        <result column="specification" jdbcType="VARCHAR" property="specification" />
 | 
			
		||||
        <result column="process_source" jdbcType="INTEGER" property="processSource" />
 | 
			
		||||
        <result column="process_price" jdbcType="REAL" property="processPrice" />
 | 
			
		||||
        <result column="process_unit_price" jdbcType="REAL" property="processUnitPrice" />
 | 
			
		||||
        <result column="original_len" jdbcType="REAL" property="originalLen" />
 | 
			
		||||
        <result column="loss" jdbcType="REAL" property="loss" />
 | 
			
		||||
        <result column="after_len" jdbcType="REAL" property="afterLen" />
 | 
			
		||||
        <result column="shrinkage" jdbcType="VARCHAR" property="shrinkage" />
 | 
			
		||||
        <result column="process_content" jdbcType="VARCHAR" property="processContent" />
 | 
			
		||||
        <result column="supplier_id" jdbcType="INTEGER" property="supplierId" />
 | 
			
		||||
        <result column="process_step" jdbcType="INTEGER" property="processStep" />
 | 
			
		||||
        <result column="merchandiser_id" jdbcType="INTEGER" property="merchandiserId" />
 | 
			
		||||
        <result column="product_bar_code" jdbcType="VARCHAR" property="productBarCode" />
 | 
			
		||||
        <result column="process_bom_id" jdbcType="INTEGER" property="processBomId" />
 | 
			
		||||
        <result column="process_bom_name" jdbcType="VARCHAR" property="processBomName" />
 | 
			
		||||
        <result column="product_annex_code" jdbcType="VARCHAR" property="productAnnexCode" />
 | 
			
		||||
        <result column="beg_date" jdbcType="TIMESTAMP" property="begDate" />
 | 
			
		||||
        <result column="end_date" jdbcType="TIMESTAMP" property="endDate" />
 | 
			
		||||
        <result column="memo" jdbcType="VARCHAR" property="memo" />
 | 
			
		||||
        <result column="company_id" jdbcType="INTEGER" property="companyId" />
 | 
			
		||||
        <result column="supplier_name" jdbcType="VARCHAR" property="supplierName" />
 | 
			
		||||
        <result column="name" jdbcType="VARCHAR" property="accessoryName" />
 | 
			
		||||
    <resultMap id="BaseResultMap" type="com.deer.wms.produce.manage.model.MtAloneProcess">
 | 
			
		||||
        <!--
 | 
			
		||||
          WARNING - @mbg.generated
 | 
			
		||||
        -->
 | 
			
		||||
        <id column="id" jdbcType="INTEGER" property="id"/>
 | 
			
		||||
        <result column="operator_id" jdbcType="INTEGER" property="operatorId"/>
 | 
			
		||||
        <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
 | 
			
		||||
        <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
 | 
			
		||||
        <result column="version" jdbcType="VARCHAR" property="version"/>
 | 
			
		||||
        <result column="status" jdbcType="INTEGER" property="status"/>
 | 
			
		||||
        <result column="process_name" jdbcType="VARCHAR" property="processName"/>
 | 
			
		||||
        <result column="product_process_id" jdbcType="INTEGER" property="productProcessId"/>
 | 
			
		||||
        <result column="code" jdbcType="VARCHAR" property="code"/>
 | 
			
		||||
        <result column="specification" jdbcType="VARCHAR" property="specification"/>
 | 
			
		||||
        <result column="process_source" jdbcType="INTEGER" property="processSource"/>
 | 
			
		||||
        <result column="process_price" jdbcType="REAL" property="processPrice"/>
 | 
			
		||||
        <result column="process_unit_price" jdbcType="REAL" property="processUnitPrice"/>
 | 
			
		||||
        <result column="original_len" jdbcType="REAL" property="originalLen"/>
 | 
			
		||||
        <result column="loss" jdbcType="REAL" property="loss"/>
 | 
			
		||||
        <result column="after_len" jdbcType="REAL" property="afterLen"/>
 | 
			
		||||
        <result column="shrinkage" jdbcType="VARCHAR" property="shrinkage"/>
 | 
			
		||||
        <result column="process_content" jdbcType="VARCHAR" property="processContent"/>
 | 
			
		||||
        <result column="supplier_id" jdbcType="INTEGER" property="supplierId"/>
 | 
			
		||||
        <result column="process_step" jdbcType="INTEGER" property="processStep"/>
 | 
			
		||||
        <result column="merchandiser_id" jdbcType="INTEGER" property="merchandiserId"/>
 | 
			
		||||
        <result column="product_bar_code" jdbcType="VARCHAR" property="productBarCode"/>
 | 
			
		||||
        <result column="process_bom_id" jdbcType="INTEGER" property="processBomId"/>
 | 
			
		||||
        <result column="process_bom_name" jdbcType="VARCHAR" property="processBomName"/>
 | 
			
		||||
        <result column="product_annex_code" jdbcType="VARCHAR" property="productAnnexCode"/>
 | 
			
		||||
        <result column="memo" jdbcType="VARCHAR" property="memo"/>
 | 
			
		||||
        <result column="beg_date" jdbcType="TIMESTAMP" property="begDate"/>
 | 
			
		||||
        <result column="end_date" jdbcType="TIMESTAMP" property="endDate"/>
 | 
			
		||||
        <result column="handle_status" jdbcType="INTEGER" property="handleStatus"/>
 | 
			
		||||
        <result column="before_handle_status" jdbcType="INTEGER" property="beforeHandleStatus"/>
 | 
			
		||||
        <result column="company_id" jdbcType="INTEGER" property="companyId"/>
 | 
			
		||||
    </resultMap>
 | 
			
		||||
 | 
			
		||||
    <select id="findProcessVoListByProductProcess" parameterType="com.deer.wms.produce.manage.model.ProductProcessParams"  resultMap="MtAloneProcessVoResultMap">
 | 
			
		||||
    <resultMap id="MtAloneProcessVoResultMap" type="com.deer.wms.produce.manage.model.MtAloneProcessVo">
 | 
			
		||||
        <id column="id" jdbcType="INTEGER" property="id"/>
 | 
			
		||||
        <result column="operator_id" jdbcType="INTEGER" property="operatorId"/>
 | 
			
		||||
        <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
 | 
			
		||||
        <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
 | 
			
		||||
        <result column="version" jdbcType="VARCHAR" property="version"/>
 | 
			
		||||
        <result column="status" jdbcType="INTEGER" property="status"/>
 | 
			
		||||
        <result column="process_name" jdbcType="VARCHAR" property="processName"/>
 | 
			
		||||
        <result column="product_process_id" jdbcType="INTEGER" property="productProcessId"/>
 | 
			
		||||
        <result column="code" jdbcType="VARCHAR" property="code"/>
 | 
			
		||||
        <result column="specification" jdbcType="VARCHAR" property="specification"/>
 | 
			
		||||
        <result column="process_source" jdbcType="INTEGER" property="processSource"/>
 | 
			
		||||
        <result column="process_price" jdbcType="REAL" property="processPrice"/>
 | 
			
		||||
        <result column="process_unit_price" jdbcType="REAL" property="processUnitPrice"/>
 | 
			
		||||
        <result column="original_len" jdbcType="REAL" property="originalLen"/>
 | 
			
		||||
        <result column="loss" jdbcType="REAL" property="loss"/>
 | 
			
		||||
        <result column="after_len" jdbcType="REAL" property="afterLen"/>
 | 
			
		||||
        <result column="shrinkage" jdbcType="VARCHAR" property="shrinkage"/>
 | 
			
		||||
        <result column="process_content" jdbcType="VARCHAR" property="processContent"/>
 | 
			
		||||
        <result column="supplier_id" jdbcType="INTEGER" property="supplierId"/>
 | 
			
		||||
        <result column="process_step" jdbcType="INTEGER" property="processStep"/>
 | 
			
		||||
        <result column="merchandiser_id" jdbcType="INTEGER" property="merchandiserId"/>
 | 
			
		||||
        <result column="product_bar_code" jdbcType="VARCHAR" property="productBarCode"/>
 | 
			
		||||
        <result column="process_bom_id" jdbcType="INTEGER" property="processBomId"/>
 | 
			
		||||
        <result column="process_bom_name" jdbcType="VARCHAR" property="processBomName"/>
 | 
			
		||||
        <result column="product_annex_code" jdbcType="VARCHAR" property="productAnnexCode"/>
 | 
			
		||||
        <result column="beg_date" jdbcType="TIMESTAMP" property="begDate"/>
 | 
			
		||||
        <result column="end_date" jdbcType="TIMESTAMP" property="endDate"/>
 | 
			
		||||
        <result column="handle_status" jdbcType="INTEGER" property="handleStatus"/>
 | 
			
		||||
        <result column="before_handle_status" jdbcType="INTEGER" property="beforeHandleStatus"/>
 | 
			
		||||
        <result column="memo" jdbcType="VARCHAR" property="memo"/>
 | 
			
		||||
        <result column="company_id" jdbcType="INTEGER" property="companyId"/>
 | 
			
		||||
        <result column="supplier_name" jdbcType="VARCHAR" property="supplierName"/>
 | 
			
		||||
        <result column="name" jdbcType="VARCHAR" property="accessoryName"/>
 | 
			
		||||
    </resultMap>
 | 
			
		||||
 | 
			
		||||
    <select id="findProcessVoListByProductProcess"
 | 
			
		||||
            parameterType="com.deer.wms.produce.manage.model.ProductProcessParams"
 | 
			
		||||
            resultMap="MtAloneProcessVoResultMap">
 | 
			
		||||
        SELECT process.*, supplier.supplier_name, accessory.name FROM mt_alone_process process
 | 
			
		||||
        LEFT JOIN supplier_manage supplier ON process.supplier_id = supplier.supplier_id AND process.company_id = supplier.company_id
 | 
			
		||||
        LEFT JOIN mt_alone_accessory accessory ON process.product_annex_code = accessory.annex_code AND process.company_id = accessory.company_id
 | 
			
		||||
        LEFT JOIN supplier_manage supplier ON process.supplier_id = supplier.supplier_id AND process.company_id =
 | 
			
		||||
        supplier.company_id
 | 
			
		||||
        LEFT JOIN mt_alone_accessory accessory ON process.product_annex_code = accessory.annex_code AND
 | 
			
		||||
        process.company_id = accessory.company_id
 | 
			
		||||
        <where>
 | 
			
		||||
            <if test="productProcessId != null">
 | 
			
		||||
                process.product_process_id = #{productProcessId}
 | 
			
		||||
@@ -81,13 +89,17 @@
 | 
			
		||||
            <if test="companyId != null">
 | 
			
		||||
                AND process.company_id = #{companyId}
 | 
			
		||||
            </if>
 | 
			
		||||
        </where> ORDER BY process.process_step
 | 
			
		||||
        </where>
 | 
			
		||||
        ORDER BY process.process_step
 | 
			
		||||
    </select>
 | 
			
		||||
 | 
			
		||||
    <select id="selectProcessVoByProcessId" parameterType="com.deer.wms.produce.manage.model.MtAloneProcessParams"  resultMap="MtAloneProcessVoResultMap">
 | 
			
		||||
    <select id="selectProcessVoByProcessId" parameterType="com.deer.wms.produce.manage.model.MtAloneProcessParams"
 | 
			
		||||
            resultMap="MtAloneProcessVoResultMap">
 | 
			
		||||
        SELECT process.*, supplier.supplier_name, accessory.name FROM mt_alone_process process
 | 
			
		||||
        LEFT JOIN supplier_manage supplier ON process.supplier_id = supplier.supplier_id AND process.company_id = supplier.company_id
 | 
			
		||||
        LEFT JOIN mt_alone_accessory accessory ON process.product_annex_code = accessory.annex_code AND process.company_id = accessory.company_id
 | 
			
		||||
        LEFT JOIN supplier_manage supplier ON process.supplier_id = supplier.supplier_id AND process.company_id =
 | 
			
		||||
        supplier.company_id
 | 
			
		||||
        LEFT JOIN mt_alone_accessory accessory ON process.product_annex_code = accessory.annex_code AND
 | 
			
		||||
        process.company_id = accessory.company_id
 | 
			
		||||
        <where>
 | 
			
		||||
            <if test="processId != null">
 | 
			
		||||
                process.id = #{processId}
 | 
			
		||||
@@ -95,8 +107,16 @@
 | 
			
		||||
            <if test="companyId != null">
 | 
			
		||||
                AND process.company_id = #{companyId}
 | 
			
		||||
            </if>
 | 
			
		||||
        </where> ORDER BY process.process_step
 | 
			
		||||
        </where>
 | 
			
		||||
        ORDER BY process.process_step
 | 
			
		||||
    </select>
 | 
			
		||||
 | 
			
		||||
    <update id="setNextProcessBeforeHandleStatus" parameterType="com.deer.wms.produce.manage.model.MtAloneProcess">
 | 
			
		||||
        UPDATE mt_alone_process
 | 
			
		||||
        <set>
 | 
			
		||||
            before_handle_status = #{handleStatus}
 | 
			
		||||
        </set>
 | 
			
		||||
        WHERE process_step = (#{processStep}+1) AND product_process_id = #{productProcessId} AND company_id = #{companyId}
 | 
			
		||||
    </update>
 | 
			
		||||
 | 
			
		||||
</mapper>
 | 
			
		||||
@@ -16,7 +16,8 @@
 | 
			
		||||
    <result column="materials_name" jdbcType="VARCHAR" property="materialsName" />
 | 
			
		||||
    <result column="code" jdbcType="VARCHAR" property="code" />
 | 
			
		||||
    <result column="specification" jdbcType="VARCHAR" property="specification" />
 | 
			
		||||
    <result column="dosage" jdbcType="REAL" property="dosage" />
 | 
			
		||||
    <result column="plan_dosage" jdbcType="REAL" property="planDosage" />
 | 
			
		||||
    <result column="real_dosage" jdbcType="REAL" property="realDosage" />
 | 
			
		||||
    <result column="unit_id" jdbcType="INTEGER" property="unitId" />
 | 
			
		||||
    <result column="memo" jdbcType="VARCHAR" property="memo" />
 | 
			
		||||
    <result column="company_id" jdbcType="INTEGER" property="companyId" />
 | 
			
		||||
@@ -59,7 +60,7 @@
 | 
			
		||||
        <foreach collection="list" index="index" item="item" open="" separator=";" close="">
 | 
			
		||||
        UPDATE mt_alone_process_materials
 | 
			
		||||
            <set>
 | 
			
		||||
                dosage = #{item.dosage},
 | 
			
		||||
                real_dosage = #{item.realDosage},
 | 
			
		||||
                update_time = #{item.updateTime}
 | 
			
		||||
            </set>
 | 
			
		||||
        WHERE id = #{item.id} AND company_id = #{item.companyId}
 | 
			
		||||
 
 | 
			
		||||
@@ -168,6 +168,18 @@ public class MtAloneProcess {
 | 
			
		||||
    @Column(name = "end_date")
 | 
			
		||||
    private Date endDate;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 处理状态:0未处理,1已处理(工序已完成)
 | 
			
		||||
     */
 | 
			
		||||
    @Column(name = "handle_status")
 | 
			
		||||
    private Integer handleStatus;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 前道工序处理状态:0未处理,1已处理(工序已完成)
 | 
			
		||||
     */
 | 
			
		||||
    @Column(name = "before_handle_status")
 | 
			
		||||
    private Integer beforeHandleStatus;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @return id
 | 
			
		||||
     */
 | 
			
		||||
@@ -682,4 +694,40 @@ public class MtAloneProcess {
 | 
			
		||||
    public void setEndDate(Date endDate) {
 | 
			
		||||
        this.endDate = endDate;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 获取处理状态
 | 
			
		||||
     *
 | 
			
		||||
     * @return handle_status - 工序处理状态
 | 
			
		||||
     */
 | 
			
		||||
    public Integer getHandleStatus() {
 | 
			
		||||
        return handleStatus;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 设置处理状态
 | 
			
		||||
     *
 | 
			
		||||
     * @param handleStatus 工序处理状态
 | 
			
		||||
     */
 | 
			
		||||
    public void setHandleStatus(Integer handleStatus) {
 | 
			
		||||
        this.handleStatus = handleStatus;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 获取前道工序处理状态
 | 
			
		||||
     *
 | 
			
		||||
     * @return before_handle_status - 前道工序处理状态
 | 
			
		||||
     */
 | 
			
		||||
    public Integer getBeforeHandleStatus() {
 | 
			
		||||
        return beforeHandleStatus;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 设置前道工序处理状态
 | 
			
		||||
     *
 | 
			
		||||
     * @param beforeHandleStatus 前道工序处理状态
 | 
			
		||||
     */
 | 
			
		||||
    public void setBeforeHandleStatus(Integer beforeHandleStatus) {
 | 
			
		||||
        this.beforeHandleStatus = beforeHandleStatus;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -1,5 +1,7 @@
 | 
			
		||||
package com.deer.wms.produce.manage.model;
 | 
			
		||||
 | 
			
		||||
import com.deer.wms.produce.manage.constant.ProduceManageConstant;
 | 
			
		||||
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 
 | 
			
		||||
@@ -66,9 +66,14 @@ public class ProcessMaterials {
 | 
			
		||||
    private String specification;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 用量
 | 
			
		||||
     * 计划用量
 | 
			
		||||
     */
 | 
			
		||||
    private Float dosage;
 | 
			
		||||
    private Float planDosage;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 实际用量
 | 
			
		||||
     */
 | 
			
		||||
    private Float realDosage;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 单位id
 | 
			
		||||
@@ -280,21 +285,39 @@ public class ProcessMaterials {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 获取用量
 | 
			
		||||
     * 获取计划用量
 | 
			
		||||
     *
 | 
			
		||||
     * @return dosage - 用量
 | 
			
		||||
     * @return plan_dosage - 计划用量
 | 
			
		||||
     */
 | 
			
		||||
    public Float getDosage() {
 | 
			
		||||
        return dosage;
 | 
			
		||||
    public Float getPlanDosage() {
 | 
			
		||||
        return planDosage;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 设置用量
 | 
			
		||||
     * 设置计划用量
 | 
			
		||||
     *
 | 
			
		||||
     * @param dosage 用量
 | 
			
		||||
     * @param planDosage 计划用量
 | 
			
		||||
     */
 | 
			
		||||
    public void setDosage(Float dosage) {
 | 
			
		||||
        this.dosage = dosage;
 | 
			
		||||
    public void setPlanDosage(Float planDosage) {
 | 
			
		||||
        this.planDosage = planDosage;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 获取实际用量
 | 
			
		||||
     *
 | 
			
		||||
     * @return real_dosage - 实际用量
 | 
			
		||||
     */
 | 
			
		||||
    public Float getRealDosage() {
 | 
			
		||||
        return realDosage;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 设置实际用量
 | 
			
		||||
     *
 | 
			
		||||
     * @param realDosage 实际用量
 | 
			
		||||
     */
 | 
			
		||||
    public void setRealDosage(Float realDosage) {
 | 
			
		||||
        this.realDosage = realDosage;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,7 @@
 | 
			
		||||
package com.deer.wms.produce.manage.service.impl;
 | 
			
		||||
 | 
			
		||||
import com.deer.wms.intercept.common.data.CurrentUser;
 | 
			
		||||
import com.deer.wms.produce.manage.constant.ProduceManageConstant;
 | 
			
		||||
import com.deer.wms.produce.manage.dao.MtAloneProcessMapper;
 | 
			
		||||
import com.deer.wms.produce.manage.model.*;
 | 
			
		||||
import com.deer.wms.produce.manage.service.MtAloneProcessService;
 | 
			
		||||
@@ -95,8 +96,10 @@ public class MtAloneProcessServiceImpl extends AbstractService<MtAloneProcess, I
 | 
			
		||||
        Date date = new Date();
 | 
			
		||||
        MtAloneProcess process = new MtAloneProcess();
 | 
			
		||||
        processHo.setUpdateTime(date);
 | 
			
		||||
        processHo.setHandleStatus(ProduceManageConstant.HANDLE_STATUS_FINISHED);
 | 
			
		||||
        BeanUtils.copyProperties(processHo, process);
 | 
			
		||||
        this.update(process);
 | 
			
		||||
        setNextProcessBeforeHandleStatus(process);//设置下道工序的前道工序处理状态为已处理
 | 
			
		||||
 | 
			
		||||
        List<ProcessMaterialsVo> procMatVoList = processHo.getProcessMaterialsVoList();
 | 
			
		||||
        if (null != procMatVoList && procMatVoList.size() != 0) {
 | 
			
		||||
@@ -111,4 +114,9 @@ public class MtAloneProcessServiceImpl extends AbstractService<MtAloneProcess, I
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    //设置下一道工序的前道工序处理状态
 | 
			
		||||
    public void setNextProcessBeforeHandleStatus(MtAloneProcess currentProcess) {
 | 
			
		||||
        mtAloneProcessMapper.setNextProcessBeforeHandleStatus(currentProcess);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -162,7 +162,7 @@ public class ProductProcessServiceImpl extends AbstractService<ProductProcess, I
 | 
			
		||||
                            procMatVo.setSpecification(procMatBomVo.getSpecification());
 | 
			
		||||
                            procMatVo.setUnitId(procMatBomVo.getUnitId());
 | 
			
		||||
                            procMatVo.setUnitName0(procMatBomVo.getUnitName());
 | 
			
		||||
                            procMatVo.setDosage(procMatBomVo.getDosage());//先按照模板对用量赋值,前端在将匹数乘以用量计算后展示在表格
 | 
			
		||||
                            procMatVo.setPlanDosage(procMatBomVo.getDosage());//先按照模板对计划用量赋值
 | 
			
		||||
                            procMatVoList.add(procMatVo);
 | 
			
		||||
                        }
 | 
			
		||||
                        processHo.setProcessMaterialsVoList(procMatVoList);
 | 
			
		||||
@@ -209,6 +209,8 @@ public class ProductProcessServiceImpl extends AbstractService<ProductProcess, I
 | 
			
		||||
                process.setProductProcessId(productProcess.getId());
 | 
			
		||||
                process.setCode(ProduceManagePublicMethod.creatUniqueCode("JGGX"));
 | 
			
		||||
                process.setCompanyId(currentUser.getCompanyId());
 | 
			
		||||
                process.setHandleStatus(ProduceManageConstant.HANDLE_STATUS_FORHANDLE);
 | 
			
		||||
                process.setBeforeHandleStatus(ProduceManageConstant.HANDLE_STATUS_FORHANDLE);
 | 
			
		||||
                processList.add(process);
 | 
			
		||||
            }
 | 
			
		||||
            processService.save(processList);
 | 
			
		||||
@@ -229,7 +231,7 @@ public class ProductProcessServiceImpl extends AbstractService<ProductProcess, I
 | 
			
		||||
                        processMaterials.setStatus(ProduceManageConstant.STATUS_AVAILABLE);
 | 
			
		||||
                        processMaterials.setProcessId(process.getId());
 | 
			
		||||
                        processMaterials.setCode(ProduceManagePublicMethod.creatUniqueCode("JGWL"));
 | 
			
		||||
                        processMaterials.setDosage(productProcess.getPiNum() * processMaterials.getDosage());
 | 
			
		||||
                        processMaterials.setPlanDosage(productProcess.getPiNum() * processMaterials.getPlanDosage());
 | 
			
		||||
                        processMaterials.setCompanyId(currentUser.getCompanyId());
 | 
			
		||||
                        processMaterialsList.add(processMaterials);
 | 
			
		||||
                    }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user