工序详情查询接口
This commit is contained in:
parent
410a5b4b6e
commit
b8c8a97523
1193
.idea/workspace.xml
1193
.idea/workspace.xml
File diff suppressed because it is too large
Load Diff
45316
logs/spring.log
45316
logs/spring.log
File diff suppressed because it is too large
Load Diff
@ -10,5 +10,7 @@ import java.util.List;
|
|||||||
|
|
||||||
public interface MtAloneProcessMapper extends Mapper<MtAloneProcess> {
|
public interface MtAloneProcessMapper extends Mapper<MtAloneProcess> {
|
||||||
|
|
||||||
List<MtAloneProcessVo> findProcessListByProductProcess(ProductProcessParams params);
|
List<MtAloneProcessVo> findProcessVoListByProductProcess(ProductProcessParams params);
|
||||||
|
|
||||||
|
MtAloneProcessVo selectProcessVoByProcessId(MtAloneProcessParams params);
|
||||||
}
|
}
|
@ -1,8 +1,13 @@
|
|||||||
package com.deer.wms.produce.manage.dao;
|
package com.deer.wms.produce.manage.dao;
|
||||||
|
|
||||||
|
|
||||||
|
import com.deer.wms.produce.manage.model.MtAloneProcessParams;
|
||||||
import com.deer.wms.produce.manage.model.ProcessMaterials;
|
import com.deer.wms.produce.manage.model.ProcessMaterials;
|
||||||
|
import com.deer.wms.produce.manage.model.ProcessMaterialsVo;
|
||||||
import com.deer.wms.project.seed.core.mapper.Mapper;
|
import com.deer.wms.project.seed.core.mapper.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public interface ProcessMaterialsMapper extends Mapper<ProcessMaterials> {
|
public interface ProcessMaterialsMapper extends Mapper<ProcessMaterials> {
|
||||||
|
List<ProcessMaterialsVo> findProcMatVoListByProcess(MtAloneProcessParams params);
|
||||||
}
|
}
|
@ -15,6 +15,7 @@
|
|||||||
<result column="materials_name" jdbcType="VARCHAR" property="materialsName" />
|
<result column="materials_name" jdbcType="VARCHAR" property="materialsName" />
|
||||||
<result column="quantity" jdbcType="REAL" property="quantity" />
|
<result column="quantity" jdbcType="REAL" property="quantity" />
|
||||||
<result column="position_name" jdbcType="VARCHAR" property="positionName" />
|
<result column="position_name" jdbcType="VARCHAR" property="positionName" />
|
||||||
|
<result column="unit_id" jdbcType="INTEGER" property="unitId" />
|
||||||
<result column="memo" jdbcType="VARCHAR" property="memo" />
|
<result column="memo" jdbcType="VARCHAR" property="memo" />
|
||||||
<result column="company_id" jdbcType="INTEGER" property="companyId" />
|
<result column="company_id" jdbcType="INTEGER" property="companyId" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
@ -23,6 +24,7 @@
|
|||||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
<result column="materials_name" jdbcType="VARCHAR" property="materialsName" />
|
<result column="materials_name" jdbcType="VARCHAR" property="materialsName" />
|
||||||
<result column="position_name" jdbcType="VARCHAR" property="positionName" />
|
<result column="position_name" jdbcType="VARCHAR" property="positionName" />
|
||||||
|
<result column="unit_id" jdbcType="INTEGER" property="unitId" />
|
||||||
<result column="user_name" jdbcType="VARCHAR" property="userName" />
|
<result column="user_name" jdbcType="VARCHAR" property="userName" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
@ -31,6 +31,8 @@
|
|||||||
<result column="process_bom_name" jdbcType="VARCHAR" property="processBomName" />
|
<result column="process_bom_name" jdbcType="VARCHAR" property="processBomName" />
|
||||||
<result column="product_annex_code" jdbcType="VARCHAR" property="productAnnexCode" />
|
<result column="product_annex_code" jdbcType="VARCHAR" property="productAnnexCode" />
|
||||||
<result column="memo" jdbcType="VARCHAR" property="memo" />
|
<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" />
|
<result column="company_id" jdbcType="INTEGER" property="companyId" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
@ -60,13 +62,15 @@
|
|||||||
<result column="process_bom_id" jdbcType="INTEGER" property="processBomId" />
|
<result column="process_bom_id" jdbcType="INTEGER" property="processBomId" />
|
||||||
<result column="process_bom_name" jdbcType="VARCHAR" property="processBomName" />
|
<result column="process_bom_name" jdbcType="VARCHAR" property="processBomName" />
|
||||||
<result column="product_annex_code" jdbcType="VARCHAR" property="productAnnexCode" />
|
<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="memo" jdbcType="VARCHAR" property="memo" />
|
||||||
<result column="company_id" jdbcType="INTEGER" property="companyId" />
|
<result column="company_id" jdbcType="INTEGER" property="companyId" />
|
||||||
<result column="supplier_name" jdbcType="VARCHAR" property="supplierName" />
|
<result column="supplier_name" jdbcType="VARCHAR" property="supplierName" />
|
||||||
<result column="name" jdbcType="VARCHAR" property="accessoryName" />
|
<result column="name" jdbcType="VARCHAR" property="accessoryName" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<select id="findProcessListByProductProcess" parameterType="com.deer.wms.produce.manage.model.ProductProcessParams" resultMap="MtAloneProcessVoResultMap">
|
<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
|
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 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 mt_alone_accessory accessory ON process.product_annex_code = accessory.annex_code AND process.company_id = accessory.company_id
|
||||||
@ -80,6 +84,19 @@
|
|||||||
</where> ORDER BY process.process_step
|
</where> ORDER BY process.process_step
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<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
|
||||||
|
<where>
|
||||||
|
<if test="processId != null">
|
||||||
|
process.id = #{processId}
|
||||||
|
</if>
|
||||||
|
<if test="companyId != null">
|
||||||
|
AND process.company_id = #{companyId}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
@ -18,8 +18,41 @@
|
|||||||
<result column="specification" jdbcType="VARCHAR" property="specification" />
|
<result column="specification" jdbcType="VARCHAR" property="specification" />
|
||||||
<result column="dosage" jdbcType="REAL" property="dosage" />
|
<result column="dosage" jdbcType="REAL" property="dosage" />
|
||||||
<result column="unit_id" jdbcType="INTEGER" property="unitId" />
|
<result column="unit_id" jdbcType="INTEGER" property="unitId" />
|
||||||
<result column="unit_name" jdbcType="VARCHAR" property="unitName" />
|
|
||||||
<result column="memo" jdbcType="VARCHAR" property="memo" />
|
<result column="memo" jdbcType="VARCHAR" property="memo" />
|
||||||
<result column="company_id" jdbcType="INTEGER" property="companyId" />
|
<result column="company_id" jdbcType="INTEGER" property="companyId" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
|
<resultMap id="ProcessMaterialsVoResultMap" type="com.deer.wms.produce.manage.model.ProcessMaterialsVo">
|
||||||
|
<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="INTEGER" property="version" />
|
||||||
|
<result column="status" jdbcType="INTEGER" property="status" />
|
||||||
|
<result column="process_id" jdbcType="INTEGER" property="processId" />
|
||||||
|
<result column="materials_bom_id" jdbcType="INTEGER" property="materialsBomId" />
|
||||||
|
<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="unit_id" jdbcType="INTEGER" property="unitId" />
|
||||||
|
<result column="memo" jdbcType="VARCHAR" property="memo" />
|
||||||
|
<result column="company_id" jdbcType="INTEGER" property="companyId" />
|
||||||
|
<result column="unit_name" jdbcType="VARCHAR" property="unitName0" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<select id="findProcMatVoListByProcess" parameterType="com.deer.wms.produce.manage.model.MtAloneProcessParams" resultMap="ProcessMaterialsVoResultMap">
|
||||||
|
SELECT procmaterials.*, unit.unit_name unit_name0 FROM mt_alone_process_materials procmaterials
|
||||||
|
LEFT JOIN unit ON procmaterials.unit_id = unit.unit_id AND procmaterials.company_id = unit.company_id
|
||||||
|
<where>
|
||||||
|
<if test="processId != null">
|
||||||
|
procmaterials.process_id = #{processId}
|
||||||
|
</if>
|
||||||
|
<if test="companyId != null">
|
||||||
|
AND procmaterials.company_id = #{companyId}
|
||||||
|
</if>
|
||||||
|
</where> ORDER BY procmaterials.id
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
@ -59,6 +59,12 @@ public class MaterialsOutgoingLog {
|
|||||||
@Column(name = "position_name")
|
@Column(name = "position_name")
|
||||||
private String positionName;
|
private String positionName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位id, 关联表:unit
|
||||||
|
*/
|
||||||
|
@Column(name = "unit_id")
|
||||||
|
private Integer unitId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备注
|
* 备注
|
||||||
*/
|
*/
|
||||||
@ -274,4 +280,22 @@ public class MaterialsOutgoingLog {
|
|||||||
public void setCompanyId(Integer companyId) {
|
public void setCompanyId(Integer companyId) {
|
||||||
this.companyId = companyId;
|
this.companyId = companyId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取单位id
|
||||||
|
*
|
||||||
|
* @return unit_Id - 单位id
|
||||||
|
*/
|
||||||
|
public Integer getUnitId() {
|
||||||
|
return unitId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置单位id
|
||||||
|
*
|
||||||
|
* @param unitId 单位id
|
||||||
|
*/
|
||||||
|
public void setUnitId(Integer unitId) {
|
||||||
|
this.unitId = unitId;
|
||||||
|
}
|
||||||
}
|
}
|
@ -1,6 +1,7 @@
|
|||||||
package com.deer.wms.produce.manage.model;
|
package com.deer.wms.produce.manage.model;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* 暂时没用
|
||||||
* @Author: hy
|
* @Author: hy
|
||||||
* @Date: 2019/8/20 11:23
|
* @Date: 2019/8/20 11:23
|
||||||
* @Version 1.0
|
* @Version 1.0
|
||||||
|
@ -156,6 +156,18 @@ public class MtAloneProcess {
|
|||||||
@Column(name = "company_id")
|
@Column(name = "company_id")
|
||||||
private Integer companyId;
|
private Integer companyId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工序开始日期
|
||||||
|
*/
|
||||||
|
@Column(name = "beg_date")
|
||||||
|
private Date begDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工序完成日期
|
||||||
|
*/
|
||||||
|
@Column(name = "end_date")
|
||||||
|
private Date endDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return id
|
* @return id
|
||||||
*/
|
*/
|
||||||
@ -634,4 +646,40 @@ public class MtAloneProcess {
|
|||||||
public void setProcessBomName(String processBomName) {
|
public void setProcessBomName(String processBomName) {
|
||||||
this.processBomName = processBomName;
|
this.processBomName = processBomName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取工序开始日期
|
||||||
|
*
|
||||||
|
* @return beg_date - 工序开始日期
|
||||||
|
*/
|
||||||
|
public Date getBegDate() {
|
||||||
|
return begDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置工序开始日期
|
||||||
|
*
|
||||||
|
* @param begDate 工序开始日期
|
||||||
|
*/
|
||||||
|
public void setBegDate(Date begDate) {
|
||||||
|
this.begDate = begDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取工序完成日期
|
||||||
|
*
|
||||||
|
* @return end_date - 工序完成日期
|
||||||
|
*/
|
||||||
|
public Date getEndDate() {
|
||||||
|
return endDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置工序完成日期
|
||||||
|
*
|
||||||
|
* @param endDate 工序完成日期
|
||||||
|
*/
|
||||||
|
public void setEndDate(Date endDate) {
|
||||||
|
this.endDate = endDate;
|
||||||
|
}
|
||||||
}
|
}
|
@ -6,9 +6,18 @@ import com.deer.wms.project.seed.core.service.QueryParams;
|
|||||||
* Created by hy on 2019/07/19.
|
* Created by hy on 2019/07/19.
|
||||||
*/
|
*/
|
||||||
public class MtAloneProcessParams extends QueryParams {
|
public class MtAloneProcessParams extends QueryParams {
|
||||||
|
private Integer processId;
|
||||||
|
|
||||||
private Integer productBomId;
|
private Integer productBomId;
|
||||||
|
|
||||||
|
public Integer getProcessId() {
|
||||||
|
return processId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProcessId(Integer processId) {
|
||||||
|
this.processId = processId;
|
||||||
|
}
|
||||||
|
|
||||||
public Integer getProductBomId() {
|
public Integer getProductBomId() {
|
||||||
return productBomId;
|
return productBomId;
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,30 @@
|
|||||||
|
package com.deer.wms.produce.manage.model;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*同时获取工序信息和物料信息
|
||||||
|
* @Author: hy
|
||||||
|
* @Date: 2019/12/19 20:13
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public class ProcessAndMaterials {
|
||||||
|
|
||||||
|
private MtAloneProcessVo processVo;//工序扩展信息
|
||||||
|
|
||||||
|
private ProcessMaterialsVo[] processMaterialsVo;//物料扩展信息
|
||||||
|
|
||||||
|
public MtAloneProcessVo getProcessVo() {
|
||||||
|
return processVo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProcessVo(MtAloneProcessVo processVo) {
|
||||||
|
this.processVo = processVo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProcessMaterialsVo[] getProcessMaterialsVo() {
|
||||||
|
return processMaterialsVo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProcessMaterialsVo(ProcessMaterialsVo[] processMaterialsVo) {
|
||||||
|
this.processMaterialsVo = processMaterialsVo;
|
||||||
|
}
|
||||||
|
}
|
@ -76,11 +76,6 @@ public class ProcessMaterials {
|
|||||||
@Column(name = "unit_id")
|
@Column(name = "unit_id")
|
||||||
private Integer unitId;
|
private Integer unitId;
|
||||||
|
|
||||||
/**
|
|
||||||
* 单位名称
|
|
||||||
*/
|
|
||||||
@Column(name = "unit_name")
|
|
||||||
private String unitName;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备注
|
* 备注
|
||||||
@ -320,24 +315,6 @@ public class ProcessMaterials {
|
|||||||
this.unitId = unitId;
|
this.unitId = unitId;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取单位名称
|
|
||||||
*
|
|
||||||
* @return unit_name - 单位名称
|
|
||||||
*/
|
|
||||||
public String getUnitName() {
|
|
||||||
return unitName;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设置单位名称
|
|
||||||
*
|
|
||||||
* @param unitName 单位名称
|
|
||||||
*/
|
|
||||||
public void setUnitName(String unitName) {
|
|
||||||
this.unitName = unitName;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取备注
|
* 获取备注
|
||||||
*
|
*
|
||||||
|
@ -0,0 +1,18 @@
|
|||||||
|
package com.deer.wms.produce.manage.model;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: hy
|
||||||
|
* @Date: 2019/12/21 17:33
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public class ProcessMaterialsVo extends ProcessMaterials {
|
||||||
|
private String unitName0;
|
||||||
|
|
||||||
|
public String getUnitName0() {
|
||||||
|
return unitName0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUnitName0(String unitName0) {
|
||||||
|
this.unitName0 = unitName0;
|
||||||
|
}
|
||||||
|
}
|
@ -1,9 +0,0 @@
|
|||||||
package com.deer.wms.produce.manage.model;
|
|
||||||
|
|
||||||
import com.deer.wms.project.seed.core.service.QueryParams;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Created by hy on 2019/07/19.
|
|
||||||
*/
|
|
||||||
public class ProcessParams extends QueryParams {
|
|
||||||
}
|
|
@ -4,15 +4,15 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 从前端同时获取批次产品加工信息和工序信息
|
* 同时获取批次产品加工信息和工序信息
|
||||||
* @Author: hy
|
* @Author: hy
|
||||||
* @Date: 2019/10/30 22:52
|
* @Date: 2019/10/30 22:52
|
||||||
* @Version 1.0
|
* @Version 1.0
|
||||||
*/
|
*/
|
||||||
public class ProductAndProcess {
|
public class ProductAndProcess {
|
||||||
private ProductProcess productProcess;
|
private ProductProcess productProcess;//批次生产加工信息
|
||||||
|
|
||||||
private MtAloneProcessVo[] processesVo;
|
private MtAloneProcessVo[] processesVo;//工序扩展信息
|
||||||
|
|
||||||
public ProductProcess getProductProcess() {
|
public ProductProcess getProductProcess() {
|
||||||
return productProcess;
|
return productProcess;
|
||||||
|
@ -18,5 +18,5 @@ public interface MaterialsOutgoingLogService extends Service<MaterialsOutgoingLo
|
|||||||
|
|
||||||
List<MaterialsOutgoingLogVo> findListByOneMaterial(MaterialsOutgoingLogParams params) ;
|
List<MaterialsOutgoingLogVo> findListByOneMaterial(MaterialsOutgoingLogParams params) ;
|
||||||
|
|
||||||
void save(MaterialsOutgoingLogDto materialsOutgoingLogDto, CurrentUser currentUser);
|
void save(MaterialsOutgoingLog materialsOutgoingLog, CurrentUser currentUser);
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,9 @@ 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<MtAloneProcessVo> findProcessVoListByProductProcess(ProductProcessParams params);
|
||||||
|
|
||||||
|
ProcessAndMaterials queryProcessDetail(MtAloneProcessParams params);
|
||||||
|
|
||||||
|
|
||||||
//List<MtAloneProcess> findList(MtAloneProcessParams params) ;
|
//List<MtAloneProcess> findList(MtAloneProcessParams params) ;
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
package com.deer.wms.produce.manage.service;
|
package com.deer.wms.produce.manage.service;
|
||||||
|
|
||||||
|
import com.deer.wms.produce.manage.model.MtAloneProcessParams;
|
||||||
import com.deer.wms.produce.manage.model.ProcessMaterials;
|
import com.deer.wms.produce.manage.model.ProcessMaterials;
|
||||||
import com.deer.wms.produce.manage.model.ProcessMaterialsParams;
|
import com.deer.wms.produce.manage.model.ProcessMaterialsParams;
|
||||||
|
import com.deer.wms.produce.manage.model.ProcessMaterialsVo;
|
||||||
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;
|
||||||
@ -10,6 +12,7 @@ import java.util.List;
|
|||||||
* Created by hy on 2019/07/19.
|
* Created by hy on 2019/07/19.
|
||||||
*/
|
*/
|
||||||
public interface ProcessMaterialsService extends Service<ProcessMaterials, Integer> {
|
public interface ProcessMaterialsService extends Service<ProcessMaterials, Integer> {
|
||||||
|
List<ProcessMaterialsVo> findProcMatVoListByProcess(MtAloneProcessParams params);
|
||||||
|
|
||||||
|
|
||||||
//List<ProcessMaterials> findList(ProcessMaterialsParams params) ;
|
//List<ProcessMaterials> findList(ProcessMaterialsParams params) ;
|
||||||
|
@ -6,6 +6,7 @@ import com.deer.wms.produce.manage.dao.MaterialsOutgoingLogMapper;
|
|||||||
import com.deer.wms.produce.manage.dao.MaterialsStockInfoMapper;
|
import com.deer.wms.produce.manage.dao.MaterialsStockInfoMapper;
|
||||||
import com.deer.wms.produce.manage.model.*;
|
import com.deer.wms.produce.manage.model.*;
|
||||||
import com.deer.wms.produce.manage.service.MaterialsOutgoingLogService;
|
import com.deer.wms.produce.manage.service.MaterialsOutgoingLogService;
|
||||||
|
import com.deer.wms.produce.manage.service.MaterialsStockInfoService;
|
||||||
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;
|
||||||
@ -25,7 +26,7 @@ public class MaterialsOutgoingLogServiceImpl extends AbstractService<MaterialsOu
|
|||||||
private MaterialsOutgoingLogMapper materialsOutgoingLogMapper;
|
private MaterialsOutgoingLogMapper materialsOutgoingLogMapper;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private MaterialsStockInfoMapper materialsStockInfoMapper;
|
private MaterialsStockInfoService materialsStockInfoService;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -34,49 +35,39 @@ public class MaterialsOutgoingLogServiceImpl extends AbstractService<MaterialsOu
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void save(MaterialsOutgoingLogDto materialsOutgoingLogDto, CurrentUser currentUser) {
|
public void save(MaterialsOutgoingLog materialsOutgoingLog, CurrentUser currentUser) {
|
||||||
Date date = new Date();
|
Date date = new Date();
|
||||||
|
|
||||||
MaterialsOutgoingLog materialsOutgoingLog = new MaterialsOutgoingLog();
|
materialsOutgoingLog.setOperatorId(1);
|
||||||
materialsOutgoingLog.setOperatorId(currentUser.getUserId());
|
|
||||||
materialsOutgoingLog.setCreateTime(date);
|
materialsOutgoingLog.setCreateTime(date);
|
||||||
materialsOutgoingLog.setMaterialsId(materialsOutgoingLogDto.getMaterialsId());
|
materialsOutgoingLog.setCompanyId(1);
|
||||||
materialsOutgoingLog.setMaterialsName(materialsOutgoingLogDto.getMaterialsName());
|
|
||||||
materialsOutgoingLog.setType(materialsOutgoingLogDto.getType());
|
|
||||||
materialsOutgoingLog.setQuantity(materialsOutgoingLogDto.getQuantity());
|
|
||||||
materialsOutgoingLog.setPositionName(materialsOutgoingLogDto.getPositionName());
|
|
||||||
materialsOutgoingLog.setCompanyId(currentUser.getCompanyId());
|
|
||||||
materialsOutgoingLogMapper.insert(materialsOutgoingLog);
|
materialsOutgoingLogMapper.insert(materialsOutgoingLog);
|
||||||
|
|
||||||
/**使用物料id(非stock主键)查询的写法**/
|
MaterialsStockInfo stock = materialsStockInfoService.findBy("materialsId", materialsOutgoingLog.getMaterialsId());
|
||||||
MaterialsStockInfo tempStock = new MaterialsStockInfo();
|
|
||||||
tempStock.setMaterialsId(materialsOutgoingLogDto.getMaterialsId());
|
|
||||||
MaterialsStockInfo stock = materialsStockInfoMapper.selectOne(tempStock);
|
|
||||||
|
|
||||||
if(stock==null){//如果是新的物料,库存表中没有该物料信息,则新增一条库存记录
|
if(stock==null){//如果是新的物料,库存表中没有该物料信息,则新增一条库存记录
|
||||||
stock = new MaterialsStockInfo();
|
stock = new MaterialsStockInfo();
|
||||||
stock.setOperatorId(currentUser.getUserId());
|
stock.setOperatorId(1);
|
||||||
stock.setMaterialsId(materialsOutgoingLogDto.getMaterialsId());
|
stock.setMaterialsId(materialsOutgoingLog.getMaterialsId());
|
||||||
stock.setUnitId(materialsOutgoingLogDto.getUnitId());
|
stock.setUnitId(materialsOutgoingLog.getUnitId());
|
||||||
stock.setCreateTime(date);
|
stock.setCreateTime(date);
|
||||||
if(materialsOutgoingLog.getType() == ProduceManageConstant.TYPE_OUT) {
|
if(materialsOutgoingLog.getType() == ProduceManageConstant.TYPE_OUT) {
|
||||||
stock.setQuantity(0-materialsOutgoingLogDto.getQuantity());//新建物料的出库仓储数量为负数
|
stock.setQuantity(0-materialsOutgoingLog.getQuantity());//新建物料的出库仓储数量为负数
|
||||||
}else if(materialsOutgoingLog.getType() == ProduceManageConstant.TYPE_IN) {
|
}else if(materialsOutgoingLog.getType() == ProduceManageConstant.TYPE_IN) {
|
||||||
stock.setQuantity(materialsOutgoingLogDto.getQuantity());//新建物料的入库仓储数量为正数
|
stock.setQuantity(materialsOutgoingLog.getQuantity());//新建物料的入库仓储数量为正数
|
||||||
}
|
}
|
||||||
|
|
||||||
stock.setPositionName(materialsOutgoingLogDto.getPositionName());
|
stock.setPositionName(materialsOutgoingLog.getPositionName());
|
||||||
stock.setCompanyId(currentUser.getCompanyId());
|
stock.setCompanyId(1);
|
||||||
|
|
||||||
materialsStockInfoMapper.insert(stock);
|
materialsStockInfoService.save(stock);
|
||||||
}else{//如果库存表中有该物料信息,则更新对应的库存记录
|
}else{//如果库存表中有该物料信息,则更新对应的库存记录
|
||||||
stock.setCreateTime(date);//日期取最新更新的日期
|
stock.setCreateTime(date);//日期取最新更新的日期
|
||||||
MaterialsInfoParams params = new MaterialsInfoParams();//查询条件赋值
|
MaterialsInfoParams params = new MaterialsInfoParams();//查询条件赋值
|
||||||
params.setMaterialsId(materialsOutgoingLogDto.getMaterialsId());
|
params.setMaterialsId(materialsOutgoingLog.getMaterialsId());
|
||||||
params.setCompanyId(currentUser.getCompanyId());
|
params.setCompanyId(1);
|
||||||
|
|
||||||
//设置库存数量:已有库存数量+入库数量(或已有库存数量-出库数量)
|
//设置库存数量:已有库存数量+入库数量(或已有库存数量-出库数量)
|
||||||
Float totalQuantity = materialsStockInfoMapper.getStockQuantityByMaId(params);
|
Float totalQuantity = materialsStockInfoService.getStockQuantityByMaId(params);
|
||||||
if(materialsOutgoingLog.getType() == ProduceManageConstant.TYPE_OUT) {
|
if(materialsOutgoingLog.getType() == ProduceManageConstant.TYPE_OUT) {
|
||||||
totalQuantity -= materialsOutgoingLog.getQuantity();
|
totalQuantity -= materialsOutgoingLog.getQuantity();
|
||||||
}else if(materialsOutgoingLog.getType() == ProduceManageConstant.TYPE_IN) {
|
}else if(materialsOutgoingLog.getType() == ProduceManageConstant.TYPE_IN) {
|
||||||
@ -86,14 +77,14 @@ public class MaterialsOutgoingLogServiceImpl extends AbstractService<MaterialsOu
|
|||||||
|
|
||||||
//设置库存位置:已有库存仓库,出入库记录对应仓库
|
//设置库存位置:已有库存仓库,出入库记录对应仓库
|
||||||
String inAndOutLogPosition = materialsOutgoingLog.getPositionName();
|
String inAndOutLogPosition = materialsOutgoingLog.getPositionName();
|
||||||
String stockPosition = materialsStockInfoMapper.getStockPositionByMaId(params);
|
String stockPosition = materialsStockInfoService.getStockPositionByMaId(params);
|
||||||
if(stockPosition!=null && !stockPosition.trim().equals("")) {
|
if(stockPosition!=null && !stockPosition.trim().equals("")) {
|
||||||
stock.setPositionName(stockPosition + "," +inAndOutLogPosition);
|
stock.setPositionName(stockPosition + "," +inAndOutLogPosition);
|
||||||
}else{
|
}else{
|
||||||
stock.setPositionName(inAndOutLogPosition);
|
stock.setPositionName(inAndOutLogPosition);
|
||||||
}
|
}
|
||||||
|
|
||||||
materialsStockInfoMapper.updateByPrimaryKey(stock);
|
materialsStockInfoService.update(stock);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,9 @@ import com.deer.wms.produce.manage.dao.MtAloneProcessMapper;
|
|||||||
import com.deer.wms.produce.manage.model.*;
|
import com.deer.wms.produce.manage.model.*;
|
||||||
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.produce.manage.service.ProcessMaterialsService;
|
||||||
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;
|
||||||
@ -25,6 +27,9 @@ public class MtAloneProcessServiceImpl extends AbstractService<MtAloneProcess, I
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ProcessBomService processBomService;
|
private ProcessBomService processBomService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ProcessMaterialsService processMaterialsService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<MtAloneProcess> findProcessListByProductBom(ProcessBomParams params) {
|
public List<MtAloneProcess> findProcessListByProductBom(ProcessBomParams params) {
|
||||||
//通过产品bom获取工序bom
|
//通过产品bom获取工序bom
|
||||||
@ -35,12 +40,7 @@ public class MtAloneProcessServiceImpl extends AbstractService<MtAloneProcess, I
|
|||||||
//循环工序bom给工序初步赋值,先不保存
|
//循环工序bom给工序初步赋值,先不保存
|
||||||
for (ProcessBom processBom : processBomList) {
|
for (ProcessBom processBom : processBomList) {
|
||||||
MtAloneProcess process = new MtAloneProcess();
|
MtAloneProcess process = new MtAloneProcess();
|
||||||
process.setProcessName(processBom.getProcessName());
|
BeanUtils.copyProperties(processBom, process);
|
||||||
process.setProcessContent(processBom.getProcessContent());
|
|
||||||
process.setProcessStep(processBom.getProcessStep());
|
|
||||||
process.setProcessBomId(processBom.getId());
|
|
||||||
process.setProcessBomName(processBom.getProcessName());
|
|
||||||
process.setSpecification(processBom.getSpecification());
|
|
||||||
processList.add(process);
|
processList.add(process);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -49,8 +49,31 @@ public class MtAloneProcessServiceImpl extends AbstractService<MtAloneProcess, I
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<MtAloneProcessVo> findProcessListByProductProcess(ProductProcessParams params) {
|
public List<MtAloneProcessVo> findProcessVoListByProductProcess(ProductProcessParams params) {
|
||||||
return mtAloneProcessMapper.findProcessListByProductProcess(params);
|
return mtAloneProcessMapper.findProcessVoListByProductProcess(params);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*接着写*/
|
||||||
|
@Override
|
||||||
|
public ProcessAndMaterials queryProcessDetail(MtAloneProcessParams params) {
|
||||||
|
//根据工序id查询工序详细信息
|
||||||
|
MtAloneProcessVo processVo = (MtAloneProcessVo) mtAloneProcessMapper.selectProcessVoByProcessId(params);
|
||||||
|
|
||||||
|
//根据工序id查询物料信息
|
||||||
|
List<ProcessMaterialsVo> processMaterialsVoList = processMaterialsService.findProcMatVoListByProcess(params);
|
||||||
|
|
||||||
|
ProcessAndMaterials processAndMaterials = new ProcessAndMaterials();
|
||||||
|
processAndMaterials.setProcessVo(processVo);
|
||||||
|
if(null != processMaterialsVoList) {
|
||||||
|
ProcessMaterialsVo[] processMaterialsVo = new ProcessMaterialsVo[processMaterialsVoList.size()];
|
||||||
|
for (int i = 0; i < processMaterialsVo.length; i++) {
|
||||||
|
processMaterialsVo[i] = processMaterialsVoList.get(i);
|
||||||
|
}
|
||||||
|
processAndMaterials.setProcessMaterialsVo(processMaterialsVo);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return processAndMaterials;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
package com.deer.wms.produce.manage.service.impl;
|
package com.deer.wms.produce.manage.service.impl;
|
||||||
|
|
||||||
import com.deer.wms.produce.manage.dao.ProcessMaterialsMapper;
|
import com.deer.wms.produce.manage.dao.ProcessMaterialsMapper;
|
||||||
|
import com.deer.wms.produce.manage.model.MtAloneProcessParams;
|
||||||
import com.deer.wms.produce.manage.model.ProcessMaterials;
|
import com.deer.wms.produce.manage.model.ProcessMaterials;
|
||||||
import com.deer.wms.produce.manage.model.ProcessMaterialsParams;
|
import com.deer.wms.produce.manage.model.ProcessMaterialsParams;
|
||||||
|
import com.deer.wms.produce.manage.model.ProcessMaterialsVo;
|
||||||
import com.deer.wms.produce.manage.service.ProcessMaterialsService;
|
import com.deer.wms.produce.manage.service.ProcessMaterialsService;
|
||||||
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;
|
||||||
@ -21,6 +23,11 @@ public class ProcessMaterialsServiceImpl extends AbstractService<ProcessMaterial
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ProcessMaterialsMapper processMaterialsMapper;
|
private ProcessMaterialsMapper processMaterialsMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ProcessMaterialsVo> findProcMatVoListByProcess(MtAloneProcessParams params) {
|
||||||
|
return processMaterialsMapper.findProcMatVoListByProcess(params);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//@Override
|
//@Override
|
||||||
//public List<ProcessMaterials> findList(ProcessMaterialsParams params) {
|
//public List<ProcessMaterials> findList(ProcessMaterialsParams params) {
|
||||||
|
@ -89,14 +89,14 @@ public class ProductProcessServiceImpl extends AbstractService<ProductProcess, I
|
|||||||
//根据批次产品加工id查询批次产品加工单信息
|
//根据批次产品加工id查询批次产品加工单信息
|
||||||
ProductProcess productProcess = productProcessMapper.selectByPrimaryKey(params.getProductProcessId());
|
ProductProcess productProcess = productProcessMapper.selectByPrimaryKey(params.getProductProcessId());
|
||||||
//根据批次产品加工id查询工序信息
|
//根据批次产品加工id查询工序信息
|
||||||
List<MtAloneProcessVo> processList = processService.findProcessListByProductProcess(params);
|
List<MtAloneProcessVo> processVoList = processService.findProcessVoListByProductProcess(params);
|
||||||
|
|
||||||
ProductAndProcess productAndProcess = new ProductAndProcess();
|
ProductAndProcess productAndProcess = new ProductAndProcess();
|
||||||
productAndProcess.setProductProcess(productProcess);
|
productAndProcess.setProductProcess(productProcess);
|
||||||
if(null != processList) {
|
if(null != processVoList) {
|
||||||
MtAloneProcessVo[] processesVo = new MtAloneProcessVo[processList.size()];
|
MtAloneProcessVo[] processesVo = new MtAloneProcessVo[processVoList.size()];
|
||||||
for (int i = 0; i < processesVo.length; i++) {
|
for (int i = 0; i < processesVo.length; i++) {
|
||||||
processesVo[i] = processList.get(i);
|
processesVo[i] = processVoList.get(i);
|
||||||
}
|
}
|
||||||
productAndProcess.setProcessesVo(processesVo);
|
productAndProcess.setProcessesVo(processesVo);
|
||||||
}
|
}
|
||||||
|
@ -115,12 +115,12 @@ public class MaterialsInfoController {
|
|||||||
@ApiOperation(value = "获取某种物料详细信息", notes = "获取某种物料详细信息")
|
@ApiOperation(value = "获取某种物料详细信息", notes = "获取某种物料详细信息")
|
||||||
@GetMapping("/detail")
|
@GetMapping("/detail")
|
||||||
public Result detail(MaterialsInfoParams params, @ApiIgnore @User CurrentUser currentUser) {
|
public Result detail(MaterialsInfoParams 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 );
|
||||||
//}
|
}
|
||||||
//StringUtil.trimObjectStringProperties(params);
|
StringUtil.trimObjectStringProperties(params);
|
||||||
|
|
||||||
params.setCompanyId(1);
|
params.setCompanyId(currentUser.getCompanyId());
|
||||||
MaterialsInfoDto materialsInfoDto = materialsInfoService.findDetailById(params);
|
MaterialsInfoDto materialsInfoDto = materialsInfoService.findDetailById(params);
|
||||||
return ResultGenerator.genSuccessResult(materialsInfoDto);
|
return ResultGenerator.genSuccessResult(materialsInfoDto);
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,7 @@ import com.deer.wms.project.seed.annotation.OperateLog;
|
|||||||
import com.deer.wms.project.seed.core.result.CommonCode;
|
import com.deer.wms.project.seed.core.result.CommonCode;
|
||||||
import com.deer.wms.project.seed.core.result.Result;
|
import com.deer.wms.project.seed.core.result.Result;
|
||||||
import com.deer.wms.project.seed.core.result.ResultGenerator;
|
import com.deer.wms.project.seed.core.result.ResultGenerator;
|
||||||
|
import com.deer.wms.project.seed.util.StringUtil;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
@ -41,24 +42,24 @@ public class MaterialsOutgoingLogController {
|
|||||||
//private MaterialsOutgoingLogDTOService materialsOutgoingLogDTOService;
|
//private MaterialsOutgoingLogDTOService materialsOutgoingLogDTOService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* hy
|
* hy正在用
|
||||||
* 添加一条出入库记录,同时更新对应的库存信息
|
* 出入库操作,添加一条出入库记录,同时更新对应的库存信息
|
||||||
* @param materialsOutgoingLogDto
|
* @param materialsOutgoingLog
|
||||||
* @param currentUser
|
* @param currentUser
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ApiImplicitParam(name = "materialsOutgoingLogDto", value = "物料出入库", paramType = "body", dataType = "MaterialsOutgoingLogDto", required = true)
|
@ApiImplicitParam(name = "materialsOutgoingLog", value = "物料出入库", paramType = "body", dataType = "MaterialsOutgoingLog", required = true)
|
||||||
})
|
})
|
||||||
@OperateLog(description = "添加一条出入库记录", type = "增加")
|
@OperateLog(description = "添加一条出入库记录", type = "增加")
|
||||||
@ApiOperation(value = "添加一条出入库记录", notes = "添加一条出入库记录")
|
@ApiOperation(value = "添加一条出入库记录", notes = "添加一条出入库记录")
|
||||||
@PostMapping("/add")
|
@PostMapping("/add")
|
||||||
public Result add(@RequestBody MaterialsOutgoingLogDto materialsOutgoingLogDto, @ApiIgnore @User CurrentUser currentUser) {
|
public Result add(@RequestBody MaterialsOutgoingLog materialsOutgoingLog, @ApiIgnore @User CurrentUser currentUser) {
|
||||||
if(currentUser==null){
|
if(currentUser==null){
|
||||||
return ResultGenerator.genFailResult( CommonCode.SERVICE_ERROR,"未登录错误",null );
|
return ResultGenerator.genFailResult( CommonCode.SERVICE_ERROR,"未登录错误",null );
|
||||||
}
|
}
|
||||||
|
|
||||||
materialsOutgoingLogService.save(materialsOutgoingLogDto, currentUser);
|
materialsOutgoingLogService.save(materialsOutgoingLog, currentUser);
|
||||||
return ResultGenerator.genSuccessResult();
|
return ResultGenerator.genSuccessResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -86,7 +87,7 @@ public class MaterialsOutgoingLogController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* hy
|
* hy正在用
|
||||||
* 获取某种物料的所有出入库记录
|
* 获取某种物料的所有出入库记录
|
||||||
* @param params
|
* @param params
|
||||||
* @param currentUser
|
* @param currentUser
|
||||||
|
@ -14,6 +14,8 @@ import com.deer.wms.project.seed.core.result.ResultGenerator;
|
|||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
import io.swagger.annotations.ApiImplicitParams;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@ -82,6 +84,7 @@ public class MtAloneProcessController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* hy
|
* hy
|
||||||
|
* 暂时没用
|
||||||
* 用于批次生产加工新建页面下方的工序列表展示,获取工序bom和工序,如果没有工序则新建对应的工序并初步赋值
|
* 用于批次生产加工新建页面下方的工序列表展示,获取工序bom和工序,如果没有工序则新建对应的工序并初步赋值
|
||||||
* @param params
|
* @param params
|
||||||
* @param currentUser
|
* @param currentUser
|
||||||
@ -113,8 +116,35 @@ public class MtAloneProcessController {
|
|||||||
|
|
||||||
params.setCompanyId(1);
|
params.setCompanyId(1);
|
||||||
PageHelper.startPage(params.getPageNum(), params.getPageSize());
|
PageHelper.startPage(params.getPageNum(), params.getPageSize());
|
||||||
List<MtAloneProcessVo> list = mtAloneProcessService.findProcessListByProductProcess(params);
|
List<MtAloneProcessVo> list = mtAloneProcessService.findProcessVoListByProductProcess(params);
|
||||||
PageInfo pageInfo = new PageInfo(list);
|
PageInfo pageInfo = new PageInfo(list);
|
||||||
return ResultGenerator.genSuccessResult(pageInfo);
|
return ResultGenerator.genSuccessResult(pageInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* hy正在用
|
||||||
|
* 点击加工处理页面中工序列表最后一列查看或处理按钮,
|
||||||
|
* 由工序id获取该工序详情及包含的物料信息
|
||||||
|
* @param params
|
||||||
|
* @param currentUser
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "根据工序id查询工序详情及物料信息", notes = "根据工序id查询工序详情及物料信息")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "processId", value = "工序id", paramType = "query", dataType = "int", required = true),
|
||||||
|
@ApiImplicitParam(name = "companyId", value = "公司id", paramType = "query", dataType = "int", required = false)
|
||||||
|
|
||||||
|
})
|
||||||
|
@OperateLog(description = "根据工序id查询工序详情及物料信息", type = "查询")
|
||||||
|
@GetMapping("/query/process/detail")
|
||||||
|
public Result queryProcessDetail(MtAloneProcessParams params, @ApiIgnore @User CurrentUser currentUser) {
|
||||||
|
//if(currentUser==null){
|
||||||
|
// return ResultGenerator.genFailResult(CommonCode.SERVICE_ERROR,"未登录错误",null );
|
||||||
|
//}
|
||||||
|
|
||||||
|
params.setCompanyId(1);
|
||||||
|
PageHelper.startPage(params.getPageNum(), params.getPageSize());
|
||||||
|
ProcessAndMaterials processAndMaterials = mtAloneProcessService.queryProcessDetail(params);
|
||||||
|
return ResultGenerator.genSuccessResult(processAndMaterials);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -124,9 +124,9 @@ public class ProductProcessController {
|
|||||||
@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();
|
||||||
@ -135,7 +135,8 @@ public class ProductProcessController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* hy正在用
|
* hy正在用
|
||||||
* 点击批次生产加工单列表最后一列详情按钮,查询批次生产加工单详情
|
* 点击批次生产加工单列表最后一列查看或处理按钮,
|
||||||
|
* 获取该批次生产加工单详情
|
||||||
* @param params
|
* @param params
|
||||||
* @param currentUser
|
* @param currentUser
|
||||||
* @return
|
* @return
|
||||||
|
Loading…
Reference in New Issue
Block a user