add:新增订单扩展信息维护
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package org.nl.wms.mps.service.orderExt;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.nl.wms.mps.service.orderExt.dao.MpsSaleOrderIcExt;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 生产订单扩展表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-05-22
|
||||
*/
|
||||
public interface IMpsSaleOrderIcExtService extends IService<MpsSaleOrderIcExt> {
|
||||
|
||||
void create(JSONObject jo);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,155 @@
|
||||
package org.nl.wms.mps.service.orderExt.dao;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 生产订单扩展表
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-05-22
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("mps_sale_order_ic_ext")
|
||||
public class MpsSaleOrderIcExt implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 销售单标识
|
||||
*/
|
||||
private String sale_id;
|
||||
|
||||
/**
|
||||
* 明细序号
|
||||
*/
|
||||
private Integer seq_no;
|
||||
|
||||
/**
|
||||
* 包装袋类型
|
||||
*/
|
||||
private String bag_type;
|
||||
|
||||
/**
|
||||
* 包装袋规格
|
||||
*/
|
||||
private String bag_spec;
|
||||
|
||||
/**
|
||||
* 袋装量
|
||||
*/
|
||||
private BigDecimal bag_qty;
|
||||
|
||||
/**
|
||||
* 包装箱类型
|
||||
*/
|
||||
private String box_type;
|
||||
|
||||
/**
|
||||
* 包装箱规格
|
||||
*/
|
||||
private String box_spec;
|
||||
|
||||
/**
|
||||
* 箱装量
|
||||
*/
|
||||
private BigDecimal box_qty;
|
||||
|
||||
/**
|
||||
* 载具类型
|
||||
*/
|
||||
private String storagevehicle_type;
|
||||
|
||||
/**
|
||||
* 载具规格
|
||||
*/
|
||||
private String storagevehicle_spec;
|
||||
|
||||
/**
|
||||
* 载具装量
|
||||
*/
|
||||
private BigDecimal storagevehicle_qty;
|
||||
|
||||
/**
|
||||
* 内唛数
|
||||
*/
|
||||
private BigDecimal innermark_num;
|
||||
|
||||
/**
|
||||
* 外唛数
|
||||
*/
|
||||
private BigDecimal outermark_num;
|
||||
|
||||
/**
|
||||
* 袋数
|
||||
*/
|
||||
private BigDecimal bag_num;
|
||||
|
||||
/**
|
||||
* 箱数
|
||||
*/
|
||||
private BigDecimal box_num;
|
||||
|
||||
/**
|
||||
* 托盘数
|
||||
*/
|
||||
private BigDecimal storagevehicle_num;
|
||||
|
||||
/**
|
||||
* 条形码
|
||||
*/
|
||||
private String bar_code;
|
||||
|
||||
/**
|
||||
* 备用1
|
||||
*/
|
||||
private String remark1;
|
||||
|
||||
/**
|
||||
* 备用2
|
||||
*/
|
||||
private String remark2;
|
||||
|
||||
/**
|
||||
* 备用3
|
||||
*/
|
||||
private String remark3;
|
||||
|
||||
/**
|
||||
* 备用4
|
||||
*/
|
||||
private String remark4;
|
||||
|
||||
/**
|
||||
* 备用5
|
||||
*/
|
||||
private String remark5;
|
||||
|
||||
/**
|
||||
* 备用6
|
||||
*/
|
||||
private String remark6;
|
||||
|
||||
/**
|
||||
* 备用7
|
||||
*/
|
||||
private String remark7;
|
||||
|
||||
/**
|
||||
* 备用8
|
||||
*/
|
||||
private String remark8;
|
||||
|
||||
/**
|
||||
* 备用9
|
||||
*/
|
||||
private String remark9;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package org.nl.wms.mps.service.orderExt.dao.mapper;
|
||||
|
||||
import org.nl.wms.mps.service.orderExt.dao.MpsSaleOrderIcExt;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 生产订单扩展表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-05-22
|
||||
*/
|
||||
public interface MpsSaleOrderIcExtMapper extends BaseMapper<MpsSaleOrderIcExt> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.nl.wms.mps.service.orderExt.dao.mapper.MpsSaleOrderIcExtMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,43 @@
|
||||
package org.nl.wms.mps.service.orderExt.impl;
|
||||
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.nl.wms.mps.service.orderExt.dao.MpsSaleOrderIcExt;
|
||||
import org.nl.wms.mps.service.orderExt.dao.mapper.MpsSaleOrderIcExtMapper;
|
||||
import org.nl.wms.mps.service.orderExt.IMpsSaleOrderIcExtService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 生产订单扩展表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-05-22
|
||||
*/
|
||||
@Service
|
||||
public class MpsSaleOrderIcExtServiceImpl extends ServiceImpl<MpsSaleOrderIcExtMapper, MpsSaleOrderIcExt> implements IMpsSaleOrderIcExtService {
|
||||
|
||||
@Override
|
||||
public void create(JSONObject jo) {
|
||||
this.remove(new QueryWrapper<MpsSaleOrderIcExt>().eq("remark1",jo.getString("workorder_code")));
|
||||
String workorder_code = jo.getString("workorder_code");
|
||||
int box_num = jo.getJSONObject("extra_map").getIntValue("box_num");
|
||||
String is_flip = jo.getJSONObject("extra_map").getString("is_flip");
|
||||
String target_roadway = jo.getJSONObject("extra_map").getString("target_roadway");
|
||||
|
||||
for (int i = 1; i <= box_num; i++) {
|
||||
MpsSaleOrderIcExt ext = new MpsSaleOrderIcExt();
|
||||
ext.setSale_id(IdUtil.getSnowflake(1, 1).nextId() + "");
|
||||
ext.setSeq_no(1);
|
||||
String pre = i < 10 ? "0000" : "000";
|
||||
String bar_code = workorder_code + is_flip + target_roadway + pre + i;
|
||||
ext.setBar_code(bar_code);
|
||||
ext.setRemark1(workorder_code);
|
||||
this.save(ext);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user