change - add工艺路线、关联工艺路线组成信息
parent
f349297028
commit
c688d612a1
@ -0,0 +1,115 @@
|
||||
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.MesBaseRoute;
|
||||
import com.hw.mes.service.IMesBaseRouteService;
|
||||
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-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/baseRoute")
|
||||
public class MesBaseRouteController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IMesBaseRouteService mesBaseRouteService;
|
||||
|
||||
/**
|
||||
* 查询工艺路线列表
|
||||
*/
|
||||
@RequiresPermissions("mes:baseRoute:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(MesBaseRoute mesBaseRoute)
|
||||
{
|
||||
startPage();
|
||||
List<MesBaseRoute> list = mesBaseRouteService.selectMesBaseRouteList(mesBaseRoute);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询工艺路线下拉框列表
|
||||
*/
|
||||
@GetMapping("/findRouteList")
|
||||
public AjaxResult findRouteList(MesBaseRoute mesBaseRoute)
|
||||
{
|
||||
List<MesBaseRoute> list = mesBaseRouteService.selectMesBaseRouteList(mesBaseRoute);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出工艺路线列表
|
||||
*/
|
||||
@RequiresPermissions("mes:baseRoute:export")
|
||||
@Log(title = "工艺路线", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, MesBaseRoute mesBaseRoute)
|
||||
{
|
||||
List<MesBaseRoute> list = mesBaseRouteService.selectMesBaseRouteList(mesBaseRoute);
|
||||
ExcelUtil<MesBaseRoute> util = new ExcelUtil<MesBaseRoute>(MesBaseRoute.class);
|
||||
util.exportExcel(response, list, "工艺路线数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取工艺路线详细信息
|
||||
*/
|
||||
@RequiresPermissions("mes:baseRoute:query")
|
||||
@GetMapping(value = "/{routeId}")
|
||||
public AjaxResult getInfo(@PathVariable("routeId") Long routeId)
|
||||
{
|
||||
return success(mesBaseRouteService.selectMesBaseRouteByRouteId(routeId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增工艺路线
|
||||
*/
|
||||
@RequiresPermissions("mes:baseRoute:add")
|
||||
@Log(title = "工艺路线", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody MesBaseRoute mesBaseRoute)
|
||||
{
|
||||
return toAjax(mesBaseRouteService.insertMesBaseRoute(mesBaseRoute));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改工艺路线
|
||||
*/
|
||||
@RequiresPermissions("mes:baseRoute:edit")
|
||||
@Log(title = "工艺路线", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody MesBaseRoute mesBaseRoute)
|
||||
{
|
||||
return toAjax(mesBaseRouteService.updateMesBaseRoute(mesBaseRoute));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除工艺路线
|
||||
*/
|
||||
@RequiresPermissions("mes:baseRoute:remove")
|
||||
@Log(title = "工艺路线", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{routeIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] routeIds)
|
||||
{
|
||||
return toAjax(mesBaseRouteService.deleteMesBaseRouteByRouteIds(routeIds));
|
||||
}
|
||||
}
|
@ -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.MesBaseRouteProcess;
|
||||
import com.hw.mes.service.IMesBaseRouteProcessService;
|
||||
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-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/baseRouteProcess")
|
||||
public class MesBaseRouteProcessController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IMesBaseRouteProcessService mesBaseRouteProcessService;
|
||||
|
||||
/**
|
||||
* 查询工艺路线组成信息列表
|
||||
*/
|
||||
@RequiresPermissions("mes:baseRouteProcess:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(MesBaseRouteProcess mesBaseRouteProcess)
|
||||
{
|
||||
startPage();
|
||||
List<MesBaseRouteProcess> list = mesBaseRouteProcessService.selectMesBaseRouteProcessList(mesBaseRouteProcess);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出工艺路线组成信息列表
|
||||
*/
|
||||
@RequiresPermissions("mes:baseRouteProcess:export")
|
||||
@Log(title = "工艺路线组成信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, MesBaseRouteProcess mesBaseRouteProcess)
|
||||
{
|
||||
List<MesBaseRouteProcess> list = mesBaseRouteProcessService.selectMesBaseRouteProcessList(mesBaseRouteProcess);
|
||||
ExcelUtil<MesBaseRouteProcess> util = new ExcelUtil<MesBaseRouteProcess>(MesBaseRouteProcess.class);
|
||||
util.exportExcel(response, list, "工艺路线组成信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取工艺路线组成信息详细信息
|
||||
*/
|
||||
@RequiresPermissions("mes:baseRouteProcess:query")
|
||||
@GetMapping(value = "/{routeProcessId}")
|
||||
public AjaxResult getInfo(@PathVariable("routeProcessId") Long routeProcessId)
|
||||
{
|
||||
return success(mesBaseRouteProcessService.selectMesBaseRouteProcessByRouteProcessId(routeProcessId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增工艺路线组成信息
|
||||
*/
|
||||
@RequiresPermissions("mes:baseRouteProcess:add")
|
||||
@Log(title = "工艺路线组成信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody MesBaseRouteProcess mesBaseRouteProcess)
|
||||
{
|
||||
return toAjax(mesBaseRouteProcessService.insertMesBaseRouteProcess(mesBaseRouteProcess));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改工艺路线组成信息
|
||||
*/
|
||||
@RequiresPermissions("mes:baseRouteProcess:edit")
|
||||
@Log(title = "工艺路线组成信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody MesBaseRouteProcess mesBaseRouteProcess)
|
||||
{
|
||||
return toAjax(mesBaseRouteProcessService.updateMesBaseRouteProcess(mesBaseRouteProcess));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除工艺路线组成信息
|
||||
*/
|
||||
@RequiresPermissions("mes:baseRouteProcess:remove")
|
||||
@Log(title = "工艺路线组成信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{routeProcessIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] routeProcessIds)
|
||||
{
|
||||
return toAjax(mesBaseRouteProcessService.deleteMesBaseRouteProcessByRouteProcessIds(routeProcessIds));
|
||||
}
|
||||
}
|
@ -0,0 +1,102 @@
|
||||
package com.hw.mes.domain;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.hw.common.core.annotation.Excel;
|
||||
import com.hw.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 工艺路线对象 mes_base_route
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2024-01-25
|
||||
*/
|
||||
public class MesBaseRoute extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 工艺路线ID
|
||||
*/
|
||||
private Long routeId;
|
||||
|
||||
/**
|
||||
* 工艺路线名称
|
||||
*/
|
||||
@Excel(name = "工艺路线名称")
|
||||
private String routeName;
|
||||
|
||||
/**
|
||||
* 工艺路线说明
|
||||
*/
|
||||
@Excel(name = "工艺路线说明")
|
||||
private String routeDesc;
|
||||
|
||||
/**
|
||||
* 激活标识
|
||||
*/
|
||||
@Excel(name = "激活标识")
|
||||
private String activeFlag;
|
||||
|
||||
/**
|
||||
* 工艺路线组成信息信息
|
||||
*/
|
||||
private List<MesBaseRouteProcess> mesBaseRouteProcessList;
|
||||
|
||||
public void setRouteId(Long routeId) {
|
||||
this.routeId = routeId;
|
||||
}
|
||||
|
||||
public Long getRouteId() {
|
||||
return routeId;
|
||||
}
|
||||
|
||||
public void setRouteName(String routeName) {
|
||||
this.routeName = routeName;
|
||||
}
|
||||
|
||||
public String getRouteName() {
|
||||
return routeName;
|
||||
}
|
||||
|
||||
public void setRouteDesc(String routeDesc) {
|
||||
this.routeDesc = routeDesc;
|
||||
}
|
||||
|
||||
public String getRouteDesc() {
|
||||
return routeDesc;
|
||||
}
|
||||
|
||||
public void setActiveFlag(String activeFlag) {
|
||||
this.activeFlag = activeFlag;
|
||||
}
|
||||
|
||||
public String getActiveFlag() {
|
||||
return activeFlag;
|
||||
}
|
||||
|
||||
public List<MesBaseRouteProcess> getMesBaseRouteProcessList() {
|
||||
return mesBaseRouteProcessList;
|
||||
}
|
||||
|
||||
public void setMesBaseRouteProcessList(List<MesBaseRouteProcess> mesBaseRouteProcessList) {
|
||||
this.mesBaseRouteProcessList = mesBaseRouteProcessList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("routeId", getRouteId())
|
||||
.append("routeName", getRouteName())
|
||||
.append("routeDesc", getRouteDesc())
|
||||
.append("activeFlag", getActiveFlag())
|
||||
.append("remark", getRemark())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("mesBaseRouteProcessList", getMesBaseRouteProcessList())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,86 @@
|
||||
package com.hw.mes.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.hw.common.core.annotation.Excel;
|
||||
import com.hw.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 工艺路线组成信息对象 mes_base_route_process
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2024-01-25
|
||||
*/
|
||||
public class MesBaseRouteProcess extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 工艺路线组成ID
|
||||
*/
|
||||
private Long routeProcessId;
|
||||
|
||||
/**
|
||||
* 工艺路线ID
|
||||
*/
|
||||
@Excel(name = "工艺路线ID")
|
||||
private Long routeId;
|
||||
|
||||
/**
|
||||
* 工序ID
|
||||
*/
|
||||
@Excel(name = "工序ID")
|
||||
private Long processId;
|
||||
|
||||
/**
|
||||
* 工艺路线顺序
|
||||
*/
|
||||
@Excel(name = "工艺路线顺序")
|
||||
private Long processOrder;
|
||||
|
||||
public void setRouteProcessId(Long routeProcessId) {
|
||||
this.routeProcessId = routeProcessId;
|
||||
}
|
||||
|
||||
public Long getRouteProcessId() {
|
||||
return routeProcessId;
|
||||
}
|
||||
|
||||
public void setRouteId(Long routeId) {
|
||||
this.routeId = routeId;
|
||||
}
|
||||
|
||||
public Long getRouteId() {
|
||||
return routeId;
|
||||
}
|
||||
|
||||
public void setProcessId(Long processId) {
|
||||
this.processId = processId;
|
||||
}
|
||||
|
||||
public Long getProcessId() {
|
||||
return processId;
|
||||
}
|
||||
|
||||
public void setProcessOrder(Long processOrder) {
|
||||
this.processOrder = processOrder;
|
||||
}
|
||||
|
||||
public Long getProcessOrder() {
|
||||
return processOrder;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("routeProcessId", getRouteProcessId())
|
||||
.append("routeId", getRouteId())
|
||||
.append("processId", getProcessId())
|
||||
.append("processOrder", getProcessOrder())
|
||||
.append("remark", getRemark())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,87 @@
|
||||
package com.hw.mes.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.hw.mes.domain.MesBaseRoute;
|
||||
import com.hw.mes.domain.MesBaseRouteProcess;
|
||||
|
||||
/**
|
||||
* 工艺路线Mapper接口
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2024-01-25
|
||||
*/
|
||||
public interface MesBaseRouteMapper
|
||||
{
|
||||
/**
|
||||
* 查询工艺路线
|
||||
*
|
||||
* @param routeId 工艺路线主键
|
||||
* @return 工艺路线
|
||||
*/
|
||||
public MesBaseRoute selectMesBaseRouteByRouteId(Long routeId);
|
||||
|
||||
/**
|
||||
* 查询工艺路线列表
|
||||
*
|
||||
* @param mesBaseRoute 工艺路线
|
||||
* @return 工艺路线集合
|
||||
*/
|
||||
public List<MesBaseRoute> selectMesBaseRouteList(MesBaseRoute mesBaseRoute);
|
||||
|
||||
/**
|
||||
* 新增工艺路线
|
||||
*
|
||||
* @param mesBaseRoute 工艺路线
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMesBaseRoute(MesBaseRoute mesBaseRoute);
|
||||
|
||||
/**
|
||||
* 修改工艺路线
|
||||
*
|
||||
* @param mesBaseRoute 工艺路线
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMesBaseRoute(MesBaseRoute mesBaseRoute);
|
||||
|
||||
/**
|
||||
* 删除工艺路线
|
||||
*
|
||||
* @param routeId 工艺路线主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesBaseRouteByRouteId(Long routeId);
|
||||
|
||||
/**
|
||||
* 批量删除工艺路线
|
||||
*
|
||||
* @param routeIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesBaseRouteByRouteIds(Long[] routeIds);
|
||||
|
||||
/**
|
||||
* 批量删除工艺路线组成信息
|
||||
*
|
||||
* @param routeIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesBaseRouteProcessByRouteIds(Long[] routeIds);
|
||||
|
||||
/**
|
||||
* 批量新增工艺路线组成信息
|
||||
*
|
||||
* @param mesBaseRouteProcessList 工艺路线组成信息列表
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchMesBaseRouteProcess(List<MesBaseRouteProcess> mesBaseRouteProcessList);
|
||||
|
||||
|
||||
/**
|
||||
* 通过工艺路线主键删除工艺路线组成信息信息
|
||||
*
|
||||
* @param routeId 工艺路线ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesBaseRouteProcessByRouteId(Long routeId);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.hw.mes.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.hw.mes.domain.MesBaseRouteProcess;
|
||||
|
||||
/**
|
||||
* 工艺路线组成信息Mapper接口
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2024-01-25
|
||||
*/
|
||||
public interface MesBaseRouteProcessMapper
|
||||
{
|
||||
/**
|
||||
* 查询工艺路线组成信息
|
||||
*
|
||||
* @param routeProcessId 工艺路线组成信息主键
|
||||
* @return 工艺路线组成信息
|
||||
*/
|
||||
public MesBaseRouteProcess selectMesBaseRouteProcessByRouteProcessId(Long routeProcessId);
|
||||
|
||||
/**
|
||||
* 查询工艺路线组成信息列表
|
||||
*
|
||||
* @param mesBaseRouteProcess 工艺路线组成信息
|
||||
* @return 工艺路线组成信息集合
|
||||
*/
|
||||
public List<MesBaseRouteProcess> selectMesBaseRouteProcessList(MesBaseRouteProcess mesBaseRouteProcess);
|
||||
|
||||
/**
|
||||
* 新增工艺路线组成信息
|
||||
*
|
||||
* @param mesBaseRouteProcess 工艺路线组成信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMesBaseRouteProcess(MesBaseRouteProcess mesBaseRouteProcess);
|
||||
|
||||
/**
|
||||
* 修改工艺路线组成信息
|
||||
*
|
||||
* @param mesBaseRouteProcess 工艺路线组成信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMesBaseRouteProcess(MesBaseRouteProcess mesBaseRouteProcess);
|
||||
|
||||
/**
|
||||
* 删除工艺路线组成信息
|
||||
*
|
||||
* @param routeProcessId 工艺路线组成信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesBaseRouteProcessByRouteProcessId(Long routeProcessId);
|
||||
|
||||
/**
|
||||
* 批量删除工艺路线组成信息
|
||||
*
|
||||
* @param routeProcessIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesBaseRouteProcessByRouteProcessIds(Long[] routeProcessIds);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.hw.mes.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.hw.mes.domain.MesBaseRouteProcess;
|
||||
|
||||
/**
|
||||
* 工艺路线组成信息Service接口
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2024-01-25
|
||||
*/
|
||||
public interface IMesBaseRouteProcessService
|
||||
{
|
||||
/**
|
||||
* 查询工艺路线组成信息
|
||||
*
|
||||
* @param routeProcessId 工艺路线组成信息主键
|
||||
* @return 工艺路线组成信息
|
||||
*/
|
||||
public MesBaseRouteProcess selectMesBaseRouteProcessByRouteProcessId(Long routeProcessId);
|
||||
|
||||
/**
|
||||
* 查询工艺路线组成信息列表
|
||||
*
|
||||
* @param mesBaseRouteProcess 工艺路线组成信息
|
||||
* @return 工艺路线组成信息集合
|
||||
*/
|
||||
public List<MesBaseRouteProcess> selectMesBaseRouteProcessList(MesBaseRouteProcess mesBaseRouteProcess);
|
||||
|
||||
/**
|
||||
* 新增工艺路线组成信息
|
||||
*
|
||||
* @param mesBaseRouteProcess 工艺路线组成信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMesBaseRouteProcess(MesBaseRouteProcess mesBaseRouteProcess);
|
||||
|
||||
/**
|
||||
* 修改工艺路线组成信息
|
||||
*
|
||||
* @param mesBaseRouteProcess 工艺路线组成信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMesBaseRouteProcess(MesBaseRouteProcess mesBaseRouteProcess);
|
||||
|
||||
/**
|
||||
* 批量删除工艺路线组成信息
|
||||
*
|
||||
* @param routeProcessIds 需要删除的工艺路线组成信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesBaseRouteProcessByRouteProcessIds(Long[] routeProcessIds);
|
||||
|
||||
/**
|
||||
* 删除工艺路线组成信息信息
|
||||
*
|
||||
* @param routeProcessId 工艺路线组成信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesBaseRouteProcessByRouteProcessId(Long routeProcessId);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.hw.mes.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.hw.mes.domain.MesBaseRoute;
|
||||
|
||||
/**
|
||||
* 工艺路线Service接口
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2024-01-25
|
||||
*/
|
||||
public interface IMesBaseRouteService
|
||||
{
|
||||
/**
|
||||
* 查询工艺路线
|
||||
*
|
||||
* @param routeId 工艺路线主键
|
||||
* @return 工艺路线
|
||||
*/
|
||||
public MesBaseRoute selectMesBaseRouteByRouteId(Long routeId);
|
||||
|
||||
/**
|
||||
* 查询工艺路线列表
|
||||
*
|
||||
* @param mesBaseRoute 工艺路线
|
||||
* @return 工艺路线集合
|
||||
*/
|
||||
public List<MesBaseRoute> selectMesBaseRouteList(MesBaseRoute mesBaseRoute);
|
||||
|
||||
/**
|
||||
* 新增工艺路线
|
||||
*
|
||||
* @param mesBaseRoute 工艺路线
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMesBaseRoute(MesBaseRoute mesBaseRoute);
|
||||
|
||||
/**
|
||||
* 修改工艺路线
|
||||
*
|
||||
* @param mesBaseRoute 工艺路线
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMesBaseRoute(MesBaseRoute mesBaseRoute);
|
||||
|
||||
/**
|
||||
* 批量删除工艺路线
|
||||
*
|
||||
* @param routeIds 需要删除的工艺路线主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesBaseRouteByRouteIds(Long[] routeIds);
|
||||
|
||||
/**
|
||||
* 删除工艺路线信息
|
||||
*
|
||||
* @param routeId 工艺路线主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMesBaseRouteByRouteId(Long routeId);
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
package com.hw.mes.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.hw.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.hw.mes.mapper.MesBaseRouteProcessMapper;
|
||||
import com.hw.mes.domain.MesBaseRouteProcess;
|
||||
import com.hw.mes.service.IMesBaseRouteProcessService;
|
||||
|
||||
/**
|
||||
* 工艺路线组成信息Service业务层处理
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2024-01-25
|
||||
*/
|
||||
@Service
|
||||
public class MesBaseRouteProcessServiceImpl implements IMesBaseRouteProcessService
|
||||
{
|
||||
@Autowired
|
||||
private MesBaseRouteProcessMapper mesBaseRouteProcessMapper;
|
||||
|
||||
/**
|
||||
* 查询工艺路线组成信息
|
||||
*
|
||||
* @param routeProcessId 工艺路线组成信息主键
|
||||
* @return 工艺路线组成信息
|
||||
*/
|
||||
@Override
|
||||
public MesBaseRouteProcess selectMesBaseRouteProcessByRouteProcessId(Long routeProcessId)
|
||||
{
|
||||
return mesBaseRouteProcessMapper.selectMesBaseRouteProcessByRouteProcessId(routeProcessId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询工艺路线组成信息列表
|
||||
*
|
||||
* @param mesBaseRouteProcess 工艺路线组成信息
|
||||
* @return 工艺路线组成信息
|
||||
*/
|
||||
@Override
|
||||
public List<MesBaseRouteProcess> selectMesBaseRouteProcessList(MesBaseRouteProcess mesBaseRouteProcess)
|
||||
{
|
||||
return mesBaseRouteProcessMapper.selectMesBaseRouteProcessList(mesBaseRouteProcess);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增工艺路线组成信息
|
||||
*
|
||||
* @param mesBaseRouteProcess 工艺路线组成信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertMesBaseRouteProcess(MesBaseRouteProcess mesBaseRouteProcess)
|
||||
{
|
||||
mesBaseRouteProcess.setCreateTime(DateUtils.getNowDate());
|
||||
return mesBaseRouteProcessMapper.insertMesBaseRouteProcess(mesBaseRouteProcess);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改工艺路线组成信息
|
||||
*
|
||||
* @param mesBaseRouteProcess 工艺路线组成信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateMesBaseRouteProcess(MesBaseRouteProcess mesBaseRouteProcess)
|
||||
{
|
||||
mesBaseRouteProcess.setUpdateTime(DateUtils.getNowDate());
|
||||
return mesBaseRouteProcessMapper.updateMesBaseRouteProcess(mesBaseRouteProcess);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除工艺路线组成信息
|
||||
*
|
||||
* @param routeProcessIds 需要删除的工艺路线组成信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteMesBaseRouteProcessByRouteProcessIds(Long[] routeProcessIds)
|
||||
{
|
||||
return mesBaseRouteProcessMapper.deleteMesBaseRouteProcessByRouteProcessIds(routeProcessIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除工艺路线组成信息信息
|
||||
*
|
||||
* @param routeProcessId 工艺路线组成信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteMesBaseRouteProcessByRouteProcessId(Long routeProcessId)
|
||||
{
|
||||
return mesBaseRouteProcessMapper.deleteMesBaseRouteProcessByRouteProcessId(routeProcessId);
|
||||
}
|
||||
}
|
@ -0,0 +1,137 @@
|
||||
package com.hw.mes.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
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.MesBaseRouteProcess;
|
||||
import com.hw.mes.mapper.MesBaseRouteMapper;
|
||||
import com.hw.mes.domain.MesBaseRoute;
|
||||
import com.hw.mes.service.IMesBaseRouteService;
|
||||
|
||||
/**
|
||||
* 工艺路线Service业务层处理
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2024-01-25
|
||||
*/
|
||||
@Service
|
||||
public class MesBaseRouteServiceImpl implements IMesBaseRouteService
|
||||
{
|
||||
@Autowired
|
||||
private MesBaseRouteMapper mesBaseRouteMapper;
|
||||
|
||||
/**
|
||||
* 查询工艺路线
|
||||
*
|
||||
* @param routeId 工艺路线主键
|
||||
* @return 工艺路线
|
||||
*/
|
||||
@Override
|
||||
public MesBaseRoute selectMesBaseRouteByRouteId(Long routeId)
|
||||
{
|
||||
return mesBaseRouteMapper.selectMesBaseRouteByRouteId(routeId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询工艺路线列表
|
||||
*
|
||||
* @param mesBaseRoute 工艺路线
|
||||
* @return 工艺路线
|
||||
*/
|
||||
@Override
|
||||
public List<MesBaseRoute> selectMesBaseRouteList(MesBaseRoute mesBaseRoute)
|
||||
{
|
||||
return mesBaseRouteMapper.selectMesBaseRouteList(mesBaseRoute);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增工艺路线
|
||||
*
|
||||
* @param mesBaseRoute 工艺路线
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public int insertMesBaseRoute(MesBaseRoute mesBaseRoute)
|
||||
{
|
||||
mesBaseRoute.setCreateTime(DateUtils.getNowDate());
|
||||
int rows = mesBaseRouteMapper.insertMesBaseRoute(mesBaseRoute);
|
||||
insertMesBaseRouteProcess(mesBaseRoute);
|
||||
return rows;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改工艺路线
|
||||
*
|
||||
* @param mesBaseRoute 工艺路线
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public int updateMesBaseRoute(MesBaseRoute mesBaseRoute)
|
||||
{
|
||||
mesBaseRoute.setUpdateTime(DateUtils.getNowDate());
|
||||
mesBaseRouteMapper.deleteMesBaseRouteProcessByRouteId(mesBaseRoute.getRouteId());
|
||||
insertMesBaseRouteProcess(mesBaseRoute);
|
||||
return mesBaseRouteMapper.updateMesBaseRoute(mesBaseRoute);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除工艺路线
|
||||
*
|
||||
* @param routeIds 需要删除的工艺路线主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public int deleteMesBaseRouteByRouteIds(Long[] routeIds)
|
||||
{
|
||||
mesBaseRouteMapper.deleteMesBaseRouteProcessByRouteIds(routeIds);
|
||||
return mesBaseRouteMapper.deleteMesBaseRouteByRouteIds(routeIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除工艺路线信息
|
||||
*
|
||||
* @param routeId 工艺路线主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public int deleteMesBaseRouteByRouteId(Long routeId)
|
||||
{
|
||||
mesBaseRouteMapper.deleteMesBaseRouteProcessByRouteId(routeId);
|
||||
return mesBaseRouteMapper.deleteMesBaseRouteByRouteId(routeId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增工艺路线组成信息信息
|
||||
*
|
||||
* @param mesBaseRoute 工艺路线对象
|
||||
*/
|
||||
public void insertMesBaseRouteProcess(MesBaseRoute mesBaseRoute)
|
||||
{
|
||||
List<MesBaseRouteProcess> mesBaseRouteProcessList = mesBaseRoute.getMesBaseRouteProcessList();
|
||||
Long routeId = mesBaseRoute.getRouteId();
|
||||
if (StringUtils.isNotNull(mesBaseRouteProcessList))
|
||||
{
|
||||
List<MesBaseRouteProcess> list = new ArrayList<MesBaseRouteProcess>();
|
||||
for (MesBaseRouteProcess mesBaseRouteProcess : mesBaseRouteProcessList)
|
||||
{
|
||||
mesBaseRouteProcess.setRouteId(routeId);
|
||||
mesBaseRouteProcess.setCreateTime(DateUtils.getNowDate());
|
||||
mesBaseRouteProcess.setCreateBy(SecurityUtils.getUsername());
|
||||
list.add(mesBaseRouteProcess);
|
||||
}
|
||||
if (list.size() > 0)
|
||||
{
|
||||
mesBaseRouteMapper.batchMesBaseRouteProcess(list);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,127 @@
|
||||
<?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.MesBaseRouteMapper">
|
||||
|
||||
<resultMap type="MesBaseRoute" id="MesBaseRouteResult">
|
||||
<result property="routeId" column="route_id" />
|
||||
<result property="routeName" column="route_name" />
|
||||
<result property="routeDesc" column="route_desc" />
|
||||
<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="MesBaseRouteMesBaseRouteProcessResult" type="MesBaseRoute" extends="MesBaseRouteResult">
|
||||
<collection property="mesBaseRouteProcessList" notNullColumn="sub_route_process_id" javaType="java.util.List" resultMap="MesBaseRouteProcessResult" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="MesBaseRouteProcess" id="MesBaseRouteProcessResult">
|
||||
<result property="routeProcessId" column="sub_route_process_id" />
|
||||
<result property="routeId" column="sub_route_id" />
|
||||
<result property="processId" column="sub_process_id" />
|
||||
<result property="processOrder" column="sub_process_order" />
|
||||
<result property="remark" column="sub_remark" />
|
||||
<result property="createBy" column="sub_create_by" />
|
||||
<result property="createTime" column="sub_create_time" />
|
||||
<result property="updateBy" column="sub_update_by" />
|
||||
<result property="updateTime" column="sub_update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectMesBaseRouteVo">
|
||||
select route_id, route_name, route_desc, active_flag, remark, create_by, create_time, update_by, update_time from mes_base_route
|
||||
</sql>
|
||||
|
||||
<select id="selectMesBaseRouteList" parameterType="MesBaseRoute" resultMap="MesBaseRouteResult">
|
||||
<include refid="selectMesBaseRouteVo"/>
|
||||
<where>
|
||||
<if test="routeName != null and routeName != ''"> and route_name like concat('%', #{routeName}, '%')</if>
|
||||
<if test="routeDesc != null and routeDesc != ''"> and route_desc = #{routeDesc}</if>
|
||||
<if test="activeFlag != null and activeFlag != ''"> and active_flag = #{activeFlag}</if>
|
||||
<if test="createBy != null and createBy != ''"> and create_by = #{createBy}</if>
|
||||
<if test="createTime != null "> and create_time = #{createTime}</if>
|
||||
<if test="updateBy != null and updateBy != ''"> and update_by = #{updateBy}</if>
|
||||
<if test="updateTime != null "> and update_time = #{updateTime}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectMesBaseRouteByRouteId" parameterType="Long" resultMap="MesBaseRouteMesBaseRouteProcessResult">
|
||||
select a.route_id, a.route_name, a.route_desc, a.active_flag, a.remark, a.create_by, a.create_time, a.update_by, a.update_time,
|
||||
b.route_process_id as sub_route_process_id, b.route_id as sub_route_id, b.process_id as sub_process_id, b.process_order as sub_process_order, b.remark as sub_remark, b.create_by as sub_create_by, b.create_time as sub_create_time, b.update_by as sub_update_by, b.update_time as sub_update_time
|
||||
from mes_base_route a
|
||||
left join mes_base_route_process b on b.route_id = a.route_id
|
||||
where a.route_id = #{routeId}
|
||||
</select>
|
||||
|
||||
<insert id="insertMesBaseRoute" parameterType="MesBaseRoute" useGeneratedKeys="true" keyProperty="routeId">
|
||||
insert into mes_base_route
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="routeName != null and routeName != ''">route_name,</if>
|
||||
<if test="routeDesc != null">route_desc,</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="routeName != null and routeName != ''">#{routeName},</if>
|
||||
<if test="routeDesc != null">#{routeDesc},</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="updateMesBaseRoute" parameterType="MesBaseRoute">
|
||||
update mes_base_route
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="routeName != null and routeName != ''">route_name = #{routeName},</if>
|
||||
<if test="routeDesc != null">route_desc = #{routeDesc},</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 route_id = #{routeId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteMesBaseRouteByRouteId" parameterType="Long">
|
||||
delete from mes_base_route where route_id = #{routeId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteMesBaseRouteByRouteIds" parameterType="String">
|
||||
delete from mes_base_route where route_id in
|
||||
<foreach item="routeId" collection="array" open="(" separator="," close=")">
|
||||
#{routeId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteMesBaseRouteProcessByRouteIds" parameterType="String">
|
||||
delete from mes_base_route_process where route_id in
|
||||
<foreach item="routeId" collection="array" open="(" separator="," close=")">
|
||||
#{routeId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteMesBaseRouteProcessByRouteId" parameterType="Long">
|
||||
delete from mes_base_route_process where route_id = #{routeId}
|
||||
</delete>
|
||||
|
||||
<insert id="batchMesBaseRouteProcess">
|
||||
insert into mes_base_route_process( route_process_id, route_id, process_id, process_order, remark, create_by, create_time, update_by, update_time) values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
( #{item.routeProcessId}, #{item.routeId}, #{item.processId}, #{item.processOrder}, #{item.remark}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime})
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
@ -0,0 +1,91 @@
|
||||
<?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.MesBaseRouteProcessMapper">
|
||||
|
||||
<resultMap type="MesBaseRouteProcess" id="MesBaseRouteProcessResult">
|
||||
<result property="routeProcessId" column="route_process_id" />
|
||||
<result property="routeId" column="route_id" />
|
||||
<result property="processId" column="process_id" />
|
||||
<result property="processOrder" column="process_order" />
|
||||
<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>
|
||||
|
||||
<sql id="selectMesBaseRouteProcessVo">
|
||||
select route_process_id, route_id, process_id, process_order, remark, create_by, create_time, update_by, update_time from mes_base_route_process
|
||||
</sql>
|
||||
|
||||
<select id="selectMesBaseRouteProcessList" parameterType="MesBaseRouteProcess" resultMap="MesBaseRouteProcessResult">
|
||||
<include refid="selectMesBaseRouteProcessVo"/>
|
||||
<where>
|
||||
<if test="routeId != null "> and route_id = #{routeId}</if>
|
||||
<if test="processId != null "> and process_id = #{processId}</if>
|
||||
<if test="processOrder != null "> and process_order = #{processOrder}</if>
|
||||
<if test="remark != null and remark != ''"> and remark = #{remark}</if>
|
||||
<if test="createBy != null and createBy != ''"> and create_by = #{createBy}</if>
|
||||
<if test="createTime != null "> and create_time = #{createTime}</if>
|
||||
<if test="updateBy != null and updateBy != ''"> and update_by = #{updateBy}</if>
|
||||
<if test="updateTime != null "> and update_time = #{updateTime}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectMesBaseRouteProcessByRouteProcessId" parameterType="Long" resultMap="MesBaseRouteProcessResult">
|
||||
<include refid="selectMesBaseRouteProcessVo"/>
|
||||
where route_process_id = #{routeProcessId}
|
||||
</select>
|
||||
|
||||
<insert id="insertMesBaseRouteProcess" parameterType="MesBaseRouteProcess" useGeneratedKeys="true" keyProperty="routeProcessId">
|
||||
insert into mes_base_route_process
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="routeId != null">route_id,</if>
|
||||
<if test="processId != null">process_id,</if>
|
||||
<if test="processOrder != null">process_order,</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="routeId != null">#{routeId},</if>
|
||||
<if test="processId != null">#{processId},</if>
|
||||
<if test="processOrder != null">#{processOrder},</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="updateMesBaseRouteProcess" parameterType="MesBaseRouteProcess">
|
||||
update mes_base_route_process
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="routeId != null">route_id = #{routeId},</if>
|
||||
<if test="processId != null">process_id = #{processId},</if>
|
||||
<if test="processOrder != null">process_order = #{processOrder},</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 route_process_id = #{routeProcessId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteMesBaseRouteProcessByRouteProcessId" parameterType="Long">
|
||||
delete from mes_base_route_process where route_process_id = #{routeProcessId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteMesBaseRouteProcessByRouteProcessIds" parameterType="String">
|
||||
delete from mes_base_route_process where route_process_id in
|
||||
<foreach item="routeProcessId" collection="array" open="(" separator="," close=")">
|
||||
#{routeProcessId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,53 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询工艺路线列表
|
||||
export function listBaseRoute(query) {
|
||||
return request({
|
||||
url: '/mes/baseRoute/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询工艺路线下拉框列表
|
||||
export function findRouteList(query) {
|
||||
return request({
|
||||
url: '/mes/baseRoute/findRouteList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询工艺路线详细
|
||||
export function getBaseRoute(routeId) {
|
||||
return request({
|
||||
url: '/mes/baseRoute/' + routeId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增工艺路线
|
||||
export function addBaseRoute(data) {
|
||||
return request({
|
||||
url: '/mes/baseRoute',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改工艺路线
|
||||
export function updateBaseRoute(data) {
|
||||
return request({
|
||||
url: '/mes/baseRoute',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除工艺路线
|
||||
export function delBaseRoute(routeId) {
|
||||
return request({
|
||||
url: '/mes/baseRoute/' + routeId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询工艺路线组成信息列表
|
||||
export function listBaseRouteProcess(query) {
|
||||
return request({
|
||||
url: '/mes/baseRouteProcess/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询工艺路线组成信息详细
|
||||
export function getBaseRouteProcess(routeProcessId) {
|
||||
return request({
|
||||
url: '/mes/baseRouteProcess/' + routeProcessId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增工艺路线组成信息
|
||||
export function addBaseRouteProcess(data) {
|
||||
return request({
|
||||
url: '/mes/baseRouteProcess',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改工艺路线组成信息
|
||||
export function updateBaseRouteProcess(data) {
|
||||
return request({
|
||||
url: '/mes/baseRouteProcess',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除工艺路线组成信息
|
||||
export function delBaseRouteProcess(routeProcessId) {
|
||||
return request({
|
||||
url: '/mes/baseRouteProcess/' + routeProcessId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
@ -0,0 +1,338 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||
<el-form-item label="工艺路线" prop="routeId">
|
||||
<el-select v-model="queryParams.routeId" filterable placeholder="请选择工艺路线" clearable>
|
||||
<el-option
|
||||
v-for="item in routeList"
|
||||
:key="item.routeId"
|
||||
:label="item.routeName"
|
||||
:value="item.routeId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="工序" prop="processId">
|
||||
<el-select v-model="queryParams.processId" filterable placeholder="请选择工序" clearable>
|
||||
<el-option
|
||||
v-for="item in processList"
|
||||
:key="item.processId"
|
||||
:label="item.processName"
|
||||
:value="item.processId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['mes:baseRouteProcess:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['mes:baseRouteProcess:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['mes:baseRouteProcess:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['mes:baseRouteProcess:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="baseRouteProcessList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="工艺路线组成ID" align="center" prop="routeProcessId" v-if="columns[0].visible"/>
|
||||
<el-table-column label="工艺路线ID" align="center" prop="routeId" v-if="columns[1].visible"/>
|
||||
<el-table-column label="工序ID" align="center" prop="processId" v-if="columns[2].visible"/>
|
||||
<el-table-column label="工艺路线顺序" align="center" prop="processOrder" v-if="columns[3].visible"/>
|
||||
<el-table-column label="备注" align="center" prop="remark" v-if="columns[4].visible"/>
|
||||
<el-table-column label="创建人" align="center" prop="createBy" v-if="columns[5].visible"/>
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180" v-if="columns[6].visible">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="更新人" align="center" prop="updateBy" v-if="columns[7].visible"/>
|
||||
<el-table-column label="更新时间" align="center" prop="updateTime" width="180" v-if="columns[8].visible">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['mes:baseRouteProcess:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['mes:baseRouteProcess:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改工艺路线组成信息对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
<el-form-item label="工艺路线" prop="routeId">
|
||||
<el-select v-model="form.routeId" filterable placeholder="请选择工艺路线" clearable>
|
||||
<el-option
|
||||
v-for="item in routeList"
|
||||
:key="item.routeId"
|
||||
:label="item.routeName"
|
||||
:value="item.routeId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="工序ID" prop="processId">
|
||||
<el-select v-model="form.processId" filterable placeholder="请选择工序" clearable>
|
||||
<el-option
|
||||
v-for="item in processList"
|
||||
:key="item.processId"
|
||||
:label="item.processName"
|
||||
:value="item.processId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="工艺路线顺序" prop="processOrder">
|
||||
<el-input v-model="form.processOrder" placeholder="请输入工艺路线顺序" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listBaseRouteProcess, getBaseRouteProcess, delBaseRouteProcess, addBaseRouteProcess, updateBaseRouteProcess } from "@/api/mes/baseRouteProcess";
|
||||
import {findProcessList} from "@//api/mes/processInfo";
|
||||
import {findRouteList} from "@//api/mes/baseRoute";
|
||||
|
||||
export default {
|
||||
name: "BaseRouteProcess",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 工艺路线组成信息表格数据
|
||||
baseRouteProcessList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
routeId: null,
|
||||
processId: null,
|
||||
processOrder: null,
|
||||
remark: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
routeId: [
|
||||
{ required: true, message: "工艺路线ID不能为空", trigger: "blur" }
|
||||
],
|
||||
processId: [
|
||||
{ required: true, message: "工序ID不能为空", trigger: "blur" }
|
||||
],
|
||||
},
|
||||
columns: [
|
||||
{ key: 0, label: `工艺路线组成ID`, visible: false },
|
||||
{ key: 1, label: `工艺路线ID`, visible: true },
|
||||
{ key: 2, label: `工序ID`, visible: true },
|
||||
{ key: 3, label: `工艺路线顺序`, visible: true },
|
||||
{ key: 4, label: `备注`, visible: true },
|
||||
{ key: 5, label: `创建人`, visible: false },
|
||||
{ key: 6, label: `创建时间`, visible: true },
|
||||
{ key: 7, label: `更新人`, visible: false },
|
||||
{ key: 8, label: `更新时间`, visible: true },
|
||||
],
|
||||
//工序选项
|
||||
processList: [],
|
||||
//工艺路线选项
|
||||
routeList: [],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询工艺路线组成信息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
findProcessList(null).then(response => {
|
||||
this.processList = response.data
|
||||
})
|
||||
findRouteList(null).then(response => {
|
||||
this.routeList = response.data
|
||||
})
|
||||
listBaseRouteProcess(this.queryParams).then(response => {
|
||||
this.baseRouteProcessList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
routeProcessId: null,
|
||||
routeId: null,
|
||||
processId: null,
|
||||
processOrder: null,
|
||||
remark: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.routeProcessId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加工艺路线组成信息";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const routeProcessId = row.routeProcessId || this.ids
|
||||
getBaseRouteProcess(routeProcessId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改工艺路线组成信息";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.routeProcessId != null) {
|
||||
updateBaseRouteProcess(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addBaseRouteProcess(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const routeProcessIds = row.routeProcessId || this.ids;
|
||||
this.$modal.confirm('是否确认删除工艺路线组成信息编号为"' + routeProcessIds + '"的数据项?').then(function() {
|
||||
return delBaseRouteProcess(routeProcessIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('mes/baseRouteProcess/export', {
|
||||
...this.queryParams
|
||||
}, `baseRouteProcess_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Reference in New Issue