Browse Source

[fix]绩效模块,修改技术团队配置,完成数据填充,页面展示,条件查询操作

dev
zhangsiqi 5 months ago
parent
commit
b421765f01
  1. 68
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysTechnicalTeamController.java
  2. 51
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysTechnicalTeam.java
  3. 26
      ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysTechnicalTeamMapper.java
  4. 24
      ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysTechnicalTeamService.java
  5. 143
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysTechnicalTeamServiceImpl.java
  6. 70
      ruoyi-admin/src/main/resources/mapper/system/SysTechnicalTeamMapper.xml
  7. 31
      ruoyi-admin/src/main/resources/templates/system/technicalTeam/add.html
  8. 84
      ruoyi-admin/src/main/resources/templates/system/technicalTeam/detail.html
  9. 14
      ruoyi-admin/src/main/resources/templates/system/technicalTeam/edit.html
  10. 129
      ruoyi-admin/src/main/resources/templates/system/technicalTeam/technicalTeam.html

68
ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysProductItemController.java → ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysTechnicalTeamController.java

@ -7,8 +7,8 @@ import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.domain.SysProductItem;
import com.ruoyi.system.service.ISysProductItemService;
import com.ruoyi.system.domain.SysTechnicalTeam;
import com.ruoyi.system.service.ISysTechnicalTeamService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@ -24,45 +24,45 @@ import java.util.List;
* @date 2023-12-04
*/
@Controller
@RequestMapping("/system/item")
public class SysProductItemController extends BaseController
@RequestMapping("/system/technicalTeam")
public class SysTechnicalTeamController extends BaseController
{
private String prefix = "system/item";
private String prefix = "system/technicalTeam";
@Autowired
private ISysProductItemService sysProductItemService;
private ISysTechnicalTeamService sysTechnicalTeamService;
@RequiresPermissions("item:item:view")
@RequiresPermissions("technical:team:view")
@GetMapping()
public String item()
{
return prefix + "/item";
return prefix + "/technicalTeam";
}
/**
* 查询生产团队列表
*/
@RequiresPermissions("item:item:list")
@RequiresPermissions("technical:team:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(SysProductItem sysProductItem)
public TableDataInfo list(SysTechnicalTeam sysTechnicalTeam)
{
startPage();
List<SysProductItem> list = sysProductItemService.selectSysProductItemList(sysProductItem);
List<SysTechnicalTeam> list = sysTechnicalTeamService.selectSysTechnicalTeamList(sysTechnicalTeam);
return getDataTable(list);
}
/**
* 导出生产团队列表
*/
@RequiresPermissions("item:item:export")
@RequiresPermissions("technical:team:export")
@Log(title = "生产团队", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(SysProductItem sysProductItem)
public AjaxResult export(SysTechnicalTeam sysTechnicalTeam)
{
List<SysProductItem> list = sysProductItemService.selectSysProductItemList(sysProductItem);
ExcelUtil<SysProductItem> util = new ExcelUtil<SysProductItem>(SysProductItem.class);
List<SysTechnicalTeam> list = sysTechnicalTeamService.selectSysTechnicalTeamList(sysTechnicalTeam);
ExcelUtil<SysTechnicalTeam> util = new ExcelUtil<SysTechnicalTeam>(SysTechnicalTeam.class);
return util.exportExcel(list, "生产团队数据");
}
@ -78,13 +78,13 @@ public class SysProductItemController extends BaseController
/**
* 新增保存生产团队
*/
@RequiresPermissions("item:item:add")
@RequiresPermissions("technical:team:add")
@Log(title = "生产团队", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(SysProductItem sysProductItem)
public AjaxResult addSave(SysTechnicalTeam sysTechnicalTeam)
{
return toAjax(sysProductItemService.insertSysProductItem(sysProductItem));
return toAjax(sysTechnicalTeamService.insertSysTechnicalTeam(sysTechnicalTeam));
}
/**
@ -93,61 +93,67 @@ public class SysProductItemController extends BaseController
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") Long id, ModelMap mmap)
{
SysProductItem sysProductItem = sysProductItemService.selectSysProductItemById(id);
mmap.put("sysProductItem", sysProductItem);
SysTechnicalTeam sysTechnicalTeam = sysTechnicalTeamService.selectSysTechnicalTeamById(id);
mmap.put("sysTechnicalTeam", sysTechnicalTeam);
return prefix + "/edit";
}
@GetMapping("/detail/{id}")
public String detail(@PathVariable("id") Long id, ModelMap mmap)
{
SysTechnicalTeam sysTechnicalTeam = sysTechnicalTeamService.selectSysTechnicalTeamById(id);
mmap.put("sysTechnicalTeam", sysTechnicalTeam);
return prefix + "/detail";
}
/**
* 修改保存生产团队
*/
@RequiresPermissions("item:item:edit")
@RequiresPermissions("technical:team:edit")
@Log(title = "生产团队", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(SysProductItem sysProductItem)
public AjaxResult editSave(SysTechnicalTeam sysTechnicalTeam)
{
return toAjax(sysProductItemService.updateSysProductItem(sysProductItem));
return toAjax(sysTechnicalTeamService.updateSysTechnicalTeam(sysTechnicalTeam));
}
/**
* 删除生产团队
*/
@RequiresPermissions("item:item:remove")
@RequiresPermissions("technical:team:remove")
@Log(title = "生产团队", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(sysProductItemService.deleteSysProductItemByIds(ids));
return toAjax(sysTechnicalTeamService.deleteSysTechnicalTeamByIds(ids));
}
/**
* 作废生产团队
*/
@RequiresPermissions("item:item:cancel")
@RequiresPermissions("technical:team:cancel")
@Log(title = "生产团队", businessType = BusinessType.CANCEL)
@GetMapping( "/cancel/{id}")
@ResponseBody
public AjaxResult cancel(@PathVariable("id") Long id){
return toAjax(sysProductItemService.cancelSysProductItemById(id));
return toAjax(sysTechnicalTeamService.cancelSysTechnicalTeamById(id));
}
/**
* 恢复生产团队
*/
@RequiresPermissions("item:item:restore")
@RequiresPermissions("technical:team:restore")
@Log(title = "生产团队", businessType = BusinessType.RESTORE)
@GetMapping( "/restore/{id}")
@ResponseBody
public AjaxResult restore(@PathVariable("id")Long id)
{
return toAjax(sysProductItemService.restoreSysProductItemById(id));
return toAjax(sysTechnicalTeamService.restoreSysTechnicalTeamById(id));
}
@PostMapping("/getId")
@ResponseBody
public Result getId() throws Exception {
return Result.getSuccessResult(sysProductItemService.getId());
return Result.getSuccessResult(sysTechnicalTeamService.getId());
}
}

51
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysProductItem.java → ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysTechnicalTeam.java

@ -6,27 +6,27 @@ import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* 生产团队对象 sys_product_item
* 技术团队对象 sys_technical_team
*
* @author ruoyi
* @date 2023-12-04
*/
public class SysProductItem extends BaseEntity
public class SysTechnicalTeam extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 生产团队的id */
@Excel(name = "生产团队的序号")
/** 技术团队的id */
@Excel(name = "技术团队的序号")
private Long id;
@Excel(name = "生产团队的ID")
private String productItemId;
/** 生产团队类型 */
@Excel(name = "生产团队类型")
@Excel(name = "技术团队的ID")
private String technicalTeamId;
/** 技术团队类型 */
@Excel(name = "技术团队类型")
private String types;
/** 生产团队成员 */
@Excel(name = "生产团队成员")
private String productItem;
/** 技术团队名称 */
@Excel(name = "技术团队名称")
private String technicalTeamName;
/** 删除标志 0正常 1删除 */
private String delFlag;
@ -73,12 +73,20 @@ public class SysProductItem extends BaseEntity
return id;
}
public String getProductItemId() {
return productItemId;
public String getTechnicalTeamId() {
return technicalTeamId;
}
public void setProductItemId(String productItemId) {
this.productItemId = productItemId;
public void setTechnicalTeamId(String technicalTeamId) {
this.technicalTeamId = technicalTeamId;
}
public String getTechnicalTeamName() {
return technicalTeamName;
}
public void setTechnicalTeamName(String technicalTeamName) {
this.technicalTeamName = technicalTeamName;
}
public void setTypes(String types)
@ -90,15 +98,6 @@ public class SysProductItem extends BaseEntity
{
return types;
}
public void setProductItem(String productItem)
{
this.productItem = productItem;
}
public String getProductItem()
{
return productItem;
}
public void setDelFlag(String delFlag)
{
this.delFlag = delFlag;
@ -185,9 +184,9 @@ public class SysProductItem extends BaseEntity
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("productItemId", getProductItemId())
.append("technicalTeamId", getTechnicalTeamId())
.append("technicalTeamName", getTechnicalTeamName())
.append("types", getTypes())
.append("productItem", getProductItem())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())

26
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysProductItemMapper.java → ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysTechnicalTeamMapper.java

@ -1,6 +1,6 @@
package com.ruoyi.system.mapper;
import com.ruoyi.system.domain.SysProductItem;
import com.ruoyi.system.domain.SysTechnicalTeam;
import java.util.List;
@ -10,7 +10,7 @@ import java.util.List;
* @author ruoyi
* @date 2023-12-04
*/
public interface SysProductItemMapper
public interface SysTechnicalTeamMapper
{
/**
* 查询生产团队
@ -18,31 +18,31 @@ public interface SysProductItemMapper
* @param id 生产团队ID
* @return 生产团队
*/
public SysProductItem selectSysProductItemById(Long id);
public SysTechnicalTeam selectSysTechnicalTeamById(Long id);
/**
* 查询生产团队列表
*
* @param sysProductItem 生产团队
* @param sysTechnicalTeam 生产团队
* @return 生产团队集合
*/
public List<SysProductItem> selectSysProductItemList(SysProductItem sysProductItem);
public List<SysTechnicalTeam> selectSysTechnicalTeamList(SysTechnicalTeam sysTechnicalTeam);
/**
* 新增生产团队
*
* @param sysProductItem 生产团队
* @param sysTechnicalTeam 生产团队
* @return 结果
*/
public int insertSysProductItem(SysProductItem sysProductItem);
public int insertSysTechnicalTeam(SysTechnicalTeam sysTechnicalTeam);
/**
* 修改生产团队
*
* @param sysProductItem 生产团队
* @param sysTechnicalTeam 生产团队
* @return 结果
*/
public int updateSysProductItem(SysProductItem sysProductItem);
public int updateSysTechnicalTeam(SysTechnicalTeam sysTechnicalTeam);
/**
* 删除生产团队
@ -50,7 +50,7 @@ public interface SysProductItemMapper
* @param id 生产团队ID
* @return 结果
*/
public int deleteSysProductItemById(Long id);
public int deleteSysTechnicalTeamById(Long id);
/**
* 批量删除生产团队
@ -58,7 +58,7 @@ public interface SysProductItemMapper
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteSysProductItemByIds(String[] ids);
public int deleteSysTechnicalTeamByIds(String[] ids);
/**
* 作废生产团队
@ -66,7 +66,7 @@ public interface SysProductItemMapper
* @param id 生产团队ID
* @return 结果
*/
public int cancelSysProductItemById(Long id);
public int cancelSysTechnicalTeamById(Long id);
/**
* 恢复生产团队
@ -74,5 +74,5 @@ public interface SysProductItemMapper
* @param id 生产团队ID
* @return 结果
*/
public int restoreSysProductItemById(Long id);
public int restoreSysTechnicalTeamById(Long id);
}

24
ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysProductItemService.java → ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysTechnicalTeamService.java

@ -1,6 +1,6 @@
package com.ruoyi.system.service;
import com.ruoyi.system.domain.SysProductItem;
import com.ruoyi.system.domain.SysTechnicalTeam;
import java.util.List;
@ -10,7 +10,7 @@ import java.util.List;
* @author ruoyi
* @date 2023-12-04
*/
public interface ISysProductItemService
public interface ISysTechnicalTeamService
{
/**
* 查询生产团队
@ -18,7 +18,7 @@ public interface ISysProductItemService
* @param id 生产团队ID
* @return 生产团队
*/
public SysProductItem selectSysProductItemById(Long id);
public SysTechnicalTeam selectSysTechnicalTeamById(Long id);
/**
* 查询生产团队列表
@ -26,7 +26,7 @@ public interface ISysProductItemService
* @param sysProductItem 生产团队
* @return 生产团队集合
*/
public List<SysProductItem> selectSysProductItemList(SysProductItem sysProductItem);
public List<SysTechnicalTeam> selectSysTechnicalTeamList(SysTechnicalTeam sysProductItem);
/**
* 新增生产团队
@ -34,7 +34,7 @@ public interface ISysProductItemService
* @param sysProductItem 生产团队
* @return 结果
*/
public int insertSysProductItem(SysProductItem sysProductItem);
public int insertSysTechnicalTeam(SysTechnicalTeam sysProductItem);
/**
* 修改生产团队
@ -42,7 +42,7 @@ public interface ISysProductItemService
* @param sysProductItem 生产团队
* @return 结果
*/
public int updateSysProductItem(SysProductItem sysProductItem);
public int updateSysTechnicalTeam(SysTechnicalTeam sysProductItem);
/**
* 批量删除生产团队
@ -50,7 +50,7 @@ public interface ISysProductItemService
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteSysProductItemByIds(String ids);
public int deleteSysTechnicalTeamByIds(String ids);
/**
* 删除生产团队信息
@ -58,23 +58,23 @@ public interface ISysProductItemService
* @param id 生产团队ID
* @return 结果
*/
public int deleteSysProductItemById(Long id);
public int deleteSysTechnicalTeamById(Long id);
/**
* 作废生产团队
* @param id 生产团队ID
* @return
*/
int cancelSysProductItemById(Long id);
int cancelSysTechnicalTeamById(Long id);
/**
* 恢复生产团队
* @param id 生产团队ID
* @return
*/
int restoreSysProductItemById(Long id);
int restoreSysTechnicalTeamById(Long id);
public List<SysProductItem> selectSysProductItemLists();
public List<SysTechnicalTeam> selectSysTechnicalTeamLists();
Object getId();
public Object getId();
}

143
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysTechnicalTeamServiceImpl.java

@ -0,0 +1,143 @@
package com.ruoyi.system.service.impl;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.system.domain.SysTechnicalTeam;
import com.ruoyi.system.mapper.SysTechnicalTeamMapper;
import com.ruoyi.system.service.ISysTechnicalTeamService;
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 SysTechnicalTeamServiceImpl implements ISysTechnicalTeamService
{
@Autowired
private SysTechnicalTeamMapper sysTechnicalTeamMapper;
@Autowired
private RedisCache redisCache;
/**
* 查询生产团队
*
* @param id 生产团队ID
* @return 生产团队
*/
@Override
public SysTechnicalTeam selectSysTechnicalTeamById(Long id)
{
return sysTechnicalTeamMapper.selectSysTechnicalTeamById(id);
}
/**
* 查询生产团队列表
*
* @param sysTechnicalTeam 生产团队
* @return 生产团队
*/
@Override
public List<SysTechnicalTeam> selectSysTechnicalTeamList(SysTechnicalTeam sysTechnicalTeam)
{
return sysTechnicalTeamMapper.selectSysTechnicalTeamList(sysTechnicalTeam);
}
/**
* 新增生产团队
*
* @param sysTechnicalTeam 生产团队
* @return 结果
*/
@Override
public int insertSysTechnicalTeam(SysTechnicalTeam sysTechnicalTeam)
{
String loginName = ShiroUtils.getLoginName();
sysTechnicalTeam.setCreateBy(loginName);
sysTechnicalTeam.setCreateTime(DateUtils.getNowDate());
sysTechnicalTeam.setTechnicalTeamId(redisCache.generateNo("JSTEAM"));
return sysTechnicalTeamMapper.insertSysTechnicalTeam(sysTechnicalTeam);
}
/**
* 修改生产团队
*
* @param sysTechnicalTeam 生产团队
* @return 结果
*/
@Override
public int updateSysTechnicalTeam(SysTechnicalTeam sysTechnicalTeam)
{
String loginName = ShiroUtils.getLoginName();
sysTechnicalTeam.setUpdateBy(loginName);
sysTechnicalTeam.setUpdateTime(DateUtils.getNowDate());
return sysTechnicalTeamMapper.updateSysTechnicalTeam(sysTechnicalTeam);
}
/**
* 删除生产团队对象
*
* @param ids 需要删除的数据ID
* @return 结果
*/
@Override
public int deleteSysTechnicalTeamByIds(String ids)
{
return sysTechnicalTeamMapper.deleteSysTechnicalTeamByIds(Convert.toStrArray(ids));
}
/**
* 删除生产团队信息
*
* @param id 生产团队ID
* @return 结果
*/
@Override
public int deleteSysTechnicalTeamById(Long id)
{
return sysTechnicalTeamMapper.deleteSysTechnicalTeamById(id);
}
/**
* 作废生产团队
*
* @param id 生产团队ID
* @return 结果
*/
@Override
public int cancelSysTechnicalTeamById(Long id)
{
return sysTechnicalTeamMapper.cancelSysTechnicalTeamById(id);
}
/**
* 恢复生产团队信息
*
* @param id 生产团队ID
* @return 结果
*/
@Override
public int restoreSysTechnicalTeamById(Long id)
{
return sysTechnicalTeamMapper.restoreSysTechnicalTeamById(id);
}
@Override
public List<SysTechnicalTeam> selectSysTechnicalTeamLists() {
SysTechnicalTeam sysTechnicalTeam = new SysTechnicalTeam();
return sysTechnicalTeamMapper.selectSysTechnicalTeamList(sysTechnicalTeam);
}
@Override
public Object getId() {
return redisCache.generateNo("JSTEAM");
}
}

70
ruoyi-admin/src/main/resources/mapper/system/SysProductItemMapper.xml → ruoyi-admin/src/main/resources/mapper/system/SysTechnicalTeamMapper.xml

@ -2,13 +2,13 @@
<!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">
<mapper namespace="com.ruoyi.system.mapper.SysTechnicalTeamMapper">
<resultMap type="SysProductItem" id="SysProductItemResult">
<resultMap type="SysTechnicalTeam" id="SysTechnicalTeamResult">
<result property="id" column="id" />
<result property="productItemId" column="product_item_id" />
<result property="technicalTeamId" column="technical_team_id" />
<result property="types" column="types" />
<result property="productItem" column="productItem" />
<result property="technicalTeamName" column="technical_team_name" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
@ -24,33 +24,35 @@
<result property="director" column="director" />
</resultMap>
<sql id="selectSysProductItemVo">
select id,product_item_id, types, productItem, create_by, create_time, update_by, updateTime, del_flag, dianqi, struct, soft, test, zhuguan1, zhuguan2, manger, director from sys_product_item
<sql id="selectSysTechnicalTeamVo">
select id,technical_team_id, types, technical_team_name, create_by, create_time, update_by, updateTime, del_flag, dianqi, struct, soft, test, zhuguan1, zhuguan2, manger, director from sys_technical_team
</sql>
<select id="selectSysProductItemList" parameterType="SysProductItem" resultMap="SysProductItemResult">
<include refid="selectSysProductItemVo"/>
<select id="selectSysTechnicalTeamList" parameterType="SysTechnicalTeam" resultMap="SysTechnicalTeamResult">
<include refid="selectSysTechnicalTeamVo"/>
<where>
<if test="productItemId != null and productItemId != ''"> and product_item_id concat('%',#{productItemId}, '%') </if>
<if test="productItem != null and productItem != ''"> and productItem like concat('%',#{productItem}, '%') </if>
<if test="dianqi != null and dianqi != ''"> and dianqi concat('%',#{dianqi}, '%') </if>
<if test="struct != null and struct != ''"> and struct concat('%',#{struct}, '%')}</if>
<if test="technicalTeamId != null and technicalTeamId != ''"> and technical_team_id concat('%',#{technicalTeamId}, '%') </if>
<if test="technicalTeamName != null and technicalTeamName != ''"> and technical_team_name like concat('%',#{technicalTeamName}, '%') </if>
<if test="dianqi != null and dianqi != ''"> and dianqi like concat('%',#{dianqi}, '%') </if>
<if test="struct != null and struct != ''"> and struct like concat('%',#{struct}, '%')}</if>
<if test="soft != null and soft != ''"> and soft like concat('%', #{soft}, '%') </if>
<if test="test != null and test != ''"> and testlike concat('%', #{test}, '%')</if>
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
<if test="test != null and test != ''"> and test like concat('%', #{test}, '%')</if>
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''">
and create_time between #{params.beginCreateTime} and #{params.endCreateTime}
</if>
</where>
</select>
<select id="selectSysProductItemById" parameterType="Long" resultMap="SysProductItemResult">
<include refid="selectSysProductItemVo"/>
<select id="selectSysTechnicalTeamById" parameterType="Long" resultMap="SysTechnicalTeamResult">
<include refid="selectSysTechnicalTeamVo"/>
where id = #{id}
</select>
<insert id="insertSysProductItem" parameterType="SysProductItem" useGeneratedKeys="true" keyProperty="id">
insert into sys_product_item
<insert id="insertSysTechnicalTeam" parameterType="SysTechnicalTeam" useGeneratedKeys="true" keyProperty="id">
insert into sys_technical_team
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="productItemId != null">product_item_id,</if>
<if test="productItem != null">productItem,</if>
<if test="technicalTeamId != null">technical_team_id,</if>
<if test="technicalTeamName != null">technical_team_name,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
@ -67,8 +69,8 @@
<if test="delFlag != null">del_flag,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="productItemId != null">#{productItemId},</if>
<if test="productItem != null">#{productItem},</if>
<if test="technicalTeamId != null">#{technicalTeamId},</if>
<if test="technicalTeamName != null">#{technicalTeamName},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
@ -86,11 +88,11 @@
</trim>
</insert>
<update id="updateSysProductItem" parameterType="SysProductItem">
update sys_product_item
<update id="updateSysTechnicalTeam" parameterType="SysTechnicalTeam">
update sys_technical_team
<trim prefix="SET" suffixOverrides=",">
<if test="productItemId != null">product_item_id = #{productItemId},</if>
<if test="productItem != null">productItem = #{productItem},</if>
<if test="technicalTeamId != null">technical_team_id = #{technicalTeamId},</if>
<if test="technicalTeamName != null">technical_team_name = #{technicalTeamName},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="dianqi != null">dianqi = #{dianqi},</if>
@ -106,22 +108,22 @@
where id = #{id}
</update>
<delete id="deleteSysProductItemById" parameterType="Long">
delete from sys_product_item where id = #{id}
<delete id="deleteSysTechnicalTeamById" parameterType="Long">
delete from sys_technical_team where id = #{id}
</delete>
<delete id="deleteSysProductItemByIds" parameterType="String">
delete from sys_product_item where id in
<delete id="deleteSysTechnicalTeamByIds" parameterType="String">
delete from sys_technical_team 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 id="cancelSysTechnicalTeamById" parameterType="Long">
update sys_technical_team 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 id="restoreSysTechnicalTeamById" parameterType="Long">
update sys_technical_team set del_flag = '0' where id = #{id}
</update>
</mapper>

31
ruoyi-admin/src/main/resources/templates/system/item/add.html → ruoyi-admin/src/main/resources/templates/system/technicalTeam/add.html

@ -1,16 +1,15 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增生产团队')" />
<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">
<input name="productItemId" type="hidden">
<form class="form-horizontal m" id="form-technicalTeam-add">
<div class="form-group">
<label class="col-sm-3 control-label is-required">团队名称:</label>
<div class="col-sm-8">
<input name="productItem" class="form-control" type="text" required>
<input name="technicalTeamName" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
@ -71,29 +70,11 @@
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "system/item"
$("#form-item-add").validate({focusCleanup: true});
var prefix = ctx + "system/technicalTeam";
$("#form-technicalTeam-add").validate({focusCleanup: true});
function submitHandler() {
if ($.validate.form()) {$.operate.save(prefix + "/add", $('#form-item-add').serialize());}
if ($.validate.form()) {$.operate.save(prefix + "/add", $('#form-technicalTeam-add').serialize());}
}
$(function(){
$.ajax({
url: prefix + "/getId",
type: "post",
dataType: "json",
success: function (result) {
if (result.code == 0) {
$("input[name='productItemId']").val(result.data);
}
else {
$.modal.msgError("失败啦");
}
},
error: function () {
$.modal.msgError("后台出错啦!");
}
});
});
</script>
</body>
</html>

84
ruoyi-admin/src/main/resources/templates/system/technicalTeam/detail.html

@ -0,0 +1,84 @@
<!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-technicalTeam-detail" th:object="${sysTechnicalTeam}">
<input name="id" th:field="*{id}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label is-required">团队ID:</label>
<div class="col-sm-8">
<input name="technicalTeamId" th:field="*{technicalTeamId}" class="form-control" type="text" required disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">团队名称:</label>
<div class="col-sm-8">
<input name="technicalTeamName" th:field="*{technicalTeamName}" class="form-control" type="text" required disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">电气:</label>
<div class="col-sm-8">
<input name="dianqi" th:field="*{dianqi}" class="form-control" type="text" required disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">结构:</label>
<div class="col-sm-8">
<input name="struct" th:field="*{struct}" class="form-control" type="text" required disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">软件:</label>
<div class="col-sm-8">
<input name="soft" th:field="*{soft}" class="form-control" type="text" required disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">测试:</label>
<div class="col-sm-8">
<input name="test" th:field="*{test}" class="form-control" type="text" required disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">主管1:</label>
<div class="col-sm-8">
<input name="zhuguan1" th:field="*{zhuguan1}" class="form-control" type="text" required disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">主管2:</label>
<div class="col-sm-8">
<input name="zhuguan2" th:field="*{zhuguan2}" class="form-control" type="text" required disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">经理:</label>
<div class="col-sm-8">
<input name="manger" th:field="*{manger}" class="form-control" type="text" required disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">总监:</label>
<div class="col-sm-8">
<input name="director" th:field="*{director}" class="form-control" type="text" required disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">
<textarea name="remark" th:field="*{remark}" class="form-control" type="text" disabled></textarea>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "system/technicalTeam";
$("#form-technicalTeam-detail").validate({focusCleanup: true});
</script>
</body>
</html>

14
ruoyi-admin/src/main/resources/templates/system/item/edit.html → ruoyi-admin/src/main/resources/templates/system/technicalTeam/edit.html

@ -5,12 +5,12 @@
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-item-edit" th:object="${sysProductItem}">
<form class="form-horizontal m" id="form-technicalTeam-edit" th:object="${sysTechnicalTeam}">
<input name="id" th:field="*{id}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label is-required">团队名称:</label>
<div class="col-sm-8">
<input name="productItem" th:field="*{productItem}" class="form-control" type="text" required>
<input name="technicalTeamName" th:field="*{technicalTeamName}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
@ -64,21 +64,19 @@
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">
<textarea name="director" th:field="*{remark}" class="form-control" type="text"></textarea>
<textarea name="remark" th:field="*{remark}" class="form-control" type="text"></textarea>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "system/item";
$("#form-item-edit").validate({
focusCleanup: true
});
var prefix = ctx + "system/technicalTeam";
$("#form-technicalTeam-edit").validate({focusCleanup: true});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-item-edit').serialize());
$.operate.save(prefix + "/edit", $('#form-technicalTeam-edit').serialize());
}
}
</script>

129
ruoyi-admin/src/main/resources/templates/system/technicalTeam/technicalTeam.html

@ -0,0 +1,129 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('技术团队列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<li>
<label>技术团队ID:</label>
<input type="text" name="technicalTeamId"/>
</li>
<li>
<label>团队名称:</label>
<input type="text" name="technicalTeamName"/>
</li>
<li>
<label>电气:</label>
<input type="text" name="dianqi"/>
</li>
<li>
<label>结构:</label>
<input type="text" name="struct"/>
</li>
<li>
<label>软件:</label>
<input type="text" name="soft"/>
</li>
<li>
<label>测试:</label>
<input type="text" name="test"/>
</li>
<li class="select-time">
<label>录入时间:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginCreateTime]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endCreateTime]"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</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="technical:team: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>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('technical:team:edit')}]];
var removeFlag = [[${@permission.hasPermi('technical:team:remove')}]];
var cancelFlag = [[${@permission.hasPermi('technical:team:cancel')}]];
var restoreFlag = [[${@permission.hasPermi('technical:team:restore')}]];
var prefix = ctx + "system/technicalTeam";
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
cancelUrl: prefix + "/cancel/{id}",
restoreUrl: prefix + "/restore/{id}",
exportUrl: prefix + "/export",
detailUrl: prefix + "/detail/{id}",
modalName: "技术团队",
columns: [
{checkbox: true},
{title: '技术团队序号',field: 'id',visible: false},
{title: '技术团队的id',field: 'technicalTeamId'},
{title: '技术团队名称', field: 'technicalTeamName',},
{title: '电气', field: 'dianqi',},
{title: '结构',field: 'struct',},
{title: '软件',field: 'soft',},
{title: '测试',field: 'test',},
{title: '主管1',field: 'zhuguan1',},
{title: '主管2',field: 'zhuguan2',},
{title: '经理',field: 'manger',},
{title: '总监',field: 'director',},
{title: '备注',field: 'remark',},
{title: '录入人',field: 'createBy',},
{title: '录入时间',field: 'createTime',},
{
field: 'updateBy',
title: '更新人',
},
{
field: 'updateTime',
title: '上次修改时间',
formatter: function (value, row, index) {
if (value == null) {
return " ";
} else {
var vArr = value.split(',')
return vArr[0];
}
}
},
{
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.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-warning btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.id + '\')"><i class="fa fa-remove"></i>详情</a> ');
return actions.join('');
}
}
]
};
$.table.init(options);
});
</script>
</body>
</html>
Loading…
Cancel
Save