Browse Source
整合新增委外工序表实体类 整合新增委外工序Controller 整合新增委外工序Mapper 整合新增委外工序Mapper.XML 整合新增委外工序Service接口 整合新增委外工序ServiceImpl实现类 整合新增委外工序VO类 整合新增委外工序前端页面dev
liuxiaoxu
4 months ago
12 changed files with 1004 additions and 79 deletions
@ -0,0 +1,110 @@ |
|||||
|
package com.ruoyi.system.domain.Vo; |
||||
|
|
||||
|
import com.ruoyi.common.core.domain.BaseEntity; |
||||
|
import com.ruoyi.system.domain.OutsourceProcess; |
||||
|
import org.apache.commons.lang3.builder.ToStringBuilder; |
||||
|
import org.apache.commons.lang3.builder.ToStringStyle; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
public class OutsourceProcessVo extends OutsourceProcess { |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** 委外工序id */ |
||||
|
// @Excel(name = "委外工序id")
|
||||
|
private Long outsourceProcessId; |
||||
|
|
||||
|
/** 委外工序ID */ |
||||
|
private String outsourceProcessCode; |
||||
|
|
||||
|
/** 委外工序编号 */ |
||||
|
private String outsourceProcessNo; |
||||
|
|
||||
|
/** 委外工序名称 */ |
||||
|
private String outsourceProcessName; |
||||
|
|
||||
|
private String remark; |
||||
|
|
||||
|
private List<Supplier> weightSupplier; |
||||
|
|
||||
|
private List<Supplier> quantitySupplier; |
||||
|
|
||||
|
private List<Supplier> areaSupplier; |
||||
|
|
||||
|
public List<Supplier> getWeightSupplier() { |
||||
|
return weightSupplier; |
||||
|
} |
||||
|
|
||||
|
public void setWeightSupplier(List<Supplier> weightSupplier) { |
||||
|
this.weightSupplier = weightSupplier; |
||||
|
} |
||||
|
|
||||
|
public List<Supplier> getQuantitySupplier() { |
||||
|
return quantitySupplier; |
||||
|
} |
||||
|
|
||||
|
public void setQuantitySupplier(List<Supplier> quantitySupplier) { |
||||
|
this.quantitySupplier = quantitySupplier; |
||||
|
} |
||||
|
|
||||
|
public List<Supplier> getAreaSupplier() { |
||||
|
return areaSupplier; |
||||
|
} |
||||
|
|
||||
|
public void setAreaSupplier(List<Supplier> areaSupplier) { |
||||
|
this.areaSupplier = areaSupplier; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
@Override |
||||
|
public Long getOutsourceProcessId() { |
||||
|
return outsourceProcessId; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void setOutsourceProcessId(Long outsourceProcessId) { |
||||
|
this.outsourceProcessId = outsourceProcessId; |
||||
|
} |
||||
|
|
||||
|
public String getOutsourceProcessCode() { |
||||
|
return outsourceProcessCode; |
||||
|
} |
||||
|
|
||||
|
public void setOutsourceProcessCode(String outsourceProcessCode) { |
||||
|
this.outsourceProcessCode = outsourceProcessCode; |
||||
|
} |
||||
|
|
||||
|
public void setOutsourceProcessNo(String outsourceProcessNo) |
||||
|
{ |
||||
|
this.outsourceProcessNo = outsourceProcessNo; |
||||
|
} |
||||
|
|
||||
|
public String getOutsourceProcessNo() |
||||
|
{ |
||||
|
return outsourceProcessNo; |
||||
|
} |
||||
|
|
||||
|
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("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,50 @@ |
|||||
|
package com.ruoyi.system.domain.Vo; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
|
||||
|
public class Supplier { |
||||
|
|
||||
|
/** 供应商编号 */ |
||||
|
private String supplierCode; |
||||
|
|
||||
|
/** 供应商名称 */ |
||||
|
private String supplierName; |
||||
|
|
||||
|
/** 工序的不含税单价(RMB) */ |
||||
|
private BigDecimal materialRmb; |
||||
|
|
||||
|
/** 工序的含税单价(RMB) */ |
||||
|
private BigDecimal materialNormb; |
||||
|
|
||||
|
public String getSupplierCode() { |
||||
|
return supplierCode; |
||||
|
} |
||||
|
|
||||
|
public void setSupplierCode(String supplierCode) { |
||||
|
this.supplierCode = supplierCode; |
||||
|
} |
||||
|
|
||||
|
public String getSupplierName() { |
||||
|
return supplierName; |
||||
|
} |
||||
|
|
||||
|
public void setSupplierName(String supplierName) { |
||||
|
this.supplierName = supplierName; |
||||
|
} |
||||
|
|
||||
|
public BigDecimal getMaterialRmb() { |
||||
|
return materialRmb; |
||||
|
} |
||||
|
|
||||
|
public void setMaterialRmb(BigDecimal materialRmb) { |
||||
|
this.materialRmb = materialRmb; |
||||
|
} |
||||
|
|
||||
|
public BigDecimal getMaterialNormb() { |
||||
|
return materialNormb; |
||||
|
} |
||||
|
|
||||
|
public void setMaterialNormb(BigDecimal materialNormb) { |
||||
|
this.materialNormb = materialNormb; |
||||
|
} |
||||
|
} |
@ -0,0 +1,95 @@ |
|||||
|
package com.ruoyi.system.mapper; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
import com.ruoyi.system.domain.OutsourceProcess; |
||||
|
import com.ruoyi.system.domain.Vo.OutsourceProcessVo; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
/** |
||||
|
* 委外工序Mapper接口 |
||||
|
* |
||||
|
* @author ruoyi |
||||
|
* @date 2024-06-30 |
||||
|
*/ |
||||
|
public interface OutsourceProcessMapper |
||||
|
{ |
||||
|
/** |
||||
|
* 查询委外工序 |
||||
|
* |
||||
|
* @param outsourceProcessId 委外工序主键 |
||||
|
* @return 委外工序 |
||||
|
*/ |
||||
|
public OutsourceProcess selectOutsourceProcessByOutsourceProcessId(long outsourceProcessId); |
||||
|
/** |
||||
|
* 查询委外工序 |
||||
|
* |
||||
|
* @param outsourceProcessIds 委外工序主键串 |
||||
|
* @return 委外工序 |
||||
|
*/ |
||||
|
public List<OutsourceProcess> selectOutsourceProcessByOutsourceProcessIds(Long[] outsourceProcessIds); |
||||
|
/** |
||||
|
* 查询委外工序 |
||||
|
* |
||||
|
* @param outsourceProcessNo 委外工序编号 |
||||
|
* @return 委外工序 |
||||
|
*/ |
||||
|
public OutsourceProcess selectOutsourceProcessByOutsourceProcessNo(String outsourceProcessNo); |
||||
|
|
||||
|
/** |
||||
|
* 查询委外工序列表 |
||||
|
* |
||||
|
* @param outsourceProcess 委外工序 |
||||
|
* @return 委外工序集合 |
||||
|
*/ |
||||
|
public List<OutsourceProcess> selectOutsourceProcessList(OutsourceProcess outsourceProcess); |
||||
|
|
||||
|
/** |
||||
|
* 按编号查询委外工序列表 |
||||
|
* |
||||
|
* @param outsourceProcessNos 委外工序编号 |
||||
|
* @return 委外工序集合 |
||||
|
*/ |
||||
|
public List<OutsourceProcessVo> selectOutsourceProcessListByNos(List<String> outsourceProcessNos); |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 新增委外工序 |
||||
|
* |
||||
|
* @param outsourceProcess 委外工序 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int insertOutsourceProcess(OutsourceProcess outsourceProcess); |
||||
|
|
||||
|
/** |
||||
|
* 修改委外工序 |
||||
|
* |
||||
|
* @param outsourceProcess 委外工序 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int updateOutsourceProcess(OutsourceProcess outsourceProcess); |
||||
|
|
||||
|
/** |
||||
|
* 删除委外工序 |
||||
|
* |
||||
|
* @param outsourceProcessId 委外工序主键 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteOutsourceProcessByOutsourceProcessId(Integer outsourceProcessId); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除委外工序 |
||||
|
* |
||||
|
* @param outsourceProcessIds 需要删除的数据主键集合 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteOutsourceProcessByOutsourceProcessIds(String[] outsourceProcessIds); |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 查询数据库中今天已经生产的最大序号 |
||||
|
* |
||||
|
* @param prefix 前面的:ZCGX年月日 |
||||
|
*/ |
||||
|
public String findMaxRoundCode(@Param("prefix") String prefix); |
||||
|
} |
@ -0,0 +1,77 @@ |
|||||
|
package com.ruoyi.system.service; |
||||
|
|
||||
|
import com.ruoyi.system.domain.OutsourceProcess; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 委外工序Service接口 |
||||
|
* |
||||
|
* @author ruoyi |
||||
|
* @date 2024-06-30 |
||||
|
*/ |
||||
|
public interface IOutsourceProcessService |
||||
|
{ |
||||
|
/** |
||||
|
* 查询委外工序 |
||||
|
* |
||||
|
* @param outsourceProcessId 委外工序主键 |
||||
|
* @return 委外工序 |
||||
|
*/ |
||||
|
public OutsourceProcess selectOutsourceProcessByOutsourceProcessId(Long outsourceProcessId); |
||||
|
/** |
||||
|
* 查询委外工序列表 |
||||
|
* |
||||
|
* @param outsourceProcessIds 委外工序主键列表 |
||||
|
* @return 委外工序 |
||||
|
*/ |
||||
|
public List<OutsourceProcess> selectOutsourceProcessByOutsourceProcessIds(String outsourceProcessIds); |
||||
|
|
||||
|
/** |
||||
|
* 查询委外工序列表 |
||||
|
* |
||||
|
* @param outsourceProcess 委外工序 |
||||
|
* @return 委外工序集合 |
||||
|
*/ |
||||
|
public List<OutsourceProcess> selectOutsourceProcessList(OutsourceProcess outsourceProcess); |
||||
|
|
||||
|
/** |
||||
|
* 新增委外工序 |
||||
|
* |
||||
|
* @param outsourceProcess 委外工序 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int insertOutsourceProcess(OutsourceProcess outsourceProcess); |
||||
|
/** |
||||
|
* 校验委外工序编号是否唯一 |
||||
|
* |
||||
|
* @param outsourceProcess 菜单信息 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public boolean checkoutsourceProcessNoUnique(OutsourceProcess outsourceProcess); |
||||
|
/** |
||||
|
* 修改委外工序 |
||||
|
* |
||||
|
* @param outsourceProcess 委外工序 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int updateOutsourceProcess(OutsourceProcess outsourceProcess); |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 批量删除委外工序 |
||||
|
* |
||||
|
* @param outsourceProcessIds 需要删除的委外工序主键集合 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteOutsourceProcessByOutsourceProcessIds(String outsourceProcessIds); |
||||
|
|
||||
|
/** |
||||
|
* 删除委外工序信息 |
||||
|
* |
||||
|
* @param outsourceProcessId 委外工序主键 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteOutsourceProcessByOutsourceProcessId(Integer outsourceProcessId); |
||||
|
} |
@ -0,0 +1,160 @@ |
|||||
|
package com.ruoyi.system.service.impl; |
||||
|
|
||||
|
import java.text.DecimalFormat; |
||||
|
import java.text.SimpleDateFormat; |
||||
|
import java.util.Date; |
||||
|
import java.util.List; |
||||
|
import com.ruoyi.common.utils.DateUtils; |
||||
|
import com.ruoyi.common.utils.StringUtils; |
||||
|
import com.ruoyi.system.domain.OutsourceProcess; |
||||
|
import com.ruoyi.system.mapper.OutsourceProcessMapper; |
||||
|
import com.ruoyi.system.service.IOutsourceProcessService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import com.ruoyi.common.core.text.Convert; |
||||
|
|
||||
|
/** |
||||
|
* 委外工序Service业务层处理 |
||||
|
* |
||||
|
* @author ruoyi |
||||
|
* @date 2024-06-30 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class OutsourceProcessServiceImpl implements IOutsourceProcessService |
||||
|
{ |
||||
|
@Autowired |
||||
|
private OutsourceProcessMapper outsourceProcessMapper; |
||||
|
|
||||
|
/** |
||||
|
* 查询委外工序 |
||||
|
* |
||||
|
* @param outsourceProcessId 委外工序主键 |
||||
|
* @return 委外工序 |
||||
|
*/ |
||||
|
@Override |
||||
|
public OutsourceProcess selectOutsourceProcessByOutsourceProcessId(Long outsourceProcessId) |
||||
|
{ |
||||
|
return outsourceProcessMapper.selectOutsourceProcessByOutsourceProcessId(outsourceProcessId); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<OutsourceProcess> selectOutsourceProcessByOutsourceProcessIds(String outsourceProcessIds) { |
||||
|
Long[] ids = Convert.toLongArray(outsourceProcessIds); |
||||
|
return outsourceProcessMapper.selectOutsourceProcessByOutsourceProcessIds(ids); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 查询委外工序列表 |
||||
|
* |
||||
|
* @param outsourceProcess 委外工序 |
||||
|
* @return 委外工序 |
||||
|
*/ |
||||
|
@Override |
||||
|
public List<OutsourceProcess> selectOutsourceProcessList(OutsourceProcess outsourceProcess) |
||||
|
{ |
||||
|
return outsourceProcessMapper.selectOutsourceProcessList(outsourceProcess); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 新增委外工序 |
||||
|
* |
||||
|
* @param outsourceProcess 委外工序 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int insertOutsourceProcess(OutsourceProcess outsourceProcess) |
||||
|
{ |
||||
|
|
||||
|
//更改日期格式,以提高可读性
|
||||
|
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd"); |
||||
|
String dataPart = df.format(new Date()); |
||||
|
|
||||
|
//移除日期中的分隔符以便于后续处理
|
||||
|
String prefix = "WWGX"+dataPart.replace("-",""); |
||||
|
|
||||
|
//查询数据库中最大的编号
|
||||
|
String maxCode = outsourceProcessMapper.findMaxRoundCode(prefix); |
||||
|
String newCode = generateNewCode(prefix,maxCode); |
||||
|
|
||||
|
// outsourceProcess.setOutsourceProcessId();
|
||||
|
outsourceProcess.setOutsourceProcessCode(newCode); |
||||
|
System.out.println(outsourceProcess.toString()); |
||||
|
|
||||
|
outsourceProcess.setCreateTime(DateUtils.getNowDate()); |
||||
|
return outsourceProcessMapper.insertOutsourceProcess(outsourceProcess); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
*委外工序ID生产规则 |
||||
|
*系统自动生成,按照特定编码,编码暂用【ZCGX+年月日+001】, |
||||
|
*自增长,如:ZCGX20231111001,ZCGX20231111002 |
||||
|
* |
||||
|
*/ |
||||
|
private String generateNewCode(String prefix, String maxCode) { |
||||
|
if (StringUtils.isEmpty(maxCode)){ |
||||
|
return prefix+"001"; |
||||
|
} |
||||
|
//解析并递增编号
|
||||
|
int sequence = Integer.parseInt(maxCode.substring(4)) + 1 ; |
||||
|
// //检查序列号是否溢出
|
||||
|
// if (sequence > 999){
|
||||
|
// throw new BusinessException("当日编号已达到最大值999,请检查或调整策略");
|
||||
|
// }
|
||||
|
//格式化序列号,自动补零至三位
|
||||
|
DecimalFormat df = new DecimalFormat("000"); |
||||
|
return prefix + df.format(sequence); |
||||
|
} |
||||
|
/** |
||||
|
* 校验委外工序编号是否唯一 |
||||
|
* |
||||
|
* @param outsourceProcess 委外工序 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public boolean checkoutsourceProcessNoUnique(OutsourceProcess outsourceProcess) { |
||||
|
|
||||
|
|
||||
|
if(outsourceProcessMapper.selectOutsourceProcessByOutsourceProcessNo(outsourceProcess.getOutsourceProcessNo())!=null){ |
||||
|
return false; |
||||
|
} |
||||
|
return true; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 修改委外工序 |
||||
|
* |
||||
|
* @param outsourceProcess 委外工序 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int updateOutsourceProcess(OutsourceProcess outsourceProcess) |
||||
|
{ |
||||
|
outsourceProcess.setUpdateTime(DateUtils.getNowDate()); |
||||
|
return outsourceProcessMapper.updateOutsourceProcess(outsourceProcess); |
||||
|
} |
||||
|
/** |
||||
|
|
||||
|
/** |
||||
|
* 批量删除委外工序 |
||||
|
* |
||||
|
* @param outsourceProcessIds 需要删除的委外工序主键 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int deleteOutsourceProcessByOutsourceProcessIds(String outsourceProcessIds) |
||||
|
{ |
||||
|
return outsourceProcessMapper.deleteOutsourceProcessByOutsourceProcessIds(Convert.toStrArray(outsourceProcessIds)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除委外工序信息 |
||||
|
* |
||||
|
* @param outsourceProcessId 委外工序主键 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int deleteOutsourceProcessByOutsourceProcessId(Integer outsourceProcessId) |
||||
|
{ |
||||
|
return outsourceProcessMapper.deleteOutsourceProcessByOutsourceProcessId(outsourceProcessId); |
||||
|
} |
||||
|
} |
@ -0,0 +1,117 @@ |
|||||
|
<?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.system.mapper.OutsourceProcessMapper"> |
||||
|
|
||||
|
<resultMap type="OutsourceProcessVo" id="OutsourceProcessResult"> |
||||
|
<result property="outsourceProcessId" column="outsource_process_id" /> |
||||
|
<result property="outsourceProcessCode" column="outsource_process_code" /> |
||||
|
<result property="outsourceProcessNo" column="outsource_process_no" /> |
||||
|
<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_no, 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 = #{outsourceProcessId}</if> |
||||
|
<if test="outsourceProcessNo != null and outsourceProcessNo != ''"> and outsource_process_no = #{outsourceProcessNo}</if> |
||||
|
<if test="outsourceProcessName != null and outsourceProcessName != ''"> and outsource_process_name like concat('%', #{outsourceProcessName}, '%')</if> |
||||
|
</where> |
||||
|
</select> |
||||
|
|
||||
|
<select id="selectOutsourceProcessByOutsourceProcessId" parameterType="Long" resultMap="OutsourceProcessResult"> |
||||
|
<include refid="selectOutsourceProcessVo"/> |
||||
|
where outsource_process_id = #{outsourceProcessId} |
||||
|
</select> |
||||
|
|
||||
|
<select id="selectOutsourceProcessByOutsourceProcessNo" parameterType="String" resultMap="OutsourceProcessResult"> |
||||
|
<include refid="selectOutsourceProcessVo"/> |
||||
|
where outsource_process_no = #{outsourceProcessNo} |
||||
|
</select> |
||||
|
|
||||
|
<select id="selectOutsourceProcessByOutsourceProcessIds" parameterType="long" resultMap="OutsourceProcessResult"> |
||||
|
<include refid="selectOutsourceProcessVo"/> |
||||
|
where outsource_process_id in |
||||
|
<foreach item="outsourceProcessId" collection="array" open="(" separator="," close=")"> |
||||
|
#{outsourceProcessId} |
||||
|
</foreach> |
||||
|
</select> |
||||
|
|
||||
|
<select id="selectOutsourceProcessListByNos" resultMap="OutsourceProcessResult"> |
||||
|
<include refid="selectOutsourceProcessVo"/> |
||||
|
where outsource_process_no in |
||||
|
<foreach item="item" collection="list" open="(" separator="," close=")"> |
||||
|
#{item} |
||||
|
</foreach> |
||||
|
</select> |
||||
|
|
||||
|
<select id="selectOutsourceProcessListByNo" parameterType="String" resultMap="OutsourceProcessResult"> |
||||
|
<include refid="selectOutsourceProcessVo"/> |
||||
|
where outsource_process_no = #{outsourceProcessNo} |
||||
|
</select> |
||||
|
|
||||
|
<insert id="insertOutsourceProcess" parameterType="OutsourceProcess" useGeneratedKeys="true" keyProperty="outsourceProcessId"> |
||||
|
insert into outsource_process |
||||
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
||||
|
<if test="outsourceProcessCode != null and outsourceProcessCode != ''">outsource_process_code,</if> |
||||
|
<if test="outsourceProcessNo != null and outsourceProcessNo != ''">outsource_process_no,</if> |
||||
|
<if test="outsourceProcessName != null">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="outsourceProcessCode != null and outsourceProcessCode != ''">outsource_process_code,</if> |
||||
|
<if test="outsourceProcessNo != null and outsourceProcessNo != ''">#{outsourceProcessNo},</if> |
||||
|
<if test="outsourceProcessName != null">#{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="outsourceProcessNo != null and outsourceProcessNo != ''">outsource_process_no = #{outsourceProcessNo},</if> |
||||
|
<if test="outsourceProcessCode != null and outsourceProcessCode != ''">outsource_process_code = #{outsourceProcessCode},</if> |
||||
|
<if test="outsourceProcessName != null">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="deleteOutsourceProcessByOutsourceProcessId" parameterType="long"> |
||||
|
delete from outsource_process where outsource_process_id = #{outsourceProcessId} |
||||
|
</delete> |
||||
|
|
||||
|
<delete id="deleteOutsourceProcessByOutsourceProcessIds" parameterType="String"> |
||||
|
delete from outsource_process where outsource_process_id in |
||||
|
<foreach item="outsourceProcessId" collection="array" open="(" separator="," close=")"> |
||||
|
#{outsourceProcessId} |
||||
|
</foreach> |
||||
|
</delete> |
||||
|
|
||||
|
<select id="findMaxRoundCode" resultType="String"> |
||||
|
select max(substring(outsource_process_code,9)) from outsource_process WHERE outsource_process_code LIKE CONCAT(#{prefix}, '%') |
||||
|
</select> |
||||
|
|
||||
|
</mapper> |
@ -0,0 +1,69 @@ |
|||||
|
<!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-outsource_process-add"> |
||||
|
<div class="col-xs-12"> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label is-required">委外工序编号:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="outsourceProcessNo" class="form-control" id="outsourceProcessNo" type="text" required> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-xs-12"> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">委外工序名称:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="outsourceProcessName" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-xs-12"> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">备注:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<textarea name="remark" class="form-control"></textarea> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</form> |
||||
|
</div> |
||||
|
<th:block th:include="include :: footer" /> |
||||
|
<script th:inline="javascript"> |
||||
|
var prefix = ctx + "system/outsource_process" |
||||
|
$("#form-outsource_process-add").validate({ |
||||
|
focusCleanup: true, |
||||
|
rules: { |
||||
|
outsourceProcessNo: { |
||||
|
remote: { |
||||
|
url: prefix + "/checkoutsourceProcessNoUnique", |
||||
|
type: "post", |
||||
|
dataType: "json", |
||||
|
data: { |
||||
|
"outsourceProcessNo": function () { |
||||
|
return $.common.trim($("#outsourceProcessNo").val()); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
}, |
||||
|
messages: { |
||||
|
"outsourceProcessNo": { |
||||
|
remote: "该工序编号已经存在" |
||||
|
} |
||||
|
} |
||||
|
}); |
||||
|
|
||||
|
function submitHandler() { |
||||
|
if ($.validate.form()) { |
||||
|
$.operate.save(prefix + "/add", $('#form-outsource_process-add').serialize()); |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
</body> |
||||
|
</html> |
@ -0,0 +1,65 @@ |
|||||
|
<!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-user-edit"> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">委外工序编号:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<div class="form-control-static" th:text="${outsourceProcess.outsourceProcessNo}"></div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">委外工序名称:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<div class="form-control-static" th:text="${outsourceProcess.outsourceProcessName}"></div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">备注:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<div class="form-control-static" th:text="${outsourceProcess.remark}"></div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">录入人:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<div class="form-control-static" th:text="${outsourceProcess.createBy}"></div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">录入时间:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<div class="form-control-static" th:text="${outsourceProcess.createTime}"></div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">更新人:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<div class="form-control-static" th:text="${outsourceProcess.updateBy}"></div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">更新时间:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<div class="form-control-static" th:text="${outsourceProcess.updateTime}"></div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</form> |
||||
|
</div> |
||||
|
<th:block th:include="include :: footer" /> |
||||
|
<script type="text/javascript"> |
||||
|
var prefix = ctx + "system/outsource_process"; |
||||
|
|
||||
|
$("#form-user-add").validate({ |
||||
|
onkeyup: false, |
||||
|
|
||||
|
focusCleanup: true |
||||
|
}); |
||||
|
|
||||
|
</script> |
||||
|
</body> |
||||
|
</html> |
@ -0,0 +1,51 @@ |
|||||
|
<!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-outsource_process-edit" th:object="${outsourceProcess}"> |
||||
|
<input name="outsourceProcessId" th:field="*{outsourceProcessId}" type="hidden"> |
||||
|
<div class="col-xs-12"> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label is-required">委外工序编号:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="outsourceProcessNo" th:field="*{outsourceProcessNo}" id="outsourceProcessNo" class="form-control" type="text" required> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-xs-12"> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">委外工序名称:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<input name="outsourceProcessName" th:field="*{outsourceProcessName}" class="form-control" type="text"> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="col-xs-12"> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-sm-3 control-label">备注:</label> |
||||
|
<div class="col-sm-8"> |
||||
|
<textarea name="remark" class="form-control">[[*{remark}]]</textarea> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</form> |
||||
|
</div> |
||||
|
<th:block th:include="include :: footer" /> |
||||
|
<script th:inline="javascript"> |
||||
|
var prefix = ctx + "system/outsource_process"; |
||||
|
$("#form-outsource_process-edit").validate({ |
||||
|
focusCleanup: true, |
||||
|
}); |
||||
|
var outsourceProcess = [[${outsourceProcess}]]; |
||||
|
|
||||
|
function submitHandler() { |
||||
|
if ($.validate.form()) { |
||||
|
$.operate.save(prefix + "/edit", $('#form-outsource_process-edit').serialize()); |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
</body> |
||||
|
</html> |
@ -0,0 +1,122 @@ |
|||||
|
<!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 class="in">委外工序ID:</label> |
||||
|
<input type="text" name="outsourceProcessCode"/> |
||||
|
</li> |
||||
|
<li> |
||||
|
<label class="in">委外工序编号:</label> |
||||
|
<input type="text" name="outsourceProcessNo"/> |
||||
|
</li> |
||||
|
<li> |
||||
|
<label class="in">委外工序名称:</label> |
||||
|
<input type="text" name="outsourceProcessName"/> |
||||
|
</li> |
||||
|
<li class="select-time"> |
||||
|
<label>录入时间: </label> |
||||
|
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginTime]"/> |
||||
|
<span>-</span> |
||||
|
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endTime]"/> |
||||
|
</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="system:outsource_process:add"> |
||||
|
<i class="fa fa-plus"></i> 添加 |
||||
|
</a> |
||||
|
</div> |
||||
|
<div class="col-sm-12 select-table table-striped"> |
||||
|
<table id="bootstrap-table"></table> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<style> |
||||
|
.in{ |
||||
|
width: 200px; |
||||
|
} |
||||
|
</style> |
||||
|
<th:block th:include="include :: footer" /> |
||||
|
<script th:inline="javascript"> |
||||
|
var editFlag = [[${@permission.hasPermi('system:outsource_process:edit')}]]; |
||||
|
var removeFlag = [[${@permission.hasPermi('system:outsource_process:remove')}]]; |
||||
|
var detailFlag = [[${@permission.hasPermi('system:outsource_process:detail')}]]; |
||||
|
var prefix = ctx + "system/outsource_process"; |
||||
|
|
||||
|
$(function() { |
||||
|
var options = { |
||||
|
url: prefix + "/list", |
||||
|
createUrl: prefix + "/add", |
||||
|
updateUrl: prefix + "/edit/{id}", |
||||
|
removeUrl: prefix + "/remove", |
||||
|
exportUrl: prefix + "/export", |
||||
|
detailUrl: prefix + "/detail/{id}", |
||||
|
modalName: "委外工序", |
||||
|
columns: [{ |
||||
|
checkbox: true |
||||
|
}, |
||||
|
{ |
||||
|
field: 'outsourceProcessCode', |
||||
|
title: '委外工序ID', |
||||
|
visible: false |
||||
|
}, |
||||
|
{ |
||||
|
field: 'outsourceProcessNo', |
||||
|
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-info btn-xs ' + detailFlag + '" href="javascript:;" onclick="$.operate.detail(\'' + row.outsourceProcessId + '\')"><i class="fa fa-search"></i>详情</a> '); |
||||
|
return actions.join(''); |
||||
|
} |
||||
|
}] |
||||
|
}; |
||||
|
$.table.init(options); |
||||
|
}); |
||||
|
</script> |
||||
|
</body> |
||||
|
</html> |
Loading…
Reference in new issue