白坯订单管理

highway
wws 1 year ago
parent 8f803da334
commit 3466e0602e

@ -25,6 +25,15 @@ public class SplitOrderDTO {
private String routeCode;
private ProOrderWorkorder proOrderWorkorder;
private Integer carNum;
public Integer getCarNum() {
return carNum;
}
public void setCarNum(Integer carNum) {
this.carNum = carNum;
}
public ProOrderWorkorder getProOrderWorkorder() {
return proOrderWorkorder;

@ -199,4 +199,10 @@ public interface ProOrderMapper {
* @param orderCode
*/
void updateOrderStatusByOrderCode(String orderCode);
/**
*
* @param proOrder
*/
void updateWhiteOrder(ProOrder proOrder);
}

@ -160,12 +160,13 @@ public class ProOrderServiceImpl implements IProOrderService {
proOrder.setUpdateTime(DateUtils.getNowDate());
proOrder.setUpdateBy(SecurityContextHolder.getUserName());
proOrder.setQuantitySplit(splitOrderDTO.getSplitNum());
proOrder.setQuantity(splitOrderDTO.getSplitNum());
proOrder.setQuantity(proOrder.getQuantitySplit());
proOrder.setStatus("o1");
proOrder.setCarNum(proOrder.getCarNum()+splitOrderDTO.getCarNum());
if (flag) {
proOrder.setStatus("o2");
}
proOrderMapper.updateOrder(proOrder);
proOrderMapper.updateWhiteOrder(proOrder);
// 设置工单通用属性
ProOrderWorkorder proOrderWorkorder = setCommonWorkAttribute(proOrder, splitOrderDTO.getProductDate(), splitOrderDTO.getProdLineCode(), splitOrderDTO.getShiftId(), splitOrderDTO.getRouteCode());
@ -183,6 +184,7 @@ public class ProOrderServiceImpl implements IProOrderService {
proOrderWorkorder.setProdType(proOrder.getProdType());
proOrderWorkorder.setParentOrder("0");
proOrderWorkorder.setEndFlag(1);
proOrderWorkorder.setCarNum(splitOrderDTO.getCarNum());
// 插入工单
proOrderWorkorderMapper.insertProOrderWorkorder(proOrderWorkorder);

@ -148,6 +148,7 @@ public class ProWhiteOrderServiceImpl implements IProWhiteOrderService {
childProOrder.setStatus("o0");
childProOrder.setOrderType(proOrder.getProdType());
childProOrder.setOrderCode(orderCode+num++);
childProOrder.setCarNum(0);
childProOrder.setCreateBy(SecurityContextHolder.getUserName());
childProOrder.setCreateTime(DateUtils.getNowDate());
childProOrder.setUpdateBy(SecurityContextHolder.getUserName());

@ -319,7 +319,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update pro_order set status = 'o1' where parent_order = #{orderCode}
</update>
<delete id="deleteProOrderById" parameterType="String">
<update id="updateWhiteOrder">
update pro_order
<trim prefix="SET" suffixOverrides=",">
<if test="quantity != null ">quantity += #{quantity},</if>
<if test="quantitySplit != null ">quantity_split += #{quantitySplit},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="status != null">status = #{status},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteProOrderById" parameterType="String">
delete from pro_order where id = #{id}
</delete>

Loading…
Cancel
Save