Browse Source

[update] 修改物料信息技术团队配置

erp、
zhangsiqi 12 months ago
parent
commit
f2cc6fe8b9
  1. 44
      ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpMaterialController.java
  2. 13
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysErpMaterialProductItem.java
  3. 209
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysProductItem.java
  4. 13
      ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysErpMaterialProductItemMapper.java
  5. 78
      ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysProductItemMapper.java
  6. 76
      ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysProductItemService.java
  7. 14
      ruoyi-admin/src/main/java/com/ruoyi/system/service/SysErpMaterialProductItemService.java
  8. 37
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysErpMaterialProductItemServiceIpml.java
  9. 127
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysProductItemServiceImpl.java
  10. 49
      ruoyi-admin/src/main/resources/mapper/system/SysErpMaterialProductItemMapper.xml
  11. 137
      ruoyi-admin/src/main/resources/mapper/system/SysProductItemMapper.xml
  12. 8
      ruoyi-admin/src/main/resources/templates/erp/bom/bom.html
  13. 30
      ruoyi-admin/src/main/resources/templates/erp/material/add.html
  14. 34
      ruoyi-admin/src/main/resources/templates/erp/material/detail.html
  15. 51
      ruoyi-admin/src/main/resources/templates/erp/material/edit.html
  16. 8
      ruoyi-admin/src/main/resources/templates/erp/material/material.html
  17. 97
      ruoyi-admin/src/main/resources/templates/system/item/add.html

44
ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpMaterialController.java

@ -1,25 +1,21 @@
package com.ruoyi.erp.controller;
import java.util.List;
import com.ruoyi.common.core.domain.entity.SysUser;
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.erp.domain.ErpMaterial;
import com.ruoyi.erp.service.IErpMaterialService;
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;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.erp.domain.ErpMaterial;
import com.ruoyi.erp.service.IErpMaterialService;
import com.ruoyi.system.service.ISysProductItemService;
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.*;
import java.util.List;
/**
* 物料信息Controller
@ -32,6 +28,8 @@ import com.ruoyi.common.core.page.TableDataInfo;
public class ErpMaterialController extends BaseController
{
private String prefix = "erp/material";
@Autowired
private ISysProductItemService sysProductItemService;
@Autowired
private IErpMaterialService erpMaterialService;
@ -167,4 +165,18 @@ public class ErpMaterialController extends BaseController
{
return prefix + "/select";
}
/**
* 审核信息
*
*/
@RequiresPermissions("erp:material:item")
@Log(title = "物料信息", businessType = BusinessType.RESTORE)
@PostMapping( "/material")
@ResponseBody
public String materialProductItemList(ErpMaterial erpMaterial){
startPage();
return "";
}
}

13
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysErpMaterialProductItem.java

@ -0,0 +1,13 @@
package com.ruoyi.system.domain;
/**
* 物料信息表与技术团体配置信息关联表
*/
public class SysErpMaterialProductItem {
// 关联表id
private Long iconId;
//物料信息Id
private Long materialId;
//技术团队id
private Long productItemId;
}

209
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysProductItem.java

@ -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();
}
}

13
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysErpMaterialProductItemMapper.java

@ -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);
}

78
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysProductItemMapper.java

@ -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);
}

76
ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysProductItemService.java

@ -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);
}

14
ruoyi-admin/src/main/java/com/ruoyi/system/service/SysErpMaterialProductItemService.java

@ -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);
}

37
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysErpMaterialProductItemServiceIpml.java

@ -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);
}
}

127
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysProductItemServiceImpl.java

@ -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);
}
}

49
ruoyi-admin/src/main/resources/mapper/system/SysErpMaterialProductItemMapper.xml

@ -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>

137
ruoyi-admin/src/main/resources/mapper/system/SysProductItemMapper.xml

@ -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>

8
ruoyi-admin/src/main/resources/templates/erp/bom/bom.html

@ -11,14 +11,14 @@
<form id="formId">
<div class="select-list">
<ul>
<li>
<label>bom号:</label>
<input type="text" name="bomNo"/>
</li>
<li>
<label>料号:</label>
<input type="text" name="materialNo"/>
</li>
<li>
<label>bom号:</label>
<input type="text" name="bomNo"/>
</li>
<li>
<label>物料名称:</label>
<input type="text" name="materialName"/>

