diff --git a/doc/设计文档/数据库设计/mes-wm.sql b/doc/设计文档/数据库设计/mes-wm.sql index 314b076..39ef654 100644 --- a/doc/设计文档/数据库设计/mes-wm.sql +++ b/doc/设计文档/数据库设计/mes-wm.sql @@ -846,7 +846,7 @@ create table wm_rt_salse_line ( -- ---------------------------- --- 12、条码清单表 +-- 18、条码清单表 -- ---------------------------- drop table if exists wm_barcode; create table wm_barcode ( @@ -872,7 +872,87 @@ create table wm_barcode ( ) engine=innodb auto_increment=200 comment = '条码清单表'; +-- ---------------------------- +-- 19、装箱单表 +-- ---------------------------- +drop table if exists wm_package; +create table wm_package ( + package_id bigint(20) not null auto_increment comment '装箱单ID', + parent_id bigint(20) not null default 0 comment '父箱ID', + ancestors varchar(255) not null comment '所有父节点ID', + package_code varchar(64) comment '装箱单编号', + barcode_id bigint(20) comment '条码ID', + barcode_content varchar(255) comment '条码内容', + barcode_url varchar(255) comment '条码地址', + package_date datetime not null comment '装箱日期', + so_code varchar(64) comment '销售订单编号', + invoice_code varchar(255) comment '发票编号', + client_id bigint(20) comment '客户ID', + client_code varchar(64) comment '客户编码', + client_name varchar(255) comment '客户名称', + client_nick varchar(255) comment '客户简称', + package_length double(12,4) comment '箱长度', + package_width double(12,4) comment '箱宽度', + package_height double(12,4) comment '箱高度', + size_unit varchar(64) comment '尺寸单位', + net_weight double(12,4) comment '净重', + cross_weight double(12,4) comment '毛重', + weight_unit varchar(64) comment '重量单位', + inspector varchar(64) comment '检查员用户名', + inspector_name varchar(64) comment '检查员名称', + enable_flag char(1) default 'Y' comment '是否生效', + remark varchar(500) default '' comment '备注', + attr1 varchar(64) default null comment '预留字段1', + attr2 varchar(255) default null comment '预留字段2', + attr3 int(11) default 0 comment '预留字段3', + attr4 int(11) default 0 comment '预留字段4', + create_by varchar(64) default '' comment '创建者', + create_time datetime comment '创建时间', + update_by varchar(64) default '' comment '更新者', + update_time datetime comment '更新时间', + primary key (package_id) +) engine=innodb auto_increment=200 comment = '装箱单表'; +-- ---------------------------- +-- 20、装箱明细表 +-- ---------------------------- +drop table if exists wm_package_line; +create table wm_package_line ( + line_id bigint(20) not null auto_increment comment '明细行ID', + package_id bigint(20) not null comment '装箱单ID', + material_stock_id bigint(20) comment '库存记录ID', + item_id bigint(20) not null comment '产品物料ID', + item_code varchar(64) comment '产品物料编码', + item_name varchar(255) comment '产品物料名称', + specification varchar(500) comment '规格型号', + unit_of_measure varchar(64) comment '单位', + quantity_package double(12,2) not null comment '装箱数量', + workorder_id bigint(20) comment '生产工单ID', + workorder_code varchar(64) comment '生产工单编号', + batch_code varchar(255) comment '批次号', + warehouse_id bigint(20) comment '仓库ID', + warehouse_code varchar(64) comment '仓库编码', + warehouse_name varchar(255) comment '仓库名称', + location_id bigint(20) comment '库区ID', + location_code varchar(64) comment '库区编码', + location_name varchar(255) comment '库区名称', + area_id bigint(20) comment '库位ID', + area_code varchar(64) comment '库位编码', + area_name varchar(255) comment '库位名称', + expire_date datetime comment '有效期', + remark varchar(500) default '' comment '备注', + attr1 varchar(64) default null comment '预留字段1', + attr2 varchar(255) default null comment '预留字段2', + attr3 int(11) default 0 comment '预留字段3', + attr4 int(11) default 0 comment '预留字段4', + create_by varchar(64) default '' comment '创建者', + create_time datetime comment '创建时间', + update_by varchar(64) default '' comment '更新者', + update_time datetime comment '更新时间', + primary key (line_id) +) engine=innodb auto_increment=200 comment = '装箱明细表'; + + diff --git a/doc/设计文档/数据库设计/数据库设计.xlsx b/doc/设计文档/数据库设计/数据库设计.xlsx index deb8e9a..40b0a05 100644 Binary files a/doc/设计文档/数据库设计/数据库设计.xlsx and b/doc/设计文档/数据库设计/数据库设计.xlsx differ diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/controller/WmPackageController.java b/ktg-mes/src/main/java/com/ktg/mes/wm/controller/WmPackageController.java new file mode 100644 index 0000000..47b7e7f --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/wm/controller/WmPackageController.java @@ -0,0 +1,112 @@ +package com.ktg.mes.wm.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +import com.ktg.common.constant.UserConstants; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.ktg.common.annotation.Log; +import com.ktg.common.core.controller.BaseController; +import com.ktg.common.core.domain.AjaxResult; +import com.ktg.common.enums.BusinessType; +import com.ktg.mes.wm.domain.WmPackage; +import com.ktg.mes.wm.service.IWmPackageService; +import com.ktg.common.utils.poi.ExcelUtil; +import com.ktg.common.core.page.TableDataInfo; + +/** + * 装箱单Controller + * + * @author yinjinlu + * @date 2022-10-10 + */ +@RestController +@RequestMapping("/mes/wm/package") +public class WmPackageController extends BaseController +{ + @Autowired + private IWmPackageService wmPackageService; + + /** + * 查询装箱单列表 + */ + @PreAuthorize("@ss.hasPermi('mes:wm:package:list')") + @GetMapping("/list") + public TableDataInfo list(WmPackage wmPackage) + { + startPage(); + List list = wmPackageService.selectWmPackageList(wmPackage); + return getDataTable(list); + } + + /** + * 导出装箱单列表 + */ + @PreAuthorize("@ss.hasPermi('mes:wm:package:export')") + @Log(title = "装箱单", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, WmPackage wmPackage) + { + List list = wmPackageService.selectWmPackageList(wmPackage); + ExcelUtil util = new ExcelUtil(WmPackage.class); + util.exportExcel(response, list, "装箱单数据"); + } + + /** + * 获取装箱单详细信息 + */ + @PreAuthorize("@ss.hasPermi('mes:wm:package:query')") + @GetMapping(value = "/{packageId}") + public AjaxResult getInfo(@PathVariable("packageId") Long packageId) + { + return AjaxResult.success(wmPackageService.selectWmPackageByPackageId(packageId)); + } + + /** + * 新增装箱单 + */ + @PreAuthorize("@ss.hasPermi('mes:wm:package:add')") + @Log(title = "装箱单", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody WmPackage wmPackage) + { + if(UserConstants.NOT_UNIQUE.equals(wmPackageService.checkPackgeCodeUnique(wmPackage))){ + return AjaxResult.error("装箱单编号已存在!"); + } + return toAjax(wmPackageService.insertWmPackage(wmPackage)); + } + + /** + * 修改装箱单 + */ + @PreAuthorize("@ss.hasPermi('mes:wm:package:edit')") + @Log(title = "装箱单", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody WmPackage wmPackage) + { + if(UserConstants.NOT_UNIQUE.equals(wmPackageService.checkPackgeCodeUnique(wmPackage))){ + return AjaxResult.error("装箱单编号已存在!"); + } + return toAjax(wmPackageService.updateWmPackage(wmPackage)); + } + + /** + * 删除装箱单 + */ + @PreAuthorize("@ss.hasPermi('mes:wm:package:remove')") + @Log(title = "装箱单", businessType = BusinessType.DELETE) + @DeleteMapping("/{packageIds}") + public AjaxResult remove(@PathVariable Long[] packageIds) + { + return toAjax(wmPackageService.deleteWmPackageByPackageIds(packageIds)); + } +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmPackage.java b/ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmPackage.java new file mode 100644 index 0000000..cd53f39 --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmPackage.java @@ -0,0 +1,420 @@ +package com.ktg.mes.wm.domain; + +import java.math.BigDecimal; +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ktg.common.annotation.Excel; +import com.ktg.common.core.domain.BaseEntity; + +/** + * 装箱单对象 wm_package + * + * @author yinjinlu + * @date 2022-10-10 + */ +public class WmPackage extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 装箱单ID */ + private Long packageId; + + /** 父箱ID */ + @Excel(name = "父箱ID") + private Long parentId; + + /** 所有父节点ID */ + @Excel(name = "所有父节点ID") + private String ancestors; + + /** 装箱单编号 */ + @Excel(name = "装箱单编号") + private String packageCode; + + /** 条码ID */ + @Excel(name = "条码ID") + private Long barcodeId; + + /** 条码内容 */ + @Excel(name = "条码内容") + private String barcodeContent; + + /** 条码地址 */ + @Excel(name = "条码地址") + private String barcodeUrl; + + /** 装箱日期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "装箱日期", width = 30, dateFormat = "yyyy-MM-dd") + private Date packageDate; + + /** 销售订单编号 */ + @Excel(name = "销售订单编号") + private String soCode; + + /** 发票编号 */ + @Excel(name = "发票编号") + private String invoiceCode; + + /** 客户ID */ + @Excel(name = "客户ID") + private Long clientId; + + /** 客户编码 */ + @Excel(name = "客户编码") + private String clientCode; + + /** 客户名称 */ + @Excel(name = "客户名称") + private String clientName; + + /** 客户简称 */ + @Excel(name = "客户简称") + private String clientNick; + + /** 箱长度 */ + @Excel(name = "箱长度") + private BigDecimal packageLength; + + /** 箱宽度 */ + @Excel(name = "箱宽度") + private BigDecimal packageWidth; + + /** 箱高度 */ + @Excel(name = "箱高度") + private BigDecimal packageHeight; + + /** 尺寸单位 */ + @Excel(name = "尺寸单位") + private String sizeUnit; + + /** 净重 */ + @Excel(name = "净重") + private BigDecimal netWeight; + + /** 毛重 */ + @Excel(name = "毛重") + private BigDecimal crossWeight; + + /** 重量单位 */ + @Excel(name = "重量单位") + private String weightUnit; + + /** 检查员用户名 */ + @Excel(name = "检查员用户名") + private String inspector; + + /** 检查员名称 */ + @Excel(name = "检查员名称") + private String inspectorName; + + /** 是否生效 */ + @Excel(name = "是否生效") + private String enableFlag; + + /** 预留字段1 */ + private String attr1; + + /** 预留字段2 */ + private String attr2; + + /** 预留字段3 */ + private Long attr3; + + /** 预留字段4 */ + private Long attr4; + + public void setPackageId(Long packageId) + { + this.packageId = packageId; + } + + public Long getPackageId() + { + return packageId; + } + public void setParentId(Long parentId) + { + this.parentId = parentId; + } + + public Long getParentId() + { + return parentId; + } + public void setAncestors(String ancestors) + { + this.ancestors = ancestors; + } + + public String getAncestors() + { + return ancestors; + } + public void setPackageCode(String packageCode) + { + this.packageCode = packageCode; + } + + public String getPackageCode() + { + return packageCode; + } + public void setBarcodeId(Long barcodeId) + { + this.barcodeId = barcodeId; + } + + public Long getBarcodeId() + { + return barcodeId; + } + public void setBarcodeContent(String barcodeContent) + { + this.barcodeContent = barcodeContent; + } + + public String getBarcodeContent() + { + return barcodeContent; + } + public void setBarcodeUrl(String barcodeUrl) + { + this.barcodeUrl = barcodeUrl; + } + + public String getBarcodeUrl() + { + return barcodeUrl; + } + public void setPackageDate(Date packageDate) + { + this.packageDate = packageDate; + } + + public Date getPackageDate() + { + return packageDate; + } + public void setSoCode(String soCode) + { + this.soCode = soCode; + } + + public String getSoCode() + { + return soCode; + } + public void setInvoiceCode(String invoiceCode) + { + this.invoiceCode = invoiceCode; + } + + public String getInvoiceCode() + { + return invoiceCode; + } + public void setClientId(Long clientId) + { + this.clientId = clientId; + } + + public Long getClientId() + { + return clientId; + } + public void setClientCode(String clientCode) + { + this.clientCode = clientCode; + } + + public String getClientCode() + { + return clientCode; + } + public void setClientName(String clientName) + { + this.clientName = clientName; + } + + public String getClientName() + { + return clientName; + } + public void setClientNick(String clientNick) + { + this.clientNick = clientNick; + } + + public String getClientNick() + { + return clientNick; + } + public void setPackageLength(BigDecimal packageLength) + { + this.packageLength = packageLength; + } + + public BigDecimal getPackageLength() + { + return packageLength; + } + public void setPackageWidth(BigDecimal packageWidth) + { + this.packageWidth = packageWidth; + } + + public BigDecimal getPackageWidth() + { + return packageWidth; + } + public void setPackageHeight(BigDecimal packageHeight) + { + this.packageHeight = packageHeight; + } + + public BigDecimal getPackageHeight() + { + return packageHeight; + } + public void setSizeUnit(String sizeUnit) + { + this.sizeUnit = sizeUnit; + } + + public String getSizeUnit() + { + return sizeUnit; + } + public void setNetWeight(BigDecimal netWeight) + { + this.netWeight = netWeight; + } + + public BigDecimal getNetWeight() + { + return netWeight; + } + public void setCrossWeight(BigDecimal crossWeight) + { + this.crossWeight = crossWeight; + } + + public BigDecimal getCrossWeight() + { + return crossWeight; + } + public void setWeightUnit(String weightUnit) + { + this.weightUnit = weightUnit; + } + + public String getWeightUnit() + { + return weightUnit; + } + public void setInspector(String inspector) + { + this.inspector = inspector; + } + + public String getInspector() + { + return inspector; + } + public void setInspectorName(String inspectorName) + { + this.inspectorName = inspectorName; + } + + public String getInspectorName() + { + return inspectorName; + } + public void setEnableFlag(String enableFlag) + { + this.enableFlag = enableFlag; + } + + public String getEnableFlag() + { + return enableFlag; + } + public void setAttr1(String attr1) + { + this.attr1 = attr1; + } + + public String getAttr1() + { + return attr1; + } + public void setAttr2(String attr2) + { + this.attr2 = attr2; + } + + public String getAttr2() + { + return attr2; + } + public void setAttr3(Long attr3) + { + this.attr3 = attr3; + } + + public Long getAttr3() + { + return attr3; + } + public void setAttr4(Long attr4) + { + this.attr4 = attr4; + } + + public Long getAttr4() + { + return attr4; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("packageId", getPackageId()) + .append("parentId", getParentId()) + .append("ancestors", getAncestors()) + .append("packageCode", getPackageCode()) + .append("barcodeId", getBarcodeId()) + .append("barcodeContent", getBarcodeContent()) + .append("barcodeUrl", getBarcodeUrl()) + .append("packageDate", getPackageDate()) + .append("soCode", getSoCode()) + .append("invoiceCode", getInvoiceCode()) + .append("clientId", getClientId()) + .append("clientCode", getClientCode()) + .append("clientName", getClientName()) + .append("clientNick", getClientNick()) + .append("packageLength", getPackageLength()) + .append("packageWidth", getPackageWidth()) + .append("packageHeight", getPackageHeight()) + .append("sizeUnit", getSizeUnit()) + .append("netWeight", getNetWeight()) + .append("crossWeight", getCrossWeight()) + .append("weightUnit", getWeightUnit()) + .append("inspector", getInspector()) + .append("inspectorName", getInspectorName()) + .append("enableFlag", getEnableFlag()) + .append("remark", getRemark()) + .append("attr1", getAttr1()) + .append("attr2", getAttr2()) + .append("attr3", getAttr3()) + .append("attr4", getAttr4()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/mapper/WmPackageMapper.java b/ktg-mes/src/main/java/com/ktg/mes/wm/mapper/WmPackageMapper.java new file mode 100644 index 0000000..21b940b --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/wm/mapper/WmPackageMapper.java @@ -0,0 +1,68 @@ +package com.ktg.mes.wm.mapper; + +import java.util.List; +import com.ktg.mes.wm.domain.WmPackage; + +/** + * 装箱单Mapper接口 + * + * @author yinjinlu + * @date 2022-10-10 + */ +public interface WmPackageMapper +{ + /** + * 查询装箱单 + * + * @param packageId 装箱单主键 + * @return 装箱单 + */ + public WmPackage selectWmPackageByPackageId(Long packageId); + + /** + * 查询装箱单列表 + * + * @param wmPackage 装箱单 + * @return 装箱单集合 + */ + public List selectWmPackageList(WmPackage wmPackage); + + /** + * 检查装箱单编号是否唯一 + * @param wmPackage + * @return + */ + public WmPackage checkPackgeCodeUnique(WmPackage wmPackage); + + /** + * 新增装箱单 + * + * @param wmPackage 装箱单 + * @return 结果 + */ + public int insertWmPackage(WmPackage wmPackage); + + /** + * 修改装箱单 + * + * @param wmPackage 装箱单 + * @return 结果 + */ + public int updateWmPackage(WmPackage wmPackage); + + /** + * 删除装箱单 + * + * @param packageId 装箱单主键 + * @return 结果 + */ + public int deleteWmPackageByPackageId(Long packageId); + + /** + * 批量删除装箱单 + * + * @param packageIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteWmPackageByPackageIds(Long[] packageIds); +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/service/IWmPackageService.java b/ktg-mes/src/main/java/com/ktg/mes/wm/service/IWmPackageService.java new file mode 100644 index 0000000..f346ceb --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/wm/service/IWmPackageService.java @@ -0,0 +1,68 @@ +package com.ktg.mes.wm.service; + +import java.util.List; +import com.ktg.mes.wm.domain.WmPackage; + +/** + * 装箱单Service接口 + * + * @author yinjinlu + * @date 2022-10-10 + */ +public interface IWmPackageService +{ + /** + * 查询装箱单 + * + * @param packageId 装箱单主键 + * @return 装箱单 + */ + public WmPackage selectWmPackageByPackageId(Long packageId); + + /** + * 查询装箱单列表 + * + * @param wmPackage 装箱单 + * @return 装箱单集合 + */ + public List selectWmPackageList(WmPackage wmPackage); + + /** + * 检查装箱单编号是否唯一 + * @param wmPackage + * @return + */ + public String checkPackgeCodeUnique(WmPackage wmPackage); + + /** + * 新增装箱单 + * + * @param wmPackage 装箱单 + * @return 结果 + */ + public int insertWmPackage(WmPackage wmPackage); + + /** + * 修改装箱单 + * + * @param wmPackage 装箱单 + * @return 结果 + */ + public int updateWmPackage(WmPackage wmPackage); + + /** + * 批量删除装箱单 + * + * @param packageIds 需要删除的装箱单主键集合 + * @return 结果 + */ + public int deleteWmPackageByPackageIds(Long[] packageIds); + + /** + * 删除装箱单信息 + * + * @param packageId 装箱单主键 + * @return 结果 + */ + public int deleteWmPackageByPackageId(Long packageId); +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmPackageServiceImpl.java b/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmPackageServiceImpl.java new file mode 100644 index 0000000..b795dc2 --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmPackageServiceImpl.java @@ -0,0 +1,109 @@ +package com.ktg.mes.wm.service.impl; + +import java.util.List; + +import com.ktg.common.constant.UserConstants; +import com.ktg.common.utils.DateUtils; +import com.ktg.common.utils.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ktg.mes.wm.mapper.WmPackageMapper; +import com.ktg.mes.wm.domain.WmPackage; +import com.ktg.mes.wm.service.IWmPackageService; + +/** + * 装箱单Service业务层处理 + * + * @author yinjinlu + * @date 2022-10-10 + */ +@Service +public class WmPackageServiceImpl implements IWmPackageService +{ + @Autowired + private WmPackageMapper wmPackageMapper; + + /** + * 查询装箱单 + * + * @param packageId 装箱单主键 + * @return 装箱单 + */ + @Override + public WmPackage selectWmPackageByPackageId(Long packageId) + { + return wmPackageMapper.selectWmPackageByPackageId(packageId); + } + + /** + * 查询装箱单列表 + * + * @param wmPackage 装箱单 + * @return 装箱单 + */ + @Override + public List selectWmPackageList(WmPackage wmPackage) + { + return wmPackageMapper.selectWmPackageList(wmPackage); + } + + @Override + public String checkPackgeCodeUnique(WmPackage wmPackage) { + WmPackage pack = wmPackageMapper.checkPackgeCodeUnique(wmPackage); + Long packgeId = wmPackage.getPackageId() ==null?-1L:wmPackage.getPackageId(); + if(StringUtils.isNotNull(pack) && packgeId.longValue()!=pack.getPackageId()){ + return UserConstants.NOT_UNIQUE; + } + return UserConstants.UNIQUE; + } + + /** + * 新增装箱单 + * + * @param wmPackage 装箱单 + * @return 结果 + */ + @Override + public int insertWmPackage(WmPackage wmPackage) + { + wmPackage.setCreateTime(DateUtils.getNowDate()); + return wmPackageMapper.insertWmPackage(wmPackage); + } + + /** + * 修改装箱单 + * + * @param wmPackage 装箱单 + * @return 结果 + */ + @Override + public int updateWmPackage(WmPackage wmPackage) + { + wmPackage.setUpdateTime(DateUtils.getNowDate()); + return wmPackageMapper.updateWmPackage(wmPackage); + } + + /** + * 批量删除装箱单 + * + * @param packageIds 需要删除的装箱单主键 + * @return 结果 + */ + @Override + public int deleteWmPackageByPackageIds(Long[] packageIds) + { + return wmPackageMapper.deleteWmPackageByPackageIds(packageIds); + } + + /** + * 删除装箱单信息 + * + * @param packageId 装箱单主键 + * @return 结果 + */ + @Override + public int deleteWmPackageByPackageId(Long packageId) + { + return wmPackageMapper.deleteWmPackageByPackageId(packageId); + } +} diff --git a/ktg-mes/src/main/resources/mapper/wm/WmPackageMapper.xml b/ktg-mes/src/main/resources/mapper/wm/WmPackageMapper.xml new file mode 100644 index 0000000..3699309 --- /dev/null +++ b/ktg-mes/src/main/resources/mapper/wm/WmPackageMapper.xml @@ -0,0 +1,207 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select package_id, parent_id, ancestors, package_code, barcode_id, barcode_content, barcode_url, package_date, so_code, invoice_code, client_id, client_code, client_name, client_nick, package_length, package_width, package_height, size_unit, net_weight, cross_weight, weight_unit, inspector, inspector_name, enable_flag, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_package + + + + + + + + + + insert into wm_package + + parent_id, + ancestors, + package_code, + barcode_id, + barcode_content, + barcode_url, + package_date, + so_code, + invoice_code, + client_id, + client_code, + client_name, + client_nick, + package_length, + package_width, + package_height, + size_unit, + net_weight, + cross_weight, + weight_unit, + inspector, + inspector_name, + enable_flag, + remark, + attr1, + attr2, + attr3, + attr4, + create_by, + create_time, + update_by, + update_time, + + + #{parentId}, + #{ancestors}, + #{packageCode}, + #{barcodeId}, + #{barcodeContent}, + #{barcodeUrl}, + #{packageDate}, + #{soCode}, + #{invoiceCode}, + #{clientId}, + #{clientCode}, + #{clientName}, + #{clientNick}, + #{packageLength}, + #{packageWidth}, + #{packageHeight}, + #{sizeUnit}, + #{netWeight}, + #{crossWeight}, + #{weightUnit}, + #{inspector}, + #{inspectorName}, + #{enableFlag}, + #{remark}, + #{attr1}, + #{attr2}, + #{attr3}, + #{attr4}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update wm_package + + parent_id = #{parentId}, + ancestors = #{ancestors}, + package_code = #{packageCode}, + barcode_id = #{barcodeId}, + barcode_content = #{barcodeContent}, + barcode_url = #{barcodeUrl}, + package_date = #{packageDate}, + so_code = #{soCode}, + invoice_code = #{invoiceCode}, + client_id = #{clientId}, + client_code = #{clientCode}, + client_name = #{clientName}, + client_nick = #{clientNick}, + package_length = #{packageLength}, + package_width = #{packageWidth}, + package_height = #{packageHeight}, + size_unit = #{sizeUnit}, + net_weight = #{netWeight}, + cross_weight = #{crossWeight}, + weight_unit = #{weightUnit}, + inspector = #{inspector}, + inspector_name = #{inspectorName}, + enable_flag = #{enableFlag}, + remark = #{remark}, + attr1 = #{attr1}, + attr2 = #{attr2}, + attr3 = #{attr3}, + attr4 = #{attr4}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where package_id = #{packageId} + + + + delete from wm_package where package_id = #{packageId} + + + + delete from wm_package where package_id in + + #{packageId} + + + \ No newline at end of file