zhangsiqi
12 months ago
17 changed files with 984 additions and 41 deletions
@ -0,0 +1,13 @@ |
|||
package com.ruoyi.system.domain; |
|||
|
|||
/** |
|||
* 物料信息表与技术团体配置信息关联表 |
|||
*/ |
|||
public class SysErpMaterialProductItem { |
|||
// 关联表id
|
|||
private Long iconId; |
|||
//物料信息Id
|
|||
private Long materialId; |
|||
//技术团队id
|
|||
private Long productItemId; |
|||
} |
@ -0,0 +1,209 @@ |
|||
package com.ruoyi.system.domain; |
|||
|
|||
import com.ruoyi.common.annotation.Excel; |
|||
import com.ruoyi.common.core.domain.BaseEntity; |
|||
import org.apache.commons.lang3.builder.ToStringBuilder; |
|||
import org.apache.commons.lang3.builder.ToStringStyle; |
|||
|
|||
/** |
|||
* 生产团队对象 sys_product_item |
|||
* |
|||
* @author ruoyi |
|||
* @date 2023-12-04 |
|||
*/ |
|||
public class SysProductItem extends BaseEntity |
|||
{ |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** 生产团队的id */ |
|||
@Excel(name = "生产团队的id") |
|||
private Long id; |
|||
|
|||
/** 生产团队类型 */ |
|||
@Excel(name = "生产团队类型") |
|||
private String types; |
|||
|
|||
/** 生产团队成员 */ |
|||
@Excel(name = "生产团队成员") |
|||
private String productItem; |
|||
|
|||
/** 删除标志 0正常 1删除 */ |
|||
private String delFlag; |
|||
|
|||
/** 职能 */ |
|||
@Excel(name = "职能") |
|||
private String functions; |
|||
|
|||
/** 电气技术人员 */ |
|||
@Excel(name = "电气技术人员") |
|||
private String dianqi; |
|||
|
|||
/** 结构技术人员 */ |
|||
@Excel(name = "结构技术人员") |
|||
private String struct; |
|||
|
|||
/** 软件技术人员 */ |
|||
@Excel(name = "软件技术人员") |
|||
private String soft; |
|||
|
|||
/** 测试技术人员 */ |
|||
@Excel(name = "测试技术人员") |
|||
private String test; |
|||
|
|||
/** 主管1 */ |
|||
@Excel(name = "主管1") |
|||
private String zhuguan1; |
|||
|
|||
/** 主管2 */ |
|||
@Excel(name = "主管2") |
|||
private String zhuguan2; |
|||
|
|||
/** 经理 */ |
|||
@Excel(name = "经理") |
|||
private String manger; |
|||
|
|||
/** 总监 */ |
|||
@Excel(name = "总监") |
|||
private String director; |
|||
|
|||
public void setId(Long id) |
|||
{ |
|||
this.id = id; |
|||
} |
|||
|
|||
public Long getId() |
|||
{ |
|||
return id; |
|||
} |
|||
public void setTypes(String types) |
|||
{ |
|||
this.types = types; |
|||
} |
|||
|
|||
public String getTypes() |
|||
{ |
|||
return types; |
|||
} |
|||
public void setProductItem(String productItem) |
|||
{ |
|||
this.productItem = productItem; |
|||
} |
|||
|
|||
public String getProductItem() |
|||
{ |
|||
return productItem; |
|||
} |
|||
public void setDelFlag(String delFlag) |
|||
{ |
|||
this.delFlag = delFlag; |
|||
} |
|||
|
|||
public String getDelFlag() |
|||
{ |
|||
return delFlag; |
|||
} |
|||
public void setFunctions(String functions) |
|||
{ |
|||
this.functions = functions; |
|||
} |
|||
|
|||
public String getFunctions() |
|||
{ |
|||
return functions; |
|||
} |
|||
public void setDianqi(String dianqi) |
|||
{ |
|||
this.dianqi = dianqi; |
|||
} |
|||
|
|||
public String getDianqi() |
|||
{ |
|||
return dianqi; |
|||
} |
|||
public void setStruct(String struct) |
|||
{ |
|||
this.struct = struct; |
|||
} |
|||
|
|||
public String getStruct() |
|||
{ |
|||
return struct; |
|||
} |
|||
public void setSoft(String soft) |
|||
{ |
|||
this.soft = soft; |
|||
} |
|||
|
|||
public String getSoft() |
|||
{ |
|||
return soft; |
|||
} |
|||
public void setTest(String test) |
|||
{ |
|||
this.test = test; |
|||
} |
|||
|
|||
public String getTest() |
|||
{ |
|||
return test; |
|||
} |
|||
public void setZhuguan1(String zhuguan1) |
|||
{ |
|||
this.zhuguan1 = zhuguan1; |
|||
} |
|||
|
|||
public String getZhuguan1() |
|||
{ |
|||
return zhuguan1; |
|||
} |
|||
public void setZhuguan2(String zhuguan2) |
|||
{ |
|||
this.zhuguan2 = zhuguan2; |
|||
} |
|||
|
|||
public String getZhuguan2() |
|||
{ |
|||
return zhuguan2; |
|||
} |
|||
public void setManger(String manger) |
|||
{ |
|||
this.manger = manger; |
|||
} |
|||
|
|||
public String getManger() |
|||
{ |
|||
return manger; |
|||
} |
|||
public void setDirector(String director) |
|||
{ |
|||
this.director = director; |
|||
} |
|||
|
|||
public String getDirector() |
|||
{ |
|||
return director; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
|||
.append("id", getId()) |
|||
.append("types", getTypes()) |
|||
.append("productItem", getProductItem()) |
|||
.append("createBy", getCreateBy()) |
|||
.append("createTime", getCreateTime()) |
|||
.append("updateBy", getUpdateBy()) |
|||
.append("updateTime", getUpdateTime()) |
|||
.append("delFlag", getDelFlag()) |
|||
.append("functions", getFunctions()) |
|||
.append("dianqi", getDianqi()) |
|||
.append("struct", getStruct()) |
|||
.append("soft", getSoft()) |
|||
.append("test", getTest()) |
|||
.append("zhuguan1", getZhuguan1()) |
|||
.append("zhuguan2", getZhuguan2()) |
|||
.append("manger", getManger()) |
|||
.append("director", getDirector()) |
|||
.toString(); |
|||
} |
|||
} |
@ -0,0 +1,13 @@ |
|||
package com.ruoyi.system.mapper; |
|||
|
|||
import com.ruoyi.system.domain.SysErpMaterialProductItem; |
|||
|
|||
import java.util.List; |
|||
|
|||
public interface SysErpMaterialProductItemMapper { |
|||
List<SysErpMaterialProductItem> selectSysMaterialProductItemList(SysErpMaterialProductItem sysErpMaterialProductItem); |
|||
SysErpMaterialProductItem selectSysMaterialProductItemListById(Long iconId); |
|||
Integer insertSysErpMaterialProductItem(SysErpMaterialProductItem sysErpMaterialProductItem); |
|||
Integer deleteSysErpMaterialProductItem(List<Long> list); |
|||
Integer updateSysErpMaterialProductItem(SysErpMaterialProductItem sysErpMaterialProductItem); |
|||
} |
@ -0,0 +1,78 @@ |
|||
package com.ruoyi.system.mapper; |
|||
|
|||
import com.ruoyi.system.domain.SysProductItem; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 生产团队Mapper接口 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2023-12-04 |
|||
*/ |
|||
public interface SysProductItemMapper |
|||
{ |
|||
/** |
|||
* 查询生产团队 |
|||
* |
|||
* @param id 生产团队ID |
|||
* @return 生产团队 |
|||
*/ |
|||
public SysProductItem selectSysProductItemById(Long id); |
|||
|
|||
/** |
|||
* 查询生产团队列表 |
|||
* |
|||
* @param sysProductItem 生产团队 |
|||
* @return 生产团队集合 |
|||
*/ |
|||
public List<SysProductItem> selectSysProductItemList(SysProductItem sysProductItem); |
|||
|
|||
/** |
|||
* 新增生产团队 |
|||
* |
|||
* @param sysProductItem 生产团队 |
|||
* @return 结果 |
|||
*/ |
|||
public int insertSysProductItem(SysProductItem sysProductItem); |
|||
|
|||
/** |
|||
* 修改生产团队 |
|||
* |
|||
* @param sysProductItem 生产团队 |
|||
* @return 结果 |
|||
*/ |
|||
public int updateSysProductItem(SysProductItem sysProductItem); |
|||
|
|||
/** |
|||
* 删除生产团队 |
|||
* |
|||
* @param id 生产团队ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteSysProductItemById(Long id); |
|||
|
|||
/** |
|||
* 批量删除生产团队 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteSysProductItemByIds(String[] ids); |
|||
|
|||
/** |
|||
* 作废生产团队 |
|||
* |
|||
* @param id 生产团队ID |
|||
* @return 结果 |
|||
*/ |
|||
public int cancelSysProductItemById(Long id); |
|||
|
|||
/** |
|||
* 恢复生产团队 |
|||
* |
|||
* @param id 生产团队ID |
|||
* @return 结果 |
|||
*/ |
|||
public int restoreSysProductItemById(Long id); |
|||
} |
@ -0,0 +1,76 @@ |
|||
package com.ruoyi.system.service; |
|||
|
|||
import com.ruoyi.system.domain.SysProductItem; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 生产团队Service接口 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2023-12-04 |
|||
*/ |
|||
public interface ISysProductItemService |
|||
{ |
|||
/** |
|||
* 查询生产团队 |
|||
* |
|||
* @param id 生产团队ID |
|||
* @return 生产团队 |
|||
*/ |
|||
public SysProductItem selectSysProductItemById(Long id); |
|||
|
|||
/** |
|||
* 查询生产团队列表 |
|||
* |
|||
* @param sysProductItem 生产团队 |
|||
* @return 生产团队集合 |
|||
*/ |
|||
public List<SysProductItem> selectSysProductItemList(SysProductItem sysProductItem); |
|||
|
|||
/** |
|||
* 新增生产团队 |
|||
* |
|||
* @param sysProductItem 生产团队 |
|||
* @return 结果 |
|||
*/ |
|||
public int insertSysProductItem(SysProductItem sysProductItem); |
|||
|
|||
/** |
|||
* 修改生产团队 |
|||
* |
|||
* @param sysProductItem 生产团队 |
|||
* @return 结果 |
|||
*/ |
|||
public int updateSysProductItem(SysProductItem sysProductItem); |
|||
|
|||
/** |
|||
* 批量删除生产团队 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteSysProductItemByIds(String ids); |
|||
|
|||
/** |
|||
* 删除生产团队信息 |
|||
* |
|||
* @param id 生产团队ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteSysProductItemById(Long id); |
|||
|
|||
/** |
|||
* 作废生产团队 |
|||
* @param id 生产团队ID |
|||
* @return |
|||
*/ |
|||
int cancelSysProductItemById(Long id); |
|||
|
|||
/** |
|||
* 恢复生产团队 |
|||
* @param id 生产团队ID |
|||
* @return |
|||
*/ |
|||
int restoreSysProductItemById(Long id); |
|||
} |
@ -0,0 +1,14 @@ |
|||
package com.ruoyi.system.service; |
|||
|
|||
import com.ruoyi.system.domain.SysErpMaterialProductItem; |
|||
|
|||
import java.util.List; |
|||
|
|||
public interface SysErpMaterialProductItemService { |
|||
public List<SysErpMaterialProductItem> selectSysMaterialProductItemList(SysErpMaterialProductItem sysErpMaterialProductItem); |
|||
public SysErpMaterialProductItem selectSysMaterialProductItemListById(Long iconId); |
|||
public Integer insertSysErpMaterialProductItem(SysErpMaterialProductItem sysErpMaterialProductItem); |
|||
public Integer deleteSysErpMaterialProductItem(List<Long> list); |
|||
public Integer updateSysErpMaterialProductItem(SysErpMaterialProductItem sysErpMaterialProductItem); |
|||
} |
|||
|
@ -0,0 +1,37 @@ |
|||
package com.ruoyi.system.service.impl; |
|||
|
|||
import com.ruoyi.system.domain.SysErpMaterialProductItem; |
|||
import com.ruoyi.system.mapper.SysErpMaterialProductItemMapper; |
|||
import com.ruoyi.system.service.SysErpMaterialProductItemService; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.List; |
|||
|
|||
@Service |
|||
public class SysErpMaterialProductItemServiceIpml implements SysErpMaterialProductItemService { |
|||
private SysErpMaterialProductItemMapper sysErpMaterialProductItemMapper; |
|||
@Override |
|||
public List<SysErpMaterialProductItem> selectSysMaterialProductItemList(SysErpMaterialProductItem sysErpMaterialProductItem) { |
|||
return sysErpMaterialProductItemMapper.selectSysMaterialProductItemList(sysErpMaterialProductItem); |
|||
} |
|||
|
|||
@Override |
|||
public SysErpMaterialProductItem selectSysMaterialProductItemListById(Long iconId) { |
|||
return sysErpMaterialProductItemMapper.selectSysMaterialProductItemListById(iconId); |
|||
} |
|||
|
|||
@Override |
|||
public Integer insertSysErpMaterialProductItem(SysErpMaterialProductItem sysErpMaterialProductItem) { |
|||
return sysErpMaterialProductItemMapper.insertSysErpMaterialProductItem(sysErpMaterialProductItem); |
|||
} |
|||
|
|||
@Override |
|||
public Integer deleteSysErpMaterialProductItem(List<Long> list) { |
|||
return sysErpMaterialProductItemMapper.deleteSysErpMaterialProductItem(list); |
|||
} |
|||
|
|||
@Override |
|||
public Integer updateSysErpMaterialProductItem(SysErpMaterialProductItem sysErpMaterialProductItem) { |
|||
return sysErpMaterialProductItemMapper.updateSysErpMaterialProductItem(sysErpMaterialProductItem); |
|||
} |
|||
} |
@ -0,0 +1,127 @@ |
|||
package com.ruoyi.system.service.impl; |
|||
|
|||
import com.ruoyi.common.core.text.Convert; |
|||
import com.ruoyi.common.utils.DateUtils; |
|||
import com.ruoyi.common.utils.ShiroUtils; |
|||
import com.ruoyi.system.domain.SysProductItem; |
|||
import com.ruoyi.system.mapper.SysProductItemMapper; |
|||
import com.ruoyi.system.service.ISysProductItemService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 生产团队Service业务层处理 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2023-12-04 |
|||
*/ |
|||
@Service("productItems") |
|||
public class SysProductItemServiceImpl implements ISysProductItemService |
|||
{ |
|||
@Autowired |
|||
private SysProductItemMapper sysProductItemMapper; |
|||
|
|||
/** |
|||
* 查询生产团队 |
|||
* |
|||
* @param id 生产团队ID |
|||
* @return 生产团队 |
|||
*/ |
|||
@Override |
|||
public SysProductItem selectSysProductItemById(Long id) |
|||
{ |
|||
return sysProductItemMapper.selectSysProductItemById(id); |
|||
} |
|||
|
|||
/** |
|||
* 查询生产团队列表 |
|||
* |
|||
* @param sysProductItem 生产团队 |
|||
* @return 生产团队 |
|||
*/ |
|||
@Override |
|||
public List<SysProductItem> selectSysProductItemList(SysProductItem sysProductItem) |
|||
{ |
|||
return sysProductItemMapper.selectSysProductItemList(sysProductItem); |
|||
} |
|||
|
|||
/** |
|||
* 新增生产团队 |
|||
* |
|||
* @param sysProductItem 生产团队 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int insertSysProductItem(SysProductItem sysProductItem) |
|||
{ |
|||
String loginName = ShiroUtils.getLoginName(); |
|||
sysProductItem.setCreateBy(loginName); |
|||
sysProductItem.setCreateTime(DateUtils.getNowDate()); |
|||
return sysProductItemMapper.insertSysProductItem(sysProductItem); |
|||
} |
|||
|
|||
/** |
|||
* 修改生产团队 |
|||
* |
|||
* @param sysProductItem 生产团队 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int updateSysProductItem(SysProductItem sysProductItem) |
|||
{ |
|||
String loginName = ShiroUtils.getLoginName(); |
|||
sysProductItem.setUpdateBy(loginName); |
|||
sysProductItem.setUpdateTime(DateUtils.getNowDate()); |
|||
return sysProductItemMapper.updateSysProductItem(sysProductItem); |
|||
} |
|||
|
|||
/** |
|||
* 删除生产团队对象 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int deleteSysProductItemByIds(String ids) |
|||
{ |
|||
return sysProductItemMapper.deleteSysProductItemByIds(Convert.toStrArray(ids)); |
|||
} |
|||
|
|||
/** |
|||
* 删除生产团队信息 |
|||
* |
|||
* @param id 生产团队ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int deleteSysProductItemById(Long id) |
|||
{ |
|||
return sysProductItemMapper.deleteSysProductItemById(id); |
|||
} |
|||
|
|||
/** |
|||
* 作废生产团队 |
|||
* |
|||
* @param id 生产团队ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int cancelSysProductItemById(Long id) |
|||
{ |
|||
return sysProductItemMapper.cancelSysProductItemById(id); |
|||
} |
|||
|
|||
/** |
|||
* 恢复生产团队信息 |
|||
* |
|||
* @param id 生产团队ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int restoreSysProductItemById(Long id) |
|||
{ |
|||
return sysProductItemMapper.restoreSysProductItemById(id); |
|||
} |
|||
} |
@ -0,0 +1,49 @@ |
|||
<?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.SysErpMaterialProductItemMapper"> |
|||
<resultMap type="SysErpMaterialProductItem" id="SysErpMaterialProductItemResult"> |
|||
<result property="id" column="id" /> |
|||
<result property="materialId" column="materialId" /> |
|||
<result property="productItemId" column="productItemId" /> |
|||
</resultMap> |
|||
<sql id="selectSysErpMaterialProductItemVo"> |
|||
select iconId,materialId,productItemId from |
|||
sys_erpmaterial_productitem |
|||
</sql> |
|||
|
|||
<select id="selectSysErpMaterialProductItemList"> |
|||
<include refid="selectSysErpMaterialProductItemVo"/> |
|||
</select> |
|||
|
|||
<select id="selectSysErpMaterialProductItemByList" parameterType="SysErpMaterialProductItem" resultMap="SysErpMaterialProductItemResult"> |
|||
<include refid="selectSysErpMaterialProductItemVo"/> |
|||
<where> |
|||
<if test="materialId != null"> and materialId = #{materialId}</if> |
|||
<if test="productItemId != null"> and productItemId = #{productItemId}</if> |
|||
</where> |
|||
</select> |
|||
<insert id="insertSysErpMaterialProductItem" useGeneratedKeys="true" keyProperty="iconId"> |
|||
insert into sys_erpmaterial_productitem(`materialId`,`productItemId`); |
|||
</insert> |
|||
<delete id="deleteSysErpMaterialProductItem"> |
|||
delete from sys_erpmaterial_productitem |
|||
where iconId in |
|||
<foreach collection="list" open="(" separator="," close=")" item="id"> |
|||
#{id} |
|||
</foreach> |
|||
</delete> |
|||
<update id="updateSysErpMaterialProductItem" parameterType="SysErpMaterialProductItem"> |
|||
update sys_erpmaterial_productitem set |
|||
materialId = #{materialId},productItemId = #{productItemId} |
|||
where iconId in |
|||
<foreach collection="list" open="(" separator="," close=")" item="id"> |
|||
#{id} |
|||
</foreach> |
|||
</update> |
|||
<select id="selectSysMaterialProductItemListById" parameterType="Long" resultMap="SysErpMaterialProductItemResult"> |
|||
<include refid="selectSysErpMaterialProductItemVo"/> |
|||
where iconId = #{iconId} |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,137 @@ |
|||
<?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.SysProductItemMapper"> |
|||
|
|||
<resultMap type="SysProductItem" id="SysProductItemResult"> |
|||
<result property="id" column="id" /> |
|||
<result property="types" column="types" /> |
|||
<result property="productItem" column="productItem" /> |
|||
<result property="createBy" column="create_by" /> |
|||
<result property="createTime" column="create_time" /> |
|||
<result property="updateBy" column="update_by" /> |
|||
<result property="updateTime" column="updateTime" /> |
|||
<result property="delFlag" column="del_flag" /> |
|||
<result property="functions" column="functions" /> |
|||
<result property="dianqi" column="dianqi" /> |
|||
<result property="struct" column="struct" /> |
|||
<result property="soft" column="soft" /> |
|||
<result property="test" column="test" /> |
|||
<result property="zhuguan1" column="zhuguan1" /> |
|||
<result property="zhuguan2" column="zhuguan2" /> |
|||
<result property="manger" column="manger" /> |
|||
<result property="director" column="director" /> |
|||
</resultMap> |
|||
|
|||
<sql id="selectSysProductItemVo"> |
|||
select id, types, productItem, create_by, create_time, update_by, updateTime, del_flag, functions, dianqi, struct, soft, test, zhuguan1, zhuguan2, manger, director from sys_product_item |
|||
</sql> |
|||
|
|||
<select id="selectSysProductItemList" parameterType="SysProductItem" resultMap="SysProductItemResult"> |
|||
<include refid="selectSysProductItemVo"/> |
|||
<where> |
|||
<if test="id != null "> and id = #{id}</if> |
|||
<if test="types != null and types != ''"> and types = #{types}</if> |
|||
<if test="productItem != null and productItem != ''"> and productItem = #{productItem}</if> |
|||
<if test="updateTime != null "> and updateTime = #{updateTime}</if> |
|||
<if test="functions != null and functions != ''"> and functions = #{functions}</if> |
|||
<if test="dianqi != null and dianqi != ''"> and dianqi = #{dianqi}</if> |
|||
<if test="struct != null and struct != ''"> and struct = #{struct}</if> |
|||
<if test="soft != null and soft != ''"> and soft = #{soft}</if> |
|||
<if test="test != null and test != ''"> and test = #{test}</if> |
|||
<if test="zhuguan1 != null and zhuguan1 != ''"> and zhuguan1 = #{zhuguan1}</if> |
|||
<if test="zhuguan2 != null and zhuguan2 != ''"> and zhuguan2 = #{zhuguan2}</if> |
|||
<if test="manger != null and manger != ''"> and manger = #{manger}</if> |
|||
<if test="director != null and director != ''"> and director = #{director}</if> |
|||
</where> |
|||
</select> |
|||
|
|||
<select id="selectSysProductItemById" parameterType="Long" resultMap="SysProductItemResult"> |
|||
<include refid="selectSysProductItemVo"/> |
|||
where id = #{id} |
|||
</select> |
|||
|
|||
<insert id="insertSysProductItem" parameterType="SysProductItem" useGeneratedKeys="true" keyProperty="id"> |
|||
insert into sys_product_item |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="types != null">types,</if> |
|||
<if test="productItem != null">productItem,</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">updateTime,</if> |
|||
<if test="delFlag != null">del_flag,</if> |
|||
<if test="functions != null">functions,</if> |
|||
<if test="dianqi != null">dianqi,</if> |
|||
<if test="struct != null">struct,</if> |
|||
<if test="soft != null">soft,</if> |
|||
<if test="test != null">test,</if> |
|||
<if test="zhuguan1 != null">zhuguan1,</if> |
|||
<if test="zhuguan2 != null">zhuguan2,</if> |
|||
<if test="manger != null">manger,</if> |
|||
<if test="director != null">director,</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="types != null">#{types},</if> |
|||
<if test="productItem != null">#{productItem},</if> |
|||
<if test="createBy != null">#{createBy},</if> |
|||
<if test="createTime != null">#{createTime},</if> |
|||
<if test="updateBy != null">#{updateBy},</if> |
|||
<if test="updateTime != null">#{updateTime},</if> |
|||
<if test="delFlag != null">#{delFlag},</if> |
|||
<if test="functions != null">#{functions},</if> |
|||
<if test="dianqi != null">#{dianqi},</if> |
|||
<if test="struct != null">#{struct},</if> |
|||
<if test="soft != null">#{soft},</if> |
|||
<if test="test != null">#{test},</if> |
|||
<if test="zhuguan1 != null">#{zhuguan1},</if> |
|||
<if test="zhuguan2 != null">#{zhuguan2},</if> |
|||
<if test="manger != null">#{manger},</if> |
|||
<if test="director != null">#{director},</if> |
|||
</trim> |
|||
</insert> |
|||
|
|||
<update id="updateSysProductItem" parameterType="SysProductItem"> |
|||
update sys_product_item |
|||
<trim prefix="SET" suffixOverrides=","> |
|||
<if test="types != null">types = #{types},</if> |
|||
<if test="productItem != null">productItem = #{productItem},</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">updateTime = #{updateTime},</if> |
|||
<if test="delFlag != null">del_flag = #{delFlag},</if> |
|||
<if test="functions != null">functions = #{functions},</if> |
|||
<if test="dianqi != null">dianqi = #{dianqi},</if> |
|||
<if test="struct != null">struct = #{struct},</if> |
|||
<if test="soft != null">soft = #{soft},</if> |
|||
<if test="test != null">test = #{test},</if> |
|||
<if test="zhuguan1 != null">zhuguan1 = #{zhuguan1},</if> |
|||
<if test="zhuguan2 != null">zhuguan2 = #{zhuguan2},</if> |
|||
<if test="manger != null">manger = #{manger},</if> |
|||
<if test="director != null">director = #{director},</if> |
|||
</trim> |
|||
where id = #{id} |
|||
</update> |
|||
|
|||
<delete id="deleteSysProductItemById" parameterType="Long"> |
|||
delete from sys_product_item where id = #{id} |
|||
</delete> |
|||
|
|||
<delete id="deleteSysProductItemByIds" parameterType="String"> |
|||
delete from sys_product_item where id in |
|||
<foreach item="id" collection="array" open="(" separator="," close=")"> |
|||
#{id} |
|||
</foreach> |
|||
</delete> |
|||
|
|||
<update id="cancelSysProductItemById" parameterType="Long"> |
|||
update sys_product_item set del_flag = '1' where id = #{id} |
|||
</update> |
|||
|
|||
<update id="restoreSysProductItemById" parameterType="Long"> |
|||
update sys_product_item set del_flag = '0' where id = #{id} |
|||
</update> |
|||
|
|||
</mapper> |
@ -0,0 +1,97 @@ |
|||
<!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-item-add"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">生产团队类型:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="types" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">生产团队成员:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="productItem" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">删除标志 0正常 1删除:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="delFlag" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">职能:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="functions" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">电气技术人员:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="dianqi" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">结构技术人员:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="struct" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">软件技术人员:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="soft" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">测试技术人员:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="test" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">主管1:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="zhuguan1" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">主管2:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="zhuguan2" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">经理:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="manger" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">总监:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="director" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "system/item" |
|||
$("#form-item-add").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
$.operate.save(prefix + "/add", $('#form-item-add').serialize()); |
|||
} |
|||
} |
|||
</script> |
|||
</body> |
|||
</html> |
Loading…
Reference in new issue