Merge remote-tracking branch 'origin/master'
commit
fc69128a8c
@ -0,0 +1,97 @@
|
||||
package com.op.device.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
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.op.common.log.annotation.Log;
|
||||
import com.op.common.log.enums.BusinessType;
|
||||
import com.op.common.security.annotation.RequiresPermissions;
|
||||
import com.op.device.domain.EquOutsourceWork;
|
||||
import com.op.device.service.IEquOutsourceWorkService;
|
||||
import com.op.common.core.web.controller.BaseController;
|
||||
import com.op.common.core.web.domain.AjaxResult;
|
||||
import com.op.common.core.utils.poi.ExcelUtil;
|
||||
import com.op.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 委外工单Controller
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-10-23
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/outsourceWorkOrder")
|
||||
public class EquOutsourceWorkController extends BaseController {
|
||||
@Autowired
|
||||
private IEquOutsourceWorkService equOutsourceWorkService;
|
||||
|
||||
/**
|
||||
* 查询委外工单列表
|
||||
*/
|
||||
@RequiresPermissions("device:outsourceWorkOrder:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(EquOutsourceWork equOutsourceWork) {
|
||||
startPage();
|
||||
List<EquOutsourceWork> list = equOutsourceWorkService.selectEquOutsourceWorkList(equOutsourceWork);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出委外工单列表
|
||||
*/
|
||||
@RequiresPermissions("device:outsourceWorkOrder:export")
|
||||
@Log(title = "委外工单", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, EquOutsourceWork equOutsourceWork) {
|
||||
List<EquOutsourceWork> list = equOutsourceWorkService.selectEquOutsourceWorkList(equOutsourceWork);
|
||||
ExcelUtil<EquOutsourceWork> util = new ExcelUtil<EquOutsourceWork>(EquOutsourceWork.class);
|
||||
util.exportExcel(response, list, "委外工单数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取委外工单详细信息
|
||||
*/
|
||||
@RequiresPermissions("device:outsourceWorkOrder:query")
|
||||
@GetMapping(value = "/{workId}")
|
||||
public AjaxResult getInfo(@PathVariable("workId") String workId) {
|
||||
return success(equOutsourceWorkService.selectEquOutsourceWorkByWorkId(workId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增委外工单
|
||||
*/
|
||||
@RequiresPermissions("device:outsourceWorkOrder:add")
|
||||
@Log(title = "委外工单", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody EquOutsourceWork equOutsourceWork) {
|
||||
return toAjax(equOutsourceWorkService.insertEquOutsourceWork(equOutsourceWork));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改委外工单
|
||||
*/
|
||||
@RequiresPermissions("device:outsourceWorkOrder:edit")
|
||||
@Log(title = "委外工单", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody EquOutsourceWork equOutsourceWork) {
|
||||
return toAjax(equOutsourceWorkService.updateEquOutsourceWork(equOutsourceWork));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除委外工单
|
||||
*/
|
||||
@RequiresPermissions("device:outsourceWorkOrder:remove")
|
||||
@Log(title = "委外工单", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{workIds}")
|
||||
public AjaxResult remove(@PathVariable String[] workIds) {
|
||||
return toAjax(equOutsourceWorkService.deleteEquOutsourceWorkByWorkIds(workIds));
|
||||
}
|
||||
}
|
@ -0,0 +1,205 @@
|
||||
package com.op.device.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.op.common.core.annotation.Excel;
|
||||
import com.op.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 委外工单对象 equ_outsource_work
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-10-23
|
||||
*/
|
||||
public class EquOutsourceWork extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private String workId;
|
||||
|
||||
/** 委外工单编码 */
|
||||
@Excel(name = "委外工单编码")
|
||||
private String workCode;
|
||||
|
||||
/** 维修人员 */
|
||||
@Excel(name = "维修人员")
|
||||
private String workPerson;
|
||||
|
||||
/** 委外单位 */
|
||||
@Excel(name = "委外单位")
|
||||
private String workOutsourcingUnit;
|
||||
|
||||
/** 联系方式 */
|
||||
@Excel(name = "联系方式")
|
||||
private String workConnection;
|
||||
|
||||
/** 原因 */
|
||||
@Excel(name = "原因")
|
||||
private String workReason;
|
||||
|
||||
/** 委外类型 */
|
||||
@Excel(name = "委外类型")
|
||||
private String workType;
|
||||
|
||||
/** 管理单号 */
|
||||
@Excel(name = "管理单号")
|
||||
private String managementCode;
|
||||
|
||||
/** 委外费用 */
|
||||
@Excel(name = "委外费用")
|
||||
private String workCost;
|
||||
|
||||
/** 委外用时 */
|
||||
@Excel(name = "委外用时")
|
||||
private String workCostTime;
|
||||
|
||||
/** 备用字段1 */
|
||||
@Excel(name = "备用字段1")
|
||||
private String attr1;
|
||||
|
||||
/** 备用字段2 */
|
||||
@Excel(name = "备用字段2")
|
||||
private String attr2;
|
||||
|
||||
/** 备用字段3 */
|
||||
@Excel(name = "备用字段3")
|
||||
private String attr3;
|
||||
|
||||
/** 删除标识 */
|
||||
private String delFlag;
|
||||
|
||||
/** 工厂编码 */
|
||||
@Excel(name = "工厂编码")
|
||||
private String factoryCode;
|
||||
|
||||
public void setWorkId(String workId) {
|
||||
this.workId = workId;
|
||||
}
|
||||
|
||||
public String getWorkId() {
|
||||
return workId;
|
||||
}
|
||||
public void setWorkCode(String workCode) {
|
||||
this.workCode = workCode;
|
||||
}
|
||||
|
||||
public String getWorkCode() {
|
||||
return workCode;
|
||||
}
|
||||
public void setWorkPerson(String workPerson) {
|
||||
this.workPerson = workPerson;
|
||||
}
|
||||
|
||||
public String getWorkPerson() {
|
||||
return workPerson;
|
||||
}
|
||||
public void setWorkOutsourcingUnit(String workOutsourcingUnit) {
|
||||
this.workOutsourcingUnit = workOutsourcingUnit;
|
||||
}
|
||||
|
||||
public String getWorkOutsourcingUnit() {
|
||||
return workOutsourcingUnit;
|
||||
}
|
||||
public void setWorkConnection(String workConnection) {
|
||||
this.workConnection = workConnection;
|
||||
}
|
||||
|
||||
public String getWorkConnection() {
|
||||
return workConnection;
|
||||
}
|
||||
public void setWorkReason(String workReason) {
|
||||
this.workReason = workReason;
|
||||
}
|
||||
|
||||
public String getWorkReason() {
|
||||
return workReason;
|
||||
}
|
||||
public void setWorkType(String workType) {
|
||||
this.workType = workType;
|
||||
}
|
||||
|
||||
public String getWorkType() {
|
||||
return workType;
|
||||
}
|
||||
public void setManagementCode(String managementCode) {
|
||||
this.managementCode = managementCode;
|
||||
}
|
||||
|
||||
public String getManagementCode() {
|
||||
return managementCode;
|
||||
}
|
||||
public void setWorkCost(String workCost) {
|
||||
this.workCost = workCost;
|
||||
}
|
||||
|
||||
public String getWorkCost() {
|
||||
return workCost;
|
||||
}
|
||||
public void setWorkCostTime(String workCostTime) {
|
||||
this.workCostTime = workCostTime;
|
||||
}
|
||||
|
||||
public String getWorkCostTime() {
|
||||
return workCostTime;
|
||||
}
|
||||
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(String attr3) {
|
||||
this.attr3 = attr3;
|
||||
}
|
||||
|
||||
public String getAttr3() {
|
||||
return attr3;
|
||||
}
|
||||
public void setDelFlag(String delFlag) {
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public String getDelFlag() {
|
||||
return delFlag;
|
||||
}
|
||||
public void setFactoryCode(String factoryCode) {
|
||||
this.factoryCode = factoryCode;
|
||||
}
|
||||
|
||||
public String getFactoryCode() {
|
||||
return factoryCode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("workId", getWorkId())
|
||||
.append("workCode", getWorkCode())
|
||||
.append("workPerson", getWorkPerson())
|
||||
.append("workOutsourcingUnit", getWorkOutsourcingUnit())
|
||||
.append("workConnection", getWorkConnection())
|
||||
.append("workReason", getWorkReason())
|
||||
.append("workType", getWorkType())
|
||||
.append("managementCode", getManagementCode())
|
||||
.append("workCost", getWorkCost())
|
||||
.append("workCostTime", getWorkCostTime())
|
||||
.append("attr1", getAttr1())
|
||||
.append("attr2", getAttr2())
|
||||
.append("attr3", getAttr3())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("factoryCode", getFactoryCode())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,107 @@
|
||||
package com.op.device.domain;
|
||||
|
||||
import com.op.common.core.annotation.Excel;
|
||||
import com.op.common.core.web.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 班组人员对象 base_team_user
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-08-29
|
||||
*/
|
||||
public class EquPerson extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private String id;
|
||||
|
||||
/** 班组id */
|
||||
@Excel(name = "班组id")
|
||||
private String teamId;
|
||||
|
||||
/** 班组编码 */
|
||||
@Excel(name = "班组编码")
|
||||
private String teamCode;
|
||||
|
||||
/** 人员id */
|
||||
@Excel(name = "人员id")
|
||||
private String userId;
|
||||
|
||||
/** 人员名字编号 */
|
||||
@Excel(name = "人员名字")
|
||||
private String userName;
|
||||
|
||||
/** 人员名字 */
|
||||
@Excel(name = "人员名字")
|
||||
private String nickName;
|
||||
|
||||
/** 人员拼接名字 */
|
||||
@Excel(name = "人员拼接名字")
|
||||
private String teamUserName;
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
public void setTeamId(String teamId) {
|
||||
this.teamId = teamId;
|
||||
}
|
||||
|
||||
public String getTeamId() {
|
||||
return teamId;
|
||||
}
|
||||
public void setTeamCode(String teamCode) {
|
||||
this.teamCode = teamCode;
|
||||
}
|
||||
|
||||
public String getTeamCode() {
|
||||
return teamCode;
|
||||
}
|
||||
public void setUserId(String userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getUserId() {
|
||||
return userId;
|
||||
}
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
public String getNickName() {
|
||||
return nickName;
|
||||
}
|
||||
public void setNickName(String nickName) {
|
||||
this.nickName = nickName;
|
||||
}
|
||||
|
||||
public String getTeamUserName() {
|
||||
return teamUserName;
|
||||
}
|
||||
public void setTeamUserName(String teamUserName) {
|
||||
this.teamUserName = teamUserName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("teamId", getTeamId())
|
||||
.append("teamCode", getTeamCode())
|
||||
.append("userId", getUserId())
|
||||
.append("userName", getUserName())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.op.device.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.op.device.domain.EquOutsourceWork;
|
||||
|
||||
/**
|
||||
* 委外工单Mapper接口
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-10-23
|
||||
*/
|
||||
public interface EquOutsourceWorkMapper {
|
||||
/**
|
||||
* 查询委外工单
|
||||
*
|
||||
* @param workId 委外工单主键
|
||||
* @return 委外工单
|
||||
*/
|
||||
public EquOutsourceWork selectEquOutsourceWorkByWorkId(String workId);
|
||||
|
||||
/**
|
||||
* 查询委外工单列表
|
||||
*
|
||||
* @param equOutsourceWork 委外工单
|
||||
* @return 委外工单集合
|
||||
*/
|
||||
public List<EquOutsourceWork> selectEquOutsourceWorkList(EquOutsourceWork equOutsourceWork);
|
||||
|
||||
/**
|
||||
* 新增委外工单
|
||||
*
|
||||
* @param equOutsourceWork 委外工单
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEquOutsourceWork(EquOutsourceWork equOutsourceWork);
|
||||
|
||||
/**
|
||||
* 修改委外工单
|
||||
*
|
||||
* @param equOutsourceWork 委外工单
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEquOutsourceWork(EquOutsourceWork equOutsourceWork);
|
||||
|
||||
/**
|
||||
* 删除委外工单
|
||||
*
|
||||
* @param workId 委外工单主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEquOutsourceWorkByWorkId(String workId);
|
||||
|
||||
/**
|
||||
* 批量删除委外工单
|
||||
*
|
||||
* @param workIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEquOutsourceWorkByWorkIds(String[] workIds);
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
package com.op.device.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.op.device.domain.EquOutsourceWork;
|
||||
|
||||
/**
|
||||
* 委外工单Service接口
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-10-23
|
||||
*/
|
||||
public interface IEquOutsourceWorkService {
|
||||
/**
|
||||
* 查询委外工单
|
||||
*
|
||||
* @param workId 委外工单主键
|
||||
* @return 委外工单
|
||||
*/
|
||||
public EquOutsourceWork selectEquOutsourceWorkByWorkId(String workId);
|
||||
|
||||
/**
|
||||
* 查询委外工单列表
|
||||
*
|
||||
* @param equOutsourceWork 委外工单
|
||||
* @return 委外工单集合
|
||||
*/
|
||||
public List<EquOutsourceWork> selectEquOutsourceWorkList(EquOutsourceWork equOutsourceWork);
|
||||
|
||||
/**
|
||||
* 新增委外工单
|
||||
*
|
||||
* @param equOutsourceWork 委外工单
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEquOutsourceWork(EquOutsourceWork equOutsourceWork);
|
||||
|
||||
/**
|
||||
* 修改委外工单
|
||||
*
|
||||
* @param equOutsourceWork 委外工单
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEquOutsourceWork(EquOutsourceWork equOutsourceWork);
|
||||
|
||||
/**
|
||||
* 批量删除委外工单
|
||||
*
|
||||
* @param workIds 需要删除的委外工单主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEquOutsourceWorkByWorkIds(String[] workIds);
|
||||
|
||||
/**
|
||||
* 删除委外工单信息
|
||||
*
|
||||
* @param workId 委外工单主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEquOutsourceWorkByWorkId(String workId);
|
||||
}
|
@ -0,0 +1,97 @@
|
||||
package com.op.device.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.op.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.op.device.mapper.EquOutsourceWorkMapper;
|
||||
import com.op.device.domain.EquOutsourceWork;
|
||||
import com.op.device.service.IEquOutsourceWorkService;
|
||||
|
||||
/**
|
||||
* 委外工单Service业务层处理
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-10-23
|
||||
*/
|
||||
@Service
|
||||
public class EquOutsourceWorkServiceImpl implements IEquOutsourceWorkService {
|
||||
@Autowired
|
||||
private EquOutsourceWorkMapper equOutsourceWorkMapper;
|
||||
|
||||
/**
|
||||
* 查询委外工单
|
||||
*
|
||||
* @param workId 委外工单主键
|
||||
* @return 委外工单
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public EquOutsourceWork selectEquOutsourceWorkByWorkId(String workId) {
|
||||
return equOutsourceWorkMapper.selectEquOutsourceWorkByWorkId(workId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询委外工单列表
|
||||
*
|
||||
* @param equOutsourceWork 委外工单
|
||||
* @return 委外工单
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public List<EquOutsourceWork> selectEquOutsourceWorkList(EquOutsourceWork equOutsourceWork) {
|
||||
return equOutsourceWorkMapper.selectEquOutsourceWorkList(equOutsourceWork);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增委外工单
|
||||
*
|
||||
* @param equOutsourceWork 委外工单
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int insertEquOutsourceWork(EquOutsourceWork equOutsourceWork) {
|
||||
equOutsourceWork.setCreateTime(DateUtils.getNowDate());
|
||||
return equOutsourceWorkMapper.insertEquOutsourceWork(equOutsourceWork);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改委外工单
|
||||
*
|
||||
* @param equOutsourceWork 委外工单
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int updateEquOutsourceWork(EquOutsourceWork equOutsourceWork) {
|
||||
equOutsourceWork.setUpdateTime(DateUtils.getNowDate());
|
||||
return equOutsourceWorkMapper.updateEquOutsourceWork(equOutsourceWork);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除委外工单
|
||||
*
|
||||
* @param workIds 需要删除的委外工单主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int deleteEquOutsourceWorkByWorkIds(String[] workIds) {
|
||||
return equOutsourceWorkMapper.deleteEquOutsourceWorkByWorkIds(workIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除委外工单信息
|
||||
*
|
||||
* @param workId 委外工单主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int deleteEquOutsourceWorkByWorkId(String workId) {
|
||||
return equOutsourceWorkMapper.deleteEquOutsourceWorkByWorkId(workId);
|
||||
}
|
||||
}
|
@ -0,0 +1,138 @@
|
||||
<?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.op.device.mapper.EquOutsourceWorkMapper">
|
||||
|
||||
<resultMap type="EquOutsourceWork" id="EquOutsourceWorkResult">
|
||||
<result property="workId" column="work_id" />
|
||||
<result property="workCode" column="work_code" />
|
||||
<result property="workPerson" column="work_person" />
|
||||
<result property="workOutsourcingUnit" column="work_outsourcing_unit" />
|
||||
<result property="workConnection" column="work_connection" />
|
||||
<result property="workReason" column="work_reason" />
|
||||
<result property="workType" column="work_type" />
|
||||
<result property="managementCode" column="management_code" />
|
||||
<result property="workCost" column="work_cost" />
|
||||
<result property="workCostTime" column="work_cost_time" />
|
||||
<result property="attr1" column="attr1" />
|
||||
<result property="attr2" column="attr2" />
|
||||
<result property="attr3" column="attr3" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="factoryCode" column="factory_code" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEquOutsourceWorkVo">
|
||||
select work_id, work_code, work_person, work_outsourcing_unit, work_connection, work_reason, work_type, management_code, work_cost, work_cost_time, attr1, attr2, attr3, del_flag, create_by, create_time, update_by, update_time, factory_code from equ_outsource_work
|
||||
</sql>
|
||||
|
||||
<select id="selectEquOutsourceWorkList" parameterType="EquOutsourceWork" resultMap="EquOutsourceWorkResult">
|
||||
<include refid="selectEquOutsourceWorkVo"/>
|
||||
<where>
|
||||
<if test="workCode != null and workCode != ''"> and work_code = #{workCode}</if>
|
||||
<if test="workPerson != null and workPerson != ''"> and work_person = #{workPerson}</if>
|
||||
<if test="workOutsourcingUnit != null and workOutsourcingUnit != ''"> and work_outsourcing_unit = #{workOutsourcingUnit}</if>
|
||||
<if test="workConnection != null and workConnection != ''"> and work_connection = #{workConnection}</if>
|
||||
<if test="workReason != null and workReason != ''"> and work_reason = #{workReason}</if>
|
||||
<if test="workType != null and workType != ''"> and work_type = #{workType}</if>
|
||||
<if test="managementCode != null and managementCode != ''"> and management_code = #{managementCode}</if>
|
||||
<if test="workCost != null and workCost != ''"> and work_cost = #{workCost}</if>
|
||||
<if test="workCostTime != null and workCostTime != ''"> and work_cost_time = #{workCostTime}</if>
|
||||
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
|
||||
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
|
||||
<if test="attr3 != null and attr3 != ''"> and attr3 = #{attr3}</if>
|
||||
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectEquOutsourceWorkByWorkId" parameterType="String" resultMap="EquOutsourceWorkResult">
|
||||
<include refid="selectEquOutsourceWorkVo"/>
|
||||
where work_id = #{workId}
|
||||
</select>
|
||||
|
||||
<insert id="insertEquOutsourceWork" parameterType="EquOutsourceWork">
|
||||
insert into equ_outsource_work
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="workId != null">work_id,</if>
|
||||
<if test="workCode != null">work_code,</if>
|
||||
<if test="workPerson != null">work_person,</if>
|
||||
<if test="workOutsourcingUnit != null">work_outsourcing_unit,</if>
|
||||
<if test="workConnection != null">work_connection,</if>
|
||||
<if test="workReason != null">work_reason,</if>
|
||||
<if test="workType != null">work_type,</if>
|
||||
<if test="managementCode != null">management_code,</if>
|
||||
<if test="workCost != null">work_cost,</if>
|
||||
<if test="workCostTime != null">work_cost_time,</if>
|
||||
<if test="attr1 != null">attr1,</if>
|
||||
<if test="attr2 != null">attr2,</if>
|
||||
<if test="attr3 != null">attr3,</if>
|
||||
<if test="delFlag != null">del_flag,</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>
|
||||
<if test="factoryCode != null">factory_code,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="workId != null">#{workId},</if>
|
||||
<if test="workCode != null">#{workCode},</if>
|
||||
<if test="workPerson != null">#{workPerson},</if>
|
||||
<if test="workOutsourcingUnit != null">#{workOutsourcingUnit},</if>
|
||||
<if test="workConnection != null">#{workConnection},</if>
|
||||
<if test="workReason != null">#{workReason},</if>
|
||||
<if test="workType != null">#{workType},</if>
|
||||
<if test="managementCode != null">#{managementCode},</if>
|
||||
<if test="workCost != null">#{workCost},</if>
|
||||
<if test="workCostTime != null">#{workCostTime},</if>
|
||||
<if test="attr1 != null">#{attr1},</if>
|
||||
<if test="attr2 != null">#{attr2},</if>
|
||||
<if test="attr3 != null">#{attr3},</if>
|
||||
<if test="delFlag != null">#{delFlag},</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>
|
||||
<if test="factoryCode != null">#{factoryCode},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateEquOutsourceWork" parameterType="EquOutsourceWork">
|
||||
update equ_outsource_work
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="workCode != null">work_code = #{workCode},</if>
|
||||
<if test="workPerson != null">work_person = #{workPerson},</if>
|
||||
<if test="workOutsourcingUnit != null">work_outsourcing_unit = #{workOutsourcingUnit},</if>
|
||||
<if test="workConnection != null">work_connection = #{workConnection},</if>
|
||||
<if test="workReason != null">work_reason = #{workReason},</if>
|
||||
<if test="workType != null">work_type = #{workType},</if>
|
||||
<if test="managementCode != null">management_code = #{managementCode},</if>
|
||||
<if test="workCost != null">work_cost = #{workCost},</if>
|
||||
<if test="workCostTime != null">work_cost_time = #{workCostTime},</if>
|
||||
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||||
<if test="attr2 != null">attr2 = #{attr2},</if>
|
||||
<if test="attr3 != null">attr3 = #{attr3},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</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>
|
||||
<if test="factoryCode != null">factory_code = #{factoryCode},</if>
|
||||
</trim>
|
||||
where work_id = #{workId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteEquOutsourceWorkByWorkId" parameterType="String">
|
||||
delete from equ_outsource_work where work_id = #{workId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEquOutsourceWorkByWorkIds" parameterType="String">
|
||||
delete from equ_outsource_work where work_id in
|
||||
<foreach item="workId" collection="array" open="(" separator="," close=")">
|
||||
#{workId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Loading…
Reference in New Issue