change - add工序信息、关联产线、页面优化工序与产线唯一对应
parent
3a8a81be5f
commit
f349297028
@ -0,0 +1,105 @@
|
||||
package com.hw.mes.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
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.hw.common.log.annotation.Log;
|
||||
import com.hw.common.log.enums.BusinessType;
|
||||
import com.hw.common.security.annotation.RequiresPermissions;
|
||||
import com.hw.mes.domain.MesBaseProcessInfo;
|
||||
import com.hw.mes.service.IMesBaseProcessInfoService;
|
||||
import com.hw.common.core.web.controller.BaseController;
|
||||
import com.hw.common.core.web.domain.AjaxResult;
|
||||
import com.hw.common.core.utils.poi.ExcelUtil;
|
||||
import com.hw.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 工序信息Controller
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2024-01-24
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/processInfo")
|
||||
public class MesBaseProcessInfoController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IMesBaseProcessInfoService mesBaseProcessInfoService;
|
||||
|
||||
/**
|
||||
* 查询工序信息列表
|
||||
*/
|
||||
@RequiresPermissions("mes:processInfo:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(MesBaseProcessInfo mesBaseProcessInfo)
|
||||
{
|
||||
startPage();
|
||||
List<MesBaseProcessInfo> list = mesBaseProcessInfoService.selectMesBaseProcessInfoList(mesBaseProcessInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出工序信息列表
|
||||
*/
|
||||
@RequiresPermissions("mes:processInfo:export")
|
||||
@Log(title = "工序信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, MesBaseProcessInfo mesBaseProcessInfo)
|
||||
{
|
||||
List<MesBaseProcessInfo> list = mesBaseProcessInfoService.selectMesBaseProcessInfoList(mesBaseProcessInfo);
|
||||
ExcelUtil<MesBaseProcessInfo> util = new ExcelUtil<MesBaseProcessInfo>(MesBaseProcessInfo.class);
|
||||
util.exportExcel(response, list, "工序信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取工序信息详细信息
|
||||
*/
|
||||
@RequiresPermissions("mes:processInfo:query")
|
||||
@GetMapping(value = "/{processId}")
|
||||
public AjaxResult getInfo(@PathVariable("processId") Long processId)
|
||||
{
|
||||
return success(mesBaseProcessInfoService.selectMesBaseProcessInfoByProcessId(processId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增工序信息
|
||||
*/
|
||||
@RequiresPermissions("mes:processInfo:add")
|
||||
@Log(title = "工序信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody MesBaseProcessInfo mesBaseProcessInfo)
|
||||
{
|
||||
return toAjax(mesBaseProcessInfoService.insertMesBaseProcessInfo(mesBaseProcessInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改工序信息
|
||||
*/
|
||||
@RequiresPermissions("mes:processInfo:edit")
|
||||
@Log(title = "工序信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody MesBaseProcessInfo mesBaseProcessInfo)
|
||||
{
|
||||
return toAjax(mesBaseProcessInfoService.updateMesBaseProcessInfo(mesBaseProcessInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除工序信息
|
||||
*/
|
||||
@RequiresPermissions("mes:processInfo:remove")
|
||||
@Log(title = "工序信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{processIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] processIds)
|
||||
{
|
||||
return toAjax(mesBaseProcessInfoService.deleteMesBaseProcessInfoByProcessIds(processIds));
|
||||
}
|
||||
}
|
@ -0,0 +1,87 @@
|
||||
package com.hw.mes.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.hw.mes.domain.MesBaseProcessInfo;
|
||||
import com.hw.mes.domain.MesBaseProcessProdline;
|
||||
|
||||
/**
|
||||
* 工序信息Mapper接口
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2024-01-24
|
||||
*/
|
||||
public interface MesBaseProcessInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询工序信息
|
||||
*
|
||||
* @param processId 工序信息主键
|
||||
* @return 工序信息
|
||||
*/
|
||||
public MesBaseProcessInfo selectMesBaseProcessInfoByProcessId(Long processId);
|
||||
|
||||
/**
|
||||
* 查询工序信息列表
|
||||
*
|
||||
* @param mesBaseProcessInfo 工序信息
|
||||
* @return 工序信息集合
|
||||
*/
|
||||
public List<MesBaseProcessInfo> selectMesBaseProcessInfoList(MesBaseProcessInfo mesBaseProcessInfo);
|
||||
|
||||
/**
|
||||
* 新增工序信息
|
||||
*
|
||||
* @param mesBaseProcessInfo 工序信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMesBaseProcessInfo(MesBaseProcessInfo mesBaseProcessInfo);
|
||||
|
||||
/**
|
||||
* 修改工序信息
|
||||
*
|
||||
* @param mesBaseProcessInfo 工序信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMesBaseProcessInfo(MesBaseProcessInfo mesBaseProcessInfo);
|
||||
|
||||
/**
|
||||
* 删除工序信息
|
||||
*
|
||||
* @param processId 工序信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesBaseProcessInfoByProcessId(Long processId);
|
||||
|
||||
/**
|
||||
* 批量删除工序信息
|
||||
*
|
||||
* @param processIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesBaseProcessInfoByProcessIds(Long[] processIds);
|
||||
|
||||
/**
|
||||
* 批量删除工序关联产线
|
||||
*
|
||||
* @param processIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesBaseProcessProdlineByProcessIds(Long[] processIds);
|
||||
|
||||
/**
|
||||
* 批量新增工序关联产线
|
||||
*
|
||||
* @param mesBaseProcessProdlineList 工序关联产线列表
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchMesBaseProcessProdline(List<MesBaseProcessProdline> mesBaseProcessProdlineList);
|
||||
|
||||
|
||||
/**
|
||||
* 通过工序信息主键删除工序关联产线信息
|
||||
*
|
||||
* @param processId 工序信息ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesBaseProcessProdlineByProcessId(Long processId);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.hw.mes.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.hw.mes.domain.MesBaseProcessInfo;
|
||||
|
||||
/**
|
||||
* 工序信息Service接口
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2024-01-24
|
||||
*/
|
||||
public interface IMesBaseProcessInfoService
|
||||
{
|
||||
/**
|
||||
* 查询工序信息
|
||||
*
|
||||
* @param processId 工序信息主键
|
||||
* @return 工序信息
|
||||
*/
|
||||
public MesBaseProcessInfo selectMesBaseProcessInfoByProcessId(Long processId);
|
||||
|
||||
/**
|
||||
* 查询工序信息列表
|
||||
*
|
||||
* @param mesBaseProcessInfo 工序信息
|
||||
* @return 工序信息集合
|
||||
*/
|
||||
public List<MesBaseProcessInfo> selectMesBaseProcessInfoList(MesBaseProcessInfo mesBaseProcessInfo);
|
||||
|
||||
/**
|
||||
* 新增工序信息
|
||||
*
|
||||
* @param mesBaseProcessInfo 工序信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMesBaseProcessInfo(MesBaseProcessInfo mesBaseProcessInfo);
|
||||
|
||||
/**
|
||||
* 修改工序信息
|
||||
*
|
||||
* @param mesBaseProcessInfo 工序信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMesBaseProcessInfo(MesBaseProcessInfo mesBaseProcessInfo);
|
||||
|
||||
/**
|
||||
* 批量删除工序信息
|
||||
*
|
||||
* @param processIds 需要删除的工序信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesBaseProcessInfoByProcessIds(Long[] processIds);
|
||||
|
||||
/**
|
||||
* 删除工序信息信息
|
||||
*
|
||||
* @param processId 工序信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesBaseProcessInfoByProcessId(Long processId);
|
||||
}
|
@ -0,0 +1,143 @@
|
||||
package com.hw.mes.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hw.common.core.exception.ServiceException;
|
||||
import com.hw.common.core.utils.DateUtils;
|
||||
import com.hw.common.security.utils.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.ArrayList;
|
||||
import com.hw.common.core.utils.StringUtils;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import com.hw.mes.domain.MesBaseProcessProdline;
|
||||
import com.hw.mes.mapper.MesBaseProcessInfoMapper;
|
||||
import com.hw.mes.domain.MesBaseProcessInfo;
|
||||
import com.hw.mes.service.IMesBaseProcessInfoService;
|
||||
|
||||
/**
|
||||
* 工序信息Service业务层处理
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2024-01-24
|
||||
*/
|
||||
@Service
|
||||
public class MesBaseProcessInfoServiceImpl implements IMesBaseProcessInfoService
|
||||
{
|
||||
@Autowired
|
||||
private MesBaseProcessInfoMapper mesBaseProcessInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询工序信息
|
||||
*
|
||||
* @param processId 工序信息主键
|
||||
* @return 工序信息
|
||||
*/
|
||||
@Override
|
||||
public MesBaseProcessInfo selectMesBaseProcessInfoByProcessId(Long processId)
|
||||
{
|
||||
return mesBaseProcessInfoMapper.selectMesBaseProcessInfoByProcessId(processId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询工序信息列表
|
||||
*
|
||||
* @param mesBaseProcessInfo 工序信息
|
||||
* @return 工序信息
|
||||
*/
|
||||
@Override
|
||||
public List<MesBaseProcessInfo> selectMesBaseProcessInfoList(MesBaseProcessInfo mesBaseProcessInfo)
|
||||
{
|
||||
return mesBaseProcessInfoMapper.selectMesBaseProcessInfoList(mesBaseProcessInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增工序信息
|
||||
*
|
||||
* @param mesBaseProcessInfo 工序信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public int insertMesBaseProcessInfo(MesBaseProcessInfo mesBaseProcessInfo)
|
||||
{
|
||||
mesBaseProcessInfo.setCreateTime(DateUtils.getNowDate());
|
||||
int rows = mesBaseProcessInfoMapper.insertMesBaseProcessInfo(mesBaseProcessInfo);
|
||||
//insertMesBaseProcessProdline(mesBaseProcessInfo);
|
||||
return rows;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改工序信息
|
||||
*
|
||||
* @param mesBaseProcessInfo 工序信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public int updateMesBaseProcessInfo(MesBaseProcessInfo mesBaseProcessInfo)
|
||||
{
|
||||
mesBaseProcessInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
mesBaseProcessInfoMapper.deleteMesBaseProcessProdlineByProcessId(mesBaseProcessInfo.getProcessId());
|
||||
try {
|
||||
insertMesBaseProcessProdline(mesBaseProcessInfo);
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException("该工序已关联此产线!");
|
||||
}
|
||||
return mesBaseProcessInfoMapper.updateMesBaseProcessInfo(mesBaseProcessInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除工序信息
|
||||
*
|
||||
* @param processIds 需要删除的工序信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public int deleteMesBaseProcessInfoByProcessIds(Long[] processIds)
|
||||
{
|
||||
mesBaseProcessInfoMapper.deleteMesBaseProcessProdlineByProcessIds(processIds);
|
||||
return mesBaseProcessInfoMapper.deleteMesBaseProcessInfoByProcessIds(processIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除工序信息信息
|
||||
*
|
||||
* @param processId 工序信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public int deleteMesBaseProcessInfoByProcessId(Long processId)
|
||||
{
|
||||
mesBaseProcessInfoMapper.deleteMesBaseProcessProdlineByProcessId(processId);
|
||||
return mesBaseProcessInfoMapper.deleteMesBaseProcessInfoByProcessId(processId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增工序关联产线信息
|
||||
*
|
||||
* @param mesBaseProcessInfo 工序信息对象
|
||||
*/
|
||||
public void insertMesBaseProcessProdline(MesBaseProcessInfo mesBaseProcessInfo)
|
||||
{
|
||||
List<MesBaseProcessProdline> mesBaseProcessProdlineList = mesBaseProcessInfo.getMesBaseProcessProdlineList();
|
||||
Long processId = mesBaseProcessInfo.getProcessId();
|
||||
if (StringUtils.isNotNull(mesBaseProcessProdlineList))
|
||||
{
|
||||
List<MesBaseProcessProdline> list = new ArrayList<MesBaseProcessProdline>();
|
||||
for (MesBaseProcessProdline mesBaseProcessProdline : mesBaseProcessProdlineList)
|
||||
{
|
||||
mesBaseProcessProdline.setProcessId(processId);
|
||||
mesBaseProcessProdline.setCreateBy(SecurityUtils.getUsername());
|
||||
mesBaseProcessProdline.setCreateTime(DateUtils.getNowDate());
|
||||
list.add(mesBaseProcessProdline);
|
||||
}
|
||||
if (list.size() > 0)
|
||||
{
|
||||
mesBaseProcessInfoMapper.batchMesBaseProcessProdline(list);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,163 @@
|
||||
<?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.hw.mes.mapper.MesBaseProcessInfoMapper">
|
||||
|
||||
<resultMap type="MesBaseProcessInfo" id="MesBaseProcessInfoResult">
|
||||
<result property="processId" column="process_id"/>
|
||||
<result property="processCode" column="process_code"/>
|
||||
<result property="processName" column="process_name"/>
|
||||
<result property="processType" column="process_type"/>
|
||||
<result property="productionTime" column="production_time"/>
|
||||
<result property="activeFlag" column="active_flag"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<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>
|
||||
|
||||
<resultMap id="MesBaseProcessInfoMesBaseProcessProdlineResult" type="MesBaseProcessInfo"
|
||||
extends="MesBaseProcessInfoResult">
|
||||
<collection property="mesBaseProcessProdlineList" notNullColumn="sub_process_id" javaType="java.util.List"
|
||||
resultMap="MesBaseProcessProdlineResult"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="MesBaseProcessProdline" id="MesBaseProcessProdlineResult">
|
||||
<result property="processId" column="sub_process_id"/>
|
||||
<result property="prodlineId" column="sub_prodline_id"/>
|
||||
<result property="createBy" column="sub_create_by"/>
|
||||
<result property="createTime" column="sub_create_time"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectMesBaseProcessInfoVo">
|
||||
select process_id,
|
||||
process_code,
|
||||
process_name,
|
||||
process_type,
|
||||
production_time,
|
||||
active_flag,
|
||||
remark,
|
||||
create_by,
|
||||
create_time,
|
||||
update_by,
|
||||
update_time
|
||||
from mes_base_process_info
|
||||
</sql>
|
||||
|
||||
<select id="selectMesBaseProcessInfoList" parameterType="MesBaseProcessInfo" resultMap="MesBaseProcessInfoResult">
|
||||
<include refid="selectMesBaseProcessInfoVo"/>
|
||||
<where>
|
||||
<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="processType != null and processType != ''">and process_type = #{processType}</if>
|
||||
<if test="productionTime != null ">and production_time = #{productionTime}</if>
|
||||
<if test="activeFlag != null and activeFlag != ''">and active_flag = #{activeFlag}</if>
|
||||
<if test="remark != null and remark != ''">and remark = #{remark}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectMesBaseProcessInfoByProcessId" parameterType="Long"
|
||||
resultMap="MesBaseProcessInfoMesBaseProcessProdlineResult">
|
||||
select a.process_id,
|
||||
a.process_code,
|
||||
a.process_name,
|
||||
a.process_type,
|
||||
a.production_time,
|
||||
a.active_flag,
|
||||
a.remark,
|
||||
a.create_by,
|
||||
a.create_time,
|
||||
a.update_by,
|
||||
a.update_time,
|
||||
b.process_id as sub_process_id,
|
||||
b.prodline_id as sub_prodline_id,
|
||||
b.create_by as sub_create_by,
|
||||
b.create_time as sub_create_time
|
||||
from mes_base_process_info a
|
||||
left join mes_base_process_prodline b on b.process_id = a.process_id
|
||||
where a.process_id = #{processId}
|
||||
</select>
|
||||
|
||||
<insert id="insertMesBaseProcessInfo" parameterType="MesBaseProcessInfo" useGeneratedKeys="true"
|
||||
keyProperty="processId">
|
||||
insert into mes_base_process_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="processCode != null">process_code,</if>
|
||||
<if test="processName != null and processName != ''">process_name,</if>
|
||||
<if test="processType != null and processType != ''">process_type,</if>
|
||||
<if test="productionTime != null">production_time,</if>
|
||||
<if test="activeFlag != null and activeFlag != ''">active_flag,</if>
|
||||
<if test="remark != null">remark,</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="processCode != null">#{processCode},</if>
|
||||
<if test="processName != null and processName != ''">#{processName},</if>
|
||||
<if test="processType != null and processType != ''">#{processType},</if>
|
||||
<if test="productionTime != null">#{productionTime},</if>
|
||||
<if test="activeFlag != null and activeFlag != ''">#{activeFlag},</if>
|
||||
<if test="remark != null">#{remark},</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="updateMesBaseProcessInfo" parameterType="MesBaseProcessInfo">
|
||||
update mes_base_process_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="processCode != null">process_code = #{processCode},</if>
|
||||
<if test="processName != null and processName != ''">process_name = #{processName},</if>
|
||||
<if test="processType != null and processType != ''">process_type = #{processType},</if>
|
||||
<if test="productionTime != null">production_time = #{productionTime},</if>
|
||||
<if test="activeFlag != null and activeFlag != ''">active_flag = #{activeFlag},</if>
|
||||
<if test="remark != null">remark = #{remark},</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 process_id = #{processId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteMesBaseProcessInfoByProcessId" parameterType="Long">
|
||||
delete
|
||||
from mes_base_process_info
|
||||
where process_id = #{processId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteMesBaseProcessInfoByProcessIds" parameterType="String">
|
||||
delete from mes_base_process_info where process_id in
|
||||
<foreach item="processId" collection="array" open="(" separator="," close=")">
|
||||
#{processId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteMesBaseProcessProdlineByProcessIds" parameterType="String">
|
||||
delete from mes_base_process_prodline where process_id in
|
||||
<foreach item="processId" collection="array" open="(" separator="," close=")">
|
||||
#{processId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteMesBaseProcessProdlineByProcessId" parameterType="Long">
|
||||
delete
|
||||
from mes_base_process_prodline
|
||||
where process_id = #{processId}
|
||||
</delete>
|
||||
|
||||
<insert id="batchMesBaseProcessProdline">
|
||||
insert into mes_base_process_prodline( process_id, prodline_id, create_by, create_time) values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
( #{item.processId}, #{item.prodlineId}, #{item.createBy}, #{item.createTime})
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询工序信息列表
|
||||
export function listProcessInfo(query) {
|
||||
return request({
|
||||
url: '/mes/processInfo/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询工序信息详细
|
||||
export function getProcessInfo(processId) {
|
||||
return request({
|
||||
url: '/mes/processInfo/' + processId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增工序信息
|
||||
export function addProcessInfo(data) {
|
||||
return request({
|
||||
url: '/mes/processInfo',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改工序信息
|
||||
export function updateProcessInfo(data) {
|
||||
return request({
|
||||
url: '/mes/processInfo',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除工序信息
|
||||
export function delProcessInfo(processId) {
|
||||
return request({
|
||||
url: '/mes/processInfo/' + processId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
Loading…
Reference in New Issue