30
ruoyi-admin/src/main/resources/templates/erp/material/add.html

@ -37,13 +37,22 @@
<label th:for="${'useStatus_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div>
</div>
</div>
<div class="form-group">
</div>-->
<div class="form-group">
<label class="col-sm-3 control-label">是否有生产团队:</label>
<div class="col-sm-8">
<input name="havaProductTem" class="form-control" type="text">
</div>
</div>-->
</div>
<div class="form-group">
<label class="col-sm-3 control-label">生产团队id:</label>
<div class="col-sm-8">
<select name="productItem" class="form-control m-b" th:with="productList=${@productItems.selectSysProductItemLists()}">
<option value="">请选择</option>
<option th:each="product:${productList}" th:value="${product.id}" th:text="${product.productItem}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">物料类型:</label>
<div class="col-sm-8">
@ -215,6 +224,21 @@
$.operate.save(prefix + "/add", $('#form-material-add').serialize());
}
}
index = 0; //图片数量
const imageArray = new Map(); //保存的图片数量
// 删除图片
function delate(val) {
imageArray.delete(val);
index--;
if (index <= 4) {
$(".shangchuan").parent().parent().css("display", "block");
}
}
</script>
</body>
</html>

34
ruoyi-admin/src/main/resources/templates/erp/material/detail.html

@ -6,26 +6,26 @@
<link th:href="@{/ajax/libs/element-ui/element-ui.css}" rel="stylesheet"/>
</head>
<body class="white-bg">
<div id="app" class="wrapper wrapper-content animated fadeInRight ibox-content">
<div id="app" class="wrapper wrapper-content animated fadeInRight ibox-content" >
<form class="form-horizontal m" id="form-material-edit" th:object="${erpMaterial}">
<input name="id" th:field="*{id}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">料号:</label>
<div class="col-sm-8">
<input id="materialNo" name="materialNo" th:field="*{materialNo}" class="form-control" type="text">
<input id="materialNo" name="materialNo" th:field="*{materialNo}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<div class="form-group">
<label class="col-sm-3 control-label">物料名称:</label>
<div class="col-sm-8">
<input name="materialName" th:field="*{materialName}" class="form-control" type="text">
<input name="materialName" th:field="*{materialName}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">审核状态:</label>
<div class="col-sm-8">
<div class="radio-box" th:each="dict : ${@dict.getType('auditStatus')}">
<input type="radio" th:id="${'auditStatus_' + dict.dictCode}" name="auditStatus" th:value="${dict.dictValue}" th:field="*{auditStatus}">
<input type="radio" readonly th:id="${'auditStatus_' + dict.dictCode}" name="auditStatus" th:value="${dict.dictValue}" th:field="*{auditStatus}">
<label th:for="${'auditStatus_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div>
</div>
@ -33,7 +33,7 @@
<div class="form-group">
<label class="col-sm-3 control-label">使用状态:</label>
<div class="col-sm-8">
<div class="radio-box" th:each="dict : ${@dict.getType('useStatus')}">
<div class="radio-box" readonly th:each="dict : ${@dict.getType('useStatus')}">
<input type="radio" th:id="${'useStatus_' + dict.dictCode}" name="useStatus" th:value="${dict.dictValue}" th:field="*{useStatus}">
<label th:for="${'useStatus_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div>
@ -42,13 +42,13 @@
<div class="form-group">
<label class="col-sm-3 control-label">是否有生产团队:</label>
<div class="col-sm-8">
<input name="havaProductTem" th:field="*{havaProductTem}" class="form-control" type="text">
<input readonly name="havaProductTem" th:field="*{havaProductTem}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<div class="form-group">
<label class="col-sm-3 control-label">物料类型:</label>
<div class="col-sm-8">
<select id="selectMaterialType" class="form-control m-b select2-multiple" th:with="childList=${@category.getChildByCode('materialType')}">
<select readonly id="selectMaterialType" class="form-control m-b select2-multiple" th:with="childList=${@category.getChildByCode('materialType')}">
<optgroup>
<option value="">请选择</option>
</optgroup>
@ -59,18 +59,18 @@
</div>
<input type="text" id="materialType" name="materialType" th:field="*{materialType}" hidden />
</div>
<div class="form-group">
<div class="form-group">
<label class="col-sm-3 control-label">加工方式:</label>
<div class="col-sm-8">
<select name="processMethod" class="form-control m-b" th:with="type=${@dict.getType('processMethod')}">
<select readonly name="processMethod" class="form-control m-b" th:with="type=${@dict.getType('processMethod')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{processMethod}"></option>
</select>
</div>
</div>
<div class="form-group">
<div class="form-group">
<label class="col-sm-3 control-label">单位:</label>
<div class="col-sm-8">
<select name="unit" class="form-control m-b" th:with="type=${@dict.getType('sys_unit_class')}">
<select readonly name="unit" class="form-control m-b" th:with="type=${@dict.getType('sys_unit_class')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{unit}"></option>
</select>
</div>
@ -78,19 +78,19 @@
<div class="form-group">
<label class="col-sm-3 control-label">品牌:</label>
<div class="col-sm-8">
<input name="brand" th:field="*{brand}" class="form-control" type="text">
<input readonly name="brand" th:field="*{brand}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">描述:</label>
<div class="col-sm-8">
<textarea name="describe" class="form-control">[[*{describe}]]</textarea>
<textarea readonly name="describe" class="form-control">[[*{describe}]]</textarea>
</div>
</div>
<div class="form-group">
<div class="form-group">
<label class="col-sm-3 control-label">入库部门:</label>
<div class="col-sm-8">
<select name="warehouseDept" class="form-control m-b" th:with="type=${@dict.getType('warehouseDept')}">
<select readonly name="warehouseDept" class="form-control m-b" th:with="type=${@dict.getType('warehouseDept')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{warehouseDept}"></option>
</select>
</div>

