流转单后台代码
This commit is contained in:
parent
afe77e394e
commit
5afe4401b1
@ -35,8 +35,9 @@ public class ProTaskIssueMobController extends BaseController {
|
||||
|
||||
/**
|
||||
* 查询当前工作站、当前任务的投料清单
|
||||
* 至少提供workstationId、taskId两个参数
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('mes:pro:taskissue:list')")
|
||||
///@PreAuthorize("@ss.hasPermi('mes:pro:taskissue:list')")
|
||||
@GetMapping("/getIssueList")
|
||||
public AjaxResult getIssueList(ProTaskIssue proTaskIssue) {
|
||||
List<ProTaskIssue> list = proTaskIssueService.selectProTaskIssueList(proTaskIssue);
|
||||
@ -48,7 +49,7 @@ public class ProTaskIssueMobController extends BaseController {
|
||||
* 如果某个领料单是领出到当前工作站或者当前任务的,则可以查询到
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('mes:pro:taskissue:list')")
|
||||
@GetMapping("/getIssueList")
|
||||
@GetMapping("/getReserveIssueList")
|
||||
public AjaxResult getReserveIssueList(ProTaskIssue proTaskIssue){
|
||||
WmIssueHeader param = new WmIssueHeader();
|
||||
//领料单上指定了工作站
|
||||
@ -140,6 +141,15 @@ public class ProTaskIssueMobController extends BaseController {
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除生产任务投料
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('mes:pro:taskissue:remove')")
|
||||
@Log(title = "生产任务投料", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{recordIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] recordIds)
|
||||
{
|
||||
return toAjax(proTaskIssueService.deleteProTaskIssueByRecordIds(recordIds));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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.ProTransOrder;
|
||||
import com.ktg.mes.pro.service.IProTransOrderService;
|
||||
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/transorder")
|
||||
public class ProTransOrderController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IProTransOrderService proTransOrderService;
|
||||
|
||||
/**
|
||||
* 查询流转单列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('mes:pro:transorder:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ProTransOrder proTransOrder)
|
||||
{
|
||||
startPage();
|
||||
List<ProTransOrder> list = proTransOrderService.selectProTransOrderList(proTransOrder);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出流转单列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('mes:pro:transorder:export')")
|
||||
@Log(title = "流转单", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, ProTransOrder proTransOrder)
|
||||
{
|
||||
List<ProTransOrder> list = proTransOrderService.selectProTransOrderList(proTransOrder);
|
||||
ExcelUtil<ProTransOrder> util = new ExcelUtil<ProTransOrder>(ProTransOrder.class);
|
||||
util.exportExcel(response, list, "流转单数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取流转单详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('mes:pro:transorder:query')")
|
||||
@GetMapping(value = "/{transOrderId}")
|
||||
public AjaxResult getInfo(@PathVariable("transOrderId") Long transOrderId)
|
||||
{
|
||||
return AjaxResult.success(proTransOrderService.selectProTransOrderByTransOrderId(transOrderId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增流转单
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('mes:pro:transorder:add')")
|
||||
@Log(title = "流转单", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ProTransOrder proTransOrder)
|
||||
{
|
||||
return toAjax(proTransOrderService.insertProTransOrder(proTransOrder));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改流转单
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('mes:pro:transorder:edit')")
|
||||
@Log(title = "流转单", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ProTransOrder proTransOrder)
|
||||
{
|
||||
return toAjax(proTransOrderService.updateProTransOrder(proTransOrder));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除流转单
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('mes:pro:transorder:remove')")
|
||||
@Log(title = "流转单", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{transOrderIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] transOrderIds)
|
||||
{
|
||||
return toAjax(proTransOrderService.deleteProTransOrderByTransOrderIds(transOrderIds));
|
||||
}
|
||||
}
|
378
ktg-mes/src/main/java/com/ktg/mes/pro/domain/ProTransOrder.java
Normal file
378
ktg-mes/src/main/java/com/ktg/mes/pro/domain/ProTransOrder.java
Normal file
@ -0,0 +1,378 @@
|
||||
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_order
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-07-24
|
||||
*/
|
||||
public class ProTransOrder extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 流转单ID */
|
||||
private Long transOrderId;
|
||||
|
||||
/** 流转单编号 */
|
||||
@Excel(name = "流转单编号")
|
||||
private String transOrderCode;
|
||||
|
||||
/** 生产任务ID */
|
||||
@Excel(name = "生产任务ID")
|
||||
private Long taskId;
|
||||
|
||||
/** 生产任务编号 */
|
||||
@Excel(name = "生产任务编号")
|
||||
private String taskCode;
|
||||
|
||||
/** 工作站ID */
|
||||
@Excel(name = "工作站ID")
|
||||
private Long workstationId;
|
||||
|
||||
/** 工作站编号 */
|
||||
@Excel(name = "工作站编号")
|
||||
private String workstationCode;
|
||||
|
||||
/** 工作站名称 */
|
||||
@Excel(name = "工作站名称")
|
||||
private String workstationName;
|
||||
|
||||
/** 工序ID */
|
||||
@Excel(name = "工序ID")
|
||||
private Long processId;
|
||||
|
||||
/** 工序编号 */
|
||||
@Excel(name = "工序编号")
|
||||
private String processCode;
|
||||
|
||||
/** 工序名称 */
|
||||
@Excel(name = "工序名称")
|
||||
private String processName;
|
||||
|
||||
/** 生产工单ID */
|
||||
@Excel(name = "生产工单ID")
|
||||
private Long workorderId;
|
||||
|
||||
/** 生产工单编号 */
|
||||
@Excel(name = "生产工单编号")
|
||||
private String workorderCode;
|
||||
|
||||
/** 生产工单名称 */
|
||||
@Excel(name = "生产工单名称")
|
||||
private String workorderName;
|
||||
|
||||
/** 批次号 */
|
||||
@Excel(name = "批次号")
|
||||
private String batchCode;
|
||||
|
||||
/** 产品物料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 quantityTransfered;
|
||||
|
||||
/** 生产日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "生产日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date produceDate;
|
||||
|
||||
/** 预留字段1 */
|
||||
private String attr1;
|
||||
|
||||
/** 预留字段2 */
|
||||
private String attr2;
|
||||
|
||||
/** 预留字段3 */
|
||||
private Long attr3;
|
||||
|
||||
/** 预留字段4 */
|
||||
private Long attr4;
|
||||
|
||||
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 setTaskCode(String taskCode)
|
||||
{
|
||||
this.taskCode = taskCode;
|
||||
}
|
||||
|
||||
public String getTaskCode()
|
||||
{
|
||||
return taskCode;
|
||||
}
|
||||
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 setWorkstationName(String workstationName)
|
||||
{
|
||||
this.workstationName = workstationName;
|
||||
}
|
||||
|
||||
public String getWorkstationName()
|
||||
{
|
||||
return workstationName;
|
||||
}
|
||||
public void setProcessId(Long processId)
|
||||
{
|
||||
this.processId = processId;
|
||||
}
|
||||
|
||||
public Long getProcessId()
|
||||
{
|
||||
return processId;
|
||||
}
|
||||
public void setProcessCode(String processCode)
|
||||
{
|
||||
this.processCode = processCode;
|
||||
}
|
||||
|
||||
public String getProcessCode()
|
||||
{
|
||||
return processCode;
|
||||
}
|
||||
public void setProcessName(String processName)
|
||||
{
|
||||
this.processName = processName;
|
||||
}
|
||||
|
||||
public String getProcessName()
|
||||
{
|
||||
return processName;
|
||||
}
|
||||
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 setWorkorderName(String workorderName)
|
||||
{
|
||||
this.workorderName = workorderName;
|
||||
}
|
||||
|
||||
public String getWorkorderName()
|
||||
{
|
||||
return workorderName;
|
||||
}
|
||||
public void setBatchCode(String batchCode)
|
||||
{
|
||||
this.batchCode = batchCode;
|
||||
}
|
||||
|
||||
public String getBatchCode()
|
||||
{
|
||||
return batchCode;
|
||||
}
|
||||
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 setQuantityTransfered(BigDecimal quantityTransfered)
|
||||
{
|
||||
this.quantityTransfered = quantityTransfered;
|
||||
}
|
||||
|
||||
public BigDecimal getQuantityTransfered()
|
||||
{
|
||||
return quantityTransfered;
|
||||
}
|
||||
public void setProduceDate(Date produceDate)
|
||||
{
|
||||
this.produceDate = produceDate;
|
||||
}
|
||||
|
||||
public Date getProduceDate()
|
||||
{
|
||||
return produceDate;
|
||||
}
|
||||
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("transOrderId", getTransOrderId())
|
||||
.append("transOrderCode", getTransOrderCode())
|
||||
.append("taskId", getTaskId())
|
||||
.append("taskCode", getTaskCode())
|
||||
.append("workstationId", getWorkstationId())
|
||||
.append("workstationCode", getWorkstationCode())
|
||||
.append("workstationName", getWorkstationName())
|
||||
.append("processId", getProcessId())
|
||||
.append("processCode", getProcessCode())
|
||||
.append("processName", getProcessName())
|
||||
.append("workorderId", getWorkorderId())
|
||||
.append("workorderCode", getWorkorderCode())
|
||||
.append("workorderName", getWorkorderName())
|
||||
.append("batchCode", getBatchCode())
|
||||
.append("itemId", getItemId())
|
||||
.append("itemCode", getItemCode())
|
||||
.append("itemName", getItemName())
|
||||
.append("specification", getSpecification())
|
||||
.append("unitOfMeasure", getUnitOfMeasure())
|
||||
.append("quantityTransfered", getQuantityTransfered())
|
||||
.append("produceDate", getProduceDate())
|
||||
.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.ProTransOrder;
|
||||
|
||||
/**
|
||||
* 流转单Mapper接口
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-07-24
|
||||
*/
|
||||
public interface ProTransOrderMapper
|
||||
{
|
||||
/**
|
||||
* 查询流转单
|
||||
*
|
||||
* @param transOrderId 流转单主键
|
||||
* @return 流转单
|
||||
*/
|
||||
public ProTransOrder selectProTransOrderByTransOrderId(Long transOrderId);
|
||||
|
||||
/**
|
||||
* 查询流转单列表
|
||||
*
|
||||
* @param proTransOrder 流转单
|
||||
* @return 流转单集合
|
||||
*/
|
||||
public List<ProTransOrder> selectProTransOrderList(ProTransOrder proTransOrder);
|
||||
|
||||
/**
|
||||
* 新增流转单
|
||||
*
|
||||
* @param proTransOrder 流转单
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertProTransOrder(ProTransOrder proTransOrder);
|
||||
|
||||
/**
|
||||
* 修改流转单
|
||||
*
|
||||
* @param proTransOrder 流转单
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateProTransOrder(ProTransOrder proTransOrder);
|
||||
|
||||
/**
|
||||
* 删除流转单
|
||||
*
|
||||
* @param transOrderId 流转单主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProTransOrderByTransOrderId(Long transOrderId);
|
||||
|
||||
/**
|
||||
* 批量删除流转单
|
||||
*
|
||||
* @param transOrderIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProTransOrderByTransOrderIds(Long[] transOrderIds);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ktg.mes.pro.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ktg.mes.pro.domain.ProTransOrder;
|
||||
|
||||
/**
|
||||
* 流转单Service接口
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-07-24
|
||||
*/
|
||||
public interface IProTransOrderService
|
||||
{
|
||||
/**
|
||||
* 查询流转单
|
||||
*
|
||||
* @param transOrderId 流转单主键
|
||||
* @return 流转单
|
||||
*/
|
||||
public ProTransOrder selectProTransOrderByTransOrderId(Long transOrderId);
|
||||
|
||||
/**
|
||||
* 查询流转单列表
|
||||
*
|
||||
* @param proTransOrder 流转单
|
||||
* @return 流转单集合
|
||||
*/
|
||||
public List<ProTransOrder> selectProTransOrderList(ProTransOrder proTransOrder);
|
||||
|
||||
/**
|
||||
* 新增流转单
|
||||
*
|
||||
* @param proTransOrder 流转单
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertProTransOrder(ProTransOrder proTransOrder);
|
||||
|
||||
/**
|
||||
* 修改流转单
|
||||
*
|
||||
* @param proTransOrder 流转单
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateProTransOrder(ProTransOrder proTransOrder);
|
||||
|
||||
/**
|
||||
* 批量删除流转单
|
||||
*
|
||||
* @param transOrderIds 需要删除的流转单主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProTransOrderByTransOrderIds(Long[] transOrderIds);
|
||||
|
||||
/**
|
||||
* 删除流转单信息
|
||||
*
|
||||
* @param transOrderId 流转单主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProTransOrderByTransOrderId(Long transOrderId);
|
||||
}
|
@ -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.ProTransOrderMapper;
|
||||
import com.ktg.mes.pro.domain.ProTransOrder;
|
||||
import com.ktg.mes.pro.service.IProTransOrderService;
|
||||
|
||||
/**
|
||||
* 流转单Service业务层处理
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-07-24
|
||||
*/
|
||||
@Service
|
||||
public class ProTransOrderServiceImpl implements IProTransOrderService
|
||||
{
|
||||
@Autowired
|
||||
private ProTransOrderMapper proTransOrderMapper;
|
||||
|
||||
/**
|
||||
* 查询流转单
|
||||
*
|
||||
* @param transOrderId 流转单主键
|
||||
* @return 流转单
|
||||
*/
|
||||
@Override
|
||||
public ProTransOrder selectProTransOrderByTransOrderId(Long transOrderId)
|
||||
{
|
||||
return proTransOrderMapper.selectProTransOrderByTransOrderId(transOrderId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询流转单列表
|
||||
*
|
||||
* @param proTransOrder 流转单
|
||||
* @return 流转单
|
||||
*/
|
||||
@Override
|
||||
public List<ProTransOrder> selectProTransOrderList(ProTransOrder proTransOrder)
|
||||
{
|
||||
return proTransOrderMapper.selectProTransOrderList(proTransOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增流转单
|
||||
*
|
||||
* @param proTransOrder 流转单
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertProTransOrder(ProTransOrder proTransOrder)
|
||||
{
|
||||
proTransOrder.setCreateTime(DateUtils.getNowDate());
|
||||
return proTransOrderMapper.insertProTransOrder(proTransOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改流转单
|
||||
*
|
||||
* @param proTransOrder 流转单
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateProTransOrder(ProTransOrder proTransOrder)
|
||||
{
|
||||
proTransOrder.setUpdateTime(DateUtils.getNowDate());
|
||||
return proTransOrderMapper.updateProTransOrder(proTransOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除流转单
|
||||
*
|
||||
* @param transOrderIds 需要删除的流转单主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteProTransOrderByTransOrderIds(Long[] transOrderIds)
|
||||
{
|
||||
return proTransOrderMapper.deleteProTransOrderByTransOrderIds(transOrderIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除流转单信息
|
||||
*
|
||||
* @param transOrderId 流转单主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteProTransOrderByTransOrderId(Long transOrderId)
|
||||
{
|
||||
return proTransOrderMapper.deleteProTransOrderByTransOrderId(transOrderId);
|
||||
}
|
||||
}
|
187
ktg-mes/src/main/resources/mapper/pro/ProTransOrderMapper.xml
Normal file
187
ktg-mes/src/main/resources/mapper/pro/ProTransOrderMapper.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.pro.mapper.ProTransOrderMapper">
|
||||
|
||||
<resultMap type="ProTransOrder" id="ProTransOrderResult">
|
||||
<result property="transOrderId" column="trans_order_id" />
|
||||
<result property="transOrderCode" column="trans_order_code" />
|
||||
<result property="taskId" column="task_id" />
|
||||
<result property="taskCode" column="task_code" />
|
||||
<result property="workstationId" column="workstation_id" />
|
||||
<result property="workstationCode" column="workstation_code" />
|
||||
<result property="workstationName" column="workstation_name" />
|
||||
<result property="processId" column="process_id" />
|
||||
<result property="processCode" column="process_code" />
|
||||
<result property="processName" column="process_name" />
|
||||
<result property="workorderId" column="workorder_id" />
|
||||
<result property="workorderCode" column="workorder_code" />
|
||||
<result property="workorderName" column="workorder_name" />
|
||||
<result property="batchCode" column="batch_code" />
|
||||
<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="quantityTransfered" column="quantity_transfered" />
|
||||
<result property="produceDate" column="produce_date" />
|
||||
<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="selectProTransOrderVo">
|
||||
select trans_order_id, trans_order_code, task_id, task_code, workstation_id, workstation_code, workstation_name, process_id, process_code, process_name, workorder_id, workorder_code, workorder_name, batch_code, item_id, item_code, item_name, specification, unit_of_measure, quantity_transfered, produce_date, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from pro_trans_order
|
||||
</sql>
|
||||
|
||||
<select id="selectProTransOrderList" parameterType="ProTransOrder" resultMap="ProTransOrderResult">
|
||||
<include refid="selectProTransOrderVo"/>
|
||||
<where>
|
||||
<if test="transOrderCode != null and transOrderCode != ''"> and trans_order_code = #{transOrderCode}</if>
|
||||
<if test="taskId != null "> and task_id = #{taskId}</if>
|
||||
<if test="taskCode != null and taskCode != ''"> and task_code = #{taskCode}</if>
|
||||
<if test="workstationId != null "> and workstation_id = #{workstationId}</if>
|
||||
<if test="workstationCode != null and workstationCode != ''"> and workstation_code = #{workstationCode}</if>
|
||||
<if test="workstationName != null and workstationName != ''"> and workstation_name like concat('%', #{workstationName}, '%')</if>
|
||||
<if test="processId != null "> and process_id = #{processId}</if>
|
||||
<if test="processCode != null and processCode != ''"> and process_code = #{processCode}</if>
|
||||
<if test="processName != null and processName != ''"> and process_name like concat('%', #{processName}, '%')</if>
|
||||
<if test="workorderId != null "> and workorder_id = #{workorderId}</if>
|
||||
<if test="workorderCode != null and workorderCode != ''"> and workorder_code = #{workorderCode}</if>
|
||||
<if test="workorderName != null and workorderName != ''"> and workorder_name like concat('%', #{workorderName}, '%')</if>
|
||||
<if test="batchCode != null and batchCode != ''"> and batch_code = #{batchCode}</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="quantityTransfered != null "> and quantity_transfered = #{quantityTransfered}</if>
|
||||
<if test="produceDate != null "> and produce_date = #{produceDate}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectProTransOrderByTransOrderId" parameterType="Long" resultMap="ProTransOrderResult">
|
||||
<include refid="selectProTransOrderVo"/>
|
||||
where trans_order_id = #{transOrderId}
|
||||
</select>
|
||||
|
||||
<insert id="insertProTransOrder" parameterType="ProTransOrder" useGeneratedKeys="true" keyProperty="transOrderId">
|
||||
insert into pro_trans_order
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="transOrderCode != null">trans_order_code,</if>
|
||||
<if test="taskId != null">task_id,</if>
|
||||
<if test="taskCode != null">task_code,</if>
|
||||
<if test="workstationId != null">workstation_id,</if>
|
||||
<if test="workstationCode != null">workstation_code,</if>
|
||||
<if test="workstationName != null">workstation_name,</if>
|
||||
<if test="processId != null">process_id,</if>
|
||||
<if test="processCode != null">process_code,</if>
|
||||
<if test="processName != null">process_name,</if>
|
||||
<if test="workorderId != null">workorder_id,</if>
|
||||
<if test="workorderCode != null">workorder_code,</if>
|
||||
<if test="workorderName != null">workorder_name,</if>
|
||||
<if test="batchCode != null">batch_code,</if>
|
||||
<if test="itemId != null">item_id,</if>
|
||||
<if test="itemCode != null and itemCode != ''">item_code,</if>
|
||||
<if test="itemName != null and itemName != ''">item_name,</if>
|
||||
<if test="specification != null">specification,</if>
|
||||
<if test="unitOfMeasure != null and unitOfMeasure != ''">unit_of_measure,</if>
|
||||
<if test="quantityTransfered != null">quantity_transfered,</if>
|
||||
<if test="produceDate != null">produce_date,</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="transOrderCode != null">#{transOrderCode},</if>
|
||||
<if test="taskId != null">#{taskId},</if>
|
||||
<if test="taskCode != null">#{taskCode},</if>
|
||||
<if test="workstationId != null">#{workstationId},</if>
|
||||
<if test="workstationCode != null">#{workstationCode},</if>
|
||||
<if test="workstationName != null">#{workstationName},</if>
|
||||
<if test="processId != null">#{processId},</if>
|
||||
<if test="processCode != null">#{processCode},</if>
|
||||
<if test="processName != null">#{processName},</if>
|
||||
<if test="workorderId != null">#{workorderId},</if>
|
||||
<if test="workorderCode != null">#{workorderCode},</if>
|
||||
<if test="workorderName != null">#{workorderName},</if>
|
||||
<if test="batchCode != null">#{batchCode},</if>
|
||||
<if test="itemId != null">#{itemId},</if>
|
||||
<if test="itemCode != null and itemCode != ''">#{itemCode},</if>
|
||||
<if test="itemName != null and itemName != ''">#{itemName},</if>
|
||||
<if test="specification != null">#{specification},</if>
|
||||
<if test="unitOfMeasure != null and unitOfMeasure != ''">#{unitOfMeasure},</if>
|
||||
<if test="quantityTransfered != null">#{quantityTransfered},</if>
|
||||
<if test="produceDate != null">#{produceDate},</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="updateProTransOrder" parameterType="ProTransOrder">
|
||||
update pro_trans_order
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="transOrderCode != null">trans_order_code = #{transOrderCode},</if>
|
||||
<if test="taskId != null">task_id = #{taskId},</if>
|
||||
<if test="taskCode != null">task_code = #{taskCode},</if>
|
||||
<if test="workstationId != null">workstation_id = #{workstationId},</if>
|
||||
<if test="workstationCode != null">workstation_code = #{workstationCode},</if>
|
||||
<if test="workstationName != null">workstation_name = #{workstationName},</if>
|
||||
<if test="processId != null">process_id = #{processId},</if>
|
||||
<if test="processCode != null">process_code = #{processCode},</if>
|
||||
<if test="processName != null">process_name = #{processName},</if>
|
||||
<if test="workorderId != null">workorder_id = #{workorderId},</if>
|
||||
<if test="workorderCode != null">workorder_code = #{workorderCode},</if>
|
||||
<if test="workorderName != null">workorder_name = #{workorderName},</if>
|
||||
<if test="batchCode != null">batch_code = #{batchCode},</if>
|
||||
<if test="itemId != null">item_id = #{itemId},</if>
|
||||
<if test="itemCode != null and itemCode != ''">item_code = #{itemCode},</if>
|
||||
<if test="itemName != null and itemName != ''">item_name = #{itemName},</if>
|
||||
<if test="specification != null">specification = #{specification},</if>
|
||||
<if test="unitOfMeasure != null and unitOfMeasure != ''">unit_of_measure = #{unitOfMeasure},</if>
|
||||
<if test="quantityTransfered != null">quantity_transfered = #{quantityTransfered},</if>
|
||||
<if test="produceDate != null">produce_date = #{produceDate},</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 trans_order_id = #{transOrderId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteProTransOrderByTransOrderId" parameterType="Long">
|
||||
delete from pro_trans_order where trans_order_id = #{transOrderId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteProTransOrderByTransOrderIds" parameterType="String">
|
||||
delete from pro_trans_order where trans_order_id in
|
||||
<foreach item="transOrderId" collection="array" open="(" separator="," close=")">
|
||||
#{transOrderId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Loading…
Reference in New Issue
Block a user