双机架完成全局样式替换,并且完成工艺管理和生产计划管理,以及完成udp电文数据贯通能力
This commit is contained in:
@@ -2,7 +2,6 @@ package com.ruoyi.mill.controller;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.mill.domain.MillProductionPlan;
|
||||
import com.ruoyi.mill.service.IMillProductionPlanService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -10,7 +9,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/mill/plan")
|
||||
@RequestMapping("/mill/production-plan")
|
||||
public class MillProductionPlanController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
|
||||
@@ -2,13 +2,18 @@ package com.ruoyi.mill.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 冷轧生产计划 — 对应 2FK101 作业命令信息
|
||||
*/
|
||||
@Data
|
||||
public class MillPlan extends BaseEntity {
|
||||
|
||||
private Long planId;
|
||||
|
||||
@Excel(name = "计划号")
|
||||
private String planNo;
|
||||
|
||||
@@ -67,62 +72,5 @@ public class MillPlan extends BaseEntity {
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
// ---- getters / setters ----
|
||||
|
||||
public String getPlanNo() { return planNo; }
|
||||
public void setPlanNo(String v) { this.planNo = v; }
|
||||
|
||||
public String getMatSeqNo() { return matSeqNo; }
|
||||
public void setMatSeqNo(String v) { this.matSeqNo = v; }
|
||||
|
||||
public String getUnitCode() { return unitCode; }
|
||||
public void setUnitCode(String v) { this.unitCode = v; }
|
||||
|
||||
public String getPlanType() { return planType; }
|
||||
public void setPlanType(String v) { this.planType = v; }
|
||||
|
||||
public Integer getPlanStatus() { return planStatus; }
|
||||
public void setPlanStatus(Integer v) { this.planStatus = v; }
|
||||
|
||||
public String getInMatNo() { return inMatNo; }
|
||||
public void setInMatNo(String v) { this.inMatNo = v; }
|
||||
|
||||
public BigDecimal getInMatThick() { return inMatThick; }
|
||||
public void setInMatThick(BigDecimal v) { this.inMatThick = v; }
|
||||
|
||||
public BigDecimal getInMatThickMax() { return inMatThickMax; }
|
||||
public void setInMatThickMax(BigDecimal v) { this.inMatThickMax = v; }
|
||||
|
||||
public BigDecimal getInMatThickMin() { return inMatThickMin; }
|
||||
public void setInMatThickMin(BigDecimal v) { this.inMatThickMin = v; }
|
||||
|
||||
public BigDecimal getInMatWidth() { return inMatWidth; }
|
||||
public void setInMatWidth(BigDecimal v) { this.inMatWidth = v; }
|
||||
|
||||
public BigDecimal getInMatWt() { return inMatWt; }
|
||||
public void setInMatWt(BigDecimal v) { this.inMatWt = v; }
|
||||
|
||||
public BigDecimal getInMatLen() { return inMatLen; }
|
||||
public void setInMatLen(BigDecimal v) { this.inMatLen = v; }
|
||||
|
||||
public BigDecimal getInMatInDia() { return inMatInDia; }
|
||||
public void setInMatInDia(BigDecimal v) { this.inMatInDia = v; }
|
||||
|
||||
public BigDecimal getInMatDia() { return inMatDia; }
|
||||
public void setInMatDia(BigDecimal v) { this.inMatDia = v; }
|
||||
|
||||
public String getPono() { return pono; }
|
||||
public void setPono(String v) { this.pono = v; }
|
||||
|
||||
public String getSgSign() { return sgSign; }
|
||||
public void setSgSign(String v) { this.sgSign = v; }
|
||||
|
||||
public String getOutMatNo() { return outMatNo; }
|
||||
public void setOutMatNo(String v) { this.outMatNo = v; }
|
||||
|
||||
public String getCustInMatNo() { return custInMatNo; }
|
||||
public void setCustInMatNo(String v) { this.custInMatNo = v; }
|
||||
|
||||
public String getRemark() { return remark; }
|
||||
public void setRemark(String v) { this.remark = v; }
|
||||
}
|
||||
|
||||
@@ -2,11 +2,16 @@ package com.ruoyi.mill.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/** 工艺方案道次详情 */
|
||||
@Data
|
||||
public class MillProcessPass extends BaseEntity {
|
||||
|
||||
private Long passId;
|
||||
|
||||
private Long recipeId;
|
||||
|
||||
@Excel(name = "道次")
|
||||
@@ -47,32 +52,4 @@ public class MillProcessPass extends BaseEntity {
|
||||
|
||||
private String delFlag;
|
||||
|
||||
public Long getRecipeId() { return recipeId; }
|
||||
public void setRecipeId(Long v) { this.recipeId = v; }
|
||||
public Integer getPassNo() { return passNo; }
|
||||
public void setPassNo(Integer v) { this.passNo = v; }
|
||||
public BigDecimal getInThick() { return inThick; }
|
||||
public void setInThick(BigDecimal v) { this.inThick = v; }
|
||||
public BigDecimal getOutThick() { return outThick; }
|
||||
public void setOutThick(BigDecimal v) { this.outThick = v; }
|
||||
public BigDecimal getWidth() { return width; }
|
||||
public void setWidth(BigDecimal v) { this.width = v; }
|
||||
public BigDecimal getRollForce() { return rollForce; }
|
||||
public void setRollForce(BigDecimal v) { this.rollForce = v; }
|
||||
public BigDecimal getInTension() { return inTension; }
|
||||
public void setInTension(BigDecimal v) { this.inTension = v; }
|
||||
public BigDecimal getOutTension() { return outTension; }
|
||||
public void setOutTension(BigDecimal v) { this.outTension = v; }
|
||||
public BigDecimal getMaxSpeed() { return maxSpeed; }
|
||||
public void setMaxSpeed(BigDecimal v) { this.maxSpeed = v; }
|
||||
public BigDecimal getInUnitTension() { return inUnitTension; }
|
||||
public void setInUnitTension(BigDecimal v) { this.inUnitTension = v; }
|
||||
public BigDecimal getOutUnitTension() { return outUnitTension; }
|
||||
public void setOutUnitTension(BigDecimal v){ this.outUnitTension = v; }
|
||||
public BigDecimal getReduction() { return reduction; }
|
||||
public void setReduction(BigDecimal v) { this.reduction = v; }
|
||||
public BigDecimal getTotalReduction() { return totalReduction; }
|
||||
public void setTotalReduction(BigDecimal v){ this.totalReduction = v; }
|
||||
public String getDelFlag() { return delFlag; }
|
||||
public void setDelFlag(String v) { this.delFlag = v; }
|
||||
}
|
||||
|
||||
@@ -2,12 +2,17 @@ package com.ruoyi.mill.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/** 工艺方案主表 */
|
||||
@Data
|
||||
public class MillProcessRecipe extends BaseEntity {
|
||||
|
||||
private Long recipeId;
|
||||
|
||||
@Excel(name = "方案记录号")
|
||||
private String recipeNo;
|
||||
|
||||
@@ -34,23 +39,4 @@ public class MillProcessRecipe extends BaseEntity {
|
||||
|
||||
/** 关联道次列表(非数据库字段) */
|
||||
private List<MillProcessPass> passList;
|
||||
|
||||
public String getRecipeNo() { return recipeNo; }
|
||||
public void setRecipeNo(String v) { this.recipeNo = v; }
|
||||
public String getAlloyNo() { return alloyNo; }
|
||||
public void setAlloyNo(String v) { this.alloyNo = v; }
|
||||
public Integer getPassCount() { return passCount; }
|
||||
public void setPassCount(Integer v) { this.passCount = v; }
|
||||
public BigDecimal getInThick() { return inThick; }
|
||||
public void setInThick(BigDecimal v) { this.inThick = v; }
|
||||
public BigDecimal getOutThick() { return outThick; }
|
||||
public void setOutThick(BigDecimal v) { this.outThick = v; }
|
||||
public BigDecimal getOutWidth() { return outWidth; }
|
||||
public void setOutWidth(BigDecimal v) { this.outWidth = v; }
|
||||
public String getStatus() { return status; }
|
||||
public void setStatus(String v) { this.status = v; }
|
||||
public String getDelFlag() { return delFlag; }
|
||||
public void setDelFlag(String v) { this.delFlag = v; }
|
||||
public List<MillProcessPass> getPassList() { return passList; }
|
||||
public void setPassList(List<MillProcessPass> v) { this.passList = v; }
|
||||
}
|
||||
|
||||
@@ -2,11 +2,16 @@ package com.ruoyi.mill.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/** 生产计划(轧制队列) */
|
||||
@Data
|
||||
public class MillProductionPlan extends BaseEntity {
|
||||
|
||||
private Long planId;
|
||||
|
||||
@Excel(name = "计划号")
|
||||
private String planNo;
|
||||
|
||||
@@ -65,47 +70,4 @@ public class MillProductionPlan extends BaseEntity {
|
||||
private String recipeNo;
|
||||
|
||||
private String delFlag;
|
||||
|
||||
public String getPlanNo() { return planNo; }
|
||||
public void setPlanNo(String v) { this.planNo = v; }
|
||||
public String getMatSeqNo() { return matSeqNo; }
|
||||
public void setMatSeqNo(String v) { this.matSeqNo = v; }
|
||||
public String getUnitCode() { return unitCode; }
|
||||
public void setUnitCode(String v) { this.unitCode = v; }
|
||||
public String getPlanType() { return planType; }
|
||||
public void setPlanType(String v) { this.planType = v; }
|
||||
public String getPlanStatus() { return planStatus; }
|
||||
public void setPlanStatus(String v) { this.planStatus = v; }
|
||||
public String getProdStatus() { return prodStatus; }
|
||||
public void setProdStatus(String v) { this.prodStatus = v; }
|
||||
public Integer getSortNo() { return sortNo; }
|
||||
public void setSortNo(Integer v) { this.sortNo = v; }
|
||||
public String getInMatNo() { return inMatNo; }
|
||||
public void setInMatNo(String v) { this.inMatNo = v; }
|
||||
public BigDecimal getInMatThick() { return inMatThick; }
|
||||
public void setInMatThick(BigDecimal v) { this.inMatThick = v; }
|
||||
public BigDecimal getInMatWidth() { return inMatWidth; }
|
||||
public void setInMatWidth(BigDecimal v) { this.inMatWidth = v; }
|
||||
public BigDecimal getInMatWt() { return inMatWt; }
|
||||
public void setInMatWt(BigDecimal v) { this.inMatWt = v; }
|
||||
public BigDecimal getInMatLen() { return inMatLen; }
|
||||
public void setInMatLen(BigDecimal v) { this.inMatLen = v; }
|
||||
public BigDecimal getInMatInDia() { return inMatInDia; }
|
||||
public void setInMatInDia(BigDecimal v) { this.inMatInDia = v; }
|
||||
public BigDecimal getInMatDia() { return inMatDia; }
|
||||
public void setInMatDia(BigDecimal v) { this.inMatDia = v; }
|
||||
public String getPono() { return pono; }
|
||||
public void setPono(String v) { this.pono = v; }
|
||||
public String getSgSign() { return sgSign; }
|
||||
public void setSgSign(String v) { this.sgSign = v; }
|
||||
public String getOutMatNo() { return outMatNo; }
|
||||
public void setOutMatNo(String v) { this.outMatNo = v; }
|
||||
public BigDecimal getOutThick() { return outThick; }
|
||||
public void setOutThick(BigDecimal v) { this.outThick = v; }
|
||||
public Long getRecipeId() { return recipeId; }
|
||||
public void setRecipeId(Long v) { this.recipeId = v; }
|
||||
public String getRecipeNo() { return recipeNo; }
|
||||
public void setRecipeNo(String v) { this.recipeNo = v; }
|
||||
public String getDelFlag() { return delFlag; }
|
||||
public void setDelFlag(String v) { this.delFlag = v; }
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ public class MillProcessRecipeServiceImpl implements IMillProcessRecipeService {
|
||||
recipe.setUpdateBy(SecurityUtils.getUsername());
|
||||
recipeMapper.update(recipe);
|
||||
// 先删除旧道次,再重新插入
|
||||
passMapper.deleteByRecipeId(recipe.getId());
|
||||
passMapper.deleteByRecipeId(recipe.getRecipeId());
|
||||
savePassList(recipe);
|
||||
return 1;
|
||||
}
|
||||
@@ -67,7 +67,7 @@ public class MillProcessRecipeServiceImpl implements IMillProcessRecipeService {
|
||||
if (list == null || list.isEmpty()) return;
|
||||
String user = SecurityUtils.getUsername();
|
||||
for (MillProcessPass p : list) {
|
||||
p.setRecipeId(recipe.getId());
|
||||
p.setRecipeId(recipe.getRecipeId());
|
||||
p.setCreateBy(user);
|
||||
p.setUpdateBy(user);
|
||||
}
|
||||
|
||||
@@ -58,8 +58,8 @@ public class MillProductionPlanServiceImpl implements IMillProductionPlanService
|
||||
.filter(p -> p.getSortNo() == cur.getSortNo() - 1)
|
||||
.findFirst().orElse(null);
|
||||
if (prev == null) return 0;
|
||||
planMapper.updateSortNo(cur.getId(), prev.getSortNo());
|
||||
planMapper.updateSortNo(prev.getId(), cur.getSortNo());
|
||||
planMapper.updateSortNo(cur.getPlanId(), prev.getSortNo());
|
||||
planMapper.updateSortNo(prev.getPlanId(), cur.getSortNo());
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -73,8 +73,8 @@ public class MillProductionPlanServiceImpl implements IMillProductionPlanService
|
||||
.filter(p -> p.getSortNo() == cur.getSortNo() + 1)
|
||||
.findFirst().orElse(null);
|
||||
if (next == null) return 0;
|
||||
planMapper.updateSortNo(cur.getId(), next.getSortNo());
|
||||
planMapper.updateSortNo(next.getId(), cur.getSortNo());
|
||||
planMapper.updateSortNo(cur.getPlanId(), next.getSortNo());
|
||||
planMapper.updateSortNo(next.getPlanId(), cur.getSortNo());
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<mapper namespace="com.ruoyi.mill.mapper.MillProcessPassMapper">
|
||||
|
||||
<resultMap id="BaseRM" type="com.ruoyi.mill.domain.MillProcessPass">
|
||||
<id property="id" column="id"/>
|
||||
<id property="passId" column="pass_id"/>
|
||||
<result property="recipeId" column="recipe_id"/>
|
||||
<result property="passNo" column="pass_no"/>
|
||||
<result property="inThick" column="in_thick"/>
|
||||
@@ -27,7 +27,7 @@
|
||||
</resultMap>
|
||||
|
||||
<select id="selectByRecipeId" resultMap="BaseRM">
|
||||
SELECT id, recipe_id, pass_no, in_thick, out_thick, width,
|
||||
SELECT pass_id, recipe_id, pass_no, in_thick, out_thick, width,
|
||||
roll_force, in_tension, out_tension, max_speed,
|
||||
in_unit_tension, out_unit_tension, reduction, total_reduction,
|
||||
del_flag, create_by, create_time, update_by, update_time, remark
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<mapper namespace="com.ruoyi.mill.mapper.MillProcessRecipeMapper">
|
||||
|
||||
<resultMap id="BaseRM" type="com.ruoyi.mill.domain.MillProcessRecipe">
|
||||
<id property="id" column="id"/>
|
||||
<id property="recipeId" column="recipe_id"/>
|
||||
<result property="recipeNo" column="recipe_no"/>
|
||||
<result property="alloyNo" column="alloy_no"/>
|
||||
<result property="passCount" column="pass_count"/>
|
||||
@@ -21,7 +21,7 @@
|
||||
</resultMap>
|
||||
|
||||
<sql id="cols">
|
||||
id, recipe_no, alloy_no, pass_count, in_thick, out_thick, out_width,
|
||||
recipe_id, recipe_no, alloy_no, pass_count, in_thick, out_thick, out_width,
|
||||
status, del_flag, create_by, create_time, update_by, update_time, remark
|
||||
</sql>
|
||||
|
||||
@@ -38,12 +38,12 @@
|
||||
<if test="status != null and status != ''">
|
||||
AND status = #{status}
|
||||
</if>
|
||||
ORDER BY id ASC
|
||||
ORDER BY recipe_id ASC
|
||||
</select>
|
||||
|
||||
<select id="selectById" resultMap="BaseRM">
|
||||
SELECT <include refid="cols"/> FROM mill_process_recipe
|
||||
WHERE id = #{id} AND del_flag = '0'
|
||||
WHERE recipe_id = #{recipeId} AND del_flag = '0'
|
||||
</select>
|
||||
|
||||
<select id="selectByRecipeNo" resultMap="BaseRM">
|
||||
@@ -73,17 +73,17 @@
|
||||
update_by = #{updateBy},
|
||||
update_time = NOW(),
|
||||
remark = #{remark}
|
||||
WHERE id = #{id}
|
||||
WHERE recipe_id = #{recipeId}
|
||||
</update>
|
||||
|
||||
<update id="deleteById">
|
||||
UPDATE mill_process_recipe SET del_flag = '2', update_time = NOW() WHERE id = #{id}
|
||||
UPDATE mill_process_recipe SET del_flag = '2', update_time = NOW() WHERE recipe_id = #{recipeId}
|
||||
</update>
|
||||
|
||||
<update id="deleteBatchByIds">
|
||||
UPDATE mill_process_recipe SET del_flag = '2', update_time = NOW()
|
||||
WHERE id IN
|
||||
<foreach collection="array" item="id" open="(" separator="," close=")">#{id}</foreach>
|
||||
WHERE recipe_id IN
|
||||
<foreach collection="array" item="recipeId" open="(" separator="," close=")">#{recipeId}</foreach>
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<mapper namespace="com.ruoyi.mill.mapper.MillProductionPlanMapper">
|
||||
|
||||
<resultMap id="BaseRM" type="com.ruoyi.mill.domain.MillProductionPlan">
|
||||
<id property="id" column="id"/>
|
||||
<id property="planId" column="plan_id"/>
|
||||
<result property="planNo" column="plan_no"/>
|
||||
<result property="matSeqNo" column="mat_seq_no"/>
|
||||
<result property="unitCode" column="unit_code"/>
|
||||
@@ -34,7 +34,7 @@
|
||||
</resultMap>
|
||||
|
||||
<sql id="cols">
|
||||
id, plan_no, mat_seq_no, unit_code, plan_type, plan_status, prod_status, sort_no,
|
||||
plan_id, plan_no, mat_seq_no, unit_code, plan_type, plan_status, prod_status, sort_no,
|
||||
in_mat_no, in_mat_thick, in_mat_width, in_mat_wt, in_mat_len, in_mat_in_dia, in_mat_dia,
|
||||
pono, sg_sign, out_mat_no, out_thick, recipe_id, recipe_no,
|
||||
del_flag, create_by, create_time, update_by, update_time, remark
|
||||
@@ -63,7 +63,7 @@
|
||||
|
||||
<select id="selectById" resultMap="BaseRM">
|
||||
SELECT <include refid="cols"/> FROM mill_production_plan
|
||||
WHERE id = #{id} AND del_flag = '0'
|
||||
WHERE plan_id = #{planId} AND del_flag = '0'
|
||||
</select>
|
||||
|
||||
<select id="selectByPlanNo" resultMap="BaseRM">
|
||||
@@ -106,11 +106,11 @@
|
||||
update_by = #{updateBy},
|
||||
update_time = NOW(),
|
||||
remark = #{remark}
|
||||
WHERE id = #{id}
|
||||
WHERE plan_id = #{planId}
|
||||
</update>
|
||||
|
||||
<update id="deleteById">
|
||||
UPDATE mill_production_plan SET del_flag = '2', update_time = NOW() WHERE id = #{id}
|
||||
UPDATE mill_production_plan SET del_flag = '2', update_time = NOW() WHERE plan_id = #{planId}
|
||||
</update>
|
||||
|
||||
<update id="incrementSortFrom">
|
||||
@@ -119,7 +119,7 @@
|
||||
</update>
|
||||
|
||||
<update id="updateSortNo">
|
||||
UPDATE mill_production_plan SET sort_no = #{sortNo} WHERE id = #{id}
|
||||
UPDATE mill_production_plan SET sort_no = #{sortNo} WHERE plan_id = #{planId}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user