工序进度跟踪

This commit is contained in:
hy2250089 2020-01-17 11:16:04 +08:00
parent f472e9cdc2
commit dedc80d719
3 changed files with 24 additions and 5 deletions

View File

@ -97,10 +97,11 @@
</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.*, prodbom.product_process_name, product.product_name SELECT prodproc.*, prodbom.product_process_name, product.product_name, SUM(process.handle_status) AS finishedProcess, COUNT(process.id) AS countProcess,
FROM mt_alone_product_process prodproc (SUM(process.handle_status)*100/COUNT(process.id)) AS schedule 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_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 LEFT JOIN mt_alone_machining_product product ON prodbom.product_id = product.id AND prodbom.company_id = product.company_id
LEFT JOIN mt_alone_process process ON prodproc.id = process.product_process_id AND prodproc.company_id = process.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}, '%')
@ -115,7 +116,7 @@
<if test="companyId != null"> <if test="companyId != null">
AND prodproc.company_id = #{companyId} AND prodproc.company_id = #{companyId}
</if> </if>
</where> ORDER BY prodproc.create_time DESC, prodproc.update_time DESC </where> GROUP BY prodproc.id ORDER BY prodproc.create_time DESC, prodproc.update_time DESC
</select> </select>

View File

@ -13,6 +13,10 @@ public class ProductProcessVo extends ProductProcess {
private Boolean isFinish = false;//是否已完成 private Boolean isFinish = false;//是否已完成
private Integer countProcess;//工序总数
private Integer finishedProcess;//已完成工序数
private Float schedule;//进度计算所得 private Float schedule;//进度计算所得
private String productProcessName;//产品Bom名称 private String productProcessName;//产品Bom名称
@ -48,4 +52,20 @@ public class ProductProcessVo extends ProductProcess {
public void setProductProcessName(String productProcessName) { public void setProductProcessName(String productProcessName) {
this.productProcessName = productProcessName; this.productProcessName = productProcessName;
} }
public Integer getCountProcess() {
return countProcess;
}
public void setCountProcess(Integer countProcess) {
this.countProcess = countProcess;
}
public Integer getFinishedProcess() {
return finishedProcess;
}
public void setFinishedProcess(Integer finishedProcess) {
this.finishedProcess = finishedProcess;
}
} }

View File

@ -68,8 +68,6 @@ public class MtAloneProcessServiceImpl extends AbstractService<MtAloneProcess, I
List<ProcessMaterialsVo> procMatVoList = processMaterialsService.findProcMatVoListByProcess(params); List<ProcessMaterialsVo> procMatVoList = processMaterialsService.findProcMatVoListByProcess(params);
ProcessHo processHo = new ProcessHo(); ProcessHo processHo = new ProcessHo();
if (null != processVo) { if (null != processVo) {
System.out.println("----------" + processVo.getId());
System.out.println("----------" + processVo.getProcessName());
BeanUtils.copyProperties(processVo, processHo); BeanUtils.copyProperties(processVo, processHo);
processHo.setProcessMaterialsVoList(procMatVoList); processHo.setProcessMaterialsVoList(procMatVoList);
} }