change - 生产工单执行用户
parent
a92ba67876
commit
9ff53f30fa
@ -0,0 +1,100 @@
|
||||
package com.os.mes.prod.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.os.common.annotation.Log;
|
||||
import com.os.common.core.controller.BaseController;
|
||||
import com.os.common.core.domain.AjaxResult;
|
||||
import com.os.common.enums.BusinessType;
|
||||
import com.os.mes.prod.domain.ProdPlanExecuteUser;
|
||||
import com.os.mes.prod.service.IProdPlanExecuteUserService;
|
||||
import com.os.common.utils.poi.ExcelUtil;
|
||||
import com.os.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 生产工单执行用户Controller
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2024-09-26
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/mes/prod/planExecuteUser")
|
||||
public class ProdPlanExecuteUserController extends BaseController {
|
||||
@Autowired
|
||||
private IProdPlanExecuteUserService prodPlanExecuteUserService;
|
||||
|
||||
/**
|
||||
* 查询生产工单执行用户列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('mes/prod:planExecuteUser:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ProdPlanExecuteUser prodPlanExecuteUser) {
|
||||
startPage();
|
||||
List<ProdPlanExecuteUser> list = prodPlanExecuteUserService.selectProdPlanExecuteUserList(prodPlanExecuteUser);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出生产工单执行用户列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('mes/prod:planExecuteUser:export')")
|
||||
@Log(title = "生产工单执行用户", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, ProdPlanExecuteUser prodPlanExecuteUser) {
|
||||
List<ProdPlanExecuteUser> list = prodPlanExecuteUserService.selectProdPlanExecuteUserList(prodPlanExecuteUser);
|
||||
ExcelUtil<ProdPlanExecuteUser> util = new ExcelUtil<ProdPlanExecuteUser>(ProdPlanExecuteUser.class);
|
||||
util.exportExcel(response, list, "生产工单执行用户数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取生产工单执行用户详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('mes/prod:planExecuteUser:query')")
|
||||
@GetMapping(value = "/{objId}")
|
||||
public AjaxResult getInfo(@PathVariable("objId") Long objId) {
|
||||
return success(prodPlanExecuteUserService.selectProdPlanExecuteUserByObjId(objId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增生产工单执行用户
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('mes/prod:planExecuteUser:add')")
|
||||
@Log(title = "生产工单执行用户", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ProdPlanExecuteUser prodPlanExecuteUser) {
|
||||
prodPlanExecuteUser.setCreateBy(getUsername());
|
||||
return toAjax(prodPlanExecuteUserService.insertProdPlanExecuteUser(prodPlanExecuteUser));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改生产工单执行用户
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('mes/prod:planExecuteUser:edit')")
|
||||
@Log(title = "生产工单执行用户", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ProdPlanExecuteUser prodPlanExecuteUser) {
|
||||
prodPlanExecuteUser.setUpdateBy(getUsername());
|
||||
return toAjax(prodPlanExecuteUserService.updateProdPlanExecuteUser(prodPlanExecuteUser));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除生产工单执行用户
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('mes/prod:planExecuteUser:remove')")
|
||||
@Log(title = "生产工单执行用户", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{objIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] objIds) {
|
||||
return toAjax(prodPlanExecuteUserService.deleteProdPlanExecuteUserByObjIds(objIds));
|
||||
}
|
||||
}
|
@ -0,0 +1,266 @@
|
||||
package com.os.mes.prod.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.os.common.annotation.Excel;
|
||||
import com.os.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 生产工单执行用户对象 prod_plan_execute_user
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2024-09-26
|
||||
*/
|
||||
public class ProdPlanExecuteUser extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键标识
|
||||
*/
|
||||
private Long objId;
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
@Excel(name = "订单编号")
|
||||
private String orderCode;
|
||||
|
||||
/**
|
||||
* 工单编号
|
||||
*/
|
||||
@Excel(name = "工单编号")
|
||||
private String planCode;
|
||||
|
||||
/**
|
||||
* 工序编号
|
||||
*/
|
||||
@Excel(name = "工序编号")
|
||||
private String processCode;
|
||||
|
||||
/**
|
||||
* 工位编号
|
||||
*/
|
||||
@Excel(name = "工位编号")
|
||||
private String stationCode;
|
||||
|
||||
/**
|
||||
* 工位名称
|
||||
*/
|
||||
private String stationName;
|
||||
|
||||
/**
|
||||
* 员工ID
|
||||
*/
|
||||
@Excel(name = "员工ID")
|
||||
private String staffId;
|
||||
|
||||
/**
|
||||
* 员工名称
|
||||
*/
|
||||
@Excel(name = "员工名称")
|
||||
private String staffName;
|
||||
|
||||
/**
|
||||
* 生产米数
|
||||
*/
|
||||
@Excel(name = "生产米数")
|
||||
private BigDecimal completeAmount;
|
||||
|
||||
/**
|
||||
* 工单明细开始时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "工单明细开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date planBeginDate;
|
||||
|
||||
/**
|
||||
* 工单明细结束时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "工单明细结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date planEndDate;
|
||||
|
||||
/**
|
||||
* 启用标识
|
||||
*/
|
||||
@Excel(name = "启用标识")
|
||||
private String isFlag;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@Excel(name = "创建人")
|
||||
private String createdBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createdTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@Excel(name = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updatedTime;
|
||||
|
||||
public String getStationName() {
|
||||
return stationName;
|
||||
}
|
||||
|
||||
public void setStationName(String stationName) {
|
||||
this.stationName = stationName;
|
||||
}
|
||||
|
||||
public String getStaffName() {
|
||||
return staffName;
|
||||
}
|
||||
|
||||
public void setStaffName(String staffName) {
|
||||
this.staffName = staffName;
|
||||
}
|
||||
|
||||
public void setObjId(Long objId) {
|
||||
this.objId = objId;
|
||||
}
|
||||
|
||||
public Long getObjId() {
|
||||
return objId;
|
||||
}
|
||||
|
||||
public void setOrderCode(String orderCode) {
|
||||
this.orderCode = orderCode;
|
||||
}
|
||||
|
||||
public String getOrderCode() {
|
||||
return orderCode;
|
||||
}
|
||||
|
||||
public void setPlanCode(String planCode) {
|
||||
this.planCode = planCode;
|
||||
}
|
||||
|
||||
public String getPlanCode() {
|
||||
return planCode;
|
||||
}
|
||||
|
||||
public void setProcessCode(String processCode) {
|
||||
this.processCode = processCode;
|
||||
}
|
||||
|
||||
public String getProcessCode() {
|
||||
return processCode;
|
||||
}
|
||||
|
||||
public void setStationCode(String stationCode) {
|
||||
this.stationCode = stationCode;
|
||||
}
|
||||
|
||||
public String getStationCode() {
|
||||
return stationCode;
|
||||
}
|
||||
|
||||
public void setStaffId(String staffId) {
|
||||
this.staffId = staffId;
|
||||
}
|
||||
|
||||
public String getStaffId() {
|
||||
return staffId;
|
||||
}
|
||||
|
||||
public void setCompleteAmount(BigDecimal completeAmount) {
|
||||
this.completeAmount = completeAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getCompleteAmount() {
|
||||
return completeAmount;
|
||||
}
|
||||
|
||||
public void setPlanBeginDate(Date planBeginDate) {
|
||||
this.planBeginDate = planBeginDate;
|
||||
}
|
||||
|
||||
public Date getPlanBeginDate() {
|
||||
return planBeginDate;
|
||||
}
|
||||
|
||||
public void setPlanEndDate(Date planEndDate) {
|
||||
this.planEndDate = planEndDate;
|
||||
}
|
||||
|
||||
public Date getPlanEndDate() {
|
||||
return planEndDate;
|
||||
}
|
||||
|
||||
public void setIsFlag(String isFlag) {
|
||||
this.isFlag = isFlag;
|
||||
}
|
||||
|
||||
public String getIsFlag() {
|
||||
return isFlag;
|
||||
}
|
||||
|
||||
public void setCreatedBy(String createdBy) {
|
||||
this.createdBy = createdBy;
|
||||
}
|
||||
|
||||
public String getCreatedBy() {
|
||||
return createdBy;
|
||||
}
|
||||
|
||||
public void setCreatedTime(Date createdTime) {
|
||||
this.createdTime = createdTime;
|
||||
}
|
||||
|
||||
public Date getCreatedTime() {
|
||||
return createdTime;
|
||||
}
|
||||
|
||||
public void setUpdatedBy(String updatedBy) {
|
||||
this.updatedBy = updatedBy;
|
||||
}
|
||||
|
||||
public String getUpdatedBy() {
|
||||
return updatedBy;
|
||||
}
|
||||
|
||||
public void setUpdatedTime(Date updatedTime) {
|
||||
this.updatedTime = updatedTime;
|
||||
}
|
||||
|
||||
public Date getUpdatedTime() {
|
||||
return updatedTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("objId", getObjId())
|
||||
.append("orderCode", getOrderCode())
|
||||
.append("planCode", getPlanCode())
|
||||
.append("processCode", getProcessCode())
|
||||
.append("stationCode", getStationCode())
|
||||
.append("staffId", getStaffId())
|
||||
.append("completeAmount", getCompleteAmount())
|
||||
.append("planBeginDate", getPlanBeginDate())
|
||||
.append("planEndDate", getPlanEndDate())
|
||||
.append("isFlag", getIsFlag())
|
||||
.append("createdBy", getCreatedBy())
|
||||
.append("createdTime", getCreatedTime())
|
||||
.append("updatedBy", getUpdatedBy())
|
||||
.append("updatedTime", getUpdatedTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.os.mes.prod.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.os.mes.prod.domain.ProdPlanExecuteUser;
|
||||
|
||||
/**
|
||||
* 生产工单执行用户Mapper接口
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2024-09-26
|
||||
*/
|
||||
public interface ProdPlanExecuteUserMapper {
|
||||
/**
|
||||
* 查询生产工单执行用户
|
||||
*
|
||||
* @param objId 生产工单执行用户主键
|
||||
* @return 生产工单执行用户
|
||||
*/
|
||||
public ProdPlanExecuteUser selectProdPlanExecuteUserByObjId(Long objId);
|
||||
|
||||
/**
|
||||
* 查询生产工单执行用户列表
|
||||
*
|
||||
* @param prodPlanExecuteUser 生产工单执行用户
|
||||
* @return 生产工单执行用户集合
|
||||
*/
|
||||
public List<ProdPlanExecuteUser> selectProdPlanExecuteUserList(ProdPlanExecuteUser prodPlanExecuteUser);
|
||||
|
||||
/**
|
||||
* 新增生产工单执行用户
|
||||
*
|
||||
* @param prodPlanExecuteUser 生产工单执行用户
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertProdPlanExecuteUser(ProdPlanExecuteUser prodPlanExecuteUser);
|
||||
|
||||
/**
|
||||
* 修改生产工单执行用户
|
||||
*
|
||||
* @param prodPlanExecuteUser 生产工单执行用户
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateProdPlanExecuteUser(ProdPlanExecuteUser prodPlanExecuteUser);
|
||||
|
||||
/**
|
||||
* 删除生产工单执行用户
|
||||
*
|
||||
* @param objId 生产工单执行用户主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProdPlanExecuteUserByObjId(Long objId);
|
||||
|
||||
/**
|
||||
* 批量删除生产工单执行用户
|
||||
*
|
||||
* @param objIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProdPlanExecuteUserByObjIds(Long[] objIds);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.os.mes.prod.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.os.mes.prod.domain.ProdPlanExecuteUser;
|
||||
|
||||
/**
|
||||
* 生产工单执行用户Service接口
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2024-09-26
|
||||
*/
|
||||
public interface IProdPlanExecuteUserService {
|
||||
/**
|
||||
* 查询生产工单执行用户
|
||||
*
|
||||
* @param objId 生产工单执行用户主键
|
||||
* @return 生产工单执行用户
|
||||
*/
|
||||
public ProdPlanExecuteUser selectProdPlanExecuteUserByObjId(Long objId);
|
||||
|
||||
/**
|
||||
* 查询生产工单执行用户列表
|
||||
*
|
||||
* @param prodPlanExecuteUser 生产工单执行用户
|
||||
* @return 生产工单执行用户集合
|
||||
*/
|
||||
public List<ProdPlanExecuteUser> selectProdPlanExecuteUserList(ProdPlanExecuteUser prodPlanExecuteUser);
|
||||
|
||||
/**
|
||||
* 新增生产工单执行用户
|
||||
*
|
||||
* @param prodPlanExecuteUser 生产工单执行用户
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertProdPlanExecuteUser(ProdPlanExecuteUser prodPlanExecuteUser);
|
||||
|
||||
/**
|
||||
* 修改生产工单执行用户
|
||||
*
|
||||
* @param prodPlanExecuteUser 生产工单执行用户
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateProdPlanExecuteUser(ProdPlanExecuteUser prodPlanExecuteUser);
|
||||
|
||||
/**
|
||||
* 批量删除生产工单执行用户
|
||||
*
|
||||
* @param objIds 需要删除的生产工单执行用户主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProdPlanExecuteUserByObjIds(Long[] objIds);
|
||||
|
||||
/**
|
||||
* 删除生产工单执行用户信息
|
||||
*
|
||||
* @param objId 生产工单执行用户主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProdPlanExecuteUserByObjId(Long objId);
|
||||
}
|
@ -0,0 +1,87 @@
|
||||
package com.os.mes.prod.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.os.mes.prod.mapper.ProdPlanExecuteUserMapper;
|
||||
import com.os.mes.prod.domain.ProdPlanExecuteUser;
|
||||
import com.os.mes.prod.service.IProdPlanExecuteUserService;
|
||||
|
||||
/**
|
||||
* 生产工单执行用户Service业务层处理
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2024-09-26
|
||||
*/
|
||||
@Service
|
||||
public class ProdPlanExecuteUserServiceImpl implements IProdPlanExecuteUserService {
|
||||
@Autowired
|
||||
private ProdPlanExecuteUserMapper prodPlanExecuteUserMapper;
|
||||
|
||||
/**
|
||||
* 查询生产工单执行用户
|
||||
*
|
||||
* @param objId 生产工单执行用户主键
|
||||
* @return 生产工单执行用户
|
||||
*/
|
||||
@Override
|
||||
public ProdPlanExecuteUser selectProdPlanExecuteUserByObjId(Long objId) {
|
||||
return prodPlanExecuteUserMapper.selectProdPlanExecuteUserByObjId(objId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询生产工单执行用户列表
|
||||
*
|
||||
* @param prodPlanExecuteUser 生产工单执行用户
|
||||
* @return 生产工单执行用户
|
||||
*/
|
||||
@Override
|
||||
public List<ProdPlanExecuteUser> selectProdPlanExecuteUserList(ProdPlanExecuteUser prodPlanExecuteUser) {
|
||||
return prodPlanExecuteUserMapper.selectProdPlanExecuteUserList(prodPlanExecuteUser);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增生产工单执行用户
|
||||
*
|
||||
* @param prodPlanExecuteUser 生产工单执行用户
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertProdPlanExecuteUser(ProdPlanExecuteUser prodPlanExecuteUser) {
|
||||
return prodPlanExecuteUserMapper.insertProdPlanExecuteUser(prodPlanExecuteUser);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改生产工单执行用户
|
||||
*
|
||||
* @param prodPlanExecuteUser 生产工单执行用户
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateProdPlanExecuteUser(ProdPlanExecuteUser prodPlanExecuteUser) {
|
||||
return prodPlanExecuteUserMapper.updateProdPlanExecuteUser(prodPlanExecuteUser);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除生产工单执行用户
|
||||
*
|
||||
* @param objIds 需要删除的生产工单执行用户主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteProdPlanExecuteUserByObjIds(Long[] objIds) {
|
||||
return prodPlanExecuteUserMapper.deleteProdPlanExecuteUserByObjIds(objIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除生产工单执行用户信息
|
||||
*
|
||||
* @param objId 生产工单执行用户主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteProdPlanExecuteUserByObjId(Long objId) {
|
||||
return prodPlanExecuteUserMapper.deleteProdPlanExecuteUserByObjId(objId);
|
||||
}
|
||||
}
|
@ -0,0 +1,140 @@
|
||||
<?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.os.mes.prod.mapper.ProdPlanExecuteUserMapper">
|
||||
|
||||
<resultMap type="ProdPlanExecuteUser" id="ProdPlanExecuteUserResult">
|
||||
<result property="objId" column="obj_id"/>
|
||||
<result property="orderCode" column="order_code"/>
|
||||
<result property="planCode" column="plan_code"/>
|
||||
<result property="processCode" column="process_code"/>
|
||||
<result property="stationCode" column="station_code"/>
|
||||
<result property="staffId" column="staff_id"/>
|
||||
<result property="completeAmount" column="complete_amount"/>
|
||||
<result property="planBeginDate" column="plan_begin_date"/>
|
||||
<result property="planEndDate" column="plan_end_date"/>
|
||||
<result property="isFlag" column="is_flag"/>
|
||||
<result property="createdBy" column="created_by"/>
|
||||
<result property="createdTime" column="created_time"/>
|
||||
<result property="updatedBy" column="updated_by"/>
|
||||
<result property="updatedTime" column="updated_time"/>
|
||||
<result property="staffName" column="staff_name"/>
|
||||
<result property="stationName" column="station_name"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectProdPlanExecuteUserVo">
|
||||
select ppeu.obj_id,
|
||||
ppeu.order_code,
|
||||
ppeu.plan_code,
|
||||
ppeu.process_code,
|
||||
ppeu.station_code,
|
||||
ppeu.staff_id,
|
||||
ppeu.complete_amount,
|
||||
ppeu.plan_begin_date,
|
||||
ppeu.plan_end_date,
|
||||
ppeu.is_flag,
|
||||
ppeu.created_by,
|
||||
ppeu.created_time,
|
||||
ppeu.updated_by,
|
||||
ppeu.updated_time,
|
||||
bsi.staff_name,
|
||||
bpl.product_line_name station_name
|
||||
from prod_plan_execute_user ppeu
|
||||
left join base_staff_info bsi on bsi.staff_id = ppeu.staff_id
|
||||
left join base_product_line bpl on bpl.product_line_code = ppeu.station_code
|
||||
</sql>
|
||||
|
||||
<select id="selectProdPlanExecuteUserList" parameterType="ProdPlanExecuteUser"
|
||||
resultMap="ProdPlanExecuteUserResult">
|
||||
<include refid="selectProdPlanExecuteUserVo"/>
|
||||
<where>
|
||||
<if test="orderCode != null and orderCode != ''">and order_code = #{orderCode}</if>
|
||||
<if test="planCode != null and planCode != ''">and plan_code = #{planCode}</if>
|
||||
<if test="processCode != null and processCode != ''">and process_code = #{processCode}</if>
|
||||
<if test="stationCode != null and stationCode != ''">and station_code = #{stationCode}</if>
|
||||
<if test="staffId != null and staffId != ''">and staff_id = #{staffId}</if>
|
||||
<if test="completeAmount != null ">and complete_amount = #{completeAmount}</if>
|
||||
<if test="planBeginDate != null ">and plan_begin_date = #{planBeginDate}</if>
|
||||
<if test="planEndDate != null ">and plan_end_date = #{planEndDate}</if>
|
||||
<if test="isFlag != null and isFlag != ''">and is_flag = #{isFlag}</if>
|
||||
<if test="createdBy != null and createdBy != ''">and created_by = #{createdBy}</if>
|
||||
<if test="createdTime != null ">and created_time = #{createdTime}</if>
|
||||
<if test="updatedBy != null and updatedBy != ''">and updated_by = #{updatedBy}</if>
|
||||
<if test="updatedTime != null ">and updated_time = #{updatedTime}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectProdPlanExecuteUserByObjId" parameterType="Long" resultMap="ProdPlanExecuteUserResult">
|
||||
<include refid="selectProdPlanExecuteUserVo"/>
|
||||
where obj_id = #{objId}
|
||||
</select>
|
||||
|
||||
<insert id="insertProdPlanExecuteUser" parameterType="ProdPlanExecuteUser" useGeneratedKeys="true"
|
||||
keyProperty="objId">
|
||||
insert into prod_plan_execute_user
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="orderCode != null">order_code,</if>
|
||||
<if test="planCode != null">plan_code,</if>
|
||||
<if test="processCode != null">process_code,</if>
|
||||
<if test="stationCode != null">station_code,</if>
|
||||
<if test="staffId != null">staff_id,</if>
|
||||
<if test="completeAmount != null">complete_amount,</if>
|
||||
<if test="planBeginDate != null">plan_begin_date,</if>
|
||||
<if test="planEndDate != null">plan_end_date,</if>
|
||||
<if test="isFlag != null">is_flag,</if>
|
||||
<if test="createdBy != null">created_by,</if>
|
||||
<if test="createdTime != null">created_time,</if>
|
||||
<if test="updatedBy != null">updated_by,</if>
|
||||
<if test="updatedTime != null">updated_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="orderCode != null">#{orderCode},</if>
|
||||
<if test="planCode != null">#{planCode},</if>
|
||||
<if test="processCode != null">#{processCode},</if>
|
||||
<if test="stationCode != null">#{stationCode},</if>
|
||||
<if test="staffId != null">#{staffId},</if>
|
||||
<if test="completeAmount != null">#{completeAmount},</if>
|
||||
<if test="planBeginDate != null">#{planBeginDate},</if>
|
||||
<if test="planEndDate != null">#{planEndDate},</if>
|
||||
<if test="isFlag != null">#{isFlag},</if>
|
||||
<if test="createdBy != null">#{createdBy},</if>
|
||||
<if test="createdTime != null">#{createdTime},</if>
|
||||
<if test="updatedBy != null">#{updatedBy},</if>
|
||||
<if test="updatedTime != null">#{updatedTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateProdPlanExecuteUser" parameterType="ProdPlanExecuteUser">
|
||||
update prod_plan_execute_user
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="orderCode != null">order_code = #{orderCode},</if>
|
||||
<if test="planCode != null">plan_code = #{planCode},</if>
|
||||
<if test="processCode != null">process_code = #{processCode},</if>
|
||||
<if test="stationCode != null">station_code = #{stationCode},</if>
|
||||
<if test="staffId != null">staff_id = #{staffId},</if>
|
||||
<if test="completeAmount != null">complete_amount = #{completeAmount},</if>
|
||||
<if test="planBeginDate != null">plan_begin_date = #{planBeginDate},</if>
|
||||
<if test="planEndDate != null">plan_end_date = #{planEndDate},</if>
|
||||
<if test="isFlag != null">is_flag = #{isFlag},</if>
|
||||
<if test="createdBy != null">created_by = #{createdBy},</if>
|
||||
<if test="createdTime != null">created_time = #{createdTime},</if>
|
||||
<if test="updatedBy != null">updated_by = #{updatedBy},</if>
|
||||
<if test="updatedTime != null">updated_time = #{updatedTime},</if>
|
||||
</trim>
|
||||
where obj_id = #{objId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteProdPlanExecuteUserByObjId" parameterType="Long">
|
||||
delete
|
||||
from prod_plan_execute_user
|
||||
where obj_id = #{objId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteProdPlanExecuteUserByObjIds" parameterType="String">
|
||||
delete from prod_plan_execute_user where obj_id in
|
||||
<foreach item="objId" collection="array" open="(" separator="," close=")">
|
||||
#{objId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Loading…
Reference in New Issue