数据分析模块开发
This commit is contained in:
parent
b1af74129c
commit
129aff6e05
|
|
@ -0,0 +1,53 @@
|
|||
package com.securitycontrol.entity.background.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class SjNewAsyncWarnVo {
|
||||
|
||||
private String id;
|
||||
/**
|
||||
* 提醒时间
|
||||
*/
|
||||
private String txTime;
|
||||
/**
|
||||
* 预警类型
|
||||
*/
|
||||
private String txType;
|
||||
/**
|
||||
* 预警内容
|
||||
*/
|
||||
private String content;
|
||||
/**
|
||||
* 数据类型
|
||||
*/
|
||||
private String dataType;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private String createTime;
|
||||
/**
|
||||
* 处理措施
|
||||
*/
|
||||
private String measureData;
|
||||
/**
|
||||
* 文件路径
|
||||
*/
|
||||
private String filePath;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 关键字查询
|
||||
*/
|
||||
private String keyWord;
|
||||
/**
|
||||
* 标段编码
|
||||
*/
|
||||
private String bidCode;
|
||||
/**
|
||||
* 工程名称
|
||||
*/
|
||||
private String proName;
|
||||
}
|
||||
|
|
@ -14,6 +14,8 @@ public class SjProjectMassVo {
|
|||
*/
|
||||
private Integer id;
|
||||
|
||||
private String teamId;
|
||||
|
||||
/**
|
||||
*班组名称
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import com.securitycontrol.common.log.annotation.Log;
|
|||
import com.securitycontrol.common.log.enums.OperationType;
|
||||
import com.securitycontrol.entity.background.dto.ParamDto;
|
||||
import com.securitycontrol.entity.background.vo.ProjectVo;
|
||||
import com.securitycontrol.entity.background.vo.SjNewAsyncWarnVo;
|
||||
import com.securitycontrol.entity.background.vo.SjProjectMassVo;
|
||||
import com.securitycontrol.entity.background.vo.SjProjectQualityVo;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
|
@ -78,8 +79,7 @@ public class SjProjectQualityController extends BaseController {
|
|||
@Log(title = "数据分析", menu = "数据分析->工程质量分析", grade = OperationType.QUERY_BUSINESS, details = "查询工程质量分析数据", type = "业务日志")
|
||||
public TableDataInfo getNewList(SjProjectMassVo dto) {
|
||||
startPage();
|
||||
List<SjProjectMassVo> list = new ArrayList<>();
|
||||
list = service.getNewList(dto);
|
||||
List<SjProjectMassVo> list = service.getNewList(dto);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
|
@ -110,4 +110,29 @@ public class SjProjectQualityController extends BaseController {
|
|||
return service.newDelete(dto);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@GetMapping("getWarnList")
|
||||
public TableDataInfo getWarnList(SjNewAsyncWarnVo vo) {
|
||||
startPage();
|
||||
List<SjNewAsyncWarnVo> list = service.getWarnList(vo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("addWarnData")
|
||||
public AjaxResult addWarnData(@RequestBody SjNewAsyncWarnVo vo) {
|
||||
return service.addWarnData(vo);
|
||||
}
|
||||
|
||||
@PostMapping("updateWarnData")
|
||||
public AjaxResult updateWarnData(@RequestBody SjNewAsyncWarnVo vo) {
|
||||
return service.updateWarnData(vo);
|
||||
}
|
||||
|
||||
@PostMapping(value="deleteWarnData")
|
||||
public AjaxResult deleteWarnData(@RequestBody SjNewAsyncWarnVo dto){
|
||||
return service.deleteWarnData(dto);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,8 +31,7 @@ public class SjWorkTeamController extends BaseController {
|
|||
@Log(title = "数据分析", menu = "数据分析->资源利用率", grade = OperationType.QUERY_BUSINESS, details = "查询班组信息详情", type = "业务日志")
|
||||
public TableDataInfo getList(SjWorkTeamVo dto) {
|
||||
startPage();
|
||||
List<SjWorkTeamVo> list = new ArrayList<>();
|
||||
list = service.getList(dto);
|
||||
List<SjWorkTeamVo> list = service.getList(dto);
|
||||
return getDataTable(list);
|
||||
}
|
||||
@ApiOperation(value = "新增班组")
|
||||
|
|
@ -69,8 +68,7 @@ public class SjWorkTeamController extends BaseController {
|
|||
@Log(title = "数据分析", menu = "数据分析->班组人数", grade = OperationType.QUERY_BUSINESS, details = "班组人员数据", type = "业务日志")
|
||||
public TableDataInfo userList(SjTeamPeopleVo dto) {
|
||||
startPage();
|
||||
List<SjTeamPeopleVo> list = new ArrayList<>();
|
||||
list = service.getUserList(dto);
|
||||
List<SjTeamPeopleVo> list = service.getUserList(dto);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.securitycontrol.background.mapper;
|
||||
|
||||
import com.securitycontrol.common.core.web.domain.AjaxResult;
|
||||
import com.securitycontrol.entity.background.vo.SjNewAsyncWarnVo;
|
||||
import com.securitycontrol.entity.background.vo.SjProjectMassVo;
|
||||
import com.securitycontrol.entity.background.vo.SjProjectQualityVo;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
|
@ -81,4 +82,32 @@ public interface SjProjectQualityMapper {
|
|||
* @return
|
||||
*/
|
||||
Integer newDelete(SjProjectMassVo dto);
|
||||
|
||||
/**
|
||||
* 查询分析预警数据接口
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
List<SjNewAsyncWarnVo> getWarnList(SjNewAsyncWarnVo vo);
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
Integer addWarnData(SjNewAsyncWarnVo vo);
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
Integer updateWarnData(SjNewAsyncWarnVo vo);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
Integer deleteWarnData(SjNewAsyncWarnVo dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.securitycontrol.background.service;
|
|||
import com.securitycontrol.common.core.web.domain.AjaxResult;
|
||||
import com.securitycontrol.entity.background.dto.ParamDto;
|
||||
import com.securitycontrol.entity.background.vo.ProjectVo;
|
||||
import com.securitycontrol.entity.background.vo.SjNewAsyncWarnVo;
|
||||
import com.securitycontrol.entity.background.vo.SjProjectMassVo;
|
||||
import com.securitycontrol.entity.background.vo.SjProjectQualityVo;
|
||||
|
||||
|
|
@ -78,4 +79,32 @@ public interface SjProjectQualityService {
|
|||
* @return
|
||||
*/
|
||||
AjaxResult newDelete(SjProjectMassVo dto);
|
||||
|
||||
/**
|
||||
* 查询预警信息
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
List<SjNewAsyncWarnVo> getWarnList(SjNewAsyncWarnVo vo);
|
||||
|
||||
/**
|
||||
* 新增
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
AjaxResult addWarnData(SjNewAsyncWarnVo vo);
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
AjaxResult updateWarnData(SjNewAsyncWarnVo vo);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
AjaxResult deleteWarnData(SjNewAsyncWarnVo dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import com.securitycontrol.background.service.SjProjectQualityService;
|
|||
import com.securitycontrol.common.core.web.domain.AjaxResult;
|
||||
import com.securitycontrol.entity.background.dto.ParamDto;
|
||||
import com.securitycontrol.entity.background.vo.ProjectVo;
|
||||
import com.securitycontrol.entity.background.vo.SjNewAsyncWarnVo;
|
||||
import com.securitycontrol.entity.background.vo.SjProjectMassVo;
|
||||
import com.securitycontrol.entity.background.vo.SjProjectQualityVo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
|
@ -176,4 +177,60 @@ public class SjProjectQualityServiceImpl implements SjProjectQualityService {
|
|||
}
|
||||
return AjaxResult.error("删除失败,数据id不正确");
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<SjNewAsyncWarnVo> getWarnList(SjNewAsyncWarnVo vo) {
|
||||
try{
|
||||
return mapper.getWarnList(vo);
|
||||
}catch (Exception e){
|
||||
log.error(e.getMessage(),e);
|
||||
}
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult addWarnData(SjNewAsyncWarnVo vo) {
|
||||
try{
|
||||
vo.setDataType("1");
|
||||
Integer num= mapper.addWarnData(vo);
|
||||
if(num!=null && num>0){
|
||||
return AjaxResult.success("添加成功");
|
||||
}
|
||||
}catch (Exception e){
|
||||
log.error(e.getMessage(),e);
|
||||
}
|
||||
return AjaxResult.error("添加失败,数据长度过长");
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult updateWarnData(SjNewAsyncWarnVo vo) {
|
||||
try{
|
||||
vo.setDataType("1");
|
||||
Integer num= mapper.updateWarnData(vo);
|
||||
if(num!=null && num>0){
|
||||
return AjaxResult.success("修改成功");
|
||||
}
|
||||
}catch (Exception e){
|
||||
log.error(e.getMessage(),e);
|
||||
}
|
||||
return AjaxResult.error("修改失败,数据长度过长");
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult deleteWarnData(SjNewAsyncWarnVo dto) {
|
||||
try{
|
||||
Integer num= mapper.deleteWarnData(dto);
|
||||
if(num!=null && num>0){
|
||||
return AjaxResult.success("删除成功");
|
||||
}
|
||||
}catch (Exception e){
|
||||
log.error(e.getMessage(),e);
|
||||
}
|
||||
return AjaxResult.error("删除失败");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,15 +18,20 @@
|
|||
insert into sj_new_project_quality(
|
||||
team_name,content,test_day,
|
||||
test_result,test_report,create_time,project_id
|
||||
)values (#{teamName},#{content},#{testDay},#{testResult},#{testReport},now(),#{bidCode})
|
||||
)values (#{teamId},#{content},#{testDay},#{testResult},#{testReport},now(),#{bidCode})
|
||||
</insert>
|
||||
<insert id="newUpdateData">
|
||||
update sj_new_project_quality set team_name=#{teamName},content=#{content},
|
||||
test_day=#{testDay},test_result=#{testResult},
|
||||
test_report=#{testReport},
|
||||
project_id=#{bidCode}
|
||||
update sj_new_project_quality set team_name=#{teamId},content=#{content},
|
||||
test_day=#{testDay},test_result=#{testResult},
|
||||
test_report=#{testReport},
|
||||
project_id=#{bidCode}
|
||||
where id=#{id}
|
||||
</insert>
|
||||
<insert id="addWarnData">
|
||||
insert into sj_new_async_warn(
|
||||
tx_time, tx_type, content, data_type, remark, create_time, project_id
|
||||
)values (#{txTime},#{txType},#{content},#{dataType},#{remark},now(),#{bidCode})
|
||||
</insert>
|
||||
<delete id="newDelete">
|
||||
delete from sj_new_project_quality where id=#{id}
|
||||
</delete>
|
||||
|
|
@ -39,9 +44,19 @@
|
|||
comm_one_accept=#{commOneAccept},comm_accept_rate=#{commAcceptRate}
|
||||
where id=#{id}
|
||||
</update>
|
||||
<update id="updateWarnData">
|
||||
update sj_new_async_warn set
|
||||
tx_time=#{txTime}, tx_type=#{txType}, content=#{content}, data_type=#{dataType},
|
||||
remark=#{remark}, create_time=now(), project_id=#{bidCode}
|
||||
where id=#{id}
|
||||
|
||||
</update>
|
||||
<delete id="delete">
|
||||
delete from sj_project_quality where id=#{id}
|
||||
</delete>
|
||||
<delete id="deleteWarnData">
|
||||
delete from sj_new_async_warn where id=#{id}
|
||||
</delete>
|
||||
<!-- -->
|
||||
<select id="getList" resultType="com.securitycontrol.entity.background.vo.SjProjectQualityVo">
|
||||
select id, pro_type proType,
|
||||
|
|
@ -90,18 +105,20 @@
|
|||
select sjq.id,
|
||||
sjq.project_id as bidCode,
|
||||
tp.pro_name proName,
|
||||
sjq.team_name teamName,
|
||||
team.id teamId ,
|
||||
team.team_name,
|
||||
sjq.content as content,
|
||||
sjq.test_day testDay,
|
||||
sjq.test_result testResult,
|
||||
sjq.test_report testReport
|
||||
from sj_new_project_quality sjq
|
||||
left join tb_project tp on sjq.project_id=tp.bid_code
|
||||
LEFT JOIN sj_work_team team on team.id=sjq.team_name
|
||||
<where>
|
||||
<if test="keyWord!=null and keyWord!=''">
|
||||
(sjq.team_name like concat('%',#{keyWord},'%')
|
||||
or sjq.content like concat('%',#{keyWord},'%')
|
||||
or sjq.test_result like concat('%',#{keyWord},'%'))
|
||||
(team.team_name like concat('%',#{keyWord},'%')
|
||||
or sjq.content like concat('%',#{keyWord},'%')
|
||||
or sjq.test_result like concat('%',#{keyWord},'%'))
|
||||
</if>
|
||||
<if test="startDate!=null and startDate!='' and endDate!=null and endDate!=''">
|
||||
and DATE(sjq.test_day) BETWEEN DATE(#{startDate}) and DATE(#{endDate})
|
||||
|
|
@ -109,12 +126,25 @@
|
|||
</where>
|
||||
</select>
|
||||
<select id="getNewDetails" resultType="com.securitycontrol.entity.background.vo.SjProjectMassVo">
|
||||
select id,
|
||||
team_name teamName,
|
||||
content as content,
|
||||
test_day testDay,
|
||||
test_result testResult,
|
||||
test_report testReport
|
||||
from sj_new_project_quality where id=#{id}
|
||||
select sjq.id,
|
||||
sjq.project_id as bidCode,
|
||||
tp.pro_name proName,
|
||||
team.id teamId ,
|
||||
team.team_name,
|
||||
sjq.content as content,
|
||||
sjq.test_day testDay,
|
||||
sjq.test_result testResult,
|
||||
sjq.test_report testReport
|
||||
from sj_new_project_quality sjq
|
||||
left join tb_project tp on sjq.project_id=tp.bid_code
|
||||
LEFT JOIN sj_work_team team on team.id=sjq.team_name
|
||||
where sjq.id=#{id}
|
||||
</select>
|
||||
<select id="getWarnList" resultType="com.securitycontrol.entity.background.vo.SjNewAsyncWarnVo">
|
||||
select warn.id,warn.tx_time txTime,warn.tx_type txType,warn.content content,
|
||||
warn.remark,warn.create_time createTime,warn.project_id bidCode,tp.pro_name proName
|
||||
FROM sj_new_async_warn warn
|
||||
left join tb_project tp on warn.project_id=tp.bid_code
|
||||
where warn.data_type='1'
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@
|
|||
</delete>
|
||||
|
||||
<select id="getList" resultType="com.securitycontrol.entity.background.vo.SjWorkTeamVo">
|
||||
select team.project_id as bidCode, tp.pro_name as proName, team.id as teamId,
|
||||
select team.project_id as bidCode, tp.pro_name as proName, team.id as teamId,team.id id,
|
||||
team.team_name teamName,team.work_type workType,team.team_leader teamLeader,
|
||||
team.leader_phone leaderPhone,IFNULL(people.teamNum,0) as teamNum,
|
||||
IFNULL(duty.dutyNum,0) onDutyNum
|
||||
|
|
|
|||
|
|
@ -0,0 +1,24 @@
|
|||
package com.securitycontrol.screen.controller;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 资源利用率分析预警
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/largeScreen/sjSource/")
|
||||
@Slf4j
|
||||
public class SjNewRourceUtilizationController {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -55,7 +55,7 @@ public class MenuController extends BaseController {
|
|||
@ApiOperation(value = "删除菜单")
|
||||
@PostMapping("delMenu")
|
||||
@Log(title = "系统管理", menu = "系统管理->菜单管理", grade = OperationType.DELETE_SYS, details = "删除菜单", type = "系统日志")
|
||||
public AjaxResult delMenu(MenuDto dto) {
|
||||
public AjaxResult delMenu(@RequestBody MenuDto dto) {
|
||||
return service.delMenu(dto);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -110,6 +110,11 @@ public class MenuServiceImpl implements MenuService {
|
|||
@Transactional(rollbackFor = Exception.class)
|
||||
public AjaxResult addOrUpdateMenu(MenuVo vo) {
|
||||
try {
|
||||
if(vo.getMenuUrl().contains("替换")){
|
||||
String menuUrl=vo.getMenuUrl().replaceAll("替换","../");
|
||||
vo.setMenuUrl(menuUrl);
|
||||
}
|
||||
|
||||
if (!Objects.equals(vo.getMenuType(), Constant.MENU_TYPE)) {
|
||||
if (StringUtils.isBlank(vo.getMenuUrl())) {
|
||||
return AjaxResult.error("菜单地址不能为空");
|
||||
|
|
|
|||
Loading…
Reference in New Issue