22个文件已修改
9个文件已添加
2个文件已删除
1 文件已重命名
| | |
| | | /** |
| | | * 外部主键 |
| | | */ |
| | | @TableField("auto_id") |
| | | private Integer autoId; |
| | | /** |
| | | * 订单号 |
| | | */ |
| | | @TableField("out_order_no") |
| | | private String outOrderNo; |
| | | // @TableField("auto_id") |
| | | // private Integer autoId; |
| | | // /** |
| | | // * 订单号 |
| | | // */ |
| | | // @TableField("out_order_no") |
| | | // private String outOrderNo; |
| | | // |
| | | // /** |
| | | // * 炉号\客户图号 |
| | | // */ |
| | | // @TableField("lu_hao") |
| | | // private String luHao; |
| | | // |
| | | // /** |
| | | // * 工单号 |
| | | // */ |
| | | // @TableField("pg_no") |
| | | // private String sPgNO; |
| | | |
| | | /** |
| | | * 炉号\客户图号 |
| | | */ |
| | | @TableField("lu_hao") |
| | | private String luHao; |
| | | |
| | | /** |
| | | * 工单号 |
| | | */ |
| | | @TableField("pg_no") |
| | | private String sPgNO; |
| | | |
| | | |
| | | @TableField("temp1") |
| | | private String temp1; |
| | | |
| | | |
| | | @TableField("temp2") |
| | | private String temp2; |
| | | |
| | | @TableField("temp3") |
| | | private String temp3; |
| | | |
| | | |
| | |
| | | * 客户编号 |
| | | */ |
| | | @ApiModelProperty(value= "客户编号") |
| | | private Long cstmr; |
| | | private String cstmr; |
| | | |
| | | /** |
| | | * 客户 |
| | |
| | | |
| | | public Order() {} |
| | | |
| | | public Order(String uuid,String orderNo,String orderTime,Long docType,Long itemId,String itemName,Long allotItemId,String defNumber,String number,Long cstmr,String cstmrName,String tel,String operMemb,Double totalFee,Double discount,Double discountFee,Double otherFee,Double actFee,Integer payType,String salesman,Integer accountDay,Integer postFeeType,Double postFee,Date payTime,Date sendTime,String shipName,String shipCode,Long settle,Integer status,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { |
| | | public Order(String uuid,String orderNo,String orderTime,Long docType,Long itemId,String itemName,Long allotItemId,String defNumber,String number,String cstmr,String cstmrName,String tel,String operMemb,Double totalFee,Double discount,Double discountFee,Double otherFee,Double actFee,Integer payType,String salesman,Integer accountDay,Integer postFeeType,Double postFee,Date payTime,Date sendTime,String shipName,String shipCode,Long settle,Integer status,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { |
| | | this.uuid = uuid; |
| | | this.orderNo = orderNo; |
| | | this.orderTime = orderTime; |
| | |
| | | |
| | | /** |
| | | * 作业数量 |
| | | * |
| | | * <p> |
| | | * 入库 : 组托完成,组托档、工作档、入库完成数量 |
| | | * 出库 : 工作档、出库完成数量 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 完成数量 |
| | | * |
| | | * <p> |
| | | * 入库 : qty 👆 |
| | | * 出库 : qty 👆 |
| | | */ |
| | |
| | | @ApiModelProperty(value= "备注") |
| | | private String memo; |
| | | |
| | | |
| | | @TableField("i_no") |
| | | private Integer iNO; |
| | | |
| | | /** |
| | | * 外部主键 |
| | |
| | | @TableField("lu_hao") |
| | | private String luHao; |
| | | |
| | | @TableField("ware_id") |
| | | private String wareId; |
| | | |
| | | @TableField("ware_name") |
| | | private String wareName; |
| | | |
| | | @TableField("packing") |
| | | private String packing; |
| | | /** |
| | | * 工单号 |
| | | */ |
| | | @TableField("pg_no") |
| | | private String sPgNO; |
| | | |
| | | |
| | | @TableField("temp1") |
| | | private String temp1; |
| | | |
| | | |
| | | @TableField("temp2") |
| | | private String temp2; |
| | | |
| | | @TableField("temp3") |
| | | private String temp3; |
| | | |
| | | @TableField("pro_type") |
| | | private String proType; |
| | | |
| | | public OrderDetl() {} |
| | | public OrderDetl() { |
| | | } |
| | | |
| | | public OrderDetl(Long orderId, String orderNo, Double anfme, Double qty, String matnr, String maktx, String batch, String specs, String model, String color, String brand, String unit, Double price, String sku, Double units, String barcode, String origin, String manu, String manuDate, String itemNum, Double safeQty, Double weight, Double length, Double volume, String threeCode, String supp, String suppCode, Integer beBatch, String deadTime, Integer deadWarn, Integer source, Integer inspect, Integer danger, Integer status, Long createBy, Date createTime, Long updateBy, Date updateTime, String memo) { |
| | | this.orderId = orderId; |
| | |
| | | } |
| | | |
| | | public String getBeBatch$(){ |
| | | if (null == this.beBatch){ return null; } |
| | | if (null == this.beBatch) { |
| | | return null; |
| | | } |
| | | switch (this.beBatch){ |
| | | case 1: |
| | | return "是"; |
| | |
| | | } |
| | | |
| | | public String getSource$(){ |
| | | if (null == this.source){ return null; } |
| | | if (null == this.source) { |
| | | return null; |
| | | } |
| | | switch (this.source){ |
| | | case 1: |
| | | return "制造"; |
| | |
| | | } |
| | | |
| | | public String getInspect$(){ |
| | | if (null == this.inspect){ return null; } |
| | | if (null == this.inspect) { |
| | | return null; |
| | | } |
| | | switch (this.inspect){ |
| | | case 1: |
| | | return "是"; |
| | |
| | | } |
| | | |
| | | public String getDanger$(){ |
| | | if (null == this.danger){ return null; } |
| | | if (null == this.danger) { |
| | | return null; |
| | | } |
| | | switch (this.danger){ |
| | | case 1: |
| | | return "是"; |
| | |
| | | } |
| | | |
| | | public String getStatus$(){ |
| | | if (null == this.status){ return null; } |
| | | if (null == this.status) { |
| | | return null; |
| | | } |
| | | switch (this.status){ |
| | | case 1: |
| | | return "正常"; |
| | |
| | | int increaseQtyByOrderNo(@Param("orderNo")String orderNo, @Param("matnr")String matnr, @Param("batch")String batch, @Param("qty")Double qty); |
| | | |
| | | int increaseWorkQty(@Param("orderId")Long orderId, @Param("matnr")String matnr, @Param("batch")String batch, @Param("workQty")Double workQty); |
| | | |
| | | |
| | | List<OrderDetl> listByOrderNo(@Param("orderNo") String orderNo); |
| | | |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | boolean increaseWorkQty(Long orderId, String matnr, String batch, Double workQty); |
| | | |
| | | List<OrderDetl> selectItem(String orderNo); |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<OrderDetl> selectItem(String orderNo) { |
| | | return this.baseMapper.listByOrderNo(orderNo); |
| | | } |
| | | |
| | | @Override |
| | | public OrderDetl selectItem(Long orderId, String matnr, String batch) { |
| | | return this.baseMapper.selectItem(orderId, matnr, batch); |
| | | } |
| | |
| | | package com.zy.common.service.erp; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.core.common.Cools; |
| | | import com.zy.third.erp.entity.InDetTB; |
| | | import lombok.SneakyThrows; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | List<T> list = new ArrayList<>(); |
| | | if (null != result) { |
| | | for (Map<String, Object> entity : result) { |
| | | list.add(Cools.conver(entity, cls)); |
| | | //用最笨的方法转换,也可以用下面的process方法(还没有写全) |
| | | list.add(JSONObject.parseObject(JSONObject.toJSONString(entity), cls)); |
| | | //list.add(Cools.conver(entity, cls)); |
| | | } |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | @SneakyThrows |
| | | public <T> void process(Map<String, Object> entity, Class<T> cls) { |
| | | for (Map.Entry<String, Object> entry : entity.entrySet()) { |
| | | String fieldName = entry.getKey(); |
| | | Object value = entry.getValue(); |
| | | |
| | | Field field = cls.getDeclaredField(fieldName); |
| | | field.setAccessible(true); |
| | | |
| | | if (value instanceof Integer && field.getType() == int.class || field.getType() == Integer.class) { |
| | | field.setInt(cls, (Integer) value); |
| | | } else if (value instanceof String && field.getType() == String.class) { |
| | | field.set(cls, value); |
| | | } |
| | | // 其他类型可以类似处理 |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 扫描所有实力类属性里的TableField注解,并将里面的值作为column |
| | | * |
| | | * @param cls |
| | | * @param <T> |
| | | * @return |
| | |
| | | * key: id, value: 1 等同于 WHERE id = 1 |
| | | * 如果要查询字符串需要自行加上'' |
| | | * key:name, value: 'zhs'等同于 WHERE name = 'zhs' |
| | | * |
| | | * @param cls |
| | | * @param condition |
| | | * @param <T> |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | /*****************************************************************************/ |
| | | /********************************* 核心层 *********************************/ |
| | | /*****************************************************************************/ |
| | | |
| | | |
| | | |
| | | private List<Map<String, Object>> executeQuery(String sql) { |
| | |
| | | Connection conn = null; |
| | | try { |
| | | conn = getConn(); |
| | | if(null != conn) |
| | | { |
| | | if (null != conn) { |
| | | pstm = conn.prepareStatement(sql); |
| | | |
| | | pstm.setQueryTimeout(QUERY_TIMEOUT_SECONDS); |
| | |
| | | package com.zy.third.erp.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.core.common.Cools;import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import com.core.common.Cools; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import java.io.Serializable; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @NoArgsConstructor |
| | |
| | | public void setMakeDate(Date MakeDate) { |
| | | this.MakeDate = MakeDate; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | package com.zy.third.erp.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.core.common.Cools;import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import com.core.common.Cools; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import java.io.Serializable; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | @NoArgsConstructor |
| | | @AllArgsConstructor |
| | |
| | | private String BillNo; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | |
| | | @TableField("iNo") |
| | | private Integer iNO; |
| | | |
| | |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("ItemId") |
| | | private String itemid; |
| | | private String ItemId; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("ItemCode") |
| | |
| | | @TableField("LKName") |
| | | private String LKName; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @TableField("FactArea") |
| | | private String FactArea; |
| | | /** |
| | | * 供应商\客户ID |
| | | */ |
| | | @TableField("Packing") |
| | | private String Packing; |
| | | /** |
| | | * 颜色 |
| | | */ |
| | | @TableField("sColor") |
| | | private String sColor; |
| | | |
| | | /** |
| | | * 炉号\客户图号 |
| | | */ |
| | | @TableField("LuHao") |
| | | private String LuHao; |
| | | |
| | | /** |
| | | * 工单号 |
| | | */ |
| | | @TableField("sPgNO") |
| | | private String sPgNO; |
| | | |
| | | |
| | | // InDetTB inDetTB = new InDetTB( |
| | | // null, // [非空] |
| | | // null, // [非空] |
| | | // null, // erp行唯一码[非空] |
| | | // null, // |
| | | // null, // |
| | | // null, // |
| | | // null, // |
| | | // null, // |
| | | // null, // |
| | | // null, // |
| | | // null, // |
| | | // null, // |
| | | // null, // |
| | | // null // |
| | | // ); |
| | | |
| | | public String getBillNo() { |
| | | return BillNo; |
| | | } |
| | | |
| | | public void setBillNo(String BillNo) { |
| | | this.BillNo = BillNo; |
| | | } |
| | | |
| | | public Integer getINO() { |
| | | return iNO; |
| | | } |
| | | |
| | | public void setINO(Integer iNO) { |
| | | this.iNO = iNO; |
| | | } |
| | | |
| | | public Integer getDetId() { |
| | | return detId; |
| | | } |
| | | |
| | | public void setDetId(Integer detId) { |
| | | this.detId = detId; |
| | | } |
| | | |
| | | public String getItemid() { |
| | | return itemid; |
| | | } |
| | | |
| | | public void setItemid(String itemid) { |
| | | this.itemid = itemid; |
| | | } |
| | | |
| | | public String getItemCode() { |
| | | return ItemCode; |
| | | } |
| | | |
| | | public void setItemCode(String ItemCode) { |
| | | this.ItemCode = ItemCode; |
| | | } |
| | | |
| | | public String getItemBatch() { |
| | | return ItemBatch; |
| | | } |
| | | |
| | | public void setItemBatch(String ItemBatch) { |
| | | this.ItemBatch = ItemBatch; |
| | | } |
| | | |
| | | public String getProtype() { |
| | | return protype; |
| | | } |
| | | |
| | | public void setProtype(String protype) { |
| | | this.protype = protype; |
| | | } |
| | | |
| | | public Double getMainNum() { |
| | | return MainNum; |
| | | } |
| | | |
| | | public void setMainNum(Double MainNum) { |
| | | this.MainNum = MainNum; |
| | | } |
| | | |
| | | public String getOrderNo() { |
| | | return OrderNo; |
| | | } |
| | | |
| | | public void setOrderNo(String OrderNo) { |
| | | this.OrderNo = OrderNo; |
| | | } |
| | | |
| | | public Date getMakedate() { |
| | | return makedate; |
| | | } |
| | | |
| | | public String getMakedate$(){ |
| | | if (Cools.isEmpty(this.makedate)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.makedate); |
| | | } |
| | | |
| | | public void setMakedate(Date makedate) { |
| | | this.makedate = makedate; |
| | | } |
| | | |
| | | public String getRemark() { |
| | | return remark; |
| | | } |
| | | |
| | | public void setRemark(String remark) { |
| | | this.remark = remark; |
| | | } |
| | | |
| | | public String getTemp1() { |
| | | return temp1; |
| | | } |
| | | |
| | | public void setTemp1(String temp1) { |
| | | this.temp1 = temp1; |
| | | } |
| | | |
| | | public String getTemp2() { |
| | | return temp2; |
| | | } |
| | | |
| | | public void setTemp2(String temp2) { |
| | | this.temp2 = temp2; |
| | | } |
| | | |
| | | public String getTemp3() { |
| | | return temp3; |
| | | } |
| | | |
| | | public void setTemp3(String temp3) { |
| | | this.temp3 = temp3; |
| | | } |
| | | |
| | | |
| | |
| | | package com.zy.third.erp.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.core.common.Cools;import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("erp_InHedTB") |
| | |
| | | |
| | | /** |
| | | * StockIn:采购入库 |
| | | ProductIn:成品入库单 |
| | | ItemMoveIn:调拨入库 |
| | | ItemSwitchIn:形态转换入库 |
| | | CheckMoreIn:盘盈入库单 |
| | | |
| | | * ProductIn:成品入库单 |
| | | * ItemMoveIn:调拨入库 |
| | | * ItemSwitchIn:形态转换入库 |
| | | * CheckMoreIn:盘盈入库单 |
| | | */ |
| | | // @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @TableField("BillDate") |
| | | private String billDate; |
| | | private Date BillDate; |
| | | |
| | | @TableField("IoKindID") |
| | | private String IoKindID; |
| | |
| | | */ |
| | | @ApiModelProperty(value= "供应商、部门ID") |
| | | @TableField("ObjectId") |
| | | private String OjectId; |
| | | private String ObjectId; |
| | | |
| | | /** |
| | | * 供应商、部门名称 |
| | | */ |
| | | @TableField("ObjectName") |
| | | @ApiModelProperty(value= "供应商、部门名称") |
| | | private String OjbectName; |
| | | private String ObjectName; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("Remark") |
| | |
| | | private String Temp3; |
| | | |
| | | |
| | | |
| | | @ApiModelProperty(value= "") |
| | | // @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @TableField("MakeDate") |
| | | private String makedate; |
| | | private Date MakeDate; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("LKName") |
| | | private String LKName; |
| | | |
| | | |
| | | |
| | | // InHedTB inHedTB = new InHedTB( |
| | | // null, // [非空] |
| | | // null, // StockIn:采购入库 |
| | | // null, // 供应商、部门ID |
| | | // null, // 供应商、部门名称 |
| | | // null, // |
| | | // null, // |
| | | // null, // |
| | | // null, // |
| | | // null // |
| | | // ); |
| | | |
| | | public String getBillNo() { |
| | | return BillNo; |
| | | } |
| | | |
| | | public void setBillNo(String BillNo) { |
| | | this.BillNo = BillNo; |
| | | } |
| | | |
| | | public String getIoKindID() { |
| | | return IoKindID; |
| | | } |
| | | |
| | | public void setIoKindID(String IoKindID) { |
| | | this.IoKindID = IoKindID; |
| | | } |
| | | |
| | | public String getOjectId() { |
| | | return OjectId; |
| | | } |
| | | |
| | | public void setOjectId(String OjectId) { |
| | | this.OjectId = OjectId; |
| | | } |
| | | |
| | | public String getOjbectName() { |
| | | return OjbectName; |
| | | } |
| | | |
| | | public void setOjbectName(String OjbectName) { |
| | | this.OjbectName = OjbectName; |
| | | } |
| | | |
| | | public String getMakedate() { |
| | | return makedate; |
| | | } |
| | | |
| | | public void setMakedate(String makedate) { |
| | | this.makedate = makedate; |
| | | } |
| | | // public Date getMakedate() { |
| | | // return makedate; |
| | | // } |
| | | // |
| | | // public String getMakedate$(){ |
| | | // if (Cools.isEmpty(this.makedate)){ |
| | | // return ""; |
| | | // } |
| | | // return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.makedate); |
| | | // } |
| | | // |
| | | // public void setMakedate(Date makedate) { |
| | | // this.makedate = makedate; |
| | | // } |
| | | |
| | | public String getRemark() { |
| | | return remark; |
| | | } |
| | | |
| | | public void setRemark(String remark) { |
| | | this.remark = remark; |
| | | } |
| | | |
| | | public String getTemp1() { |
| | | return Temp1; |
| | | } |
| | | |
| | | public void setTemp1(String Temp1) { |
| | | this.Temp1 = Temp1; |
| | | } |
| | | |
| | | public String getTemp2() { |
| | | return Temp2; |
| | | } |
| | | |
| | | public void setTemp2(String Temp2) { |
| | | this.Temp2 = Temp2; |
| | | } |
| | | |
| | | public String getTemp3() { |
| | | return Temp3; |
| | | } |
| | | |
| | | public void setTemp3(String Temp3) { |
| | | this.Temp3 = Temp3; |
| | | } |
| | | /** |
| | | * |
| | | */ |
| | | @TableField("FactArea") |
| | | private String FactArea; |
| | | |
| | | |
| | | } |
| | |
| | | package com.zy.third.erp.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.core.common.Cools;import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import com.core.common.Cools; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import java.io.Serializable; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @NoArgsConstructor |
| | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("LKName") |
| | | private String LKName; |
| | | /** |
| | | * 订单号 |
| | | */ |
| | | @TableField("order_no") |
| | | private String orderNo; |
| | | |
| | | /** |
| | | * 炉号\客户图号 |
| | | */ |
| | | @TableField("lu_hao") |
| | | private String luHao; |
| | | |
| | | /** |
| | | * 工单号 |
| | | */ |
| | | @TableField("pg_no") |
| | | private String sPgNO; |
| | | |
| | | // ItemTB itemTB = new ItemTB( |
| | | // null, // [非空] |
| | | // null, // [非空] |
| | | // null, // [非空] |
| | | // null, // |
| | | // null, // [非空] |
| | | // null, // 毛坯、半成品、成品 |
| | | // null, // |
| | | // null, // 00:新增 22:删除 |
| | | // null, // |
| | | // null, // |
| | | // null, // |
| | | // null, // |
| | | // null, // |
| | | // null // |
| | | // ); |
| | | |
| | | public String getItemId() { |
| | | return ItemId; |
| | | } |
| | | |
| | | public void setItemId(String ItemID) { |
| | | this.ItemId = ItemID; |
| | | } |
| | | |
| | | public String getItemCode() { |
| | | return ItemCode; |
| | | } |
| | | |
| | | public void setItemCode(String ItemCode) { |
| | | this.ItemCode = ItemCode; |
| | | } |
| | | |
| | | public String getItemName() { |
| | | return ItemName; |
| | | } |
| | | |
| | | public void setItemName(String ItemName) { |
| | | this.ItemName = ItemName; |
| | | } |
| | | |
| | | public String getItemSpc() { |
| | | return ItemSpc; |
| | | } |
| | | |
| | | public void setItemSpc(String ItemSpc) { |
| | | this.ItemSpc = ItemSpc; |
| | | } |
| | | |
| | | public String getItemUnit() { |
| | | return ItemUnit; |
| | | } |
| | | |
| | | public void setItemUnit(String ItemUnit) { |
| | | this.ItemUnit = ItemUnit; |
| | | } |
| | | |
| | | public String getItemKind() { |
| | | return ItemKind; |
| | | } |
| | | |
| | | public void setItemKind(String ItemKind) { |
| | | this.ItemKind = ItemKind; |
| | | } |
| | | |
| | | public String getRemark() { |
| | | return Remark; |
| | | } |
| | | |
| | | public void setRemark(String remark) { |
| | | this.Remark = remark; |
| | | } |
| | | |
| | | public String getFlag() { |
| | | return Flag; |
| | | } |
| | | |
| | | public void setFlag(String flag) { |
| | | this.Flag = flag; |
| | | } |
| | | |
| | | public Date getMakeDate() { |
| | | return MakeDate; |
| | | } |
| | | |
| | | public String getMakedate$(){ |
| | | if (Cools.isEmpty(this.MakeDate)){ |
| | |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.MakeDate); |
| | | } |
| | | |
| | | public void setMakeDate(Date makeDate) { |
| | | this.MakeDate = makeDate; |
| | | } |
| | | |
| | | public String getTemp1() { |
| | | return Temp1; |
| | | } |
| | | |
| | | public void setTemp1(String temp1) { |
| | | this.Temp1 = temp1; |
| | | } |
| | | |
| | | public String getTemp2() { |
| | | return Temp2; |
| | | } |
| | | |
| | | public void setTemp2(String temp2) { |
| | | this.Temp2 = temp2; |
| | | } |
| | | |
| | | public String getTemp3() { |
| | | return Temp3; |
| | | } |
| | | |
| | | public void setTemp3(String temp3) { |
| | | this.Temp3 = temp3; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.third.erp.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.core.common.Cools; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("erp_OutCancelTB") |
| | | public class OutCancelTB implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "AutoId", type = IdType.AUTO) |
| | | private Integer AutoId; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | @TableField("BillNo") |
| | | private String BillNo; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @TableField("MakeDate") |
| | | private Date MakeDate; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | @TableField("LKName") |
| | | private String LKName; |
| | | |
| | | |
| | | public String getMakedate$() { |
| | | if (Cools.isEmpty(this.MakeDate)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.MakeDate); |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.third.erp.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.core.common.Cools; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @NoArgsConstructor |
| | | @AllArgsConstructor |
| | | @TableName("erp_OutDetTB") |
| | | public class OutDetTB implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "AutoId", type = IdType.AUTO) |
| | | private Integer AutoId; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | @TableField("BillNo") |
| | | private String BillNo; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | @TableField("iNo") |
| | | private Integer iNO; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | @TableField("DetId") |
| | | private Integer detId; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | @TableField("ItemId") |
| | | private String ItemId; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | @TableField("ItemCode") |
| | | private String ItemCode; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | @TableField("ItemBatch") |
| | | private String ItemBatch; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | @TableField("proType") |
| | | private String proType; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | @TableField("OrderNo") |
| | | private String OrderNo; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | @TableField("MainNum") |
| | | private Double MainNum; |
| | | |
| | | @TableField("remark") |
| | | private String remark; |
| | | |
| | | @TableField("WareId") |
| | | private String wareId; |
| | | |
| | | @TableField("WareName") |
| | | private String wareName; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | private String temp1; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | private String temp2; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | private String temp3; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @TableField("MakeDate") |
| | | private Date makedate; |
| | | |
| | | // @ApiModelProperty(value= "") |
| | | // @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | // @TableField("DelDate") |
| | | // private Date delDate; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | @TableField("LKName") |
| | | private String LKName; |
| | | |
| | | |
| | | @TableField("FactArea") |
| | | private String FactArea; |
| | | |
| | | /** |
| | | * 供应商\客户ID |
| | | */ |
| | | @TableField("Packing") |
| | | private String Packing; |
| | | /** |
| | | * 颜色 |
| | | */ |
| | | @TableField("sColor") |
| | | private String sColor; |
| | | |
| | | /** |
| | | * 炉号\客户图号 |
| | | */ |
| | | @TableField("LuHao") |
| | | private String LuHao; |
| | | |
| | | /** |
| | | * 工单号 |
| | | */ |
| | | @TableField("sPgNO") |
| | | private String sPgNO; |
| | | |
| | | public String getMakedate$() { |
| | | if (Cools.isEmpty(this.makedate)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.makedate); |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.third.erp.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @NoArgsConstructor |
| | | @AllArgsConstructor |
| | | @TableName("erp_OutHedTB") |
| | | public class OutHedTB implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "AutoId", type = IdType.AUTO) |
| | | private Integer AutoId; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | @TableId(value = "BillNo", type = IdType.INPUT) |
| | | @TableField("BillNo") |
| | | private String BillNo; |
| | | |
| | | |
| | | @TableField("BillDate") |
| | | // @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date BillDate; |
| | | |
| | | /** |
| | | * SendMatOut:发料出库 |
| | | * OtherOut:其它出库单 |
| | | * ItemMoveOut:调拨出库 |
| | | * ItemSwitchOut:形态转换出库 |
| | | * CheckLossOut:盘盈出库单 |
| | | */ |
| | | @ApiModelProperty(value = "SendMatOut:发料出库 ") |
| | | @TableField("IoKindID") |
| | | private String IoKindID; |
| | | |
| | | @TableField("IoKindName") |
| | | private String ioKindName; |
| | | |
| | | /** |
| | | * 部门ID |
| | | */ |
| | | @ApiModelProperty(value = "部门ID") |
| | | @TableField("ObjectId") |
| | | private String ObjectId; |
| | | |
| | | /** |
| | | * 部门名称 |
| | | */ |
| | | @ApiModelProperty(value = "部门名称") |
| | | @TableField("ObjectName") |
| | | private String ObjectName; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | @TableField("Remark") |
| | | private String remark; |
| | | |
| | | @TableField("WareId") |
| | | private String wareId; |
| | | |
| | | @TableField("WareName") |
| | | private String wareName; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | @TableField("Temp1") |
| | | private String Temp1; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | @TableField("Temp2") |
| | | private String Temp2; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | @TableField("Temp3") |
| | | private String Temp3; |
| | | |
| | | |
| | | @ApiModelProperty(value = "") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @TableField("MakeDate") |
| | | private Date MakeDate; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | @TableField("LKName") |
| | | private String LKName; |
| | | |
| | | @TableField("FactArea") |
| | | private String FactArea; |
| | | |
| | | } |
| | |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | |
| | | private Boolean erpEnabled; |
| | | |
| | | @Autowired |
| | | private ERPInCancelSchedulerMS inMS; |
| | | private ERPInOrOutCancelService inMS; |
| | | |
| | | @Autowired |
| | | private ErpSqlServer erpSqlServer; |
| | | |
| | | |
| | | @Transactional(rollbackFor = Throwable.class) |
| | | @Scheduled(cron = "${erp.refreshtime}") |
| | | public void InCancelScheduler() { |
| | | log.info("InCancelScheduler开始了"); |
| | |
| | | List<InCancelTB> ins = erpSqlServer.select(sqlInCancelTB, InCancelTB.class); |
| | | for (InCancelTB in : ins) { |
| | | System.out.println(in); |
| | | com.zy.third.lk.entity.InCancelTB lkCancel = inMS.tryCancel(in); |
| | | com.zy.third.lk.entity.InCancelTB lkCancel = inMS.tryCancel(in.getBillNo()); |
| | | if (lkCancel != null) { |
| | | HashMap<String, String> condition = new HashMap<>(); |
| | | condition.put("BillNo", "'" + in.getBillNo() + "'"); |
| | | erpSqlServer.delete(InCancelTB.class, condition); |
| | | int delete = erpSqlServer.delete(InCancelTB.class, condition); |
| | | if (delete > 0) { |
| | | log.info("将入库取消通知单删除成功,{}", lkCancel.getBillNo()); |
| | | } else { |
| | | log.error("将入库取消通知单删除失败,{}", lkCancel.getBillNo()); |
| | | } |
| | | HashMap<String, Object> content = new HashMap<>(); |
| | | content.put("BillNo", "'" + lkCancel.getBillNo() + "'"); |
| | | content.put("opFlag", lkCancel.getOpFlag()); |
| | | erpSqlServer.insert(com.zy.third.lk.entity.InCancelTB.class, content); |
| | | int insert = erpSqlServer.insert(com.zy.third.lk.entity.InCancelTB.class, content); |
| | | if (insert > 0) { |
| | | log.info("将入库取消通知单写入成功,{}", lkCancel.getBillNo()); |
| | | } else { |
| | | log.error("将入库取消通知单写入失败,{}", lkCancel.getBillNo()); |
| | | } |
| | | } else { |
| | | log.error("将入库取消通知单写入失败"); |
| | | } |
| | |
| | | |
| | | |
| | | @Autowired |
| | | private ERPInOrOutTBSchedulerMS inMS; |
| | | private ERPInOrOutService inMS; |
| | | |
| | | |
| | | @Autowired |
| | | private ErpSqlServer erpSqlServer; |
| | | |
| | | |
| | | @Transactional(rollbackFor = Throwable.class) |
| | | @Scheduled(cron = "${erp.refreshtime}") |
| | | public void InHedTBScheduler() { |
| | | log.info("InHedTBScheduler开始了"); |
| | | if (!erpEnabled) return; |
| | | String sqlInHed = "select * from erp_InHedTB where LKName='中扬二期'"; |
| | | List<InHedTB> inHeds = erpSqlServer.select(sqlInHed, InHedTB.class); |
| | | if (inHeds.size() > 0) { |
| | | if (!inHeds.isEmpty()) { |
| | | for (InHedTB inHed : inHeds) { |
| | | System.out.println(inHed); |
| | | HashMap<String, String> condition = new HashMap<>(); |
| | |
| | | HashMap<String, Object> hedAndDet = new HashMap<>(); |
| | | hedAndDet.put("hed", inHed); |
| | | hedAndDet.put("det", inDetTBS); |
| | | boolean result = inMS.createOrder(inHed, inDetTBS); |
| | | boolean result = inMS.createInOrder(inHed, inDetTBS); |
| | | if (result) { |
| | | move(hedAndDet); |
| | | } else { |
| | |
| | | } |
| | | } |
| | | |
| | | @Transactional |
| | | |
| | | @Transactional(rollbackFor = Throwable.class) |
| | | public void move(HashMap<String, Object> hedAndDet) { |
| | | InHedTB hed = (InHedTB) hedAndDet.get("hed"); |
| | | ArrayList<InDetTB> dets = (ArrayList<InDetTB>) hedAndDet.get("det"); |
| | |
| | | condition2.put("BillNo", "'" + det.getBillNo() + "'"); |
| | | condition2.put("iNo", String.valueOf(det.getINO())); |
| | | erpSqlServer.delete(InDetTB.class, condition2); |
| | | |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.third.erp.task; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.zy.asrs.entity.Order; |
| | | import com.zy.asrs.entity.OrderDetl; |
| | | import com.zy.asrs.service.OrderDetlService; |
| | | import com.zy.asrs.service.OrderService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Optional; |
| | | |
| | | @Slf4j |
| | | @Component |
| | | public class ERPInOrOutCancelService { |
| | | |
| | | @Autowired |
| | | private OrderService orderService; |
| | | |
| | | @Autowired |
| | | private OrderDetlService orderDetlService; |
| | | |
| | | |
| | | public com.zy.third.lk.entity.InCancelTB tryCancel(String orderNo) { |
| | | com.zy.third.lk.entity.InCancelTB lkCancel = new com.zy.third.lk.entity.InCancelTB(); |
| | | |
| | | List<Order> targets = orderService.selectList(new EntityWrapper<Order>() |
| | | .eq("order_no",orderNo)); |
| | | log.info("要取消的订单:{}", targets); |
| | | if (targets.isEmpty()) { |
| | | lkCancel.setBillNo(orderNo); |
| | | //erp方要求,订单找不到,返回1 |
| | | lkCancel.setOpFlag(1); |
| | | lkCancel.setMakeDate(new Date()); |
| | | return lkCancel; |
| | | } else { |
| | | //默认订单id不能重复 |
| | | Order order = targets.get(0); |
| | | List<OrderDetl> detlList = orderDetlService.selectItem(order.getOrderNo()); |
| | | log.info("要取消的订单详情:{}", detlList); |
| | | Optional<OrderDetl> any = detlList.stream().filter(s -> s.getQty().compareTo(0D) > 0).findAny(); |
| | | if (order.getSettle() > 1L || any.isPresent()) { |
| | | lkCancel.setBillNo(orderNo); |
| | | lkCancel.setOpFlag(2); |
| | | lkCancel.setMakeDate(new Date()); |
| | | return lkCancel; |
| | | } |
| | | orderService.addToLogTable(order); |
| | | orderService.delete(new EntityWrapper<Order>() |
| | | .eq("order_no", order.getOrderNo())); |
| | | detlList.stream().forEach(d -> orderDetlService.addToLogTable(d)); |
| | | orderDetlService.delete(new EntityWrapper<OrderDetl>() |
| | | .eq("order_no", order.getOrderNo())); |
| | | lkCancel.setBillNo(orderNo); |
| | | lkCancel.setOpFlag(1); |
| | | lkCancel.setMakeDate(new Date()); |
| | | return lkCancel; |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.third.erp.task; |
| | | |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.SnowflakeIdWorker; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.DocType; |
| | | import com.zy.asrs.entity.Mat; |
| | | import com.zy.asrs.entity.Order; |
| | | import com.zy.asrs.entity.OrderDetl; |
| | | import com.zy.asrs.service.DocTypeService; |
| | | import com.zy.asrs.service.MatService; |
| | | import com.zy.asrs.service.OrderDetlService; |
| | | import com.zy.asrs.service.OrderService; |
| | | import com.zy.third.erp.entity.InDetTB; |
| | | import com.zy.third.erp.entity.InHedTB; |
| | | import com.zy.third.erp.entity.OutDetTB; |
| | | import com.zy.third.erp.entity.OutHedTB; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Slf4j |
| | | @Component |
| | | public class ERPInOrOutService { |
| | | |
| | | |
| | | @Autowired |
| | | private OrderService orderService; |
| | | |
| | | @Autowired |
| | | private OrderDetlService orderDetlService; |
| | | |
| | | |
| | | @Autowired |
| | | private SnowflakeIdWorker snowflakeIdWorker; |
| | | |
| | | |
| | | @Autowired |
| | | private DocTypeService docTypeService; |
| | | |
| | | |
| | | @Autowired |
| | | private MatService matService; |
| | | |
| | | |
| | | /** |
| | | * @return |
| | | */ |
| | | @Transactional(rollbackFor = Throwable.class) |
| | | public boolean createInOrder(InHedTB inHedTB, List<InDetTB> inDetTBs) { |
| | | Order order = orderService.selectByNo(inHedTB.getBillNo()); |
| | | // 如果单据不存在则添加;如果单据存在,作业中无法修改,反之则修改单据 |
| | | if (!Cools.isEmpty(order)) { |
| | | if (order.getSettle() > 1L) { |
| | | throw new CoolException(inHedTB.getBillNo() + "正在出库,无法修改单据"); |
| | | } |
| | | orderService.remove(order.getId()); |
| | | } |
| | | DocType docType = docTypeService.selectOrAdd(inHedTB.getIoKindID(), Boolean.FALSE); |
| | | Date now = new Date(); |
| | | // 单据主档 |
| | | order = new Order( |
| | | String.valueOf(snowflakeIdWorker.nextId()), // 编号[非空] |
| | | inHedTB.getBillNo(), // 订单编号 |
| | | DateUtils.convert(inHedTB.getBillDate()), // 单据日期 |
| | | docType.getDocId(), // 单据类型 |
| | | null, // 项目编号 |
| | | null, // |
| | | null, // 调拨项目编号 |
| | | null, // 初始票据号 |
| | | null, // 票据号 |
| | | inHedTB.getObjectId(), // 客户编号 |
| | | inHedTB.getObjectName(), // 客户 |
| | | null, // 联系方式 |
| | | null, // 操作人员 |
| | | null, // 合计金额 |
| | | null, // 优惠率 |
| | | null, // 优惠金额 |
| | | null, // 销售或采购费用合计 |
| | | null, // 实付金额 |
| | | null, // 付款类型 |
| | | null, // 业务员 |
| | | null, // 结算天数 |
| | | null, // 邮费支付类型 |
| | | null, // 邮费 |
| | | null, // 付款时间 |
| | | null, // 发货时间 |
| | | null, // 物流名称 |
| | | null, // 物流单号 |
| | | 1L, // 订单状态 |
| | | 1, // 状态 |
| | | 9527L, // 添加人员 |
| | | now, // 添加时间 |
| | | 9527L, // 修改人员 |
| | | inHedTB.getMakeDate(), // 修改时间 |
| | | inHedTB.getRemark() // 备注 |
| | | ); |
| | | if (!orderService.insert(order)) { |
| | | throw new CoolException("生成单据主档失败,请联系管理员"); |
| | | } |
| | | for (InDetTB outDetTB : inDetTBs) { |
| | | Mat mat = matService.selectByMatnr(outDetTB.getItemCode()); |
| | | if (Cools.isEmpty(mat)) { |
| | | throw new CoolException(outDetTB.getItemCode() + "编号商品检索失败,请先添加商品"); |
| | | } |
| | | OrderDetl orderDetl = new OrderDetl(); |
| | | orderDetl.sync(mat); |
| | | orderDetl.setOrderNo(outDetTB.getBillNo()); |
| | | orderDetl.setOutOrderNo(outDetTB.getOrderNo()); |
| | | orderDetl.setAutoId(outDetTB.getAutoId()); |
| | | orderDetl.setLuHao(outDetTB.getLuHao()); |
| | | orderDetl.setSpecs(outDetTB.getSPgNO()); |
| | | orderDetl.setPacking(outDetTB.getPacking()); |
| | | orderDetl.setWareId(outDetTB.getWareId()); |
| | | orderDetl.setWareName(outDetTB.getWareName()); |
| | | orderDetl.setBatch(outDetTB.getItemBatch()); |
| | | orderDetl.setAnfme(outDetTB.getMainNum()); |
| | | orderDetl.setINO(outDetTB.getINO()); |
| | | orderDetl.setOrderId(order.getId()); |
| | | orderDetl.setTemp1(outDetTB.getTemp1()); |
| | | orderDetl.setTemp2(outDetTB.getTemp2()); |
| | | orderDetl.setTemp3(outDetTB.getTemp3()); |
| | | orderDetl.setOrderNo(order.getOrderNo()); |
| | | orderDetl.setThreeCode(outDetTB.getDetId() + ""); |
| | | orderDetl.setCreateBy(9527L); |
| | | orderDetl.setCreateTime(now); |
| | | orderDetl.setUpdateBy(9527L); |
| | | orderDetl.setUpdateTime(now); |
| | | orderDetl.setStatus(1); |
| | | orderDetl.setQty(0.0D); |
| | | if (!orderDetlService.insert(orderDetl)) { |
| | | throw new CoolException("生成单据明细失败,请联系管理员"); |
| | | } |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * @return |
| | | */ |
| | | @Transactional(rollbackFor = Throwable.class) |
| | | public boolean createOutOrder(OutHedTB inHedTB, List<OutDetTB> inDetTBs) { |
| | | Order order = orderService.selectByNo(inHedTB.getBillNo()); |
| | | // 如果单据不存在则添加;如果单据存在,作业中无法修改,反之则修改单据 |
| | | if (!Cools.isEmpty(order)) { |
| | | if (order.getSettle() > 1L) { |
| | | throw new CoolException(inHedTB.getBillNo() + "正在出库,无法修改单据"); |
| | | } |
| | | orderService.remove(order.getId()); |
| | | } |
| | | DocType docType = docTypeService.selectOrAdd(inHedTB.getIoKindID(), Boolean.FALSE); |
| | | Date now = new Date(); |
| | | // 单据主档 |
| | | order = new Order( |
| | | String.valueOf(snowflakeIdWorker.nextId()), // 编号[非空] |
| | | inHedTB.getBillNo(), // 订单编号 |
| | | DateUtils.convert(inHedTB.getBillDate()), // 单据日期 |
| | | docType.getDocId(), // 单据类型 |
| | | null, // 项目编号 |
| | | null, // |
| | | null, // 调拨项目编号 |
| | | null, // 初始票据号 |
| | | null, // 票据号 |
| | | inHedTB.getObjectId(), // 客户编号 |
| | | inHedTB.getObjectName(), // 客户 |
| | | null, // 联系方式 |
| | | null, // 操作人员 |
| | | null, // 合计金额 |
| | | null, // 优惠率 |
| | | null, // 优惠金额 |
| | | null, // 销售或采购费用合计 |
| | | null, // 实付金额 |
| | | null, // 付款类型 |
| | | null, // 业务员 |
| | | null, // 结算天数 |
| | | null, // 邮费支付类型 |
| | | null, // 邮费 |
| | | null, // 付款时间 |
| | | null, // 发货时间 |
| | | null, // 物流名称 |
| | | null, // 物流单号 |
| | | 1L, // 订单状态 |
| | | 1, // 状态 |
| | | 9527L, // 添加人员 |
| | | now, // 添加时间 |
| | | 9527L, // 修改人员 |
| | | inHedTB.getMakeDate(), // 修改时间 |
| | | inHedTB.getRemark() // 备注 |
| | | ); |
| | | if (!orderService.insert(order)) { |
| | | throw new CoolException("生成单据主档失败,请联系管理员"); |
| | | } |
| | | for (OutDetTB outDetTB : inDetTBs) { |
| | | Mat mat = matService.selectByMatnr(outDetTB.getItemCode()); |
| | | if (Cools.isEmpty(mat)) { |
| | | throw new CoolException(outDetTB.getItemCode() + "编号商品检索失败,请先添加商品"); |
| | | } |
| | | OrderDetl orderDetl = new OrderDetl(); |
| | | orderDetl.sync(mat); |
| | | orderDetl.setOrderNo(outDetTB.getBillNo()); |
| | | orderDetl.setOutOrderNo(outDetTB.getOrderNo()); |
| | | orderDetl.setAutoId(outDetTB.getAutoId()); |
| | | orderDetl.setLuHao(outDetTB.getLuHao()); |
| | | orderDetl.setSpecs(outDetTB.getSPgNO()); |
| | | orderDetl.setPacking(outDetTB.getPacking()); |
| | | orderDetl.setWareId(outDetTB.getWareId()); |
| | | orderDetl.setWareName(outDetTB.getWareName()); |
| | | orderDetl.setBatch(outDetTB.getItemBatch()); |
| | | orderDetl.setAnfme(outDetTB.getMainNum()); |
| | | orderDetl.setINO(outDetTB.getINO()); |
| | | orderDetl.setOrderId(order.getId()); |
| | | orderDetl.setTemp1(outDetTB.getTemp1()); |
| | | orderDetl.setTemp2(outDetTB.getTemp2()); |
| | | orderDetl.setTemp3(outDetTB.getTemp3()); |
| | | orderDetl.setOrderNo(order.getOrderNo()); |
| | | orderDetl.setThreeCode(outDetTB.getDetId() + ""); |
| | | orderDetl.setCreateBy(9527L); |
| | | orderDetl.setCreateTime(now); |
| | | orderDetl.setUpdateBy(9527L); |
| | | orderDetl.setUpdateTime(now); |
| | | orderDetl.setStatus(1); |
| | | orderDetl.setQty(0.0D); |
| | | if (!orderDetlService.insert(orderDetl)) { |
| | | throw new CoolException("生成单据明细失败,请联系管理员"); |
| | | } |
| | | } |
| | | return true; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | private Boolean erpEnabled; |
| | | |
| | | @Autowired |
| | | private ERPItemSchedulerMS erpItemSchedulerMS; |
| | | private ERPItemService erpItemService; |
| | | |
| | | @Autowired |
| | | private ErpSqlServer erpSqlServer; |
| | | |
| | | |
| | | |
| | | @Transactional(rollbackFor = Throwable.class) |
| | | @Scheduled(cron = "${erp.refreshtime}") |
| | | public void ItemScheduler() { |
| | | log.info("ItemScheduler开始了"); |
| | |
| | | System.out.println(itemTB); |
| | | //00代表新增 |
| | | if (itemTB.getFlag().equals("00")) { |
| | | erpItemSchedulerMS.addToMainDatabase(itemTB); |
| | | erpItemService.addToMainDatabase(itemTB); |
| | | } |
| | | //22代表删除 |
| | | if (itemTB.getFlag().equals("22")) { |
| | | erpItemSchedulerMS.deleteFromMainDatabase(itemTB); |
| | | erpItemService.deleteFromMainDatabase(itemTB); |
| | | } |
| | | moveToBak(itemTB); |
| | | } |
File was renamed from src/main/java/com/zy/third/erp/task/ERPItemSchedulerMS.java |
| | |
| | | |
| | | @Slf4j |
| | | @Component |
| | | public class ERPItemSchedulerMS { |
| | | public class ERPItemService { |
| | | |
| | | @Autowired |
| | | private MatService matService; |
| | |
| | | } |
| | | |
| | | private Mat sync(Mat mat, ItemTB itemTB) { |
| | | mat.setThreeCode(itemTB.getItemId()); |
| | | mat.setUuid(itemTB.getItemId()); |
| | | mat.setMatnr(itemTB.getItemCode()); |
| | | mat.setMaktx(itemTB.getItemName()); |
| | | mat.setSpecs(itemTB.getItemSpc()); |
| | | mat.setUnit(itemTB.getItemUnit()); |
| | | mat.setMemo(itemTB.getRemark()); |
| | | mat.setCreateTime(itemTB.getMakeDate()); |
| | | mat.setAutoId(itemTB.getAutoId()); |
| | | mat.setTemp1(itemTB.getTemp1()); |
| | | mat.setTemp2(itemTB.getTemp2()); |
| | | mat.setTemp3(itemTB.getTemp3()); |
| | | mat.setLuHao(itemTB.getLuHao()); |
| | | mat.setSPgNO(itemTB.getSPgNO()); |
| | | mat.setOutOrderNo(itemTB.getOrderNo()); |
| | | return mat; |
| | | } |
| | | |
| | |
| | | */ |
| | | protected void deleteFromMainDatabase(ItemTB itemTB) { |
| | | EntityWrapper<Mat> matCodeEntityWrapper = new EntityWrapper<>(); |
| | | matCodeEntityWrapper.eq("matnr", itemTB.getItemId()); |
| | | matCodeEntityWrapper.eq("matnr", itemTB.getItemCode()); |
| | | matMapper.delete(matCodeEntityWrapper); |
| | | } |
| | | |
New file |
| | |
| | | package com.zy.third.erp.task; |
| | | |
| | | import com.zy.common.service.erp.ErpSqlServer; |
| | | import com.zy.third.erp.entity.InCancelTB; |
| | | import com.zy.third.erp.entity.OutCancelTB; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | |
| | | @Slf4j |
| | | @Component |
| | | public class ERPOutCancelScheduler { |
| | | |
| | | @Value("${erp.enabled}") |
| | | private Boolean erpEnabled; |
| | | |
| | | @Autowired |
| | | private ERPInOrOutCancelService inMS; |
| | | |
| | | @Autowired |
| | | private ErpSqlServer erpSqlServer; |
| | | |
| | | |
| | | @Transactional(rollbackFor = Throwable.class) |
| | | @Scheduled(cron = "${erp.refreshtime}") |
| | | public void InCancelScheduler() { |
| | | log.info("InCancelScheduler开始了"); |
| | | if (!erpEnabled) return; |
| | | String sqlInCancelTB = "select * from erp_OutCancelTB where LKName='中扬二期'"; |
| | | List<OutCancelTB> ins = erpSqlServer.select(sqlInCancelTB, OutCancelTB.class); |
| | | for (OutCancelTB in : ins) { |
| | | System.out.println(in); |
| | | com.zy.third.lk.entity.InCancelTB lkCancel = inMS.tryCancel(in.getBillNo()); |
| | | if (lkCancel != null) { |
| | | HashMap<String, String> condition = new HashMap<>(); |
| | | condition.put("BillNo", "'" + in.getBillNo() + "'"); |
| | | int delete = erpSqlServer.delete(InCancelTB.class, condition); |
| | | if (delete > 0) { |
| | | log.info("将入库取消通知单删除成功,{}", lkCancel.getBillNo()); |
| | | } else { |
| | | log.error("将入库取消通知单删除失败,{}", lkCancel.getBillNo()); |
| | | } |
| | | HashMap<String, Object> content = new HashMap<>(); |
| | | content.put("BillNo", "'" + lkCancel.getBillNo() + "'"); |
| | | content.put("opFlag", lkCancel.getOpFlag()); |
| | | int insert = erpSqlServer.insert(com.zy.third.lk.entity.InCancelTB.class, content); |
| | | if (insert > 0) { |
| | | log.info("将入库取消通知单写入成功,{}", lkCancel.getBillNo()); |
| | | } else { |
| | | log.error("将入库取消通知单写入失败,{}", lkCancel.getBillNo()); |
| | | } |
| | | } else { |
| | | log.error("将入库取消通知单写入失败"); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | package com.zy.third.erp.task; |
| | | |
| | | import com.zy.common.service.erp.ErpSqlServer; |
| | | import com.zy.third.erp.entity.InDetTB; |
| | | import com.zy.third.erp.entity.InHedTB; |
| | | import com.zy.third.erp.entity.OutDetTB; |
| | | import com.zy.third.erp.entity.OutHedTB; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | |
| | | |
| | | /** |
| | | * 入库单据 |
| | | */@Slf4j |
| | | */ |
| | | @Slf4j |
| | | @Component |
| | | public class ERPOutHedTBScheduler { |
| | | |
| | |
| | | |
| | | |
| | | @Autowired |
| | | private ERPInOrOutTBSchedulerMS inMS; |
| | | private ERPInOrOutService inMS; |
| | | |
| | | |
| | | @Autowired |
| | | private ErpSqlServer erpSqlServer; |
| | | |
| | | |
| | | @Transactional(rollbackFor = Throwable.class) |
| | | @Scheduled(cron = "${erp.refreshtime}") |
| | | public void OutHedTBScheduler() { |
| | | log.info("OutHedTBScheduler开始了"); |
| | | if (!erpEnabled) return; |
| | | String sqlInHed = "select * from erp_OutHedTB where LKName='中扬二期'"; |
| | | List<InHedTB> inHeds = erpSqlServer.select(sqlInHed, InHedTB.class); |
| | | if (inHeds.size() > 0) { |
| | | for (InHedTB inHed : inHeds) { |
| | | List<OutHedTB> inHeds = erpSqlServer.select(sqlInHed, OutHedTB.class); |
| | | if (!inHeds.isEmpty()) { |
| | | for (OutHedTB inHed : inHeds) { |
| | | System.out.println(inHed); |
| | | HashMap<String, String> condition = new HashMap<>(); |
| | | condition.put("BillNo", "'" + inHed.getBillNo() + "'"); |
| | | List<InDetTB> inDetTBS = erpSqlServer.selectList(InDetTB.class, condition); |
| | | List<OutDetTB> inDetTBS = erpSqlServer.selectList(OutDetTB.class, condition); |
| | | HashMap<String, Object> hedAndDet = new HashMap<>(); |
| | | hedAndDet.put("hed", inHed); |
| | | hedAndDet.put("det", inDetTBS); |
| | | boolean result = inMS.createOrder(inHed, inDetTBS); |
| | | boolean result = inMS.createOutOrder(inHed, inDetTBS); |
| | | if (result) { |
| | | move(hedAndDet); |
| | | } else { |
| | |
| | | } |
| | | } |
| | | |
| | | @Transactional |
| | | @Transactional(rollbackFor = Throwable.class) |
| | | public void move(HashMap<String, Object> hedAndDet) { |
| | | InHedTB hed = (InHedTB) hedAndDet.get("hed"); |
| | | ArrayList<InDetTB> dets = (ArrayList<InDetTB>) hedAndDet.get("det"); |
| | | OutHedTB hed = (OutHedTB) hedAndDet.get("hed"); |
| | | ArrayList<OutDetTB> dets = (ArrayList<OutDetTB>) hedAndDet.get("det"); |
| | | HashMap<String, String> condition = new HashMap<>(); |
| | | condition.put("BillNo", "'" + hed.getBillNo() + "'"); |
| | | erpSqlServer.delete(InHedTB.class, condition); |
| | | |
| | | for (InDetTB det : dets) { |
| | | erpSqlServer.delete(OutHedTB.class, condition); |
| | | for (OutDetTB det : dets) { |
| | | HashMap<String, String> condition2 = new HashMap<>(); |
| | | condition2.put("BillNo", "'" + det.getBillNo() + "'"); |
| | | condition2.put("iNo", String.valueOf(det.getINO())); |
| | | erpSqlServer.delete(InDetTB.class, condition2); |
| | | |
| | | erpSqlServer.delete(OutDetTB.class, condition2); |
| | | } |
| | | |
| | | } |
| | |
| | | package com.zy.third.lk.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.core.common.Cools;import io.swagger.annotations.ApiModelProperty; |
| | | import com.core.common.Cools; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | |
| | | private Date makedate; |
| | | |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @TableField("FactArea") |
| | | private String FactArea; |
| | | /** |
| | | * 供应商\客户ID |
| | | */ |
| | | @TableField("Packing") |
| | | private String Packing; |
| | | /** |
| | | * 颜色 |
| | | */ |
| | | @TableField("sColor") |
| | | private String sColor; |
| | | |
| | | /** |
| | | * 炉号\客户图号 |
| | | */ |
| | | @TableField("LuHao") |
| | | private String LuHao; |
| | | |
| | | /** |
| | | * 工单号 |
| | | */ |
| | | @TableField("sPgNO") |
| | | private String sPgNO; |
| | | |
| | | |
| | | public String getMakedate$() { |
| | | if (Cools.isEmpty(this.makedate)) { |
| | | return ""; |
New file |
| | |
| | | package com.zy.third.lk.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.core.common.Cools; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | @TableName("lk_InDetTB_bak") |
| | | public class InDetTBBak implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "AutoId", type = IdType.AUTO) |
| | | private Integer autoId; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | @TableField("BillNo") |
| | | private String BillNo; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | @TableField("iNo") |
| | | private Integer iNO; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | @TableField("DetId") |
| | | private Integer detId; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | @TableField("ItemId") |
| | | private String itemid; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | @TableField("ItemCode") |
| | | private String ItemCode; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | @TableField("ItemBatch") |
| | | private String ItemBatch; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | @TableField("proType") |
| | | private String protype; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | @TableField("OrderNo") |
| | | private String OrderNo; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | @TableField("MainNum") |
| | | private Double MainNum; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | @TableField("remark") |
| | | private String remark; |
| | | |
| | | @TableField("WareId") |
| | | private String wareId; |
| | | |
| | | @TableField("WareName") |
| | | private String wareName; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | private String temp1; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | private String temp2; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | private String temp3; |
| | | |
| | | |
| | | @ApiModelProperty(value = "") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @TableField("MakeDate") |
| | | private Date makedate; |
| | | |
| | | @TableField("DelDate") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date DelDate; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @TableField("FactArea") |
| | | private String FactArea; |
| | | /** |
| | | * 供应商\客户ID |
| | | */ |
| | | @TableField("Packing") |
| | | private String Packing; |
| | | /** |
| | | * 颜色 |
| | | */ |
| | | @TableField("sColor") |
| | | private String sColor; |
| | | |
| | | /** |
| | | * 炉号\客户图号 |
| | | */ |
| | | @TableField("LuHao") |
| | | private String LuHao; |
| | | |
| | | /** |
| | | * 工单号 |
| | | */ |
| | | @TableField("sPgNO") |
| | | private String sPgNO; |
| | | |
| | | public String getMakedate$() { |
| | | if (Cools.isEmpty(this.makedate)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.makedate); |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.third.lk.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.core.common.Cools; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | @TableName("lk_InHedTB_bak") |
| | | public class InHedTBBak implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "AutoId", type = IdType.AUTO) |
| | | private Integer autoId; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | @TableField("BillNo") |
| | | private String BillNo; |
| | | |
| | | @TableField("BillDate") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date billDate; |
| | | |
| | | /** |
| | | * StockIn:采购入库 |
| | | * ProductIn:成品入库单 |
| | | * ItemMoveIn:调拨入库 |
| | | * ItemSwitchIn:形态转换入库 |
| | | * CheckMoreIn:盘盈入库单 |
| | | */ |
| | | @ApiModelProperty(value = "StockIn:采购入库 ") |
| | | @TableField("IoKindID") |
| | | private String IoKindID; |
| | | |
| | | @TableField("IoKindName") |
| | | private String ioKindName; |
| | | |
| | | /** |
| | | * 供应商、部门ID |
| | | */ |
| | | @ApiModelProperty(value = "供应商、部门ID") |
| | | @TableField("ObjectId") |
| | | private String ObjectId; |
| | | |
| | | /** |
| | | * 供应商、部门名称 |
| | | */ |
| | | @ApiModelProperty(value = "供应商、部门名称") |
| | | @TableField("ObjectName") |
| | | private String ObjectName; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | @TableField("Remark") |
| | | private String remark; |
| | | |
| | | @TableField("WareId") |
| | | private String wareId; |
| | | |
| | | @TableField("WareName") |
| | | private String wareName; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | @TableField("Temp1") |
| | | private String temp1; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | @TableField("Temp2") |
| | | private String temp2; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | @TableField("Temp3") |
| | | private String temp3; |
| | | |
| | | @ApiModelProperty(value = "") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @TableField("MakeDate") |
| | | private Date makedate; |
| | | |
| | | @TableField("DelDate") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date delDate; |
| | | |
| | | |
| | | @TableField("bPass") |
| | | private Boolean bPass; |
| | | |
| | | @TableField("bStartIn") |
| | | private Boolean bStartIn; |
| | | |
| | | public String getMakedate$() { |
| | | if (Cools.isEmpty(this.makedate)) { |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.makedate); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | @Data |
| | | @NoArgsConstructor |
| | | @AllArgsConstructor |
| | | @TableName("lk_OutDetTb") |
| | | @TableName("lk_OutDetTB") |
| | | public class OutDetTB implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | |
| | | @TableField("DelDate") |
| | | private Date delDate; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @TableField("FactArea") |
| | | private String FactArea; |
| | | /** |
| | | * 供应商\客户ID |
| | | */ |
| | | @TableField("Packing") |
| | | private String Packing; |
| | | /** |
| | | * 颜色 |
| | | */ |
| | | @TableField("sColor") |
| | | private String sColor; |
| | | |
| | | /** |
| | | * 炉号\客户图号 |
| | | */ |
| | | @TableField("LuHao") |
| | | private String LuHao; |
| | | |
| | | /** |
| | | * 工单号 |
| | | */ |
| | | @TableField("sPgNO") |
| | | private String sPgNO; |
| | | |
| | | |
| | | public String getMakedate$() { |
| | | if (Cools.isEmpty(this.makedate)) { |
| | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @TableName("lk_OutDetTb_bak") |
| | | @TableName("lk_OutDetTB_bak") |
| | | @Data |
| | | public class OutDetTBBak implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date delDate; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @TableField("FactArea") |
| | | private String FactArea; |
| | | /** |
| | | * 供应商\客户ID |
| | | */ |
| | | @TableField("Packing") |
| | | private String Packing; |
| | | /** |
| | | * 颜色 |
| | | */ |
| | | @TableField("sColor") |
| | | private String sColor; |
| | | |
| | | /** |
| | | * 炉号\客户图号 |
| | | */ |
| | | @TableField("LuHao") |
| | | private String LuHao; |
| | | |
| | | /** |
| | | * 工单号 |
| | | */ |
| | | @TableField("sPgNO") |
| | | private String sPgNO; |
| | | |
| | | public String getMakedate$() { |
| | | if (Cools.isEmpty(this.makedate)) { |
| | |
| | | package com.zy.third.lk.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.core.common.Cools;import io.swagger.annotations.ApiModelProperty; |
| | | import com.core.common.Cools; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | |
| | |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @TableName("lk_OutHedTb_bak") |
| | |
| | | |
| | | /** |
| | | * SendMatOut:发料出库 |
| | | OtherOut:其它出库单 |
| | | ItemMoveOut:调拨出库 |
| | | ItemSwitchOut:形态转换出库 |
| | | CheckLossOut:盘盈出库单 |
| | | |
| | | * OtherOut:其它出库单 |
| | | * ItemMoveOut:调拨出库 |
| | | * ItemSwitchOut:形态转换出库 |
| | | * CheckLossOut:盘盈出库单 |
| | | */ |
| | | @ApiModelProperty(value= "SendMatOut:发料出库 ") |
| | | @TableField("IoKindID") |
| | |
| | | private Boolean bStartIn; |
| | | |
| | | |
| | | |
| | | public String getMakedate$(){ |
| | | if (Cools.isEmpty(this.makedate)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.makedate); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | package com.zy.third.lk.task; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.Cools; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.DocType; |
| | | import com.zy.asrs.entity.Mat; |
| | | import com.zy.asrs.entity.Order; |
| | | import com.zy.asrs.entity.OrderDetl; |
| | | import com.zy.asrs.entity.param.OpenOrderCompleteParam; |
| | | import com.zy.asrs.entity.result.OpenOrderCompeteResult; |
| | | import com.zy.asrs.service.DocTypeService; |
| | | import com.zy.asrs.service.MatService; |
| | | import com.zy.asrs.service.OrderDetlService; |
| | | import com.zy.asrs.service.OrderService; |
| | | import com.zy.common.model.DetlDto; |
| | | import com.zy.common.service.erp.ErpSqlServer; |
| | | import com.zy.third.lk.entity.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 入库更新完成回报 |
| | |
| | | @Autowired |
| | | private ErpSqlServer erpSqlServer; |
| | | |
| | | @Transactional |
| | | @Transactional(rollbackFor = Throwable.class) |
| | | @Scheduled(cron = "${erp.refreshtime}") |
| | | public void pakinOrderComplete() { |
| | | log.info("开始入库更新完成回报"); |
| | |
| | | * @param orderDetl |
| | | * @return |
| | | */ |
| | | @Transactional |
| | | @Transactional(rollbackFor = Throwable.class) |
| | | public boolean insertInDet(OrderDetl orderDetl) { |
| | | String sqlInDetTb = "select * from lk_InDetTB where BillNo='" + orderDetl.getOrderNo() + "' and " + |
| | | " ItemId='" + orderDetl.getMatnr() + "' and ItemBatch='" + orderDetl.getBatch() + "' and proType='" + orderDetl.getSpecs() + "'"; |
| | | List<InDetTB> inDets = erpSqlServer.select(sqlInDetTb, InDetTB.class); |
| | | String sqlInDetTbBak = "select * from lk_InDetTB_Bak where BillNo='" + orderDetl.getOrderNo() + "' and " + |
| | | " ItemId='" + orderDetl.getMatnr() + "' and ItemBatch='" + orderDetl.getBatch() + "' and proType='" + orderDetl.getSpecs() + "'"; |
| | | List<InDetTB> inDetBaks = erpSqlServer.select(sqlInDetTbBak, InDetTB.class); |
| | | if (inDets.size() > 0 || inDetBaks.size() > 0) { |
| | | List<InDetTBBak> inDetBaks = erpSqlServer.select(sqlInDetTbBak, InDetTBBak.class); |
| | | if (!inDets.isEmpty() || !inDetBaks.isEmpty()) { |
| | | log.error("该单号料号中间表表身已存在:" + orderDetl.getOrderNo() + "==>>" + orderDetl.getOrderNo()); |
| | | return true; |
| | | } |
| | | Mat mat = matService.selectByMatnr(orderDetl.getMatnr()); |
| | | HashMap<String, Object> content = new HashMap<>(); |
| | | content.put("BillNo", "'" + orderDetl.getOrderNo() + "'"); |
| | | content.put("ItemId", "'" + orderDetl.getThreeCode() + "'"); |
| | | content.put("ItemCode", "'" + orderDetl.getMatnr() + "'"); |
| | | content.put("proType", "'" + orderDetl.getSpecs() + "'"); |
| | | content.put("remark", "'" + orderDetl.getMemo() + "'"); |
| | | content.put("OrderNo", "'" + orderDetl.getOutOrderNo() + "'"); |
| | | content.put("ItemBatch", "'" + orderDetl.getBatch() + "'"); |
| | | content.put("iNo", orderDetl.getId()); |
| | | content.put("DetId", orderDetl.getAutoId()); |
| | | content.put("MainNum", orderDetl.getQty()); |
| | | content.put("LKName", "'中扬二期'"); |
| | | Map<String, Object> content = getMap(orderDetl); |
| | | int insert = erpSqlServer.insert(InDetTB.class, content); |
| | | |
| | | if (insert == 1) { |
| | | log.info("入库单表身回传成功:" + content.toString()); |
| | | log.info("入库单表身回传成功:{}", content); |
| | | return true; |
| | | } else { |
| | | log.error("入库回传失败,实体类打印:" + content.toString()); |
| | | log.error("入库回传失败,实体类打印:{}", content); |
| | | return false; |
| | | } |
| | | |
| | |
| | | * @param order |
| | | * @return |
| | | */ |
| | | @Transactional |
| | | @Transactional(rollbackFor = Throwable.class) |
| | | public boolean insertInHed(Order order) { |
| | | String sqlInHedTb = "select * from lk_InHedTB where LKName='中扬二期' and BillNo='" + order.getOrderNo() + "'"; |
| | | List<InHedTB> outHeds = erpSqlServer.select(sqlInHedTb, InHedTB.class); |
| | | String sqlInHedTbBak = "select * from lk_InHedTB_Bak where LKName='中扬二期' and BillNo='" + order.getOrderNo() + "'"; |
| | | List<InHedTB> inHedBaks = erpSqlServer.select(sqlInHedTbBak, InHedTB.class); |
| | | if (outHeds.size() > 0 || inHedBaks.size() > 0) { |
| | | List<InHedTBBak> inHedBaks = erpSqlServer.select(sqlInHedTbBak, InHedTBBak.class); |
| | | if (!outHeds.isEmpty() || !inHedBaks.isEmpty()) { |
| | | log.error("该单号料号中间表表头已存在:" + order.getOrderNo()); |
| | | return true; |
| | | } |
| | |
| | | content.put("ObjectId", "'" + order.getCstmr() + "'"); |
| | | content.put("ObjectName", "'" + order.getCstmrName() + "'"); |
| | | content.put("Remark", "'" + order.getMemo() + "'"); |
| | | content.put("LKName", "'中扬'"); |
| | | content.put("LKName", "'中扬二期'"); |
| | | int insert = erpSqlServer.insert(InHedTB.class, content); |
| | | String sql = "UPDATE lk_InHedTB SET bPass = 1, LKName='中扬二期' WHERE BillNo = '" + order.getOrderNo() + "'"; |
| | | int update = erpSqlServer.update(sql); |
| | | if (update == 1) { |
| | | log.info("入库单表头回传成功:" + content.toString()); |
| | | log.info("入库单表头回传成功:" + content); |
| | | return true; |
| | | } else { |
| | | log.error("入库单表头回传失败:" + content.toString()); |
| | | log.error("入库单表头回传失败:" + content); |
| | | return false; |
| | | } |
| | | } |
| | |
| | | * @param orderDetl |
| | | * @return |
| | | */ |
| | | @Transactional |
| | | @Transactional(rollbackFor = Throwable.class) |
| | | public boolean insertOutDet(OrderDetl orderDetl) { |
| | | String sqlInDetTb = "select * from lk_OutDetTB where BillNo='" + orderDetl.getOrderNo() + "' and " + |
| | | " ItemId='" + orderDetl.getMatnr() + "' and ItemBatch='" + orderDetl.getBatch() + "' and proType='" + orderDetl.getSpecs() + "'"; |
| | |
| | | String sqlInDetTbBak = "select * from lk_OutDetTB_Bak where BillNo='" + orderDetl.getOrderNo() + "' and " + |
| | | " ItemId='" + orderDetl.getMatnr() + "' and ItemBatch='" + orderDetl.getBatch() + "' and proType='" + orderDetl.getSpecs() + "'"; |
| | | List<OutDetTBBak> inDetBaks = erpSqlServer.select(sqlInDetTbBak, OutDetTBBak.class); |
| | | if (inDets.size() > 0 || inDetBaks.size() > 0) { |
| | | if (!inDets.isEmpty() || !inDetBaks.isEmpty()) { |
| | | log.error("该单号料号中间表表身已存在:" + orderDetl.getOrderNo() + "==>>" + orderDetl.getOrderNo()); |
| | | return true; |
| | | } |
| | | Mat mat = matService.selectByMatnr(orderDetl.getMatnr()); |
| | | HashMap<String, Object> content = new HashMap<>(); |
| | | content.put("BillNo", "'" + orderDetl.getOrderNo() + "'"); |
| | | content.put("ItemId", "'" + orderDetl.getThreeCode() + "'"); |
| | | content.put("ItemCode", "'" + orderDetl.getMatnr() + "'"); |
| | | content.put("proType", "'" + orderDetl.getSpecs() + "'"); |
| | | content.put("remark", "'" + orderDetl.getMemo() + "'"); |
| | | content.put("OrderNo", "'" + orderDetl.getOutOrderNo() + "'"); |
| | | content.put("ItemBatch", "'" + orderDetl.getBatch() + "'"); |
| | | content.put("iNo", orderDetl.getId()); |
| | | content.put("DetId", orderDetl.getAutoId()); |
| | | content.put("MainNum", orderDetl.getQty()); |
| | | content.put("LKName", "'中扬二期'"); |
| | | Map<String, Object> content = getMap(orderDetl); |
| | | int insert = erpSqlServer.insert(InDetTB.class, content); |
| | | |
| | | if (insert == 1) { |
| | |
| | | * @param order |
| | | * @return |
| | | */ |
| | | @Transactional |
| | | @Transactional(rollbackFor = Throwable.class) |
| | | public boolean insertOutHed(Order order) { |
| | | String sqlInHedTb = "select * from lk_OutHedTB where LKName='中扬二期' and BillNo='" + order.getOrderNo() + "'"; |
| | | List<OutHedTB> outHeds = erpSqlServer.select(sqlInHedTb, OutHedTB.class); |
| | | String sqlInHedTbBak = "select * from lk_OutHedTB_Bak where LKName='中扬二期' and BillNo='" + order.getOrderNo() + "'"; |
| | | List<OutHedTBBak> inHedBaks = erpSqlServer.select(sqlInHedTbBak, OutHedTBBak.class); |
| | | if (outHeds.size() > 0 || inHedBaks.size() > 0) { |
| | | if (!outHeds.isEmpty() || !inHedBaks.isEmpty()) { |
| | | log.error("该单号料号中间表表头已存在:" + order.getOrderNo()); |
| | | return true; |
| | | } |
| | |
| | | content.put("ObjectId", "'" + order.getCstmr() + "'"); |
| | | content.put("ObjectName", "'" + order.getCstmrName() + "'"); |
| | | content.put("Remark", "'" + order.getMemo() + "'"); |
| | | content.put("LKName", "'中扬'"); |
| | | int insert = erpSqlServer.insert(InHedTB.class, content); |
| | | String sql = "UPDATE lk_InHedTB SET bPass = 1, LKName='中扬二期' WHERE BillNo = '" + order.getOrderNo() + "'"; |
| | | content.put("LKName", "'中扬二期'"); |
| | | int insert = erpSqlServer.insert(OutHedTB.class, content); |
| | | String sql = "UPDATE lk_OutHedTB SET bPass = 1, LKName='中扬二期' WHERE BillNo = '" + order.getOrderNo() + "'"; |
| | | int update = erpSqlServer.update(sql); |
| | | if (update == 1) { |
| | | log.info("入库单表头回传成功:" + content.toString()); |
| | | log.info("入库单表头回传成功:" + content); |
| | | return true; |
| | | } else { |
| | | log.error("入库单表头回传失败:" + content.toString()); |
| | | log.error("入库单表头回传失败:" + content); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | private Map<String, Object> getMap(OrderDetl orderDetl) { |
| | | Map<String, Object> content = new HashMap<>(); |
| | | content.put("BillNo", "'" + orderDetl.getOrderNo() + "'"); |
| | | content.put("iNO", "'" + orderDetl.getINO() + "'"); |
| | | content.put("detId", orderDetl.getThreeCode()); |
| | | content.put("ItemId", "'" + orderDetl.getThreeCode() + "'"); |
| | | content.put("ItemCode", "'" + orderDetl.getMatnr() + "'"); |
| | | content.put("ItemBatch", "'" + orderDetl.getBatch() + "'"); |
| | | content.put("proType", "'" + orderDetl.getProType() + "'"); |
| | | content.put("remark", "'" + orderDetl.getMemo() + "'"); |
| | | content.put("OrderNo", "'" + orderDetl.getOutOrderNo() + "'"); |
| | | content.put("MainNum", orderDetl.getQty()); |
| | | content.put("WareId", "'" + orderDetl.getWareId() + "'"); |
| | | content.put("WareName", "'" + orderDetl.getWareName() + "'"); |
| | | content.put("Packing", "'" + orderDetl.getPacking() + "'"); |
| | | content.put("LuHao", "'" + orderDetl.getLuHao() + "'"); |
| | | content.put("sPgNO", "'" + orderDetl.getSPgNO() + "'"); |
| | | content.put("temp1", "'" + orderDetl.getTemp1() + "'"); |
| | | content.put("temp2", "'" + orderDetl.getTemp2() + "'"); |
| | | content.put("temp3", "'" + orderDetl.getTemp3() + "'"); |
| | | content.put("LKName", "'中扬二期'"); |
| | | return content; |
| | | } |
| | | } |
New file |
| | |
| | | ALTER TABLE [dbo].[man_mat] ADD [temp1] varchar(255) NULL |
| | | GO |
| | | |
| | | ALTER TABLE [dbo].[man_mat] ADD [temp2] varchar(255) NULL |
| | | GO |
| | | |
| | | ALTER TABLE [dbo].[man_mat] ADD [temp3] varchar(255) NULL |
| | | |
| | | |
| | | ALTER TABLE [dbo].[man_order] ALTER COLUMN [cstmr] varchar(50) NULL |
| | | |
| | | ALTER TABLE [dbo].[man_order_log] ALTER COLUMN [cstmr] varchar(50) NULL |
| | | |
| | | |
| | | ALTER TABLE [dbo].[man_order_detl] ADD [auto_id] int NULL |
| | | GO |
| | | |
| | | ALTER TABLE [dbo].[man_order_detl] ADD [out_order_no] varchar(255) NULL |
| | | GO |
| | | |
| | | ALTER TABLE [dbo].[man_order_detl] ADD [lu_hao] varchar(255) NULL |
| | | GO |
| | | |
| | | ALTER TABLE [dbo].[man_order_detl] ADD [ware_id] varchar(255) NULL |
| | | GO |
| | | |
| | | ALTER TABLE [dbo].[man_order_detl] ADD [ware_name] varchar(255) NULL |
| | | GO |
| | | |
| | | ALTER TABLE [dbo].[man_order_detl] ADD [packing] varchar(255) NULL |
| | | GO |
| | | |
| | | ALTER TABLE [dbo].[man_order_detl] ADD [pg_no] varchar(255) NULL |
| | | GO |
| | | |
| | | ALTER TABLE [dbo].[man_order_detl] ADD [temp1] varchar(255) NULL |
| | | GO |
| | | |
| | | ALTER TABLE [dbo].[man_order_detl] ADD [temp2] varchar(255) NULL |
| | | GO |
| | | |
| | | ALTER TABLE [dbo].[man_order_detl] ADD [temp3] varchar(255) NULL |
| | | GO |
| | | |
| | | ALTER TABLE [dbo].[man_order_detl] ADD [pro_type] varchar(255) NULL |
| | | GO |
| | | |
| | | EXEC sp_addextendedproperty |
| | | 'MS_Description', N'外部主键id', |
| | | 'SCHEMA', N'dbo', |
| | | 'TABLE', N'man_order_detl', |
| | | 'COLUMN', N'auto_id' |
| | | GO |
| | | |
| | | EXEC sp_addextendedproperty |
| | | 'MS_Description', N'订单号 ', |
| | | 'SCHEMA', N'dbo', |
| | | 'TABLE', N'man_order_detl', |
| | | 'COLUMN', N'out_order_no' |
| | | GO |
| | | |
| | | EXEC sp_addextendedproperty |
| | | 'MS_Description', N'炉号\客户图号', |
| | | 'SCHEMA', N'dbo', |
| | | 'TABLE', N'man_order_detl', |
| | | 'COLUMN', N'lu_hao' |
| | | GO |
| | | |
| | | EXEC sp_addextendedproperty |
| | | 'MS_Description', N'仓库ID', |
| | | 'SCHEMA', N'dbo', |
| | | 'TABLE', N'man_order_detl', |
| | | 'COLUMN', N'ware_id' |
| | | GO |
| | | |
| | | EXEC sp_addextendedproperty |
| | | 'MS_Description', N'仓库', |
| | | 'SCHEMA', N'dbo', |
| | | 'TABLE', N'man_order_detl', |
| | | 'COLUMN', N'ware_name' |
| | | GO |
| | | |
| | | EXEC sp_addextendedproperty |
| | | 'MS_Description', N'供应商\客户ID', |
| | | 'SCHEMA', N'dbo', |
| | | 'TABLE', N'man_order_detl', |
| | | 'COLUMN', N'packing' |
| | | GO |
| | | |
| | | EXEC sp_addextendedproperty |
| | | 'MS_Description', N'工单号', |
| | | 'SCHEMA', N'dbo', |
| | | 'TABLE', N'man_order_detl', |
| | | 'COLUMN', N'pg_no' |
| | | GO |
| | | |
| | | EXEC sp_addextendedproperty |
| | | 'MS_Description', N'备用字段', |
| | | 'SCHEMA', N'dbo', |
| | | 'TABLE', N'man_order_detl', |
| | | 'COLUMN', N'temp1' |
| | | GO |
| | | |
| | | EXEC sp_addextendedproperty |
| | | 'MS_Description', N'备用字段', |
| | | 'SCHEMA', N'dbo', |
| | | 'TABLE', N'man_order_detl', |
| | | 'COLUMN', N'temp2' |
| | | GO |
| | | |
| | | EXEC sp_addextendedproperty |
| | | 'MS_Description', N'备用字段', |
| | | 'SCHEMA', N'dbo', |
| | | 'TABLE', N'man_order_detl', |
| | | 'COLUMN', N'temp3' |
| | | GO |
| | | |
| | | EXEC sp_addextendedproperty |
| | | 'MS_Description', N'属性', |
| | | 'SCHEMA', N'dbo', |
| | | 'TABLE', N'man_order_detl', |
| | | 'COLUMN', N'pro_type' |
| | | |
| | | |
| | | ALTER TABLE [dbo].[man_order_detl_log] ADD [auto_id] int NULL |
| | | GO |
| | | |
| | | ALTER TABLE [dbo].[man_order_detl_log] ADD [out_order_no] varchar(255) NULL |
| | | GO |
| | | |
| | | ALTER TABLE [dbo].[man_order_detl_log] ADD [lu_hao] varchar(255) NULL |
| | | GO |
| | | |
| | | ALTER TABLE [dbo].[man_order_detl_log] ADD [ware_id] varchar(255) NULL |
| | | GO |
| | | |
| | | ALTER TABLE [dbo].[man_order_detl_log] ADD [ware_name] varchar(255) NULL |
| | | GO |
| | | |
| | | ALTER TABLE [dbo].[man_order_detl_log] ADD [packing] varchar(255) NULL |
| | | GO |
| | | |
| | | ALTER TABLE [dbo].[man_order_detl_log] ADD [pg_no] varchar(255) NULL |
| | | GO |
| | | |
| | | ALTER TABLE [dbo].[man_order_detl_log] ADD [temp1] varchar(255) NULL |
| | | GO |
| | | |
| | | ALTER TABLE [dbo].[man_order_detl_log] ADD [temp2] varchar(255) NULL |
| | | GO |
| | | |
| | | ALTER TABLE [dbo].[man_order_detl_log] ADD [temp3] varchar(255) NULL |
| | | GO |
| | | |
| | | ALTER TABLE [dbo].[man_order_detl_log] ADD [pro_type] varchar(255) NULL |
| | | GO |
| | | |
| | | |
| | | |
| | | |
| | | ALTER TABLE [dbo].[man_doc_type] ADD [doc_code] varchar(255) NULL |
| | | |
| | | |
| | | |
| | | ALTER TABLE [dbo].[man_order_detl] ADD [i_no] int NULL |
| | | |
| | | |
| | | ALTER TABLE [dbo].[man_order_detl_log] ADD [i_no] int NULL |
| | |
| | | </choose> |
| | | </update> |
| | | |
| | | |
| | | <select id="listByOrderNo" resultMap="BaseResultMap"> |
| | | select * from man_order_detl |
| | | where 1=1 |
| | | and order_no = #{orderNo} |
| | | </select> |
| | | </mapper> |