zhangsiqi
9 months ago
9 changed files with 866 additions and 0 deletions
@ -0,0 +1,158 @@ |
|||
package com.ruoyi.outsource.controller; |
|||
|
|||
import java.text.SimpleDateFormat; |
|||
import java.util.List; |
|||
|
|||
import com.ruoyi.ck.utils.Result; |
|||
import com.ruoyi.common.utils.StringUtils; |
|||
import org.apache.shiro.authz.annotation.RequiresPermissions; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Controller; |
|||
import org.springframework.ui.ModelMap; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
import org.springframework.web.bind.annotation.PathVariable; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.ResponseBody; |
|||
import com.ruoyi.common.annotation.Log; |
|||
import com.ruoyi.common.enums.BusinessType; |
|||
import com.ruoyi.outsource.domain.OutsourceProcess; |
|||
import com.ruoyi.outsource.service.IOutsourceProcessService; |
|||
import com.ruoyi.common.core.controller.BaseController; |
|||
import com.ruoyi.common.core.domain.AjaxResult; |
|||
import com.ruoyi.common.utils.poi.ExcelUtil; |
|||
import com.ruoyi.common.core.page.TableDataInfo; |
|||
|
|||
/** |
|||
* 委外工序列表Controller |
|||
* |
|||
* @author zhang |
|||
* @date 2024-03-08 |
|||
*/ |
|||
@Controller |
|||
@RequestMapping("/outsource/process") |
|||
public class OutsourceProcessController extends BaseController |
|||
{ |
|||
private String prefix = "outsource/process"; |
|||
|
|||
@Autowired |
|||
private IOutsourceProcessService outsourceProcessService; |
|||
|
|||
@RequiresPermissions("outsource:process:view") |
|||
@GetMapping() |
|||
public String process() |
|||
{ |
|||
return prefix + "/process"; |
|||
} |
|||
|
|||
/** |
|||
* 查询委外工序列表列表 |
|||
*/ |
|||
@RequiresPermissions("outsource:process:list") |
|||
@PostMapping("/list") |
|||
@ResponseBody |
|||
public TableDataInfo list(OutsourceProcess outsourceProcess) |
|||
{ |
|||
startPage(); |
|||
List<OutsourceProcess> list = outsourceProcessService.selectOutsourceProcessList(outsourceProcess); |
|||
return getDataTable(list); |
|||
} |
|||
|
|||
/** |
|||
* 导出委外工序列表列表 |
|||
*/ |
|||
@RequiresPermissions("outsource:process:export") |
|||
@Log(title = "委外工序列表", businessType = BusinessType.EXPORT) |
|||
@PostMapping("/export") |
|||
@ResponseBody |
|||
public AjaxResult export(OutsourceProcess outsourceProcess) |
|||
{ |
|||
List<OutsourceProcess> list = outsourceProcessService.selectOutsourceProcessList(outsourceProcess); |
|||
ExcelUtil<OutsourceProcess> util = new ExcelUtil<OutsourceProcess>(OutsourceProcess.class); |
|||
return util.exportExcel(list, "委外工序列表数据"); |
|||
} |
|||
|
|||
/** |
|||
* 新增委外工序列表 |
|||
*/ |
|||
@GetMapping("/add") |
|||
public String add() |
|||
{ |
|||
return prefix + "/add"; |
|||
} |
|||
|
|||
/** |
|||
* 新增保存委外工序列表 |
|||
*/ |
|||
@RequiresPermissions("outsource:process:add") |
|||
@Log(title = "委外工序列表", businessType = BusinessType.INSERT) |
|||
@PostMapping("/add") |
|||
@ResponseBody |
|||
public AjaxResult addSave(OutsourceProcess outsourceProcess) |
|||
{ |
|||
return toAjax(outsourceProcessService.insertOutsourceProcess(outsourceProcess)); |
|||
} |
|||
|
|||
/** |
|||
* 修改委外工序列表 |
|||
*/ |
|||
@GetMapping("/edit/{outsourceProcessId}") |
|||
public String edit(@PathVariable("outsourceProcessId") String outsourceProcessId, ModelMap mmap) |
|||
{ |
|||
OutsourceProcess outsourceProcess = outsourceProcessService.selectOutsourceProcessById(outsourceProcessId); |
|||
mmap.put("outsourceProcess", outsourceProcess); |
|||
return prefix + "/edit"; |
|||
} |
|||
|
|||
/** |
|||
* 修改保存委外工序列表 |
|||
*/ |
|||
@RequiresPermissions("outsource:process:edit") |
|||
@Log(title = "委外工序列表", businessType = BusinessType.UPDATE) |
|||
@PostMapping("/edit") |
|||
@ResponseBody |
|||
public AjaxResult editSave(OutsourceProcess outsourceProcess) |
|||
{ |
|||
return toAjax(outsourceProcessService.updateOutsourceProcess(outsourceProcess)); |
|||
} |
|||
|
|||
/** |
|||
* 删除委外工序列表 |
|||
*/ |
|||
@RequiresPermissions("outsource:process:remove") |
|||
@Log(title = "委外工序列表", businessType = BusinessType.DELETE) |
|||
@PostMapping( "/remove") |
|||
@ResponseBody |
|||
public AjaxResult remove(String ids) |
|||
{ |
|||
return toAjax(outsourceProcessService.deleteOutsourceProcessByIds(ids)); |
|||
} |
|||
|
|||
/** |
|||
* 作废委外工序列表 |
|||
*/ |
|||
@RequiresPermissions("outsource:process:cancel") |
|||
@Log(title = "委外工序列表", businessType = BusinessType.CANCEL) |
|||
@GetMapping( "/cancel/{id}") |
|||
@ResponseBody |
|||
public AjaxResult cancel(@PathVariable("id") String id){ |
|||
return toAjax(outsourceProcessService.cancelOutsourceProcessById(id)); |
|||
} |
|||
|
|||
/** |
|||
* 恢复委外工序列表 |
|||
*/ |
|||
@RequiresPermissions("outsource:process:restore") |
|||
@Log(title = "委外工序列表", businessType = BusinessType.RESTORE) |
|||
@GetMapping( "/restore/{id}") |
|||
@ResponseBody |
|||
public AjaxResult restore(@PathVariable("id")String id) |
|||
{ |
|||
return toAjax(outsourceProcessService.restoreOutsourceProcessById(id)); |
|||
} |
|||
@PostMapping("/getId") |
|||
@ResponseBody |
|||
public Result getId() throws Exception { |
|||
return Result.getSuccessResult(outsourceProcessService.getId()); |
|||
} |
|||
} |
@ -0,0 +1,71 @@ |
|||
package com.ruoyi.outsource.domain; |
|||
|
|||
import org.apache.commons.lang3.builder.ToStringBuilder; |
|||
import org.apache.commons.lang3.builder.ToStringStyle; |
|||
import com.ruoyi.common.annotation.Excel; |
|||
import com.ruoyi.common.core.domain.BaseEntity; |
|||
|
|||
/** |
|||
* 委外工序列表对象 outsource_process |
|||
* |
|||
* @author zhang |
|||
* @date 2024-03-08 |
|||
*/ |
|||
public class OutsourceProcess extends BaseEntity |
|||
{ |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** 委外工序ID */ |
|||
@Excel(name = "委外工序ID") |
|||
private String outsourceProcessId; |
|||
|
|||
/** 委外工序编号 */ |
|||
@Excel(name = "委外工序编号") |
|||
private String outsourceProcessCode; |
|||
|
|||
/** 委外工序名称 */ |
|||
@Excel(name = "委外工序名称") |
|||
private String outsourceProcessName; |
|||
|
|||
public void setOutsourceProcessId(String outsourceProcessId) |
|||
{ |
|||
this.outsourceProcessId = outsourceProcessId; |
|||
} |
|||
|
|||
public String getOutsourceProcessId() |
|||
{ |
|||
return outsourceProcessId; |
|||
} |
|||
public void setOutsourceProcessCode(String outsourceProcessCode) |
|||
{ |
|||
this.outsourceProcessCode = outsourceProcessCode; |
|||
} |
|||
|
|||
public String getOutsourceProcessCode() |
|||
{ |
|||
return outsourceProcessCode; |
|||
} |
|||
public void setOutsourceProcessName(String outsourceProcessName) |
|||
{ |
|||
this.outsourceProcessName = outsourceProcessName; |
|||
} |
|||
|
|||
public String getOutsourceProcessName() |
|||
{ |
|||
return outsourceProcessName; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
|||
.append("outsourceProcessId", getOutsourceProcessId()) |
|||
.append("outsourceProcessCode", getOutsourceProcessCode()) |
|||
.append("outsourceProcessName", getOutsourceProcessName()) |
|||
.append("remark", getRemark()) |
|||
.append("createBy", getCreateBy()) |
|||
.append("createTime", getCreateTime()) |
|||
.append("updateBy", getUpdateBy()) |
|||
.append("updateTime", getUpdateTime()) |
|||
.toString(); |
|||
} |
|||
} |
@ -0,0 +1,77 @@ |
|||
package com.ruoyi.outsource.mapper; |
|||
|
|||
import java.util.List; |
|||
import com.ruoyi.outsource.domain.OutsourceProcess; |
|||
|
|||
/** |
|||
* 委外工序列表Mapper接口 |
|||
* |
|||
* @author zhang |
|||
* @date 2024-03-08 |
|||
*/ |
|||
public interface OutsourceProcessMapper |
|||
{ |
|||
/** |
|||
* 查询委外工序列表 |
|||
* |
|||
* @param outsourceProcessId 委外工序列表ID |
|||
* @return 委外工序列表 |
|||
*/ |
|||
public OutsourceProcess selectOutsourceProcessById(String outsourceProcessId); |
|||
|
|||
/** |
|||
* 查询委外工序列表列表 |
|||
* |
|||
* @param outsourceProcess 委外工序列表 |
|||
* @return 委外工序列表集合 |
|||
*/ |
|||
public List<OutsourceProcess> selectOutsourceProcessList(OutsourceProcess outsourceProcess); |
|||
|
|||
/** |
|||
* 新增委外工序列表 |
|||
* |
|||
* @param outsourceProcess 委外工序列表 |
|||
* @return 结果 |
|||
*/ |
|||
public int insertOutsourceProcess(OutsourceProcess outsourceProcess); |
|||
|
|||
/** |
|||
* 修改委外工序列表 |
|||
* |
|||
* @param outsourceProcess 委外工序列表 |
|||
* @return 结果 |
|||
*/ |
|||
public int updateOutsourceProcess(OutsourceProcess outsourceProcess); |
|||
|
|||
/** |
|||
* 删除委外工序列表 |
|||
* |
|||
* @param outsourceProcessId 委外工序列表ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteOutsourceProcessById(String outsourceProcessId); |
|||
|
|||
/** |
|||
* 批量删除委外工序列表 |
|||
* |
|||
* @param outsourceProcessIds 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteOutsourceProcessByIds(String[] outsourceProcessIds); |
|||
|
|||
/** |
|||
* 作废委外工序列表 |
|||
* |
|||
* @param outsourceProcessId 委外工序列表ID |
|||
* @return 结果 |
|||
*/ |
|||
public int cancelOutsourceProcessById(String outsourceProcessId); |
|||
|
|||
/** |
|||
* 恢复委外工序列表 |
|||
* |
|||
* @param outsourceProcessId 委外工序列表ID |
|||
* @return 结果 |
|||
*/ |
|||
public int restoreOutsourceProcessById(String outsourceProcessId); |
|||
} |
@ -0,0 +1,77 @@ |
|||
package com.ruoyi.outsource.service; |
|||
|
|||
import java.util.List; |
|||
import com.ruoyi.outsource.domain.OutsourceProcess; |
|||
|
|||
/** |
|||
* 委外工序列表Service接口 |
|||
* |
|||
* @author zhang |
|||
* @date 2024-03-08 |
|||
*/ |
|||
public interface IOutsourceProcessService |
|||
{ |
|||
/** |
|||
* 查询委外工序列表 |
|||
* |
|||
* @param outsourceProcessId 委外工序列表ID |
|||
* @return 委外工序列表 |
|||
*/ |
|||
public OutsourceProcess selectOutsourceProcessById(String outsourceProcessId); |
|||
|
|||
/** |
|||
* 查询委外工序列表列表 |
|||
* |
|||
* @param outsourceProcess 委外工序列表 |
|||
* @return 委外工序列表集合 |
|||
*/ |
|||
public List<OutsourceProcess> selectOutsourceProcessList(OutsourceProcess outsourceProcess); |
|||
|
|||
/** |
|||
* 新增委外工序列表 |
|||
* |
|||
* @param outsourceProcess 委外工序列表 |
|||
* @return 结果 |
|||
*/ |
|||
public int insertOutsourceProcess(OutsourceProcess outsourceProcess); |
|||
|
|||
/** |
|||
* 修改委外工序列表 |
|||
* |
|||
* @param outsourceProcess 委外工序列表 |
|||
* @return 结果 |
|||
*/ |
|||
public int updateOutsourceProcess(OutsourceProcess outsourceProcess); |
|||
|
|||
/** |
|||
* 批量删除委外工序列表 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteOutsourceProcessByIds(String ids); |
|||
|
|||
/** |
|||
* 删除委外工序列表信息 |
|||
* |
|||
* @param outsourceProcessId 委外工序列表ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteOutsourceProcessById(String outsourceProcessId); |
|||
|
|||
/** |
|||
* 作废委外工序列表 |
|||
* @param outsourceProcessId 委外工序列表ID |
|||
* @return |
|||
*/ |
|||
int cancelOutsourceProcessById(String outsourceProcessId); |
|||
|
|||
/** |
|||
* 恢复委外工序列表 |
|||
* @param outsourceProcessId 委外工序列表ID |
|||
* @return |
|||
*/ |
|||
int restoreOutsourceProcessById(String outsourceProcessId); |
|||
|
|||
Object getId(); |
|||
} |
@ -0,0 +1,141 @@ |
|||
package com.ruoyi.outsource.service.impl; |
|||
|
|||
import java.text.SimpleDateFormat; |
|||
import java.util.List; |
|||
|
|||
import com.ruoyi.common.core.redis.RedisCache; |
|||
import com.ruoyi.common.utils.DateUtils; |
|||
import com.ruoyi.common.utils.ShiroUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import com.ruoyi.outsource.mapper.OutsourceProcessMapper; |
|||
import com.ruoyi.outsource.domain.OutsourceProcess; |
|||
import com.ruoyi.outsource.service.IOutsourceProcessService; |
|||
import com.ruoyi.common.core.text.Convert; |
|||
|
|||
/** |
|||
* 委外工序列表Service业务层处理 |
|||
* |
|||
* @author zhang |
|||
* @date 2024-03-08 |
|||
*/ |
|||
@Service |
|||
public class OutsourceProcessServiceImpl implements IOutsourceProcessService |
|||
{ |
|||
@Autowired |
|||
private OutsourceProcessMapper outsourceProcessMapper; |
|||
|
|||
@Autowired |
|||
private RedisCache redisCache; |
|||
|
|||
/** |
|||
* 查询委外工序列表 |
|||
* |
|||
* @param outsourceProcessId 委外工序列表ID |
|||
* @return 委外工序列表 |
|||
*/ |
|||
@Override |
|||
public OutsourceProcess selectOutsourceProcessById(String outsourceProcessId) |
|||
{ |
|||
return outsourceProcessMapper.selectOutsourceProcessById(outsourceProcessId); |
|||
} |
|||
|
|||
/** |
|||
* 查询委外工序列表列表 |
|||
* |
|||
* @param outsourceProcess 委外工序列表 |
|||
* @return 委外工序列表 |
|||
*/ |
|||
@Override |
|||
public List<OutsourceProcess> selectOutsourceProcessList(OutsourceProcess outsourceProcess) |
|||
{ |
|||
return outsourceProcessMapper.selectOutsourceProcessList(outsourceProcess); |
|||
} |
|||
|
|||
/** |
|||
* 新增委外工序列表 |
|||
* |
|||
* @param outsourceProcess 委外工序列表 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int insertOutsourceProcess(OutsourceProcess outsourceProcess) |
|||
{ |
|||
String loginName = ShiroUtils.getLoginName(); |
|||
outsourceProcess.setCreateBy(loginName); |
|||
outsourceProcess.setCreateTime(DateUtils.getNowDate()); |
|||
return outsourceProcessMapper.insertOutsourceProcess(outsourceProcess); |
|||
} |
|||
|
|||
/** |
|||
* 修改委外工序列表 |
|||
* |
|||
* @param outsourceProcess 委外工序列表 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int updateOutsourceProcess(OutsourceProcess outsourceProcess) |
|||
{ |
|||
String loginName = ShiroUtils.getLoginName(); |
|||
outsourceProcess.setUpdateBy(loginName); |
|||
outsourceProcess.setUpdateTime(DateUtils.getNowDate()); |
|||
return outsourceProcessMapper.updateOutsourceProcess(outsourceProcess); |
|||
} |
|||
|
|||
/** |
|||
* 删除委外工序列表对象 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int deleteOutsourceProcessByIds(String ids) |
|||
{ |
|||
return outsourceProcessMapper.deleteOutsourceProcessByIds(Convert.toStrArray(ids)); |
|||
} |
|||
|
|||
/** |
|||
* 删除委外工序列表信息 |
|||
* |
|||
* @param outsourceProcessId 委外工序列表ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int deleteOutsourceProcessById(String outsourceProcessId) |
|||
{ |
|||
return outsourceProcessMapper.deleteOutsourceProcessById(outsourceProcessId); |
|||
} |
|||
|
|||
/** |
|||
* 作废委外工序列表 |
|||
* |
|||
* @param outsourceProcessId 委外工序列表ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int cancelOutsourceProcessById(String outsourceProcessId) |
|||
{ |
|||
return outsourceProcessMapper.cancelOutsourceProcessById(outsourceProcessId); |
|||
} |
|||
|
|||
/** |
|||
* 恢复委外工序列表信息 |
|||
* |
|||
* @param outsourceProcessId 委外工序列表ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int restoreOutsourceProcessById(String outsourceProcessId) |
|||
{ |
|||
return outsourceProcessMapper.restoreOutsourceProcessById(outsourceProcessId); |
|||
} |
|||
|
|||
/** |
|||
* 获取生成委外工序ID |
|||
* @return |
|||
*/ |
|||
@Override |
|||
public Object getId() { |
|||
return redisCache.generateNo("WWGX"); |
|||
} |
|||
} |
@ -0,0 +1,95 @@ |
|||
<?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.ruoyi.outsource.mapper.OutsourceProcessMapper"> |
|||
|
|||
<resultMap type="OutsourceProcess" id="OutsourceProcessResult"> |
|||
<result property="outsourceProcessId" column="outsource_process_Id" /> |
|||
<result property="outsourceProcessCode" column="outsource_process_code" /> |
|||
<result property="outsourceProcessName" column="outsource_process_name" /> |
|||
<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="selectOutsourceProcessVo"> |
|||
select outsource_process_Id, outsource_process_code, outsource_process_name, remark, create_by, create_time, update_by, update_time from outsource_process |
|||
</sql> |
|||
|
|||
<select id="selectOutsourceProcessList" parameterType="OutsourceProcess" resultMap="OutsourceProcessResult"> |
|||
<include refid="selectOutsourceProcessVo"/> |
|||
<where> |
|||
<if test="outsourceProcessId != null and outsourceProcessId != ''"> and outsource_process_Id like concat('%', #{outsourceProcessId}, '%')</if> |
|||
<if test="outsourceProcessCode != null and outsourceProcessCode != ''"> and outsource_process_code like concat('%', #{outsourceProcessCode}, '%')</if> |
|||
<if test="outsourceProcessName != null and outsourceProcessName != ''"> and outsource_process_name like concat('%', #{outsourceProcessName}, '%')</if> |
|||
<if test="remark != null and remark != ''"> and remark = #{remark}</if> |
|||
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if> |
|||
</where> |
|||
</select> |
|||
|
|||
<select id="selectOutsourceProcessById" parameterType="String" resultMap="OutsourceProcessResult"> |
|||
<include refid="selectOutsourceProcessVo"/> |
|||
where outsource_process_Id = #{outsourceProcessId} |
|||
</select> |
|||
|
|||
<insert id="insertOutsourceProcess" parameterType="OutsourceProcess"> |
|||
insert into outsource_process |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="outsourceProcessId != null">outsource_process_Id,</if> |
|||
<if test="outsourceProcessCode != null and outsourceProcessCode != ''">outsource_process_code,</if> |
|||
<if test="outsourceProcessName != null and outsourceProcessName != ''">outsource_process_name,</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="outsourceProcessId != null">#{outsourceProcessId},</if> |
|||
<if test="outsourceProcessCode != null and outsourceProcessCode != ''">#{outsourceProcessCode},</if> |
|||
<if test="outsourceProcessName != null and outsourceProcessName != ''">#{outsourceProcessName},</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="updateOutsourceProcess" parameterType="OutsourceProcess"> |
|||
update outsource_process |
|||
<trim prefix="SET" suffixOverrides=","> |
|||
<if test="outsourceProcessCode != null and outsourceProcessCode != ''">outsource_process_code = #{outsourceProcessCode},</if> |
|||
<if test="outsourceProcessName != null and outsourceProcessName != ''">outsource_process_name = #{outsourceProcessName},</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 outsource_process_Id = #{outsourceProcessId} |
|||
</update> |
|||
|
|||
<delete id="deleteOutsourceProcessById" parameterType="String"> |
|||
delete from outsource_process where outsource_process_Id = #{outsourceProcessId} |
|||
</delete> |
|||
|
|||
<delete id="deleteOutsourceProcessByIds" parameterType="String"> |
|||
delete from outsource_process where outsource_process_Id in |
|||
<foreach item="outsourceProcessId" collection="array" open="(" separator="," close=")"> |
|||
#{outsourceProcessId} |
|||
</foreach> |
|||
</delete> |
|||
|
|||
<update id="cancelOutsourceProcessById" parameterType="String"> |
|||
update outsource_process set del_flag = '1' where outsource_process_Id = #{outsourceProcessId} |
|||
</update> |
|||
|
|||
<update id="restoreOutsourceProcessById" parameterType="String"> |
|||
update outsource_process set del_flag = '0' where outsource_process_Id = #{outsourceProcessId} |
|||
</update> |
|||
|
|||
</mapper> |
@ -0,0 +1,67 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('新增委外工序列表')" /> |
|||
</head> |
|||
<body class="white-bg"> |
|||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-process-add"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-6 control-label">委外工序ID:</label> |
|||
<div class="col-sm-6"> |
|||
<input name="outsourceProcessId" class="form-control" type="text" required > |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-6 control-label is-required">委外工序编号:</label> |
|||
<div class="col-sm-6"> |
|||
<input name="outsourceProcessCode" class="form-control" type="text" required> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-6 control-label is-required">委外工序名称:</label> |
|||
<div class="col-sm-6"> |
|||
<input name="outsourceProcessName" class="form-control m-b" required /> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-6 control-label">备注:</label> |
|||
<div class="col-sm-6"> |
|||
<input name="remark" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "outsource/process" |
|||
$("#form-process-add").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
$.operate.save(prefix + "/add", $('#form-process-add').serialize()); |
|||
} |
|||
} |
|||
|
|||
$(function(){ |
|||
$.ajax({ |
|||
url: prefix + "/getId", |
|||
type: "post", |
|||
dateType: "json", |
|||
success: function (resp) { |
|||
if (resp.code === 0) { |
|||
$("input[name='outsourceProcessId']").val(resp.data); |
|||
} else { |
|||
$.modal.msgError("失败啦"); |
|||
} |
|||
}, |
|||
error: function () { |
|||
$.modal.msgError("后台出错啦!"); |
|||
} |
|||
}); |
|||
}) |
|||
</script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,44 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('修改委外工序列表')" /> |
|||
</head> |
|||
<body class="white-bg"> |
|||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-process-edit" th:object="${outsourceProcess}"> |
|||
<input name="outsourceProcessId" th:field="*{outsourceProcessId}" type="hidden"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label is-required">委外工序编号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="outsourceProcessCode" th:field="*{outsourceProcessCode}" class="form-control" type="text" required> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label is-required">委外工序名称:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="outsourceProcessName" th:field="*{outsourceProcessCode}" class="form-control m-b" required /> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">备注:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="remark" th:field="*{remark}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "outsource/process"; |
|||
$("#form-process-edit").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
$.operate.save(prefix + "/edit", $('#form-process-edit').serialize()); |
|||
} |
|||
} |
|||
</script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,136 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> |
|||
<head> |
|||
<th:block th:include="include :: header('委外工序列表列表')" /> |
|||
</head> |
|||
<body class="gray-bg"> |
|||
<div class="container-div"> |
|||
<div class="row"> |
|||
<div class="col-sm-12 search-collapse"> |
|||
<form id="formId"> |
|||
<div class="select-list"> |
|||
<ul> |
|||
<li> |
|||
<label>委外工序ID:</label> |
|||
<input type="text" name="outsourceProcessId"/> |
|||
</li> |
|||
<li> |
|||
<label>委外工序编号:</label> |
|||
<input type="text" name="outsourceProcessCode"/> |
|||
</li> |
|||
<li> |
|||
<label>委外工序名称:</label> |
|||
<select name="outsourceProcessName"> |
|||
<option value="">所有</option> |
|||
<option value="-1">代码生成请选择字典属性</option> |
|||
</select> |
|||
</li> |
|||
<li class="select-time"> |
|||
<label>录入时间:</label> |
|||
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginCreateTime]"/> |
|||
<span>-</span> |
|||
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endCreateTime]"/> |
|||
</li> |
|||
<li> |
|||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
|||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a> |
|||
</li> |
|||
</ul> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
|
|||
<div class="btn-group-sm" id="toolbar" role="group"> |
|||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="outsource:process:add"> |
|||
<i class="fa fa-plus"></i> 添加 |
|||
</a> |
|||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="outsource:process:edit"> |
|||
<i class="fa fa-edit"></i> 修改 |
|||
</a> |
|||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="outsource:process:remove"> |
|||
<i class="fa fa-remove"></i> 删除 |
|||
</a> |
|||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="outsource:process:export"> |
|||
<i class="fa fa-download"></i> 导出 |
|||
</a> |
|||
</div> |
|||
<div class="col-sm-12 select-table table-striped"> |
|||
<table id="bootstrap-table"></table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<script th:inline="javascript"> |
|||
var editFlag = [[${@permission.hasPermi('outsource:process:edit')}]]; |
|||
var removeFlag = [[${@permission.hasPermi('outsource:process:remove')}]]; |
|||
var cancelFlag = [[${@permission.hasPermi('outsource:process:cancel')}]]; |
|||
var restoreFlag = [[${@permission.hasPermi('outsource:process:restore')}]]; |
|||
var prefix = ctx + "outsource/process"; |
|||
|
|||
$(function() { |
|||
var options = { |
|||
url: prefix + "/list", |
|||
createUrl: prefix + "/add", |
|||
updateUrl: prefix + "/edit/{id}", |
|||
removeUrl: prefix + "/remove", |
|||
cancelUrl: prefix + "/cancel/{id}", |
|||
restoreUrl: prefix + "/restore/{id}", |
|||
exportUrl: prefix + "/export", |
|||
modalName: "委外工序列表", |
|||
columns: [{ |
|||
checkbox: true |
|||
}, |
|||
{ |
|||
field: 'outsourceProcessId', |
|||
title: '委外工序ID', |
|||
visible: false |
|||
}, |
|||
{ |
|||
field: 'outsourceProcessCode', |
|||
title: '委外工序编号' |
|||
}, |
|||
{ |
|||
field: 'outsourceProcessName', |
|||
title: '委外工序名称' |
|||
}, |
|||
{ |
|||
field: 'remark', |
|||
title: '备注' |
|||
}, |
|||
{ |
|||
field: 'createBy', |
|||
title: '录入人' |
|||
}, |
|||
{ |
|||
field: 'createTime', |
|||
title: '录入时间' |
|||
}, |
|||
{ |
|||
field: 'updateBy', |
|||
title: '更新人' |
|||
}, |
|||
{ |
|||
field: 'updateTime', |
|||
title: '最后更新时间' |
|||
}, |
|||
{ |
|||
title: '操作', |
|||
align: 'center', |
|||
formatter: function(value, row, index) { |
|||
var actions = []; |
|||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.outsourceProcessId + '\')"><i class="fa fa-edit"></i>编辑</a> '); |
|||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.outsourceProcessId + '\')"><i class="fa fa-remove"></i>删除</a> '); |
|||
if(row.delFlag == '0'){ |
|||
actions.push('<a class="btn btn-danger btn-xs ' + cancelFlag + '" href="javascript:void(0)" onclick="$.operate.cancel(\'' + row.id + '\')"><i class="fa fa-remove"></i>作废</a> '); |
|||
}else{ |
|||
actions.push('<a class="btn btn-success btn-xs ' + restoreFlag + '" href="javascript:void(0)" onclick="$.operate.restore(\'' + row.id + '\')"><i class="fa fa-window-restore"></i>恢复</a> '); |
|||
} |
|||
return actions.join(''); |
|||
} |
|||
}] |
|||
}; |
|||
$.table.init(options); |
|||
}); |
|||
</script> |
|||
</body> |
|||
</html> |
Loading…
Reference in new issue