51
ruoyi-admin/src/main/resources/templates/erp/material/edit.html

@ -121,7 +121,6 @@
<script th:src="@{/ajax/libs/vue/vue.js}"></script>
<script th:src="@{/ajax/libs/element-ui/element-ui.js}"></script>
<script type="text/javascript">
new Vue({
el: '#app',
data: function() {
@ -268,6 +267,56 @@
$.operate.save(prefix + "/edit", $('#form-material-edit').serialize());
}
}
$("#small").on("change", function (el) {
// 1.单张图片上传
// index++;
// 1.多张图片上传
index = index + el.target.files.length;
const _this = this;
// 2.1 单张图片回显
// let file = el.target.files[0];
// reader.readAsDataURL(file);
// 2.2多张图片回显
// let i = el.target.files.length;
for (let index = 0; index < el.target.files.length; index++) {
//2. 图片回显
var reader = new FileReader();
reader.readAsDataURL(el.target.files[index]);
//多张图片回显
reader.onload = (e) => {
if (index >= 4) {
$(_this).parent().parent().css("display", "none");
}
if (index > 5) {
toast("最多只能上传四张图片", 3000);
return;
} else {
const content =
` <div class="list-img">
<div class="close" data-index="${index}">
<img src="../../assets/img/icon/close (2).png" alt="">
</div>
<div class="z_photo">
<img src="` + e.target.result + `" alt="" class="img" />
</div>
</div>`;
$(_this).parent().parent().before(content);
// imageArray.push(e.target.result);
imageArray.set(`${index}`, e.target.result);
$(_this).val("");
$(".close").unbind("click");
$(".close").on("click", function () {
console.log($(this).attr("data-index"));
delate($(this).attr("data-index"));
$(this).parent().remove();
});
}
};
}
});
</script>
</body>
</html>

8
ruoyi-admin/src/main/resources/templates/erp/material/material.html

@ -92,6 +92,9 @@
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="erp:material:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-success" onclick="$.operate.item()" shiro:hasPermission="erp:material:item">
<i class="fa fa-plus"></i> 技术团队配置
</a>
<!--<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="erp:material:edit">
<i class="fa fa-edit"></i> 修改
</a>
@ -126,6 +129,7 @@
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
itemUrl: prefix + "/item",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
cancelUrl: prefix + "/cancel/{id}",
@ -163,6 +167,10 @@
field: 'materialNo',
title: '料号'
},
{
field: '',
title: '关联bom号'
},
{
field: 'photoUrl',
title: '图片',

97
ruoyi-admin/src/main/resources/templates/system/item/add.html

@ -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…
Cancel
Save