zhangsiqi
7 months ago
10 changed files with 491 additions and 149 deletions
@ -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"); |
|||
} |
|||
} |
@ -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> |
@ -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> 搜索</a> |
|||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a> |
|||
</li> |
|||
</ul> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
|
|||
<div class="btn-group-sm" id="toolbar" role="group"> |
|||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="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…
Reference in new issue