批次生产加工新增、详情查询接口更新
This commit is contained in:
parent
17b5b7d98c
commit
410a5b4b6e
1122
.idea/workspace.xml
1122
.idea/workspace.xml
File diff suppressed because it is too large
Load Diff
9093
logs/spring.log
9093
logs/spring.log
File diff suppressed because it is too large
Load Diff
@ -2,10 +2,13 @@ package com.deer.wms.produce.manage.dao;
|
|||||||
|
|
||||||
import com.deer.wms.produce.manage.model.MtAloneProcess;
|
import com.deer.wms.produce.manage.model.MtAloneProcess;
|
||||||
import com.deer.wms.produce.manage.model.MtAloneProcessParams;
|
import com.deer.wms.produce.manage.model.MtAloneProcessParams;
|
||||||
|
import com.deer.wms.produce.manage.model.MtAloneProcessVo;
|
||||||
|
import com.deer.wms.produce.manage.model.ProductProcessParams;
|
||||||
import com.deer.wms.project.seed.core.mapper.Mapper;
|
import com.deer.wms.project.seed.core.mapper.Mapper;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public interface MtAloneProcessMapper extends Mapper<MtAloneProcess> {
|
public interface MtAloneProcessMapper extends Mapper<MtAloneProcess> {
|
||||||
|
|
||||||
|
List<MtAloneProcessVo> findProcessListByProductProcess(ProductProcessParams params);
|
||||||
}
|
}
|
@ -22,4 +22,6 @@ public interface ProcessBomMapper extends Mapper<ProcessBom> {
|
|||||||
List<ProcessBomDto> findListByProductNameId(ProcessBomParams params);
|
List<ProcessBomDto> findListByProductNameId(ProcessBomParams params);
|
||||||
|
|
||||||
void insertOrUpdate(List<ProcessBom> processBomList);
|
void insertOrUpdate(List<ProcessBom> processBomList);
|
||||||
|
|
||||||
|
ProductProcessBomPo findProductAndProcessBomByProdBom(Integer productBomId);
|
||||||
}
|
}
|
@ -10,4 +10,5 @@ import java.util.List;
|
|||||||
|
|
||||||
public interface ProductProcessMapper extends Mapper<ProductProcess> {
|
public interface ProductProcessMapper extends Mapper<ProductProcess> {
|
||||||
List<ProductProcessVo> findList(ProductProcessParams params);
|
List<ProductProcessVo> findList(ProductProcessParams params);
|
||||||
|
|
||||||
}
|
}
|
@ -34,5 +34,52 @@
|
|||||||
<result column="company_id" jdbcType="INTEGER" property="companyId" />
|
<result column="company_id" jdbcType="INTEGER" property="companyId" />
|
||||||
</resultMap>
|
</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="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="findProcessListByProductProcess" 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
|
||||||
|
<where>
|
||||||
|
<if test="productProcessId != null">
|
||||||
|
process.product_process_id = #{productProcessId}
|
||||||
|
</if>
|
||||||
|
<if test="companyId != null">
|
||||||
|
AND process.company_id = #{companyId}
|
||||||
|
</if>
|
||||||
|
</where> ORDER BY process.process_step
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
@ -172,4 +172,5 @@
|
|||||||
</if>
|
</if>
|
||||||
</where> ORDER BY procbom.process_step
|
</where> ORDER BY procbom.process_step
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
@ -28,6 +28,7 @@
|
|||||||
<result column="product_process_name0" jdbcType="VARCHAR" property="productProcessName0" />
|
<result column="product_process_name0" jdbcType="VARCHAR" property="productProcessName0" />
|
||||||
<result column="finish_time" jdbcType="TIMESTAMP" property="finishTime" />
|
<result column="finish_time" jdbcType="TIMESTAMP" property="finishTime" />
|
||||||
<result column="product_bom_id" jdbcType="INTEGER" property="productBomId" />
|
<result column="product_bom_id" jdbcType="INTEGER" property="productBomId" />
|
||||||
|
<result column="product_process_bom_name" jdbcType="VARCHAR" property="productProcessBomName" />
|
||||||
<result column="specification" jdbcType="VARCHAR" property="specification" />
|
<result column="specification" jdbcType="VARCHAR" property="specification" />
|
||||||
<result column="process_price" jdbcType="REAL" property="processPrice" />
|
<result column="process_price" jdbcType="REAL" property="processPrice" />
|
||||||
<result column="len" jdbcType="REAL" property="len" />
|
<result column="len" jdbcType="REAL" property="len" />
|
||||||
@ -49,7 +50,6 @@
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<resultMap id="ProductProcessVoResultMap" type="com.deer.wms.produce.manage.model.ProductProcessVo">
|
<resultMap id="ProductProcessVoResultMap" type="com.deer.wms.produce.manage.model.ProductProcessVo">
|
||||||
|
|
||||||
<id column="id" jdbcType="INTEGER" property="id" />
|
<id column="id" jdbcType="INTEGER" property="id" />
|
||||||
<result column="operator_id" jdbcType="INTEGER" property="operatorId" />
|
<result column="operator_id" jdbcType="INTEGER" property="operatorId" />
|
||||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
@ -73,6 +73,7 @@
|
|||||||
<result column="product_process_name0" jdbcType="VARCHAR" property="productProcessName0" />
|
<result column="product_process_name0" jdbcType="VARCHAR" property="productProcessName0" />
|
||||||
<result column="finish_time" jdbcType="TIMESTAMP" property="finishTime" />
|
<result column="finish_time" jdbcType="TIMESTAMP" property="finishTime" />
|
||||||
<result column="product_bom_id" jdbcType="INTEGER" property="productBomId" />
|
<result column="product_bom_id" jdbcType="INTEGER" property="productBomId" />
|
||||||
|
<result column="product_process_bom_name" jdbcType="VARCHAR" property="productProcessBomName" />
|
||||||
<result column="specification" jdbcType="VARCHAR" property="specification" />
|
<result column="specification" jdbcType="VARCHAR" property="specification" />
|
||||||
<result column="process_price" jdbcType="REAL" property="processPrice" />
|
<result column="process_price" jdbcType="REAL" property="processPrice" />
|
||||||
<result column="len" jdbcType="REAL" property="len" />
|
<result column="len" jdbcType="REAL" property="len" />
|
||||||
@ -96,21 +97,42 @@
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<select id="findList" parameterType="com.deer.wms.produce.manage.model.ProductProcessParams" resultMap="ProductProcessVoResultMap">
|
<select id="findList" parameterType="com.deer.wms.produce.manage.model.ProductProcessParams" resultMap="ProductProcessVoResultMap">
|
||||||
SELECT prodproc.*, probom.product_process_name, product.product_name
|
SELECT prodproc.*, prodbom.product_process_name, product.product_name
|
||||||
FROM mt_alone_product_process prodproc
|
FROM mt_alone_product_process prodproc
|
||||||
LEFT JOIN mt_alone_product_process_bom probom ON prodproc.product_bom_id = probom.id AND prodproc.company_id = probom.company_id
|
LEFT JOIN mt_alone_product_process_bom prodbom ON prodproc.product_bom_id = prodbom.id AND prodproc.company_id = prodbom.company_id
|
||||||
LEFT JOIN mt_alone_machining_product product ON probom.product_id = product.id AND probom.company_id = product.company_id
|
LEFT JOIN mt_alone_machining_product product ON prodbom.product_id = product.id AND prodbom.company_id = product.company_id
|
||||||
<where>
|
<where>
|
||||||
<if test="keywords != null and keywords != ''">
|
<if test="keywords != null and keywords != ''">
|
||||||
AND prodproc.work_order_code LIKE CONCAT('%', #{keywords}, '%')
|
AND prodproc.work_order_code LIKE CONCAT('%', #{keywords}, '%')
|
||||||
OR probom.product_bom_name LIKE CONCAT('%', #{keywords}, '%')
|
OR prodbom.product_bom_name LIKE CONCAT('%', #{keywords}, '%')
|
||||||
OR prodproc.product_process_name LIKE CONCAT('%', #{keywords}, '%')
|
OR prodproc.product_process_name LIKE CONCAT('%', #{keywords}, '%')
|
||||||
OR client.client_name LIKE CONCAT('%', #{keywords}, '%')
|
OR client.client_name LIKE CONCAT('%', #{keywords}, '%')
|
||||||
OR prodproc.contract_name LIKE CONCAT('%', #{keywords}, '%')
|
OR prodproc.contract_name LIKE CONCAT('%', #{keywords}, '%')
|
||||||
</if>
|
</if>
|
||||||
|
<if test="createDate != null">
|
||||||
|
AND DATE_FORMAT(prodproc.create_time,'%Y-%m-%d') = DATE_FORMAT(#{createDate}, '%Y-%m-%d')
|
||||||
|
</if>
|
||||||
<if test="companyId != null">
|
<if test="companyId != null">
|
||||||
AND prodproc.company_id = #{companyId}
|
AND prodproc.company_id = #{companyId}
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<!--没用
|
||||||
|
<select id="findProductProcessPoById" parameterType="com.deer.wms.produce.manage.model.ProductProcessParams" resultMap="ProductProcessPoResultMap">
|
||||||
|
SELECT prodproc.*, prodbom.product_process_name, product.product_name
|
||||||
|
FROM mt_alone_product_process prodproc
|
||||||
|
LEFT JOIN mt_alone_product_process_bom prodbom ON prodproc.product_bom_id = prodbom.id AND prodproc.company_id = prodbom.company_id
|
||||||
|
LEFT JOIN mt_alone_machining_product product ON prodbom.product_id = product.id AND prodbom.company_id = product.company_id
|
||||||
|
<where>
|
||||||
|
<if test=" != null">
|
||||||
|
AND DATE_FORMAT(prodproc.create_time,'%Y-%m-%d') = DATE_FORMAT(#{createDate}, '%Y-%m-%d')
|
||||||
|
</if>
|
||||||
|
<if test="companyId != null">
|
||||||
|
AND prodproc.company_id = #{companyId}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
-->
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
@ -0,0 +1,29 @@
|
|||||||
|
package com.deer.wms.produce.manage.model;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用于处理、编辑批次产品加工单时下方展示的工序信息
|
||||||
|
* @Author: hy
|
||||||
|
* @Date: 2019/12/19 9:11
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public class MtAloneProcessVo extends MtAloneProcess {
|
||||||
|
private String supplierName;//加工商名称(供应商表取值)
|
||||||
|
|
||||||
|
private String accessoryName;//附件名称(附件表取值)
|
||||||
|
|
||||||
|
public String getSupplierName() {
|
||||||
|
return supplierName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSupplierName(String supplierName) {
|
||||||
|
this.supplierName = supplierName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAccessoryName() {
|
||||||
|
return accessoryName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAccessoryName(String accessoryName) {
|
||||||
|
this.accessoryName = accessoryName;
|
||||||
|
}
|
||||||
|
}
|
@ -10,7 +10,7 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
public class ProcessBomParams extends QueryParams {
|
public class ProcessBomParams extends QueryParams {
|
||||||
/**
|
/**
|
||||||
*产品生产bom的id
|
*产品bom的id
|
||||||
*/
|
*/
|
||||||
private Integer productProcessId;
|
private Integer productProcessId;
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.deer.wms.produce.manage.model;
|
package com.deer.wms.produce.manage.model;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 从前端同时获取批次产品加工信息和工序信息
|
* 从前端同时获取批次产品加工信息和工序信息
|
||||||
@ -11,7 +12,7 @@ import java.util.ArrayList;
|
|||||||
public class ProductAndProcess {
|
public class ProductAndProcess {
|
||||||
private ProductProcess productProcess;
|
private ProductProcess productProcess;
|
||||||
|
|
||||||
private static MtAloneProcess[] processes;
|
private MtAloneProcessVo[] processesVo;
|
||||||
|
|
||||||
public ProductProcess getProductProcess() {
|
public ProductProcess getProductProcess() {
|
||||||
return productProcess;
|
return productProcess;
|
||||||
@ -21,11 +22,11 @@ public class ProductAndProcess {
|
|||||||
this.productProcess = productProcess;
|
this.productProcess = productProcess;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static MtAloneProcess[] getProcesses() {
|
public MtAloneProcessVo[] getProcessesVo() {
|
||||||
return processes;
|
return processesVo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setProcesses(MtAloneProcess[] processes) {
|
public void setProcessesVo(MtAloneProcessVo[] processesVo) {
|
||||||
this.processes = processes;
|
this.processesVo = processesVo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -133,6 +133,12 @@ public class ProductProcess {
|
|||||||
@Column(name = "product_bom_id")
|
@Column(name = "product_bom_id")
|
||||||
private Integer productBomId;
|
private Integer productBomId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产品bom名称
|
||||||
|
*/
|
||||||
|
@Column(name = "product_process_bom_name")
|
||||||
|
private String productProcessBomName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 加工规格型号
|
* 加工规格型号
|
||||||
*/
|
*/
|
||||||
@ -945,4 +951,12 @@ public class ProductProcess {
|
|||||||
public void setCompanyId(Integer companyId) {
|
public void setCompanyId(Integer companyId) {
|
||||||
this.companyId = companyId;
|
this.companyId = companyId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getProductProcessBomName() {
|
||||||
|
return productProcessBomName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProductProcessBomName(String productProcessBomName) {
|
||||||
|
this.productProcessBomName = productProcessBomName;
|
||||||
|
}
|
||||||
}
|
}
|
@ -0,0 +1,40 @@
|
|||||||
|
package com.deer.wms.produce.manage.model;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: hy
|
||||||
|
* @Date: 2019/12/17 20:13
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public class ProductProcessBomPo {
|
||||||
|
private String specification;//加工规格型号
|
||||||
|
|
||||||
|
private String processContent;//加工描述内容
|
||||||
|
|
||||||
|
private List<ProcessBom> processBomList;//产品bom下的工序bom
|
||||||
|
|
||||||
|
public String getSpecification() {
|
||||||
|
return specification;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSpecification(String specification) {
|
||||||
|
this.specification = specification;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProcessContent() {
|
||||||
|
return processContent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProcessContent(String processContent) {
|
||||||
|
this.processContent = processContent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<ProcessBom> getProcessBomList() {
|
||||||
|
return processBomList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProcessBomList(List<ProcessBom> processBomList) {
|
||||||
|
this.processBomList = processBomList;
|
||||||
|
}
|
||||||
|
}
|
@ -1,64 +0,0 @@
|
|||||||
package com.deer.wms.produce.manage.model;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author: hy
|
|
||||||
* @Date: 2019/9/5 21:22
|
|
||||||
* @Version 1.0
|
|
||||||
*
|
|
||||||
* 新建生产加工页面对应的结构,集成生产加工单、生产工序、生产物料等信息,备用!!!!
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
public class ProductProcessDtoSpare extends ProductProcess {
|
|
||||||
private ProcessMaterialsBomVo processMaterialsBomVo;//所有bom信息
|
|
||||||
|
|
||||||
private MtAloneProcess[] mtAloneProcess;//产品工序
|
|
||||||
|
|
||||||
private ProcessMaterials[] processMaterials;//工序所用物料
|
|
||||||
|
|
||||||
private ProductProcessBom productProcessBom;
|
|
||||||
|
|
||||||
private ProcessBom[] processBom;
|
|
||||||
|
|
||||||
private ProcessMaterialsBom[] processMaterialsBom;
|
|
||||||
|
|
||||||
public MtAloneProcess[] getMtAloneProcess() {
|
|
||||||
return mtAloneProcess;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMtAloneProcess(MtAloneProcess[] mtAloneProcess) {
|
|
||||||
this.mtAloneProcess = mtAloneProcess;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ProcessMaterials[] getProcessMaterials() {
|
|
||||||
return processMaterials;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setProcessMaterials(ProcessMaterials[] processMaterials) {
|
|
||||||
this.processMaterials = processMaterials;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ProductProcessBom getProductProcessBom() {
|
|
||||||
return productProcessBom;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setProductProcessBom(ProductProcessBom productProcessBom) {
|
|
||||||
this.productProcessBom = productProcessBom;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ProcessBom[] getProcessBom() {
|
|
||||||
return processBom;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setProcessBom(ProcessBom[] processBom) {
|
|
||||||
this.processBom = processBom;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ProcessMaterialsBomVo getProcessMaterialsBomVo() {
|
|
||||||
return processMaterialsBomVo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setProcessMaterialsBomVo(ProcessMaterialsBomVo processMaterialsBomVo) {
|
|
||||||
this.processMaterialsBomVo = processMaterialsBomVo;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,6 +1,7 @@
|
|||||||
package com.deer.wms.produce.manage.model;
|
package com.deer.wms.produce.manage.model;
|
||||||
|
|
||||||
import com.deer.wms.project.seed.core.service.QueryParams;
|
import com.deer.wms.project.seed.core.service.QueryParams;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
@ -8,8 +9,19 @@ import java.util.Date;
|
|||||||
* Created by guo on 2019/09/24.
|
* Created by guo on 2019/09/24.
|
||||||
*/
|
*/
|
||||||
public class ProductProcessParams extends QueryParams {
|
public class ProductProcessParams extends QueryParams {
|
||||||
|
private Integer productProcessId;
|
||||||
|
|
||||||
|
@JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
|
||||||
private Date createDate;
|
private Date createDate;
|
||||||
|
|
||||||
|
public Integer getProductProcessId() {
|
||||||
|
return productProcessId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProductProcessId(Integer productProcessId) {
|
||||||
|
this.productProcessId = productProcessId;
|
||||||
|
}
|
||||||
|
|
||||||
public Date getCreateDate() {
|
public Date getCreateDate() {
|
||||||
return createDate;
|
return createDate;
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,6 @@ public class ProductProcessVo extends ProductProcess {
|
|||||||
|
|
||||||
private String productProcessName;//产品Bom名称
|
private String productProcessName;//产品Bom名称
|
||||||
|
|
||||||
|
|
||||||
public String getProductName() {
|
public String getProductName() {
|
||||||
return productName;
|
return productName;
|
||||||
}
|
}
|
||||||
@ -42,12 +41,10 @@ public class ProductProcessVo extends ProductProcess {
|
|||||||
this.schedule = schedule;
|
this.schedule = schedule;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public String getProductProcessName() {
|
public String getProductProcessName() {
|
||||||
return productProcessName;
|
return productProcessName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void setProductProcessName(String productProcessName) {
|
public void setProductProcessName(String productProcessName) {
|
||||||
this.productProcessName = productProcessName;
|
this.productProcessName = productProcessName;
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
package com.deer.wms.produce.manage.service;
|
package com.deer.wms.produce.manage.service;
|
||||||
|
|
||||||
import com.deer.wms.produce.manage.model.MtAloneProcess;
|
import com.deer.wms.produce.manage.model.*;
|
||||||
import com.deer.wms.produce.manage.model.MtAloneProcessParams;
|
|
||||||
import com.deer.wms.produce.manage.model.ProcessBomParams;
|
|
||||||
import com.deer.wms.project.seed.core.service.Service;
|
import com.deer.wms.project.seed.core.service.Service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -13,6 +11,8 @@ import java.util.List;
|
|||||||
public interface MtAloneProcessService extends Service<MtAloneProcess, Integer> {
|
public interface MtAloneProcessService extends Service<MtAloneProcess, Integer> {
|
||||||
List<MtAloneProcess> findProcessListByProductBom(ProcessBomParams params);
|
List<MtAloneProcess> findProcessListByProductBom(ProcessBomParams params);
|
||||||
|
|
||||||
|
List<MtAloneProcessVo> findProcessListByProductProcess(ProductProcessParams params);
|
||||||
|
|
||||||
|
|
||||||
//List<MtAloneProcess> findList(MtAloneProcessParams params) ;
|
//List<MtAloneProcess> findList(MtAloneProcessParams params) ;
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@ package com.deer.wms.produce.manage.service;
|
|||||||
import com.deer.wms.produce.manage.model.ProcessBom;
|
import com.deer.wms.produce.manage.model.ProcessBom;
|
||||||
import com.deer.wms.produce.manage.model.ProcessBomDto;
|
import com.deer.wms.produce.manage.model.ProcessBomDto;
|
||||||
import com.deer.wms.produce.manage.model.ProcessBomParams;
|
import com.deer.wms.produce.manage.model.ProcessBomParams;
|
||||||
|
import com.deer.wms.produce.manage.model.ProductProcessBomPo;
|
||||||
import com.deer.wms.project.seed.core.service.Service;
|
import com.deer.wms.project.seed.core.service.Service;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -21,4 +22,5 @@ public interface ProcessBomService extends Service<ProcessBom, Integer> {
|
|||||||
|
|
||||||
List<ProcessBomDto> findListByProductNameId(ProcessBomParams params);
|
List<ProcessBomDto> findListByProductNameId(ProcessBomParams params);
|
||||||
|
|
||||||
|
ProductProcessBomPo findProductAndProcessBomByProdBom(ProcessBomParams params);
|
||||||
}
|
}
|
||||||
|
@ -18,4 +18,6 @@ public interface ProductProcessService extends Service<ProductProcess, Integer>
|
|||||||
void save(ProductProcess productProcess, CurrentUser currentUser);
|
void save(ProductProcess productProcess, CurrentUser currentUser);
|
||||||
|
|
||||||
void saveProdAndProc(ProductAndProcess productAndProcess, CurrentUser currentUser);
|
void saveProdAndProc(ProductAndProcess productAndProcess, CurrentUser currentUser);
|
||||||
|
|
||||||
|
ProductAndProcess queryProductProcessDetail(ProductProcessParams params);
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
package com.deer.wms.produce.manage.service.impl;
|
package com.deer.wms.produce.manage.service.impl;
|
||||||
|
|
||||||
import com.deer.wms.produce.manage.dao.MtAloneProcessMapper;
|
import com.deer.wms.produce.manage.dao.MtAloneProcessMapper;
|
||||||
import com.deer.wms.produce.manage.model.MtAloneProcess;
|
import com.deer.wms.produce.manage.model.*;
|
||||||
import com.deer.wms.produce.manage.model.MtAloneProcessParams;
|
|
||||||
import com.deer.wms.produce.manage.model.ProcessBom;
|
|
||||||
import com.deer.wms.produce.manage.model.ProcessBomParams;
|
|
||||||
import com.deer.wms.produce.manage.service.MtAloneProcessService;
|
import com.deer.wms.produce.manage.service.MtAloneProcessService;
|
||||||
import com.deer.wms.produce.manage.service.ProcessBomService;
|
import com.deer.wms.produce.manage.service.ProcessBomService;
|
||||||
import com.deer.wms.project.seed.core.service.AbstractService;
|
import com.deer.wms.project.seed.core.service.AbstractService;
|
||||||
@ -51,6 +48,11 @@ public class MtAloneProcessServiceImpl extends AbstractService<MtAloneProcess, I
|
|||||||
return processList;
|
return processList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<MtAloneProcessVo> findProcessListByProductProcess(ProductProcessParams params) {
|
||||||
|
return mtAloneProcessMapper.findProcessListByProductProcess(params);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//@Override
|
//@Override
|
||||||
//public List<MtAloneProcess> findList(MtAloneProcessParams params) {
|
//public List<MtAloneProcess> findList(MtAloneProcessParams params) {
|
||||||
|
@ -4,6 +4,7 @@ import com.deer.wms.produce.manage.dao.ProcessBomMapper;
|
|||||||
import com.deer.wms.produce.manage.model.*;
|
import com.deer.wms.produce.manage.model.*;
|
||||||
import com.deer.wms.produce.manage.service.ProcessBomService;
|
import com.deer.wms.produce.manage.service.ProcessBomService;
|
||||||
|
|
||||||
|
import com.deer.wms.produce.manage.service.ProductProcessBomService;
|
||||||
import com.deer.wms.project.seed.core.service.AbstractService;
|
import com.deer.wms.project.seed.core.service.AbstractService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@ -23,6 +24,9 @@ public class ProcessBomServiceImpl extends AbstractService<ProcessBom, Integer>
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ProcessBomMapper processBomMapper;
|
private ProcessBomMapper processBomMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ProductProcessBomService productProcessBomService;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ProcessBom> findList(ProcessBomParams params) {
|
public List<ProcessBom> findList(ProcessBomParams params) {
|
||||||
@ -62,4 +66,18 @@ public class ProcessBomServiceImpl extends AbstractService<ProcessBom, Integer>
|
|||||||
public List<ProcessBomDto> findListByProductNameId(ProcessBomParams params) {
|
public List<ProcessBomDto> findListByProductNameId(ProcessBomParams params) {
|
||||||
return processBomMapper.findListByProductNameId(params);
|
return processBomMapper.findListByProductNameId(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ProductProcessBomPo findProductAndProcessBomByProdBom(ProcessBomParams params) {
|
||||||
|
List<ProcessBom> processBomList = processBomMapper.findListByProductBom(params);
|
||||||
|
ProductProcessBom productProcessBom = productProcessBomService.findById(params.getProductProcessId());
|
||||||
|
|
||||||
|
ProductProcessBomPo productProcessBomPo = new ProductProcessBomPo();
|
||||||
|
productProcessBomPo.setProcessBomList(processBomList);
|
||||||
|
if(null != productProcessBom) {
|
||||||
|
productProcessBomPo.setSpecification(productProcessBom.getSpecification());
|
||||||
|
productProcessBomPo.setProcessContent(productProcessBom.getProcessContent());
|
||||||
|
}
|
||||||
|
return productProcessBomPo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,16 +9,14 @@ import com.deer.wms.produce.manage.service.MtAloneProcessService;
|
|||||||
import com.deer.wms.produce.manage.service.ProcessBomService;
|
import com.deer.wms.produce.manage.service.ProcessBomService;
|
||||||
import com.deer.wms.produce.manage.service.ProductProcessService;
|
import com.deer.wms.produce.manage.service.ProductProcessService;
|
||||||
import com.deer.wms.project.seed.core.service.AbstractService;
|
import com.deer.wms.project.seed.core.service.AbstractService;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
import java.text.NumberFormat;
|
import java.text.NumberFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by hy on 2019/07/19.
|
* Created by hy on 2019/07/19.
|
||||||
@ -75,13 +73,35 @@ public class ProductProcessServiceImpl extends AbstractService<ProductProcess, I
|
|||||||
productProcessMapper.insert(productProcess);
|
productProcessMapper.insert(productProcess);
|
||||||
|
|
||||||
//其次保存由前端获取的工序信息
|
//其次保存由前端获取的工序信息
|
||||||
MtAloneProcess[] processes = productAndProcess.getProcesses();
|
MtAloneProcessVo[] processesVo = productAndProcess.getProcessesVo();
|
||||||
if(null != processes) {
|
if(null != processesVo) {
|
||||||
List<MtAloneProcess> processesList = new ArrayList<>(processes.length);
|
MtAloneProcess[] processes = new MtAloneProcess[processesVo.length];
|
||||||
Collections.addAll(processesList, processes);
|
for (int i = 0; i < processesVo.length; i++) {
|
||||||
processService.save(processesList);
|
processes[i] = new MtAloneProcess();
|
||||||
|
BeanUtils.copyProperties(processesVo[i], processes[i]);
|
||||||
|
processService.save(processes[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ProductAndProcess queryProductProcessDetail(ProductProcessParams params) {
|
||||||
|
//根据批次产品加工id查询批次产品加工单信息
|
||||||
|
ProductProcess productProcess = productProcessMapper.selectByPrimaryKey(params.getProductProcessId());
|
||||||
|
//根据批次产品加工id查询工序信息
|
||||||
|
List<MtAloneProcessVo> processList = processService.findProcessListByProductProcess(params);
|
||||||
|
|
||||||
|
ProductAndProcess productAndProcess = new ProductAndProcess();
|
||||||
|
productAndProcess.setProductProcess(productProcess);
|
||||||
|
if(null != processList) {
|
||||||
|
MtAloneProcessVo[] processesVo = new MtAloneProcessVo[processList.size()];
|
||||||
|
for (int i = 0; i < processesVo.length; i++) {
|
||||||
|
processesVo[i] = processList.get(i);
|
||||||
|
}
|
||||||
|
productAndProcess.setProcessesVo(processesVo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return productAndProcess;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,7 @@ public class MaterialsInfoController {
|
|||||||
private MaterialsOutgoingLogService materialsOutgoingLogService;
|
private MaterialsOutgoingLogService materialsOutgoingLogService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* hy
|
* hy正在用
|
||||||
* 新增物料信息
|
* 新增物料信息
|
||||||
* @param materialsInfo
|
* @param materialsInfo
|
||||||
* @param currentUser
|
* @param currentUser
|
||||||
@ -101,8 +101,8 @@ public class MaterialsInfoController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* hy
|
* hy正在用
|
||||||
* 获取某种物料详细信息
|
* 获取某个物料详细信息
|
||||||
* @param params
|
* @param params
|
||||||
* @param currentUser
|
* @param currentUser
|
||||||
* @return
|
* @return
|
||||||
@ -118,7 +118,7 @@ public class MaterialsInfoController {
|
|||||||
//if(currentUser==null){
|
//if(currentUser==null){
|
||||||
// return ResultGenerator.genFailResult(CommonCode.SERVICE_ERROR,"未登录错误",null );
|
// return ResultGenerator.genFailResult(CommonCode.SERVICE_ERROR,"未登录错误",null );
|
||||||
//}
|
//}
|
||||||
StringUtil.trimObjectStringProperties(params);
|
//StringUtil.trimObjectStringProperties(params);
|
||||||
|
|
||||||
params.setCompanyId(1);
|
params.setCompanyId(1);
|
||||||
MaterialsInfoDto materialsInfoDto = materialsInfoService.findDetailById(params);
|
MaterialsInfoDto materialsInfoDto = materialsInfoService.findDetailById(params);
|
||||||
@ -126,7 +126,7 @@ public class MaterialsInfoController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* hy
|
* hy正在用
|
||||||
* 物料信息分页列表查询
|
* 物料信息分页列表查询
|
||||||
* @param params
|
* @param params
|
||||||
* @param currentUser
|
* @param currentUser
|
||||||
@ -135,8 +135,8 @@ public class MaterialsInfoController {
|
|||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ApiImplicitParam(name = "companyId", value = "公司id", paramType = "query", dataType = "int", required = false),
|
@ApiImplicitParam(name = "companyId", value = "公司id", paramType = "query", dataType = "int", required = false),
|
||||||
@ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String", required = false),
|
@ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String", required = false),
|
||||||
@ApiImplicitParam(name = "begDate", value = "起始日期", paramType = "query", dataType = "Date", required = false),
|
@ApiImplicitParam(name = "begDate", value = "起始日期", paramType = "query", dataType = "String", required = false),
|
||||||
@ApiImplicitParam(name = "endDate", value = "结束日期", paramType = "query", dataType = "Date", required = false)
|
@ApiImplicitParam(name = "endDate", value = "结束日期", paramType = "query", dataType = "String", required = false)
|
||||||
})
|
})
|
||||||
@OperateLog(description = "物料信息分页查询", type = "查询")
|
@OperateLog(description = "物料信息分页查询", type = "查询")
|
||||||
@ApiOperation(value = "物料信息列表分页", notes = "物料信息列表分页")
|
@ApiOperation(value = "物料信息列表分页", notes = "物料信息列表分页")
|
||||||
|
@ -91,15 +91,30 @@ public class MtAloneProcessController {
|
|||||||
@ApiOperation(value = "根据产品bom查询工序", notes = "根据产品bom查询工序")
|
@ApiOperation(value = "根据产品bom查询工序", notes = "根据产品bom查询工序")
|
||||||
@GetMapping("/processListByProductBom")
|
@GetMapping("/processListByProductBom")
|
||||||
public Result processListByProductBom(ProcessBomParams params, @ApiIgnore @User CurrentUser currentUser) {
|
public Result processListByProductBom(ProcessBomParams params, @ApiIgnore @User CurrentUser currentUser) {
|
||||||
//if(currentUser==null){
|
if(currentUser==null){
|
||||||
// return ResultGenerator.genFailResult(CommonCode.SERVICE_ERROR,"未登录错误",null );
|
return ResultGenerator.genFailResult(CommonCode.SERVICE_ERROR,"未登录错误",null );
|
||||||
//}
|
}
|
||||||
|
|
||||||
params.setCompanyId(1);
|
params.setCompanyId(currentUser.getCompanyId());
|
||||||
PageHelper.startPage(params.getPageNum(), params.getPageSize());
|
PageHelper.startPage(params.getPageNum(), params.getPageSize());
|
||||||
List<MtAloneProcess> list = mtAloneProcessService.findProcessListByProductBom(params);
|
List<MtAloneProcess> list = mtAloneProcessService.findProcessListByProductBom(params);
|
||||||
PageInfo pageInfo = new PageInfo(list);
|
PageInfo pageInfo = new PageInfo(list);
|
||||||
return ResultGenerator.genSuccessResult(pageInfo);
|
return ResultGenerator.genSuccessResult(pageInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@OperateLog(description = "根据批次产品加工单id查询工序", type = "查询")
|
||||||
|
@ApiOperation(value = "根据批次产品加工单id查询工序", notes = "根据批次产品加工单id查询工序")
|
||||||
|
@GetMapping("/processListByProductProcess")
|
||||||
|
public Result processListByProductProcess(ProductProcessParams params, @ApiIgnore @User CurrentUser currentUser) {
|
||||||
|
//if(currentUser==null){
|
||||||
|
// return ResultGenerator.genFailResult(CommonCode.SERVICE_ERROR,"未登录错误",null );
|
||||||
|
//}
|
||||||
|
|
||||||
|
params.setCompanyId(1);
|
||||||
|
PageHelper.startPage(params.getPageNum(), params.getPageSize());
|
||||||
|
List<MtAloneProcessVo> list = mtAloneProcessService.findProcessListByProductProcess(params);
|
||||||
|
PageInfo pageInfo = new PageInfo(list);
|
||||||
|
return ResultGenerator.genSuccessResult(pageInfo);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -128,7 +128,8 @@ public class ProcessBomController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* hy
|
* hy
|
||||||
* 根据选择的产品名称来展示产品其他数据和工序数据
|
* 根据选择的产品名称来展示产品其他数据和工序数据,
|
||||||
|
* 用于新建生产加工产品bom下拉框选择
|
||||||
* @param params
|
* @param params
|
||||||
* @param currentUser
|
* @param currentUser
|
||||||
* @return
|
* @return
|
||||||
@ -143,13 +144,39 @@ public class ProcessBomController {
|
|||||||
return ResultGenerator.genFailResult(CommonCode.SERVICE_ERROR,"未登录错误",null );
|
return ResultGenerator.genFailResult(CommonCode.SERVICE_ERROR,"未登录错误",null );
|
||||||
}
|
}
|
||||||
|
|
||||||
params.setCompanyId(1);
|
params.setCompanyId(currentUser.getCompanyId());
|
||||||
PageHelper.startPage(params.getPageNum(), params.getPageSize());
|
PageHelper.startPage(params.getPageNum(), params.getPageSize());
|
||||||
List<ProcessBomDto> list = processBomService.findListByProductNameId(params);
|
List<ProcessBomDto> list = processBomService.findListByProductNameId(params);
|
||||||
PageInfo pageInfo = new PageInfo(list);
|
PageInfo pageInfo = new PageInfo(list);
|
||||||
return ResultGenerator.genSuccessResult(pageInfo);
|
return ResultGenerator.genSuccessResult(pageInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* hy正在用
|
||||||
|
* 根据产品bom的id获取产品bom部分数据和工序数据
|
||||||
|
* 用于新建生产加工产品bom下拉框选择
|
||||||
|
* @param params
|
||||||
|
* @param currentUser
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "根据产品bom的id获取产品bom部分数据和工序数据", notes = "根据产品bom的id获取产品bom部分数据和工序数据")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "access-token", value = "token", paramType = "header", dataType = "String", required = true),
|
||||||
|
@ApiImplicitParam(name = "productProcessId", value = "产品bom的id", paramType = "query", dataType = "int", required = true),
|
||||||
|
@ApiImplicitParam(name = "companyId", value = "公司id", paramType = "query", dataType = "int", required = false)
|
||||||
|
|
||||||
|
})
|
||||||
|
@GetMapping("/and/product/bom/by/prodbom")
|
||||||
|
public Result ProductAndProcessBomByProdBom(ProcessBomParams params, @ApiIgnore @User CurrentUser currentUser){
|
||||||
|
if(currentUser==null){
|
||||||
|
return ResultGenerator.genFailResult(CommonCode.SERVICE_ERROR,"未登录错误",null );
|
||||||
|
}
|
||||||
|
|
||||||
|
params.setCompanyId(currentUser.getCompanyId());
|
||||||
|
ProductProcessBomPo productProcessBomPo = processBomService.findProductAndProcessBomByProdBom(params);
|
||||||
|
return ResultGenerator.genSuccessResult(productProcessBomPo);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加工序数据到数据库
|
* 添加工序数据到数据库
|
||||||
*/
|
*/
|
||||||
|
@ -164,7 +164,13 @@ public class ProductProcessBomController {
|
|||||||
return ResultGenerator.genSuccessResult(pageInfo);
|
return ResultGenerator.genSuccessResult(pageInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**根据产品bom的id获取产品bom,用于新建批次产品加工的产品bom下拉框填入名称**/
|
/**
|
||||||
|
* hy
|
||||||
|
* 根据产品bom的id获取产品bom,用于新建批次产品加工的产品bom下拉框填入名称
|
||||||
|
* @param params
|
||||||
|
* @param currentUser
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
@GetMapping("/listById")
|
@GetMapping("/listById")
|
||||||
public Result listByProductId(ProductProcessBomParams params, @ApiIgnore @User CurrentUser currentUser) {
|
public Result listByProductId(ProductProcessBomParams params, @ApiIgnore @User CurrentUser currentUser) {
|
||||||
if(currentUser==null){
|
if(currentUser==null){
|
||||||
|
@ -83,7 +83,7 @@ public class ProductProcessController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* hy
|
* hy正在用
|
||||||
* 批次生产加工单分页查询
|
* 批次生产加工单分页查询
|
||||||
* @param params
|
* @param params
|
||||||
* @param currentUser
|
* @param currentUser
|
||||||
@ -91,6 +91,7 @@ public class ProductProcessController {
|
|||||||
*/
|
*/
|
||||||
@ApiOperation(value = "批次生产加工单分页查询", notes = "批次生产加工单分页查询")
|
@ApiOperation(value = "批次生产加工单分页查询", notes = "批次生产加工单分页查询")
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "createDate", value = "创建时间", paramType = "query", dataType = "Date", required = false),
|
||||||
@ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String", required = false),
|
@ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String", required = false),
|
||||||
@ApiImplicitParam(name = "companyId", value = "公司id", paramType = "query", dataType = "int", required = false)
|
@ApiImplicitParam(name = "companyId", value = "公司id", paramType = "query", dataType = "int", required = false)
|
||||||
|
|
||||||
@ -98,11 +99,11 @@ public class ProductProcessController {
|
|||||||
@OperateLog(description = "批次生产加工单分页查询", type = "查询")
|
@OperateLog(description = "批次生产加工单分页查询", type = "查询")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public Result list(ProductProcessParams params, @ApiIgnore @User CurrentUser currentUser) {
|
public Result list(ProductProcessParams params, @ApiIgnore @User CurrentUser currentUser) {
|
||||||
//if(currentUser==null){
|
if(currentUser==null){
|
||||||
// return ResultGenerator.genFailResult(CommonCode.SERVICE_ERROR,"未登录错误",null );
|
return ResultGenerator.genFailResult(CommonCode.SERVICE_ERROR,"未登录错误",null );
|
||||||
//}
|
}
|
||||||
|
|
||||||
params.setCompanyId(1);
|
params.setCompanyId(currentUser.getCompanyId());
|
||||||
PageHelper.startPage(params.getPageNum(), params.getPageSize());
|
PageHelper.startPage(params.getPageNum(), params.getPageSize());
|
||||||
List<ProductProcessVo> list = productProcessService.findList(params);
|
List<ProductProcessVo> list = productProcessService.findList(params);
|
||||||
PageInfo pageInfo = new PageInfo(list);
|
PageInfo pageInfo = new PageInfo(list);
|
||||||
@ -110,25 +111,51 @@ public class ProductProcessController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* hy
|
* hy正在用
|
||||||
* 新建批次产品加工完毕时,点击提交同时保存产品加工和工序信息
|
* 新建批次产品加工完毕时,点击提交同时保存产品加工和工序信息
|
||||||
* @param productAndProcess
|
* @param productAndProcess
|
||||||
* @param currentUser
|
* @param currentUser
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "批次生产加工及工序保存更新", notes = "批次生产加工及工序保存更新")
|
@ApiOperation(value = "批次生产加工及工序保存", notes = "批次生产加工及工序保存")
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ApiImplicitParam(name = "productAndProcess", value = "批次生产加工及工序", paramType = "body", dataType = "ProductAndProcess", required = true)
|
@ApiImplicitParam(name = "productAndProcess", value = "批次生产加工及工序", paramType = "body", dataType = "ProductAndProcess", required = true)
|
||||||
})
|
})
|
||||||
@OperateLog(description = "批次生产加工及工序保存", type = "保存")
|
@OperateLog(description = "批次生产加工及工序保存", type = "保存")
|
||||||
@PostMapping("/saveProdAndProc")
|
@PostMapping("/saveProdAndProc")
|
||||||
public Result saveProdAndProc(@RequestBody ProductAndProcess productAndProcess, @ApiIgnore @User CurrentUser currentUser) {
|
public Result saveProdAndProc(@RequestBody ProductAndProcess productAndProcess, @ApiIgnore @User CurrentUser currentUser) {
|
||||||
if(currentUser==null){
|
//if(currentUser==null){
|
||||||
return ResultGenerator.genFailResult(CommonCode.SERVICE_ERROR,"未登录错误",null );
|
// return ResultGenerator.genFailResult(CommonCode.SERVICE_ERROR,"未登录错误",null );
|
||||||
}
|
//}
|
||||||
|
|
||||||
productProcessService.saveProdAndProc(productAndProcess, currentUser);
|
productProcessService.saveProdAndProc(productAndProcess, currentUser);
|
||||||
return ResultGenerator.genSuccessResult();
|
return ResultGenerator.genSuccessResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* hy正在用
|
||||||
|
* 点击批次生产加工单列表最后一列详情按钮,查询批次生产加工单详情
|
||||||
|
* @param params
|
||||||
|
* @param currentUser
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "批次生产加工单详情查询", notes = "批次生产加工单详情查询")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "productProcessId", value = "批次生产加工单id", paramType = "query", dataType = "int", required = true),
|
||||||
|
@ApiImplicitParam(name = "companyId", value = "公司id", paramType = "query", dataType = "int", required = false)
|
||||||
|
|
||||||
|
})
|
||||||
|
@OperateLog(description = "批次生产加工单详情查询", type = "查询")
|
||||||
|
@GetMapping("/query/product/process/detail")
|
||||||
|
public Result queryProductProcessDetail(ProductProcessParams params, @ApiIgnore @User CurrentUser currentUser) {
|
||||||
|
if(currentUser==null){
|
||||||
|
return ResultGenerator.genFailResult(CommonCode.SERVICE_ERROR,"未登录错误",null );
|
||||||
|
}
|
||||||
|
|
||||||
|
params.setCompanyId(currentUser.getCompanyId());
|
||||||
|
ProductAndProcess productAndProcess = productProcessService.queryProductProcessDetail(params);
|
||||||
|
return ResultGenerator.genSuccessResult(productAndProcess);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user