生产领料后端代码
This commit is contained in:
parent
371afa1ed5
commit
b0259439ca
@ -313,7 +313,79 @@ create table wm_rt_vendor_line (
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 10、生产领料单头表
|
||||||
|
-- ----------------------------
|
||||||
|
drop table if exists wm_issue_header;
|
||||||
|
create table wm_issue_header (
|
||||||
|
issue_id bigint(20) not null auto_increment comment '领料单ID',
|
||||||
|
issue_code varchar(64) not null comment '领料单编号',
|
||||||
|
issue_name varchar(255) not null comment '领料单名称',
|
||||||
|
workstation_id bigint(20) comment '工作站ID',
|
||||||
|
workstation_code varchar(64) comment '工作站编号',
|
||||||
|
workorder_id bigint(20) comment '生产工单ID',
|
||||||
|
workorder_code varchar(64) comment '生产工单编码',
|
||||||
|
task_id bigint(20) comment '生产任务ID',
|
||||||
|
task_code varchar(64) 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 '库位名称',
|
||||||
|
issue_date datetime comment '领料日期',
|
||||||
|
status varchar(64) default 'PREPARE' 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 (issue_id)
|
||||||
|
) engine=innodb auto_increment=200 comment = '生产领料单头表';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 11、生产领料单行表
|
||||||
|
-- ----------------------------
|
||||||
|
drop table if exists wm_issue_line;
|
||||||
|
create table wm_issue_line (
|
||||||
|
line_id bigint(20) not null auto_increment comment '行ID',
|
||||||
|
issue_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_issued double(12,2) not null 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 '库位名称',
|
||||||
|
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 = '生产领料单行表';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Binary file not shown.
@ -0,0 +1,123 @@
|
|||||||
|
package com.ktg.mes.wm.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.ktg.common.constant.UserConstants;
|
||||||
|
import com.ktg.mes.wm.service.IWmIssueLineService;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
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.WmIssueHeader;
|
||||||
|
import com.ktg.mes.wm.service.IWmIssueHeaderService;
|
||||||
|
import com.ktg.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ktg.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生产领料单头Controller
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2022-07-14
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/mes/wm/issueheader")
|
||||||
|
public class WmIssueHeaderController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private IWmIssueHeaderService wmIssueHeaderService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IWmIssueLineService wmIssueLineService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询生产领料单头列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('mes:wm:issueheader:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(WmIssueHeader wmIssueHeader)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<WmIssueHeader> list = wmIssueHeaderService.selectWmIssueHeaderList(wmIssueHeader);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出生产领料单头列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('mes:wm:issueheader:export')")
|
||||||
|
@Log(title = "生产领料单头", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, WmIssueHeader wmIssueHeader)
|
||||||
|
{
|
||||||
|
List<WmIssueHeader> list = wmIssueHeaderService.selectWmIssueHeaderList(wmIssueHeader);
|
||||||
|
ExcelUtil<WmIssueHeader> util = new ExcelUtil<WmIssueHeader>(WmIssueHeader.class);
|
||||||
|
util.exportExcel(response, list, "生产领料单头数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取生产领料单头详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('mes:wm:issueheader:query')")
|
||||||
|
@GetMapping(value = "/{issueId}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("issueId") Long issueId)
|
||||||
|
{
|
||||||
|
return AjaxResult.success(wmIssueHeaderService.selectWmIssueHeaderByIssueId(issueId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增生产领料单头
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('mes:wm:issueheader:add')")
|
||||||
|
@Log(title = "生产领料单头", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody WmIssueHeader wmIssueHeader)
|
||||||
|
{
|
||||||
|
if(UserConstants.NOT_UNIQUE.equals(wmIssueHeaderService.checkIssueCodeUnique(wmIssueHeader))){
|
||||||
|
return AjaxResult.error("领料单编号已存在");
|
||||||
|
}
|
||||||
|
return toAjax(wmIssueHeaderService.insertWmIssueHeader(wmIssueHeader));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改生产领料单头
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('mes:wm:issueheader:edit')")
|
||||||
|
@Log(title = "生产领料单头", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody WmIssueHeader wmIssueHeader)
|
||||||
|
{
|
||||||
|
if(UserConstants.NOT_UNIQUE.equals(wmIssueHeaderService.checkIssueCodeUnique(wmIssueHeader))){
|
||||||
|
return AjaxResult.error("领料单编号已存在");
|
||||||
|
}
|
||||||
|
return toAjax(wmIssueHeaderService.updateWmIssueHeader(wmIssueHeader));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除生产领料单头
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('mes:wm:issueheader:remove')")
|
||||||
|
@Log(title = "生产领料单头", businessType = BusinessType.DELETE)
|
||||||
|
@Transactional
|
||||||
|
@DeleteMapping("/{issueIds}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] issueIds)
|
||||||
|
{
|
||||||
|
for (long issueId:issueIds
|
||||||
|
) {
|
||||||
|
wmIssueLineService.deleteByIssueHeaderId(issueId);
|
||||||
|
}
|
||||||
|
|
||||||
|
return toAjax(wmIssueHeaderService.deleteWmIssueHeaderByIssueIds(issueIds));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,104 @@
|
|||||||
|
package com.ktg.mes.wm.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
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.WmIssueLine;
|
||||||
|
import com.ktg.mes.wm.service.IWmIssueLineService;
|
||||||
|
import com.ktg.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ktg.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生产领料单行Controller
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2022-07-14
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/mes/wm/issueline")
|
||||||
|
public class WmIssueLineController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private IWmIssueLineService wmIssueLineService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询生产领料单行列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('mes:wm:issueline:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(WmIssueLine wmIssueLine)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<WmIssueLine> list = wmIssueLineService.selectWmIssueLineList(wmIssueLine);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出生产领料单行列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('mes:wm:issueline:export')")
|
||||||
|
@Log(title = "生产领料单行", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, WmIssueLine wmIssueLine)
|
||||||
|
{
|
||||||
|
List<WmIssueLine> list = wmIssueLineService.selectWmIssueLineList(wmIssueLine);
|
||||||
|
ExcelUtil<WmIssueLine> util = new ExcelUtil<WmIssueLine>(WmIssueLine.class);
|
||||||
|
util.exportExcel(response, list, "生产领料单行数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取生产领料单行详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('mes:wm:issueline:query')")
|
||||||
|
@GetMapping(value = "/{lineId}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("lineId") Long lineId)
|
||||||
|
{
|
||||||
|
return AjaxResult.success(wmIssueLineService.selectWmIssueLineByLineId(lineId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增生产领料单行
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('mes:wm:issueline:add')")
|
||||||
|
@Log(title = "生产领料单行", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody WmIssueLine wmIssueLine)
|
||||||
|
{
|
||||||
|
return toAjax(wmIssueLineService.insertWmIssueLine(wmIssueLine));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改生产领料单行
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('mes:wm:issueline:edit')")
|
||||||
|
@Log(title = "生产领料单行", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody WmIssueLine wmIssueLine)
|
||||||
|
{
|
||||||
|
return toAjax(wmIssueLineService.updateWmIssueLine(wmIssueLine));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除生产领料单行
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('mes:wm:issueline:remove')")
|
||||||
|
@Log(title = "生产领料单行", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{lineIds}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] lineIds)
|
||||||
|
{
|
||||||
|
return toAjax(wmIssueLineService.deleteWmIssueLineByLineIds(lineIds));
|
||||||
|
}
|
||||||
|
}
|
363
ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmIssueHeader.java
Normal file
363
ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmIssueHeader.java
Normal file
@ -0,0 +1,363 @@
|
|||||||
|
package com.ktg.mes.wm.domain;
|
||||||
|
|
||||||
|
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_issue_header
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2022-07-14
|
||||||
|
*/
|
||||||
|
public class WmIssueHeader extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 领料单ID */
|
||||||
|
private Long issueId;
|
||||||
|
|
||||||
|
/** 领料单编号 */
|
||||||
|
@Excel(name = "领料单编号")
|
||||||
|
private String issueCode;
|
||||||
|
|
||||||
|
/** 领料单名称 */
|
||||||
|
@Excel(name = "领料单名称")
|
||||||
|
private String issueName;
|
||||||
|
|
||||||
|
/** 工作站ID */
|
||||||
|
@Excel(name = "工作站ID")
|
||||||
|
private Long workstationId;
|
||||||
|
|
||||||
|
/** 工作站编号 */
|
||||||
|
@Excel(name = "工作站编号")
|
||||||
|
private String workstationCode;
|
||||||
|
|
||||||
|
/** 生产工单ID */
|
||||||
|
@Excel(name = "生产工单ID")
|
||||||
|
private Long workorderId;
|
||||||
|
|
||||||
|
/** 生产工单编码 */
|
||||||
|
@Excel(name = "生产工单编码")
|
||||||
|
private String workorderCode;
|
||||||
|
|
||||||
|
/** 生产任务ID */
|
||||||
|
@Excel(name = "生产任务ID")
|
||||||
|
private Long taskId;
|
||||||
|
|
||||||
|
/** 生产任务编码 */
|
||||||
|
@Excel(name = "生产任务编码")
|
||||||
|
private String taskCode;
|
||||||
|
|
||||||
|
/** 仓库ID */
|
||||||
|
@Excel(name = "仓库ID")
|
||||||
|
private Long warehouseId;
|
||||||
|
|
||||||
|
/** 仓库编码 */
|
||||||
|
@Excel(name = "仓库编码")
|
||||||
|
private String warehouseCode;
|
||||||
|
|
||||||
|
/** 仓库名称 */
|
||||||
|
@Excel(name = "仓库名称")
|
||||||
|
private String warehouseName;
|
||||||
|
|
||||||
|
/** 库区ID */
|
||||||
|
@Excel(name = "库区ID")
|
||||||
|
private Long locationId;
|
||||||
|
|
||||||
|
/** 库区编码 */
|
||||||
|
@Excel(name = "库区编码")
|
||||||
|
private String locationCode;
|
||||||
|
|
||||||
|
/** 库区名称 */
|
||||||
|
@Excel(name = "库区名称")
|
||||||
|
private String locationName;
|
||||||
|
|
||||||
|
/** 库位ID */
|
||||||
|
@Excel(name = "库位ID")
|
||||||
|
private Long areaId;
|
||||||
|
|
||||||
|
/** 库位编码 */
|
||||||
|
@Excel(name = "库位编码")
|
||||||
|
private String areaCode;
|
||||||
|
|
||||||
|
/** 库位名称 */
|
||||||
|
@Excel(name = "库位名称")
|
||||||
|
private String areaName;
|
||||||
|
|
||||||
|
/** 领料日期 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@Excel(name = "领料日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date issueDate;
|
||||||
|
|
||||||
|
/** 单据状态 */
|
||||||
|
@Excel(name = "单据状态")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/** 预留字段1 */
|
||||||
|
private String attr1;
|
||||||
|
|
||||||
|
/** 预留字段2 */
|
||||||
|
private String attr2;
|
||||||
|
|
||||||
|
/** 预留字段3 */
|
||||||
|
private Long attr3;
|
||||||
|
|
||||||
|
/** 预留字段4 */
|
||||||
|
private Long attr4;
|
||||||
|
|
||||||
|
public void setIssueId(Long issueId)
|
||||||
|
{
|
||||||
|
this.issueId = issueId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getIssueId()
|
||||||
|
{
|
||||||
|
return issueId;
|
||||||
|
}
|
||||||
|
public void setIssueCode(String issueCode)
|
||||||
|
{
|
||||||
|
this.issueCode = issueCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIssueCode()
|
||||||
|
{
|
||||||
|
return issueCode;
|
||||||
|
}
|
||||||
|
public void setIssueName(String issueName)
|
||||||
|
{
|
||||||
|
this.issueName = issueName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIssueName()
|
||||||
|
{
|
||||||
|
return issueName;
|
||||||
|
}
|
||||||
|
public void setWorkstationId(Long workstationId)
|
||||||
|
{
|
||||||
|
this.workstationId = workstationId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getWorkstationId()
|
||||||
|
{
|
||||||
|
return workstationId;
|
||||||
|
}
|
||||||
|
public void setWorkstationCode(String workstationCode)
|
||||||
|
{
|
||||||
|
this.workstationCode = workstationCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWorkstationCode()
|
||||||
|
{
|
||||||
|
return workstationCode;
|
||||||
|
}
|
||||||
|
public void setWorkorderId(Long workorderId)
|
||||||
|
{
|
||||||
|
this.workorderId = workorderId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getWorkorderId()
|
||||||
|
{
|
||||||
|
return workorderId;
|
||||||
|
}
|
||||||
|
public void setWorkorderCode(String workorderCode)
|
||||||
|
{
|
||||||
|
this.workorderCode = workorderCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWorkorderCode()
|
||||||
|
{
|
||||||
|
return workorderCode;
|
||||||
|
}
|
||||||
|
public void setTaskId(Long taskId)
|
||||||
|
{
|
||||||
|
this.taskId = taskId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getTaskId()
|
||||||
|
{
|
||||||
|
return taskId;
|
||||||
|
}
|
||||||
|
public void setTaskCode(String taskCode)
|
||||||
|
{
|
||||||
|
this.taskCode = taskCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTaskCode()
|
||||||
|
{
|
||||||
|
return taskCode;
|
||||||
|
}
|
||||||
|
public void setWarehouseId(Long warehouseId)
|
||||||
|
{
|
||||||
|
this.warehouseId = warehouseId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getWarehouseId()
|
||||||
|
{
|
||||||
|
return warehouseId;
|
||||||
|
}
|
||||||
|
public void setWarehouseCode(String warehouseCode)
|
||||||
|
{
|
||||||
|
this.warehouseCode = warehouseCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWarehouseCode()
|
||||||
|
{
|
||||||
|
return warehouseCode;
|
||||||
|
}
|
||||||
|
public void setWarehouseName(String warehouseName)
|
||||||
|
{
|
||||||
|
this.warehouseName = warehouseName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWarehouseName()
|
||||||
|
{
|
||||||
|
return warehouseName;
|
||||||
|
}
|
||||||
|
public void setLocationId(Long locationId)
|
||||||
|
{
|
||||||
|
this.locationId = locationId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getLocationId()
|
||||||
|
{
|
||||||
|
return locationId;
|
||||||
|
}
|
||||||
|
public void setLocationCode(String locationCode)
|
||||||
|
{
|
||||||
|
this.locationCode = locationCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLocationCode()
|
||||||
|
{
|
||||||
|
return locationCode;
|
||||||
|
}
|
||||||
|
public void setLocationName(String locationName)
|
||||||
|
{
|
||||||
|
this.locationName = locationName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLocationName()
|
||||||
|
{
|
||||||
|
return locationName;
|
||||||
|
}
|
||||||
|
public void setAreaId(Long areaId)
|
||||||
|
{
|
||||||
|
this.areaId = areaId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getAreaId()
|
||||||
|
{
|
||||||
|
return areaId;
|
||||||
|
}
|
||||||
|
public void setAreaCode(String areaCode)
|
||||||
|
{
|
||||||
|
this.areaCode = areaCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAreaCode()
|
||||||
|
{
|
||||||
|
return areaCode;
|
||||||
|
}
|
||||||
|
public void setAreaName(String areaName)
|
||||||
|
{
|
||||||
|
this.areaName = areaName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAreaName()
|
||||||
|
{
|
||||||
|
return areaName;
|
||||||
|
}
|
||||||
|
public void setIssueDate(Date issueDate)
|
||||||
|
{
|
||||||
|
this.issueDate = issueDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getIssueDate()
|
||||||
|
{
|
||||||
|
return issueDate;
|
||||||
|
}
|
||||||
|
public void setStatus(String status)
|
||||||
|
{
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStatus()
|
||||||
|
{
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
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("issueId", getIssueId())
|
||||||
|
.append("issueCode", getIssueCode())
|
||||||
|
.append("issueName", getIssueName())
|
||||||
|
.append("workstationId", getWorkstationId())
|
||||||
|
.append("workstationCode", getWorkstationCode())
|
||||||
|
.append("workorderId", getWorkorderId())
|
||||||
|
.append("workorderCode", getWorkorderCode())
|
||||||
|
.append("taskId", getTaskId())
|
||||||
|
.append("taskCode", getTaskCode())
|
||||||
|
.append("warehouseId", getWarehouseId())
|
||||||
|
.append("warehouseCode", getWarehouseCode())
|
||||||
|
.append("warehouseName", getWarehouseName())
|
||||||
|
.append("locationId", getLocationId())
|
||||||
|
.append("locationCode", getLocationCode())
|
||||||
|
.append("locationName", getLocationName())
|
||||||
|
.append("areaId", getAreaId())
|
||||||
|
.append("areaCode", getAreaCode())
|
||||||
|
.append("areaName", getAreaName())
|
||||||
|
.append("issueDate", getIssueDate())
|
||||||
|
.append("status", getStatus())
|
||||||
|
.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();
|
||||||
|
}
|
||||||
|
}
|
333
ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmIssueLine.java
Normal file
333
ktg-mes/src/main/java/com/ktg/mes/wm/domain/WmIssueLine.java
Normal file
@ -0,0 +1,333 @@
|
|||||||
|
package com.ktg.mes.wm.domain;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
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_issue_line
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2022-07-14
|
||||||
|
*/
|
||||||
|
public class WmIssueLine extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 行ID */
|
||||||
|
private Long lineId;
|
||||||
|
|
||||||
|
/** 领料单ID */
|
||||||
|
@Excel(name = "领料单ID")
|
||||||
|
private Long issueId;
|
||||||
|
|
||||||
|
/** 产品物料ID */
|
||||||
|
@Excel(name = "产品物料ID")
|
||||||
|
private Long itemId;
|
||||||
|
|
||||||
|
/** 产品物料编码 */
|
||||||
|
@Excel(name = "产品物料编码")
|
||||||
|
private String itemCode;
|
||||||
|
|
||||||
|
/** 产品物料名称 */
|
||||||
|
@Excel(name = "产品物料名称")
|
||||||
|
private String itemName;
|
||||||
|
|
||||||
|
/** 规格型号 */
|
||||||
|
@Excel(name = "规格型号")
|
||||||
|
private String specification;
|
||||||
|
|
||||||
|
/** 单位 */
|
||||||
|
@Excel(name = "单位")
|
||||||
|
private String unitOfMeasure;
|
||||||
|
|
||||||
|
/** 领料数量 */
|
||||||
|
@Excel(name = "领料数量")
|
||||||
|
private BigDecimal quantityIssued;
|
||||||
|
|
||||||
|
/** 领料批次号 */
|
||||||
|
@Excel(name = "领料批次号")
|
||||||
|
private String batchCode;
|
||||||
|
|
||||||
|
/** 仓库ID */
|
||||||
|
@Excel(name = "仓库ID")
|
||||||
|
private Long warehouseId;
|
||||||
|
|
||||||
|
/** 仓库编码 */
|
||||||
|
@Excel(name = "仓库编码")
|
||||||
|
private String warehouseCode;
|
||||||
|
|
||||||
|
/** 仓库名称 */
|
||||||
|
@Excel(name = "仓库名称")
|
||||||
|
private String warehouseName;
|
||||||
|
|
||||||
|
/** 库区ID */
|
||||||
|
@Excel(name = "库区ID")
|
||||||
|
private Long locationId;
|
||||||
|
|
||||||
|
/** 库区编码 */
|
||||||
|
@Excel(name = "库区编码")
|
||||||
|
private String locationCode;
|
||||||
|
|
||||||
|
/** 库区名称 */
|
||||||
|
@Excel(name = "库区名称")
|
||||||
|
private String locationName;
|
||||||
|
|
||||||
|
/** 库位ID */
|
||||||
|
@Excel(name = "库位ID")
|
||||||
|
private Long areaId;
|
||||||
|
|
||||||
|
/** 库位编码 */
|
||||||
|
@Excel(name = "库位编码")
|
||||||
|
private String areaCode;
|
||||||
|
|
||||||
|
/** 库位名称 */
|
||||||
|
@Excel(name = "库位名称")
|
||||||
|
private String areaName;
|
||||||
|
|
||||||
|
/** 预留字段1 */
|
||||||
|
private String attr1;
|
||||||
|
|
||||||
|
/** 预留字段2 */
|
||||||
|
private String attr2;
|
||||||
|
|
||||||
|
/** 预留字段3 */
|
||||||
|
private Long attr3;
|
||||||
|
|
||||||
|
/** 预留字段4 */
|
||||||
|
private Long attr4;
|
||||||
|
|
||||||
|
public void setLineId(Long lineId)
|
||||||
|
{
|
||||||
|
this.lineId = lineId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getLineId()
|
||||||
|
{
|
||||||
|
return lineId;
|
||||||
|
}
|
||||||
|
public void setIssueId(Long issueId)
|
||||||
|
{
|
||||||
|
this.issueId = issueId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getIssueId()
|
||||||
|
{
|
||||||
|
return issueId;
|
||||||
|
}
|
||||||
|
public void setItemId(Long itemId)
|
||||||
|
{
|
||||||
|
this.itemId = itemId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getItemId()
|
||||||
|
{
|
||||||
|
return itemId;
|
||||||
|
}
|
||||||
|
public void setItemCode(String itemCode)
|
||||||
|
{
|
||||||
|
this.itemCode = itemCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getItemCode()
|
||||||
|
{
|
||||||
|
return itemCode;
|
||||||
|
}
|
||||||
|
public void setItemName(String itemName)
|
||||||
|
{
|
||||||
|
this.itemName = itemName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getItemName()
|
||||||
|
{
|
||||||
|
return itemName;
|
||||||
|
}
|
||||||
|
public void setSpecification(String specification)
|
||||||
|
{
|
||||||
|
this.specification = specification;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSpecification()
|
||||||
|
{
|
||||||
|
return specification;
|
||||||
|
}
|
||||||
|
public void setUnitOfMeasure(String unitOfMeasure)
|
||||||
|
{
|
||||||
|
this.unitOfMeasure = unitOfMeasure;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUnitOfMeasure()
|
||||||
|
{
|
||||||
|
return unitOfMeasure;
|
||||||
|
}
|
||||||
|
public void setQuantityIssued(BigDecimal quantityIssued)
|
||||||
|
{
|
||||||
|
this.quantityIssued = quantityIssued;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getQuantityIssued()
|
||||||
|
{
|
||||||
|
return quantityIssued;
|
||||||
|
}
|
||||||
|
public void setBatchCode(String batchCode)
|
||||||
|
{
|
||||||
|
this.batchCode = batchCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBatchCode()
|
||||||
|
{
|
||||||
|
return batchCode;
|
||||||
|
}
|
||||||
|
public void setWarehouseId(Long warehouseId)
|
||||||
|
{
|
||||||
|
this.warehouseId = warehouseId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getWarehouseId()
|
||||||
|
{
|
||||||
|
return warehouseId;
|
||||||
|
}
|
||||||
|
public void setWarehouseCode(String warehouseCode)
|
||||||
|
{
|
||||||
|
this.warehouseCode = warehouseCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWarehouseCode()
|
||||||
|
{
|
||||||
|
return warehouseCode;
|
||||||
|
}
|
||||||
|
public void setWarehouseName(String warehouseName)
|
||||||
|
{
|
||||||
|
this.warehouseName = warehouseName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWarehouseName()
|
||||||
|
{
|
||||||
|
return warehouseName;
|
||||||
|
}
|
||||||
|
public void setLocationId(Long locationId)
|
||||||
|
{
|
||||||
|
this.locationId = locationId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getLocationId()
|
||||||
|
{
|
||||||
|
return locationId;
|
||||||
|
}
|
||||||
|
public void setLocationCode(String locationCode)
|
||||||
|
{
|
||||||
|
this.locationCode = locationCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLocationCode()
|
||||||
|
{
|
||||||
|
return locationCode;
|
||||||
|
}
|
||||||
|
public void setLocationName(String locationName)
|
||||||
|
{
|
||||||
|
this.locationName = locationName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLocationName()
|
||||||
|
{
|
||||||
|
return locationName;
|
||||||
|
}
|
||||||
|
public void setAreaId(Long areaId)
|
||||||
|
{
|
||||||
|
this.areaId = areaId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getAreaId()
|
||||||
|
{
|
||||||
|
return areaId;
|
||||||
|
}
|
||||||
|
public void setAreaCode(String areaCode)
|
||||||
|
{
|
||||||
|
this.areaCode = areaCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAreaCode()
|
||||||
|
{
|
||||||
|
return areaCode;
|
||||||
|
}
|
||||||
|
public void setAreaName(String areaName)
|
||||||
|
{
|
||||||
|
this.areaName = areaName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAreaName()
|
||||||
|
{
|
||||||
|
return areaName;
|
||||||
|
}
|
||||||
|
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("lineId", getLineId())
|
||||||
|
.append("issueId", getIssueId())
|
||||||
|
.append("itemId", getItemId())
|
||||||
|
.append("itemCode", getItemCode())
|
||||||
|
.append("itemName", getItemName())
|
||||||
|
.append("specification", getSpecification())
|
||||||
|
.append("unitOfMeasure", getUnitOfMeasure())
|
||||||
|
.append("quantityIssued", getQuantityIssued())
|
||||||
|
.append("batchCode", getBatchCode())
|
||||||
|
.append("warehouseId", getWarehouseId())
|
||||||
|
.append("warehouseCode", getWarehouseCode())
|
||||||
|
.append("warehouseName", getWarehouseName())
|
||||||
|
.append("locationId", getLocationId())
|
||||||
|
.append("locationCode", getLocationCode())
|
||||||
|
.append("locationName", getLocationName())
|
||||||
|
.append("areaId", getAreaId())
|
||||||
|
.append("areaCode", getAreaCode())
|
||||||
|
.append("areaName", getAreaName())
|
||||||
|
.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();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,68 @@
|
|||||||
|
package com.ktg.mes.wm.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ktg.mes.wm.domain.WmIssueHeader;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生产领料单头Mapper接口
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2022-07-14
|
||||||
|
*/
|
||||||
|
public interface WmIssueHeaderMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询生产领料单头
|
||||||
|
*
|
||||||
|
* @param issueId 生产领料单头主键
|
||||||
|
* @return 生产领料单头
|
||||||
|
*/
|
||||||
|
public WmIssueHeader selectWmIssueHeaderByIssueId(Long issueId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询生产领料单头列表
|
||||||
|
*
|
||||||
|
* @param wmIssueHeader 生产领料单头
|
||||||
|
* @return 生产领料单头集合
|
||||||
|
*/
|
||||||
|
public List<WmIssueHeader> selectWmIssueHeaderList(WmIssueHeader wmIssueHeader);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查生产领料单编号是否唯一
|
||||||
|
* @param wmIssueHeader
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public WmIssueHeader checkIssueCodeUnique(WmIssueHeader wmIssueHeader);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增生产领料单头
|
||||||
|
*
|
||||||
|
* @param wmIssueHeader 生产领料单头
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertWmIssueHeader(WmIssueHeader wmIssueHeader);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改生产领料单头
|
||||||
|
*
|
||||||
|
* @param wmIssueHeader 生产领料单头
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateWmIssueHeader(WmIssueHeader wmIssueHeader);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除生产领料单头
|
||||||
|
*
|
||||||
|
* @param issueId 生产领料单头主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteWmIssueHeaderByIssueId(Long issueId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除生产领料单头
|
||||||
|
*
|
||||||
|
* @param issueIds 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteWmIssueHeaderByIssueIds(Long[] issueIds);
|
||||||
|
}
|
@ -0,0 +1,63 @@
|
|||||||
|
package com.ktg.mes.wm.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ktg.mes.wm.domain.WmIssueLine;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生产领料单行Mapper接口
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2022-07-14
|
||||||
|
*/
|
||||||
|
public interface WmIssueLineMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询生产领料单行
|
||||||
|
*
|
||||||
|
* @param lineId 生产领料单行主键
|
||||||
|
* @return 生产领料单行
|
||||||
|
*/
|
||||||
|
public WmIssueLine selectWmIssueLineByLineId(Long lineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询生产领料单行列表
|
||||||
|
*
|
||||||
|
* @param wmIssueLine 生产领料单行
|
||||||
|
* @return 生产领料单行集合
|
||||||
|
*/
|
||||||
|
public List<WmIssueLine> selectWmIssueLineList(WmIssueLine wmIssueLine);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增生产领料单行
|
||||||
|
*
|
||||||
|
* @param wmIssueLine 生产领料单行
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertWmIssueLine(WmIssueLine wmIssueLine);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改生产领料单行
|
||||||
|
*
|
||||||
|
* @param wmIssueLine 生产领料单行
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateWmIssueLine(WmIssueLine wmIssueLine);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除生产领料单行
|
||||||
|
*
|
||||||
|
* @param lineId 生产领料单行主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteWmIssueLineByLineId(Long lineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除生产领料单行
|
||||||
|
*
|
||||||
|
* @param lineIds 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteWmIssueLineByLineIds(Long[] lineIds);
|
||||||
|
|
||||||
|
public int deleteByIssueHeaderId(Long issueId);
|
||||||
|
}
|
@ -0,0 +1,68 @@
|
|||||||
|
package com.ktg.mes.wm.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ktg.mes.wm.domain.WmIssueHeader;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生产领料单头Service接口
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2022-07-14
|
||||||
|
*/
|
||||||
|
public interface IWmIssueHeaderService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询生产领料单头
|
||||||
|
*
|
||||||
|
* @param issueId 生产领料单头主键
|
||||||
|
* @return 生产领料单头
|
||||||
|
*/
|
||||||
|
public WmIssueHeader selectWmIssueHeaderByIssueId(Long issueId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询生产领料单头列表
|
||||||
|
*
|
||||||
|
* @param wmIssueHeader 生产领料单头
|
||||||
|
* @return 生产领料单头集合
|
||||||
|
*/
|
||||||
|
public List<WmIssueHeader> selectWmIssueHeaderList(WmIssueHeader wmIssueHeader);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查生产领料单编号是否唯一
|
||||||
|
* @param wmIssueHeader
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String checkIssueCodeUnique(WmIssueHeader wmIssueHeader);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增生产领料单头
|
||||||
|
*
|
||||||
|
* @param wmIssueHeader 生产领料单头
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertWmIssueHeader(WmIssueHeader wmIssueHeader);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改生产领料单头
|
||||||
|
*
|
||||||
|
* @param wmIssueHeader 生产领料单头
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateWmIssueHeader(WmIssueHeader wmIssueHeader);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除生产领料单头
|
||||||
|
*
|
||||||
|
* @param issueIds 需要删除的生产领料单头主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteWmIssueHeaderByIssueIds(Long[] issueIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除生产领料单头信息
|
||||||
|
*
|
||||||
|
* @param issueId 生产领料单头主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteWmIssueHeaderByIssueId(Long issueId);
|
||||||
|
}
|
@ -0,0 +1,64 @@
|
|||||||
|
package com.ktg.mes.wm.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ktg.mes.wm.domain.WmIssueLine;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生产领料单行Service接口
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2022-07-14
|
||||||
|
*/
|
||||||
|
public interface IWmIssueLineService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询生产领料单行
|
||||||
|
*
|
||||||
|
* @param lineId 生产领料单行主键
|
||||||
|
* @return 生产领料单行
|
||||||
|
*/
|
||||||
|
public WmIssueLine selectWmIssueLineByLineId(Long lineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询生产领料单行列表
|
||||||
|
*
|
||||||
|
* @param wmIssueLine 生产领料单行
|
||||||
|
* @return 生产领料单行集合
|
||||||
|
*/
|
||||||
|
public List<WmIssueLine> selectWmIssueLineList(WmIssueLine wmIssueLine);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增生产领料单行
|
||||||
|
*
|
||||||
|
* @param wmIssueLine 生产领料单行
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertWmIssueLine(WmIssueLine wmIssueLine);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改生产领料单行
|
||||||
|
*
|
||||||
|
* @param wmIssueLine 生产领料单行
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateWmIssueLine(WmIssueLine wmIssueLine);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除生产领料单行
|
||||||
|
*
|
||||||
|
* @param lineIds 需要删除的生产领料单行主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteWmIssueLineByLineIds(Long[] lineIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除生产领料单行信息
|
||||||
|
*
|
||||||
|
* @param lineId 生产领料单行主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteWmIssueLineByLineId(Long lineId);
|
||||||
|
|
||||||
|
public int deleteByIssueHeaderId(Long issueId);
|
||||||
|
|
||||||
|
}
|
@ -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.WmIssueHeaderMapper;
|
||||||
|
import com.ktg.mes.wm.domain.WmIssueHeader;
|
||||||
|
import com.ktg.mes.wm.service.IWmIssueHeaderService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生产领料单头Service业务层处理
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2022-07-14
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class WmIssueHeaderServiceImpl implements IWmIssueHeaderService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private WmIssueHeaderMapper wmIssueHeaderMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询生产领料单头
|
||||||
|
*
|
||||||
|
* @param issueId 生产领料单头主键
|
||||||
|
* @return 生产领料单头
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public WmIssueHeader selectWmIssueHeaderByIssueId(Long issueId)
|
||||||
|
{
|
||||||
|
return wmIssueHeaderMapper.selectWmIssueHeaderByIssueId(issueId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询生产领料单头列表
|
||||||
|
*
|
||||||
|
* @param wmIssueHeader 生产领料单头
|
||||||
|
* @return 生产领料单头
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<WmIssueHeader> selectWmIssueHeaderList(WmIssueHeader wmIssueHeader)
|
||||||
|
{
|
||||||
|
return wmIssueHeaderMapper.selectWmIssueHeaderList(wmIssueHeader);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String checkIssueCodeUnique(WmIssueHeader wmIssueHeader) {
|
||||||
|
WmIssueHeader header = wmIssueHeaderMapper.checkIssueCodeUnique(wmIssueHeader);
|
||||||
|
Long headerId = wmIssueHeader.getIssueId()==null?-1l:wmIssueHeader.getIssueId();
|
||||||
|
if(StringUtils.isNotNull(header) && headerId.longValue() !=header.getIssueId().longValue()){
|
||||||
|
return UserConstants.NOT_UNIQUE;
|
||||||
|
}
|
||||||
|
return UserConstants.UNIQUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增生产领料单头
|
||||||
|
*
|
||||||
|
* @param wmIssueHeader 生产领料单头
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertWmIssueHeader(WmIssueHeader wmIssueHeader)
|
||||||
|
{
|
||||||
|
wmIssueHeader.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return wmIssueHeaderMapper.insertWmIssueHeader(wmIssueHeader);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改生产领料单头
|
||||||
|
*
|
||||||
|
* @param wmIssueHeader 生产领料单头
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateWmIssueHeader(WmIssueHeader wmIssueHeader)
|
||||||
|
{
|
||||||
|
wmIssueHeader.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return wmIssueHeaderMapper.updateWmIssueHeader(wmIssueHeader);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除生产领料单头
|
||||||
|
*
|
||||||
|
* @param issueIds 需要删除的生产领料单头主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteWmIssueHeaderByIssueIds(Long[] issueIds)
|
||||||
|
{
|
||||||
|
return wmIssueHeaderMapper.deleteWmIssueHeaderByIssueIds(issueIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除生产领料单头信息
|
||||||
|
*
|
||||||
|
* @param issueId 生产领料单头主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteWmIssueHeaderByIssueId(Long issueId)
|
||||||
|
{
|
||||||
|
return wmIssueHeaderMapper.deleteWmIssueHeaderByIssueId(issueId);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,101 @@
|
|||||||
|
package com.ktg.mes.wm.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ktg.common.utils.DateUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.ktg.mes.wm.mapper.WmIssueLineMapper;
|
||||||
|
import com.ktg.mes.wm.domain.WmIssueLine;
|
||||||
|
import com.ktg.mes.wm.service.IWmIssueLineService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生产领料单行Service业务层处理
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2022-07-14
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class WmIssueLineServiceImpl implements IWmIssueLineService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private WmIssueLineMapper wmIssueLineMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询生产领料单行
|
||||||
|
*
|
||||||
|
* @param lineId 生产领料单行主键
|
||||||
|
* @return 生产领料单行
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public WmIssueLine selectWmIssueLineByLineId(Long lineId)
|
||||||
|
{
|
||||||
|
return wmIssueLineMapper.selectWmIssueLineByLineId(lineId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询生产领料单行列表
|
||||||
|
*
|
||||||
|
* @param wmIssueLine 生产领料单行
|
||||||
|
* @return 生产领料单行
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<WmIssueLine> selectWmIssueLineList(WmIssueLine wmIssueLine)
|
||||||
|
{
|
||||||
|
return wmIssueLineMapper.selectWmIssueLineList(wmIssueLine);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增生产领料单行
|
||||||
|
*
|
||||||
|
* @param wmIssueLine 生产领料单行
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertWmIssueLine(WmIssueLine wmIssueLine)
|
||||||
|
{
|
||||||
|
wmIssueLine.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return wmIssueLineMapper.insertWmIssueLine(wmIssueLine);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改生产领料单行
|
||||||
|
*
|
||||||
|
* @param wmIssueLine 生产领料单行
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateWmIssueLine(WmIssueLine wmIssueLine)
|
||||||
|
{
|
||||||
|
wmIssueLine.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return wmIssueLineMapper.updateWmIssueLine(wmIssueLine);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除生产领料单行
|
||||||
|
*
|
||||||
|
* @param lineIds 需要删除的生产领料单行主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteWmIssueLineByLineIds(Long[] lineIds)
|
||||||
|
{
|
||||||
|
return wmIssueLineMapper.deleteWmIssueLineByLineIds(lineIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除生产领料单行信息
|
||||||
|
*
|
||||||
|
* @param lineId 生产领料单行主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteWmIssueLineByLineId(Long lineId)
|
||||||
|
{
|
||||||
|
return wmIssueLineMapper.deleteWmIssueLineByLineId(lineId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int deleteByIssueHeaderId(Long issueId) {
|
||||||
|
return wmIssueLineMapper.deleteByIssueHeaderId(issueId);
|
||||||
|
}
|
||||||
|
}
|
187
ktg-mes/src/main/resources/mapper/wm/WmIssueHeaderMapper.xml
Normal file
187
ktg-mes/src/main/resources/mapper/wm/WmIssueHeaderMapper.xml
Normal file
@ -0,0 +1,187 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.ktg.mes.wm.mapper.WmIssueHeaderMapper">
|
||||||
|
|
||||||
|
<resultMap type="WmIssueHeader" id="WmIssueHeaderResult">
|
||||||
|
<result property="issueId" column="issue_id" />
|
||||||
|
<result property="issueCode" column="issue_code" />
|
||||||
|
<result property="issueName" column="issue_name" />
|
||||||
|
<result property="workstationId" column="workstation_id" />
|
||||||
|
<result property="workstationCode" column="workstation_code" />
|
||||||
|
<result property="workorderId" column="workorder_id" />
|
||||||
|
<result property="workorderCode" column="workorder_code" />
|
||||||
|
<result property="taskId" column="task_id" />
|
||||||
|
<result property="taskCode" column="task_code" />
|
||||||
|
<result property="warehouseId" column="warehouse_id" />
|
||||||
|
<result property="warehouseCode" column="warehouse_code" />
|
||||||
|
<result property="warehouseName" column="warehouse_name" />
|
||||||
|
<result property="locationId" column="location_id" />
|
||||||
|
<result property="locationCode" column="location_code" />
|
||||||
|
<result property="locationName" column="location_name" />
|
||||||
|
<result property="areaId" column="area_id" />
|
||||||
|
<result property="areaCode" column="area_code" />
|
||||||
|
<result property="areaName" column="area_name" />
|
||||||
|
<result property="issueDate" column="issue_date" />
|
||||||
|
<result property="status" column="status" />
|
||||||
|
<result property="remark" column="remark" />
|
||||||
|
<result property="attr1" column="attr1" />
|
||||||
|
<result property="attr2" column="attr2" />
|
||||||
|
<result property="attr3" column="attr3" />
|
||||||
|
<result property="attr4" column="attr4" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectWmIssueHeaderVo">
|
||||||
|
select issue_id, issue_code, issue_name, workstation_id, workstation_code, workorder_id, workorder_code, task_id, task_code, warehouse_id, warehouse_code, warehouse_name, location_id, location_code, location_name, area_id, area_code, area_name, issue_date, status, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_issue_header
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectWmIssueHeaderList" parameterType="WmIssueHeader" resultMap="WmIssueHeaderResult">
|
||||||
|
<include refid="selectWmIssueHeaderVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="issueCode != null and issueCode != ''"> and issue_code = #{issueCode}</if>
|
||||||
|
<if test="issueName != null and issueName != ''"> and issue_name like concat('%', #{issueName}, '%')</if>
|
||||||
|
<if test="workstationId != null "> and workstation_id = #{workstationId}</if>
|
||||||
|
<if test="workstationCode != null and workstationCode != ''"> and workstation_code = #{workstationCode}</if>
|
||||||
|
<if test="workorderId != null "> and workorder_id = #{workorderId}</if>
|
||||||
|
<if test="workorderCode != null and workorderCode != ''"> and workorder_code = #{workorderCode}</if>
|
||||||
|
<if test="taskId != null "> and task_id = #{taskId}</if>
|
||||||
|
<if test="taskCode != null and taskCode != ''"> and task_code = #{taskCode}</if>
|
||||||
|
<if test="warehouseId != null "> and warehouse_id = #{warehouseId}</if>
|
||||||
|
<if test="warehouseCode != null and warehouseCode != ''"> and warehouse_code = #{warehouseCode}</if>
|
||||||
|
<if test="warehouseName != null and warehouseName != ''"> and warehouse_name like concat('%', #{warehouseName}, '%')</if>
|
||||||
|
<if test="locationId != null "> and location_id = #{locationId}</if>
|
||||||
|
<if test="locationCode != null and locationCode != ''"> and location_code = #{locationCode}</if>
|
||||||
|
<if test="locationName != null and locationName != ''"> and location_name like concat('%', #{locationName}, '%')</if>
|
||||||
|
<if test="areaId != null "> and area_id = #{areaId}</if>
|
||||||
|
<if test="areaCode != null and areaCode != ''"> and area_code = #{areaCode}</if>
|
||||||
|
<if test="areaName != null and areaName != ''"> and area_name like concat('%', #{areaName}, '%')</if>
|
||||||
|
<if test="issueDate != null "> and issue_date = #{issueDate}</if>
|
||||||
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectWmIssueHeaderByIssueId" parameterType="Long" resultMap="WmIssueHeaderResult">
|
||||||
|
<include refid="selectWmIssueHeaderVo"/>
|
||||||
|
where issue_id = #{issueId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="checkIssueCodeUnique" parameterType="WmIssueHeader" resultMap="WmIssueHeaderResult">
|
||||||
|
<include refid="selectWmIssueHeaderVo"/>
|
||||||
|
where issue_code = #{issueCode} limit 1
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertWmIssueHeader" parameterType="WmIssueHeader" useGeneratedKeys="true" keyProperty="issueId">
|
||||||
|
insert into wm_issue_header
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="issueCode != null and issueCode != ''">issue_code,</if>
|
||||||
|
<if test="issueName != null and issueName != ''">issue_name,</if>
|
||||||
|
<if test="workstationId != null">workstation_id,</if>
|
||||||
|
<if test="workstationCode != null">workstation_code,</if>
|
||||||
|
<if test="workorderId != null">workorder_id,</if>
|
||||||
|
<if test="workorderCode != null">workorder_code,</if>
|
||||||
|
<if test="taskId != null">task_id,</if>
|
||||||
|
<if test="taskCode != null">task_code,</if>
|
||||||
|
<if test="warehouseId != null">warehouse_id,</if>
|
||||||
|
<if test="warehouseCode != null">warehouse_code,</if>
|
||||||
|
<if test="warehouseName != null">warehouse_name,</if>
|
||||||
|
<if test="locationId != null">location_id,</if>
|
||||||
|
<if test="locationCode != null">location_code,</if>
|
||||||
|
<if test="locationName != null">location_name,</if>
|
||||||
|
<if test="areaId != null">area_id,</if>
|
||||||
|
<if test="areaCode != null">area_code,</if>
|
||||||
|
<if test="areaName != null">area_name,</if>
|
||||||
|
<if test="issueDate != null">issue_date,</if>
|
||||||
|
<if test="status != null">status,</if>
|
||||||
|
<if test="remark != null">remark,</if>
|
||||||
|
<if test="attr1 != null">attr1,</if>
|
||||||
|
<if test="attr2 != null">attr2,</if>
|
||||||
|
<if test="attr3 != null">attr3,</if>
|
||||||
|
<if test="attr4 != null">attr4,</if>
|
||||||
|
<if test="createBy != null">create_by,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
<if test="updateBy != null">update_by,</if>
|
||||||
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="issueCode != null and issueCode != ''">#{issueCode},</if>
|
||||||
|
<if test="issueName != null and issueName != ''">#{issueName},</if>
|
||||||
|
<if test="workstationId != null">#{workstationId},</if>
|
||||||
|
<if test="workstationCode != null">#{workstationCode},</if>
|
||||||
|
<if test="workorderId != null">#{workorderId},</if>
|
||||||
|
<if test="workorderCode != null">#{workorderCode},</if>
|
||||||
|
<if test="taskId != null">#{taskId},</if>
|
||||||
|
<if test="taskCode != null">#{taskCode},</if>
|
||||||
|
<if test="warehouseId != null">#{warehouseId},</if>
|
||||||
|
<if test="warehouseCode != null">#{warehouseCode},</if>
|
||||||
|
<if test="warehouseName != null">#{warehouseName},</if>
|
||||||
|
<if test="locationId != null">#{locationId},</if>
|
||||||
|
<if test="locationCode != null">#{locationCode},</if>
|
||||||
|
<if test="locationName != null">#{locationName},</if>
|
||||||
|
<if test="areaId != null">#{areaId},</if>
|
||||||
|
<if test="areaCode != null">#{areaCode},</if>
|
||||||
|
<if test="areaName != null">#{areaName},</if>
|
||||||
|
<if test="issueDate != null">#{issueDate},</if>
|
||||||
|
<if test="status != null">#{status},</if>
|
||||||
|
<if test="remark != null">#{remark},</if>
|
||||||
|
<if test="attr1 != null">#{attr1},</if>
|
||||||
|
<if test="attr2 != null">#{attr2},</if>
|
||||||
|
<if test="attr3 != null">#{attr3},</if>
|
||||||
|
<if test="attr4 != null">#{attr4},</if>
|
||||||
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateWmIssueHeader" parameterType="WmIssueHeader">
|
||||||
|
update wm_issue_header
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="issueCode != null and issueCode != ''">issue_code = #{issueCode},</if>
|
||||||
|
<if test="issueName != null and issueName != ''">issue_name = #{issueName},</if>
|
||||||
|
<if test="workstationId != null">workstation_id = #{workstationId},</if>
|
||||||
|
<if test="workstationCode != null">workstation_code = #{workstationCode},</if>
|
||||||
|
<if test="workorderId != null">workorder_id = #{workorderId},</if>
|
||||||
|
<if test="workorderCode != null">workorder_code = #{workorderCode},</if>
|
||||||
|
<if test="taskId != null">task_id = #{taskId},</if>
|
||||||
|
<if test="taskCode != null">task_code = #{taskCode},</if>
|
||||||
|
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
|
||||||
|
<if test="warehouseCode != null">warehouse_code = #{warehouseCode},</if>
|
||||||
|
<if test="warehouseName != null">warehouse_name = #{warehouseName},</if>
|
||||||
|
<if test="locationId != null">location_id = #{locationId},</if>
|
||||||
|
<if test="locationCode != null">location_code = #{locationCode},</if>
|
||||||
|
<if test="locationName != null">location_name = #{locationName},</if>
|
||||||
|
<if test="areaId != null">area_id = #{areaId},</if>
|
||||||
|
<if test="areaCode != null">area_code = #{areaCode},</if>
|
||||||
|
<if test="areaName != null">area_name = #{areaName},</if>
|
||||||
|
<if test="issueDate != null">issue_date = #{issueDate},</if>
|
||||||
|
<if test="status != null">status = #{status},</if>
|
||||||
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||||||
|
<if test="attr2 != null">attr2 = #{attr2},</if>
|
||||||
|
<if test="attr3 != null">attr3 = #{attr3},</if>
|
||||||
|
<if test="attr4 != null">attr4 = #{attr4},</if>
|
||||||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
where issue_id = #{issueId}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteWmIssueHeaderByIssueId" parameterType="Long">
|
||||||
|
delete from wm_issue_header where issue_id = #{issueId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteWmIssueHeaderByIssueIds" parameterType="String">
|
||||||
|
delete from wm_issue_header where issue_id in
|
||||||
|
<foreach item="issueId" collection="array" open="(" separator="," close=")">
|
||||||
|
#{issueId}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
177
ktg-mes/src/main/resources/mapper/wm/WmIssueLineMapper.xml
Normal file
177
ktg-mes/src/main/resources/mapper/wm/WmIssueLineMapper.xml
Normal file
@ -0,0 +1,177 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.ktg.mes.wm.mapper.WmIssueLineMapper">
|
||||||
|
|
||||||
|
<resultMap type="WmIssueLine" id="WmIssueLineResult">
|
||||||
|
<result property="lineId" column="line_id" />
|
||||||
|
<result property="issueId" column="issue_id" />
|
||||||
|
<result property="itemId" column="item_id" />
|
||||||
|
<result property="itemCode" column="item_code" />
|
||||||
|
<result property="itemName" column="item_name" />
|
||||||
|
<result property="specification" column="specification" />
|
||||||
|
<result property="unitOfMeasure" column="unit_of_measure" />
|
||||||
|
<result property="quantityIssued" column="quantity_issued" />
|
||||||
|
<result property="batchCode" column="batch_code" />
|
||||||
|
<result property="warehouseId" column="warehouse_id" />
|
||||||
|
<result property="warehouseCode" column="warehouse_code" />
|
||||||
|
<result property="warehouseName" column="warehouse_name" />
|
||||||
|
<result property="locationId" column="location_id" />
|
||||||
|
<result property="locationCode" column="location_code" />
|
||||||
|
<result property="locationName" column="location_name" />
|
||||||
|
<result property="areaId" column="area_id" />
|
||||||
|
<result property="areaCode" column="area_code" />
|
||||||
|
<result property="areaName" column="area_name" />
|
||||||
|
<result property="remark" column="remark" />
|
||||||
|
<result property="attr1" column="attr1" />
|
||||||
|
<result property="attr2" column="attr2" />
|
||||||
|
<result property="attr3" column="attr3" />
|
||||||
|
<result property="attr4" column="attr4" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectWmIssueLineVo">
|
||||||
|
select line_id, issue_id, item_id, item_code, item_name, specification, unit_of_measure, quantity_issued, batch_code, warehouse_id, warehouse_code, warehouse_name, location_id, location_code, location_name, area_id, area_code, area_name, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_issue_line
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectWmIssueLineList" parameterType="WmIssueLine" resultMap="WmIssueLineResult">
|
||||||
|
<include refid="selectWmIssueLineVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="issueId != null "> and issue_id = #{issueId}</if>
|
||||||
|
<if test="itemId != null "> and item_id = #{itemId}</if>
|
||||||
|
<if test="itemCode != null and itemCode != ''"> and item_code = #{itemCode}</if>
|
||||||
|
<if test="itemName != null and itemName != ''"> and item_name like concat('%', #{itemName}, '%')</if>
|
||||||
|
<if test="specification != null and specification != ''"> and specification = #{specification}</if>
|
||||||
|
<if test="unitOfMeasure != null and unitOfMeasure != ''"> and unit_of_measure = #{unitOfMeasure}</if>
|
||||||
|
<if test="quantityIssued != null "> and quantity_issued = #{quantityIssued}</if>
|
||||||
|
<if test="batchCode != null and batchCode != ''"> and batch_code = #{batchCode}</if>
|
||||||
|
<if test="warehouseId != null "> and warehouse_id = #{warehouseId}</if>
|
||||||
|
<if test="warehouseCode != null and warehouseCode != ''"> and warehouse_code = #{warehouseCode}</if>
|
||||||
|
<if test="warehouseName != null and warehouseName != ''"> and warehouse_name like concat('%', #{warehouseName}, '%')</if>
|
||||||
|
<if test="locationId != null "> and location_id = #{locationId}</if>
|
||||||
|
<if test="locationCode != null and locationCode != ''"> and location_code = #{locationCode}</if>
|
||||||
|
<if test="locationName != null and locationName != ''"> and location_name like concat('%', #{locationName}, '%')</if>
|
||||||
|
<if test="areaId != null "> and area_id = #{areaId}</if>
|
||||||
|
<if test="areaCode != null and areaCode != ''"> and area_code = #{areaCode}</if>
|
||||||
|
<if test="areaName != null and areaName != ''"> and area_name like concat('%', #{areaName}, '%')</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectWmIssueLineByLineId" parameterType="Long" resultMap="WmIssueLineResult">
|
||||||
|
<include refid="selectWmIssueLineVo"/>
|
||||||
|
where line_id = #{lineId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertWmIssueLine" parameterType="WmIssueLine" useGeneratedKeys="true" keyProperty="lineId">
|
||||||
|
insert into wm_issue_line
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="issueId != null">issue_id,</if>
|
||||||
|
<if test="itemId != null">item_id,</if>
|
||||||
|
<if test="itemCode != null">item_code,</if>
|
||||||
|
<if test="itemName != null">item_name,</if>
|
||||||
|
<if test="specification != null">specification,</if>
|
||||||
|
<if test="unitOfMeasure != null">unit_of_measure,</if>
|
||||||
|
<if test="quantityIssued != null">quantity_issued,</if>
|
||||||
|
<if test="batchCode != null">batch_code,</if>
|
||||||
|
<if test="warehouseId != null">warehouse_id,</if>
|
||||||
|
<if test="warehouseCode != null">warehouse_code,</if>
|
||||||
|
<if test="warehouseName != null">warehouse_name,</if>
|
||||||
|
<if test="locationId != null">location_id,</if>
|
||||||
|
<if test="locationCode != null">location_code,</if>
|
||||||
|
<if test="locationName != null">location_name,</if>
|
||||||
|
<if test="areaId != null">area_id,</if>
|
||||||
|
<if test="areaCode != null">area_code,</if>
|
||||||
|
<if test="areaName != null">area_name,</if>
|
||||||
|
<if test="remark != null">remark,</if>
|
||||||
|
<if test="attr1 != null">attr1,</if>
|
||||||
|
<if test="attr2 != null">attr2,</if>
|
||||||
|
<if test="attr3 != null">attr3,</if>
|
||||||
|
<if test="attr4 != null">attr4,</if>
|
||||||
|
<if test="createBy != null">create_by,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
<if test="updateBy != null">update_by,</if>
|
||||||
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="issueId != null">#{issueId},</if>
|
||||||
|
<if test="itemId != null">#{itemId},</if>
|
||||||
|
<if test="itemCode != null">#{itemCode},</if>
|
||||||
|
<if test="itemName != null">#{itemName},</if>
|
||||||
|
<if test="specification != null">#{specification},</if>
|
||||||
|
<if test="unitOfMeasure != null">#{unitOfMeasure},</if>
|
||||||
|
<if test="quantityIssued != null">#{quantityIssued},</if>
|
||||||
|
<if test="batchCode != null">#{batchCode},</if>
|
||||||
|
<if test="warehouseId != null">#{warehouseId},</if>
|
||||||
|
<if test="warehouseCode != null">#{warehouseCode},</if>
|
||||||
|
<if test="warehouseName != null">#{warehouseName},</if>
|
||||||
|
<if test="locationId != null">#{locationId},</if>
|
||||||
|
<if test="locationCode != null">#{locationCode},</if>
|
||||||
|
<if test="locationName != null">#{locationName},</if>
|
||||||
|
<if test="areaId != null">#{areaId},</if>
|
||||||
|
<if test="areaCode != null">#{areaCode},</if>
|
||||||
|
<if test="areaName != null">#{areaName},</if>
|
||||||
|
<if test="remark != null">#{remark},</if>
|
||||||
|
<if test="attr1 != null">#{attr1},</if>
|
||||||
|
<if test="attr2 != null">#{attr2},</if>
|
||||||
|
<if test="attr3 != null">#{attr3},</if>
|
||||||
|
<if test="attr4 != null">#{attr4},</if>
|
||||||
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateWmIssueLine" parameterType="WmIssueLine">
|
||||||
|
update wm_issue_line
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="issueId != null">issue_id = #{issueId},</if>
|
||||||
|
<if test="itemId != null">item_id = #{itemId},</if>
|
||||||
|
<if test="itemCode != null">item_code = #{itemCode},</if>
|
||||||
|
<if test="itemName != null">item_name = #{itemName},</if>
|
||||||
|
<if test="specification != null">specification = #{specification},</if>
|
||||||
|
<if test="unitOfMeasure != null">unit_of_measure = #{unitOfMeasure},</if>
|
||||||
|
<if test="quantityIssued != null">quantity_issued = #{quantityIssued},</if>
|
||||||
|
<if test="batchCode != null">batch_code = #{batchCode},</if>
|
||||||
|
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
|
||||||
|
<if test="warehouseCode != null">warehouse_code = #{warehouseCode},</if>
|
||||||
|
<if test="warehouseName != null">warehouse_name = #{warehouseName},</if>
|
||||||
|
<if test="locationId != null">location_id = #{locationId},</if>
|
||||||
|
<if test="locationCode != null">location_code = #{locationCode},</if>
|
||||||
|
<if test="locationName != null">location_name = #{locationName},</if>
|
||||||
|
<if test="areaId != null">area_id = #{areaId},</if>
|
||||||
|
<if test="areaCode != null">area_code = #{areaCode},</if>
|
||||||
|
<if test="areaName != null">area_name = #{areaName},</if>
|
||||||
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||||||
|
<if test="attr2 != null">attr2 = #{attr2},</if>
|
||||||
|
<if test="attr3 != null">attr3 = #{attr3},</if>
|
||||||
|
<if test="attr4 != null">attr4 = #{attr4},</if>
|
||||||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
where line_id = #{lineId}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteWmIssueLineByLineId" parameterType="Long">
|
||||||
|
delete from wm_issue_line where line_id = #{lineId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteWmIssueLineByLineIds" parameterType="String">
|
||||||
|
delete from wm_issue_line where line_id in
|
||||||
|
<foreach item="lineId" collection="array" open="(" separator="," close=")">
|
||||||
|
#{lineId}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteByIssueHeaderId" parameterType="Long">
|
||||||
|
delete from wm_issue_line where issue_id = #{issueId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue
Block a user