计划模块(车数)

highway
wws 1 year ago
parent 3607120391
commit aae8fc7dc1

@ -132,6 +132,17 @@ public class ProOrder extends TreeEntity {
@Excel(name = "更新日期", width = 20, dateFormat = "yyyy-MM-dd")
private Date updateTime;
// 车数
private Integer carNum;
public Integer getCarNum() {
return carNum;
}
public void setCarNum(Integer carNum) {
this.carNum = carNum;
}
@Override
public Date getCreateTime() {
return createTime;
@ -324,6 +335,7 @@ public class ProOrder extends TreeEntity {
.append("prodSpc", getProdSpc())
.append("planDateStart",getPlanDateStart())
.append("planDateEnd",getPlanDateEnd())
.append("carNum",getCarNum())
.toString();
}
}

@ -148,6 +148,17 @@ public class ProOrderWorkorder extends TreeEntity {
/** 班次名称(数据库无该字段,需自行查询) */
private String shiftDesc;
// 车数
private Integer carNum;
public Integer getCarNum() {
return carNum;
}
public void setCarNum(Integer carNum) {
this.carNum = carNum;
}
// 料罐id湿料计划模块使用
private Integer bucketId;
@ -512,6 +523,7 @@ public class ProOrderWorkorder extends TreeEntity {
.append("bucketName",getBucketName())
.append("routeName",getRouteName())
.append("prodLineName",getProdLineName())
.append("carNum",getCarNum())
.toString();
}
}

@ -63,6 +63,16 @@ public class ProOrderDTO {
private String planFactoryCode;
private Integer carNum;
public Integer getCarNum() {
return carNum;
}
public void setCarNum(Integer carNum) {
this.carNum = carNum;
}
public String getPlanFactoryCode() {
return planFactoryCode;
}

@ -154,6 +154,12 @@ public class ProOrderServiceImpl implements IProOrderService {
workOrder.setWorkorderCode(proOrder.getOrderCode() + "-" + endCode);
// 3.设置父工单
workOrder.setParentOrder(parentOrder.toString());
// 工单对应车数-白坯订单操作
if (proOrder.getProdType().equals("white")) {
int everyNum = (int) Math.ceil(proOrder.getQuantity() / proOrder.getCarNum());
int carNum = (int) Math.ceil(splitOrderDTO.getSplitNum() / everyNum);
workOrder.setCarNum(carNum);
}
// 将工单信息更新至数据库
proOrderWorkorderMapper.insertProOrderWorkorder(workOrder);
// 生成批次表信息并更新至数据库

@ -525,6 +525,13 @@ public class ProOrderWorkorderServiceImpl implements IProOrderWorkorderService {
if (splitOrderDTO.getRouteCode() != null){
proOrderWorkorder.setRouteCode(splitOrderDTO.getRouteCode());
}
// 白坯工单返修-车数
if (proOrderWorkorder.getProdType().equals("white")) {
int everyNum = (int) Math.ceil(proOrder.getQuantity() / proOrder.getCarNum());
int carNum = (int) Math.ceil(splitOrderDTO.getSplitNum() / everyNum);
proOrderWorkorder.setCarNum(carNum);
}
proOrderWorkorderMapper.updateProOrderWorkorder(proOrderWorkorder);
// System.out.println("这里是workorderCode------------》"+proOrderWorkorder.getWorkorderCode());

@ -29,13 +29,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateTime" column="update_time" />
<result property="prodType" column="prod_type" />
<result property="prodSpc" column="prod_spc" />
<result property="carNum" column="car_num" />
</resultMap>
<sql id="selectProOrderVo">
select id, plan_factory_code, order_type, order_code, prod_code, prod_desc, quantity, quantity_split,
unit, worker_order, plan_pro_date, plan_complete, atrr1, atrr2, atrr3,
status, parent_order, create_by, create_time, update_by, update_time, prod_type,
factory_code, prod_spc
factory_code, prod_spc ,car_num
from pro_order
</sql>
@ -197,6 +198,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">update_time,</if>
<if test="prodType != null">prod_type,</if>
<if test="prodSpc != null">prod_spc,</if>
<if test="carNum != null">car_num,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
@ -223,6 +225,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">#{updateTime},</if>
<if test="prodType != null">#{prodType},</if>
<if test="prodSpc != null">#{prodSpc},</if>
<if test="carNum != null">#{carNum},</if>
</trim>
</insert>

@ -36,13 +36,14 @@
<result property="prodType" column="prod_type" />
<result property="factoryCode" column="factory_code" />
<result property="endFlag" column="end_flag" />
<result property="carNum" column="car_num" />
</resultMap>
<sql id="selectProOrderWorkorderVo">
select workorder_id, workorder_code, workorder_name, order_id, order_code, product_id, product_code, product_name,
product_spc, unit, quantity_produced, quantity_split, route_code, prod_line_code, product_date,
shift_id, parent_order, ancestors, status, remark, attr1, attr2, attr3, attr4, create_by, create_time,
update_by, update_time, prod_type, factory_code , end_flag
update_by, update_time, prod_type, factory_code , end_flag , car_num
from pro_order_workorder
</sql>
@ -184,6 +185,7 @@
<if test="prodType != null">prod_type,</if>
<if test="factoryCode != null">factory_code,</if>
<if test="endFlag != null">end_flag,</if>
<if test="carNum != null">car_num,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="workorderId != null">#{workorderId},</if>
@ -217,6 +219,7 @@
<if test="prodType != null">#{prodType},</if>
<if test="factoryCode != null">#{factoryCode},</if>
<if test="endFlag != null">#{endFlag},</if>
<if test="carNum != null">#{carNum},</if>
</trim>
</insert>
<insert id="createPrepare">
@ -368,6 +371,7 @@
<if test="prodType != null">prod_type = #{prodType},</if>
<if test="factoryCode != null">factory_code = #{factoryCode},</if>
<if test="endFlag != null">end_flag = #{endFlag},</if>
<if test="carNum != null">car_num = #{carNum},</if>
</trim>
where workorder_id = #{workorderId}
</update>

Loading…
Cancel
Save