物料消耗记录后台代码
This commit is contained in:
parent
5afe4401b1
commit
c95184e602
@ -353,7 +353,7 @@ create table pro_trans_order (
|
|||||||
create_time datetime comment '创建时间',
|
create_time datetime comment '创建时间',
|
||||||
update_by varchar(64) default '' comment '更新者',
|
update_by varchar(64) default '' comment '更新者',
|
||||||
update_time datetime comment '更新时间',
|
update_time datetime comment '更新时间',
|
||||||
primary key (record_id)
|
primary key (trans_order_id)
|
||||||
) engine=innodb auto_increment=200 comment = '流转单表';
|
) engine=innodb auto_increment=200 comment = '流转单表';
|
||||||
|
|
||||||
|
|
||||||
@ -377,7 +377,7 @@ create table pro_trans_consume (
|
|||||||
source_doc_code varchar(64) comment '被消耗单据编号',
|
source_doc_code varchar(64) comment '被消耗单据编号',
|
||||||
source_doc_type varchar(64) comment '被消耗单据类型',
|
source_doc_type varchar(64) comment '被消耗单据类型',
|
||||||
source_line_id bigint(20) comment '被消耗单据行ID',
|
source_line_id bigint(20) comment '被消耗单据行ID',
|
||||||
batch_code varchar(64) comment '被消耗物料批次号',
|
source_batch_code varchar(64) comment '被消耗物料批次号',
|
||||||
item_id bigint(20) comment '被消耗产品物料ID',
|
item_id bigint(20) comment '被消耗产品物料ID',
|
||||||
item_code varchar(64) not null comment '被消耗产品物料编码',
|
item_code varchar(64) not null comment '被消耗产品物料编码',
|
||||||
item_name varchar(255) not null comment '被消耗产品物料名称',
|
item_name varchar(255) not null comment '被消耗产品物料名称',
|
||||||
|
@ -0,0 +1,104 @@
|
|||||||
|
package com.ktg.mes.pro.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.pro.domain.ProTransConsume;
|
||||||
|
import com.ktg.mes.pro.service.IProTransConsumeService;
|
||||||
|
import com.ktg.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ktg.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物料消耗记录Controller
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2022-07-24
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/mes/pro/transconsume")
|
||||||
|
public class ProTransConsumeController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private IProTransConsumeService proTransConsumeService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询物料消耗记录列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('mes:pro:transconsume:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(ProTransConsume proTransConsume)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<ProTransConsume> list = proTransConsumeService.selectProTransConsumeList(proTransConsume);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出物料消耗记录列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('mes:pro:transconsume:export')")
|
||||||
|
@Log(title = "物料消耗记录", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, ProTransConsume proTransConsume)
|
||||||
|
{
|
||||||
|
List<ProTransConsume> list = proTransConsumeService.selectProTransConsumeList(proTransConsume);
|
||||||
|
ExcelUtil<ProTransConsume> util = new ExcelUtil<ProTransConsume>(ProTransConsume.class);
|
||||||
|
util.exportExcel(response, list, "物料消耗记录数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取物料消耗记录详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('mes:pro:transconsume:query')")
|
||||||
|
@GetMapping(value = "/{recordId}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("recordId") Long recordId)
|
||||||
|
{
|
||||||
|
return AjaxResult.success(proTransConsumeService.selectProTransConsumeByRecordId(recordId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增物料消耗记录
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('mes:pro:transconsume:add')")
|
||||||
|
@Log(title = "物料消耗记录", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody ProTransConsume proTransConsume)
|
||||||
|
{
|
||||||
|
return toAjax(proTransConsumeService.insertProTransConsume(proTransConsume));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改物料消耗记录
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('mes:pro:transconsume:edit')")
|
||||||
|
@Log(title = "物料消耗记录", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody ProTransConsume proTransConsume)
|
||||||
|
{
|
||||||
|
return toAjax(proTransConsumeService.updateProTransConsume(proTransConsume));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除物料消耗记录
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('mes:pro:transconsume:remove')")
|
||||||
|
@Log(title = "物料消耗记录", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{recordIds}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] recordIds)
|
||||||
|
{
|
||||||
|
return toAjax(proTransConsumeService.deleteProTransConsumeByRecordIds(recordIds));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,364 @@
|
|||||||
|
package com.ktg.mes.pro.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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物料消耗记录对象 pro_trans_consume
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2022-07-24
|
||||||
|
*/
|
||||||
|
public class ProTransConsume extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 记录ID */
|
||||||
|
private Long recordId;
|
||||||
|
|
||||||
|
/** 流转单ID */
|
||||||
|
@Excel(name = "流转单ID")
|
||||||
|
private Long transOrderId;
|
||||||
|
|
||||||
|
/** 流转单编号 */
|
||||||
|
@Excel(name = "流转单编号")
|
||||||
|
private String transOrderCode;
|
||||||
|
|
||||||
|
/** 生产任务ID */
|
||||||
|
@Excel(name = "生产任务ID")
|
||||||
|
private Long taskId;
|
||||||
|
|
||||||
|
/** 工作站ID */
|
||||||
|
@Excel(name = "工作站ID")
|
||||||
|
private Long workstationId;
|
||||||
|
|
||||||
|
/** 工序ID */
|
||||||
|
@Excel(name = "工序ID")
|
||||||
|
private Long processId;
|
||||||
|
|
||||||
|
/** 生产工单ID */
|
||||||
|
@Excel(name = "生产工单ID")
|
||||||
|
private Long workorderId;
|
||||||
|
|
||||||
|
/** 批次号 */
|
||||||
|
@Excel(name = "批次号")
|
||||||
|
private String batchCode;
|
||||||
|
|
||||||
|
/** 被消耗单据ID */
|
||||||
|
@Excel(name = "被消耗单据ID")
|
||||||
|
private Long sourceDocId;
|
||||||
|
|
||||||
|
/** 被消耗单据编号 */
|
||||||
|
@Excel(name = "被消耗单据编号")
|
||||||
|
private String sourceDocCode;
|
||||||
|
|
||||||
|
/** 被消耗单据类型 */
|
||||||
|
@Excel(name = "被消耗单据类型")
|
||||||
|
private String sourceDocType;
|
||||||
|
|
||||||
|
/** 被消耗单据行ID */
|
||||||
|
@Excel(name = "被消耗单据行ID")
|
||||||
|
private Long sourceLineId;
|
||||||
|
|
||||||
|
/** 被消耗物料批次号 */
|
||||||
|
@Excel(name = "被消耗物料批次号")
|
||||||
|
private String sourceBatchCode;
|
||||||
|
|
||||||
|
/** 被消耗产品物料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 quantityConsumed;
|
||||||
|
|
||||||
|
/** 消耗时间 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@Excel(name = "消耗时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date consumeDate;
|
||||||
|
|
||||||
|
/** 预留字段1 */
|
||||||
|
private String attr1;
|
||||||
|
|
||||||
|
/** 预留字段2 */
|
||||||
|
private String attr2;
|
||||||
|
|
||||||
|
/** 预留字段3 */
|
||||||
|
private Long attr3;
|
||||||
|
|
||||||
|
/** 预留字段4 */
|
||||||
|
private Long attr4;
|
||||||
|
|
||||||
|
public void setRecordId(Long recordId)
|
||||||
|
{
|
||||||
|
this.recordId = recordId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getRecordId()
|
||||||
|
{
|
||||||
|
return recordId;
|
||||||
|
}
|
||||||
|
public void setTransOrderId(Long transOrderId)
|
||||||
|
{
|
||||||
|
this.transOrderId = transOrderId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getTransOrderId()
|
||||||
|
{
|
||||||
|
return transOrderId;
|
||||||
|
}
|
||||||
|
public void setTransOrderCode(String transOrderCode)
|
||||||
|
{
|
||||||
|
this.transOrderCode = transOrderCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTransOrderCode()
|
||||||
|
{
|
||||||
|
return transOrderCode;
|
||||||
|
}
|
||||||
|
public void setTaskId(Long taskId)
|
||||||
|
{
|
||||||
|
this.taskId = taskId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getTaskId()
|
||||||
|
{
|
||||||
|
return taskId;
|
||||||
|
}
|
||||||
|
public void setWorkstationId(Long workstationId)
|
||||||
|
{
|
||||||
|
this.workstationId = workstationId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getWorkstationId()
|
||||||
|
{
|
||||||
|
return workstationId;
|
||||||
|
}
|
||||||
|
public void setProcessId(Long processId)
|
||||||
|
{
|
||||||
|
this.processId = processId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getProcessId()
|
||||||
|
{
|
||||||
|
return processId;
|
||||||
|
}
|
||||||
|
public void setWorkorderId(Long workorderId)
|
||||||
|
{
|
||||||
|
this.workorderId = workorderId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getWorkorderId()
|
||||||
|
{
|
||||||
|
return workorderId;
|
||||||
|
}
|
||||||
|
public void setBatchCode(String batchCode)
|
||||||
|
{
|
||||||
|
this.batchCode = batchCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBatchCode()
|
||||||
|
{
|
||||||
|
return batchCode;
|
||||||
|
}
|
||||||
|
public void setSourceDocId(Long sourceDocId)
|
||||||
|
{
|
||||||
|
this.sourceDocId = sourceDocId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getSourceDocId()
|
||||||
|
{
|
||||||
|
return sourceDocId;
|
||||||
|
}
|
||||||
|
public void setSourceDocCode(String sourceDocCode)
|
||||||
|
{
|
||||||
|
this.sourceDocCode = sourceDocCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSourceDocCode()
|
||||||
|
{
|
||||||
|
return sourceDocCode;
|
||||||
|
}
|
||||||
|
public void setSourceDocType(String sourceDocType)
|
||||||
|
{
|
||||||
|
this.sourceDocType = sourceDocType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSourceDocType()
|
||||||
|
{
|
||||||
|
return sourceDocType;
|
||||||
|
}
|
||||||
|
public void setSourceLineId(Long sourceLineId)
|
||||||
|
{
|
||||||
|
this.sourceLineId = sourceLineId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getSourceLineId()
|
||||||
|
{
|
||||||
|
return sourceLineId;
|
||||||
|
}
|
||||||
|
public void setSourceBatchCode(String sourceBatchCode)
|
||||||
|
{
|
||||||
|
this.sourceBatchCode = sourceBatchCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSourceBatchCode()
|
||||||
|
{
|
||||||
|
return sourceBatchCode;
|
||||||
|
}
|
||||||
|
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 setQuantityConsumed(BigDecimal quantityConsumed)
|
||||||
|
{
|
||||||
|
this.quantityConsumed = quantityConsumed;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getQuantityConsumed()
|
||||||
|
{
|
||||||
|
return quantityConsumed;
|
||||||
|
}
|
||||||
|
public void setConsumeDate(Date consumeDate)
|
||||||
|
{
|
||||||
|
this.consumeDate = consumeDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getConsumeDate()
|
||||||
|
{
|
||||||
|
return consumeDate;
|
||||||
|
}
|
||||||
|
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("recordId", getRecordId())
|
||||||
|
.append("transOrderId", getTransOrderId())
|
||||||
|
.append("transOrderCode", getTransOrderCode())
|
||||||
|
.append("taskId", getTaskId())
|
||||||
|
.append("workstationId", getWorkstationId())
|
||||||
|
.append("processId", getProcessId())
|
||||||
|
.append("workorderId", getWorkorderId())
|
||||||
|
.append("batchCode", getBatchCode())
|
||||||
|
.append("sourceDocId", getSourceDocId())
|
||||||
|
.append("sourceDocCode", getSourceDocCode())
|
||||||
|
.append("sourceDocType", getSourceDocType())
|
||||||
|
.append("sourceLineId", getSourceLineId())
|
||||||
|
.append("sourceBatchCode", getSourceBatchCode())
|
||||||
|
.append("itemId", getItemId())
|
||||||
|
.append("itemCode", getItemCode())
|
||||||
|
.append("itemName", getItemName())
|
||||||
|
.append("specification", getSpecification())
|
||||||
|
.append("unitOfMeasure", getUnitOfMeasure())
|
||||||
|
.append("quantityConsumed", getQuantityConsumed())
|
||||||
|
.append("consumeDate", getConsumeDate())
|
||||||
|
.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,61 @@
|
|||||||
|
package com.ktg.mes.pro.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ktg.mes.pro.domain.ProTransConsume;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物料消耗记录Mapper接口
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2022-07-24
|
||||||
|
*/
|
||||||
|
public interface ProTransConsumeMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询物料消耗记录
|
||||||
|
*
|
||||||
|
* @param recordId 物料消耗记录主键
|
||||||
|
* @return 物料消耗记录
|
||||||
|
*/
|
||||||
|
public ProTransConsume selectProTransConsumeByRecordId(Long recordId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询物料消耗记录列表
|
||||||
|
*
|
||||||
|
* @param proTransConsume 物料消耗记录
|
||||||
|
* @return 物料消耗记录集合
|
||||||
|
*/
|
||||||
|
public List<ProTransConsume> selectProTransConsumeList(ProTransConsume proTransConsume);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增物料消耗记录
|
||||||
|
*
|
||||||
|
* @param proTransConsume 物料消耗记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertProTransConsume(ProTransConsume proTransConsume);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改物料消耗记录
|
||||||
|
*
|
||||||
|
* @param proTransConsume 物料消耗记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateProTransConsume(ProTransConsume proTransConsume);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除物料消耗记录
|
||||||
|
*
|
||||||
|
* @param recordId 物料消耗记录主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteProTransConsumeByRecordId(Long recordId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除物料消耗记录
|
||||||
|
*
|
||||||
|
* @param recordIds 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteProTransConsumeByRecordIds(Long[] recordIds);
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
package com.ktg.mes.pro.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ktg.mes.pro.domain.ProTransConsume;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物料消耗记录Service接口
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2022-07-24
|
||||||
|
*/
|
||||||
|
public interface IProTransConsumeService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询物料消耗记录
|
||||||
|
*
|
||||||
|
* @param recordId 物料消耗记录主键
|
||||||
|
* @return 物料消耗记录
|
||||||
|
*/
|
||||||
|
public ProTransConsume selectProTransConsumeByRecordId(Long recordId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询物料消耗记录列表
|
||||||
|
*
|
||||||
|
* @param proTransConsume 物料消耗记录
|
||||||
|
* @return 物料消耗记录集合
|
||||||
|
*/
|
||||||
|
public List<ProTransConsume> selectProTransConsumeList(ProTransConsume proTransConsume);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增物料消耗记录
|
||||||
|
*
|
||||||
|
* @param proTransConsume 物料消耗记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertProTransConsume(ProTransConsume proTransConsume);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改物料消耗记录
|
||||||
|
*
|
||||||
|
* @param proTransConsume 物料消耗记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateProTransConsume(ProTransConsume proTransConsume);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除物料消耗记录
|
||||||
|
*
|
||||||
|
* @param recordIds 需要删除的物料消耗记录主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteProTransConsumeByRecordIds(Long[] recordIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除物料消耗记录信息
|
||||||
|
*
|
||||||
|
* @param recordId 物料消耗记录主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteProTransConsumeByRecordId(Long recordId);
|
||||||
|
}
|
@ -0,0 +1,96 @@
|
|||||||
|
package com.ktg.mes.pro.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.pro.mapper.ProTransConsumeMapper;
|
||||||
|
import com.ktg.mes.pro.domain.ProTransConsume;
|
||||||
|
import com.ktg.mes.pro.service.IProTransConsumeService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物料消耗记录Service业务层处理
|
||||||
|
*
|
||||||
|
* @author yinjinlu
|
||||||
|
* @date 2022-07-24
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class ProTransConsumeServiceImpl implements IProTransConsumeService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private ProTransConsumeMapper proTransConsumeMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询物料消耗记录
|
||||||
|
*
|
||||||
|
* @param recordId 物料消耗记录主键
|
||||||
|
* @return 物料消耗记录
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ProTransConsume selectProTransConsumeByRecordId(Long recordId)
|
||||||
|
{
|
||||||
|
return proTransConsumeMapper.selectProTransConsumeByRecordId(recordId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询物料消耗记录列表
|
||||||
|
*
|
||||||
|
* @param proTransConsume 物料消耗记录
|
||||||
|
* @return 物料消耗记录
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<ProTransConsume> selectProTransConsumeList(ProTransConsume proTransConsume)
|
||||||
|
{
|
||||||
|
return proTransConsumeMapper.selectProTransConsumeList(proTransConsume);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增物料消耗记录
|
||||||
|
*
|
||||||
|
* @param proTransConsume 物料消耗记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertProTransConsume(ProTransConsume proTransConsume)
|
||||||
|
{
|
||||||
|
proTransConsume.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return proTransConsumeMapper.insertProTransConsume(proTransConsume);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改物料消耗记录
|
||||||
|
*
|
||||||
|
* @param proTransConsume 物料消耗记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateProTransConsume(ProTransConsume proTransConsume)
|
||||||
|
{
|
||||||
|
proTransConsume.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return proTransConsumeMapper.updateProTransConsume(proTransConsume);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除物料消耗记录
|
||||||
|
*
|
||||||
|
* @param recordIds 需要删除的物料消耗记录主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteProTransConsumeByRecordIds(Long[] recordIds)
|
||||||
|
{
|
||||||
|
return proTransConsumeMapper.deleteProTransConsumeByRecordIds(recordIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除物料消耗记录信息
|
||||||
|
*
|
||||||
|
* @param recordId 物料消耗记录主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteProTransConsumeByRecordId(Long recordId)
|
||||||
|
{
|
||||||
|
return proTransConsumeMapper.deleteProTransConsumeByRecordId(recordId);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user