4ea5969d 张雷

危险作业人流程修改

1 个父辈 aea41295
......@@ -16,12 +16,13 @@ import com.skua.modules.alarmtmp.vo.AlarmCustomRuleConfigVO;
*/
public interface AlarmCustomRuleConfigMapper extends BaseMapper<AlarmCustomRuleConfig> {
@Select("SELECT\r\n" +
" a.*, b.alarm_rule_level_name,c.alarm_template_name,d.alarm_index_show_tag \r\n" +
"FROM\r\n" +
" alarm_custom_rule_config a\r\n" +
@Select("SELECT " +
" a.*, b.alarm_rule_level_name,c.alarm_template_name,d.alarm_index_show_tag " +
"FROM " +
" alarm_custom_rule_config a\r\n" +
"LEFT JOIN alarm_rule_level_config b ON a.id = b.alarm_rule_id " +
"LEFT JOIN alarm_rule_level_config_template c ON (b.alarm_rule_level_name = c.alarm_template_level_name and b.sort=c.sort and b.template_type = c.alarm_template_type) " +
"LEFT JOIN alarm_rule_level_config_template c ON (b.alarm_rule_level_name = c.alarm_template_level_name " +
" and b.sort=c.sort and b.template_type = c.alarm_template_type and b.depart_id = c.depart_id) " +
"LEFT JOIN alarm_custom_rule_repository d ON a.alarm_rule_repository_id = d.id " +
"${ew.customSqlSegment}")
IPage<AlarmCustomRuleConfigVO> getPage(Page<AlarmCustomRuleConfigVO> page,@Param(Constants.WRAPPER)QueryWrapper<AlarmCustomRuleConfigVO> queryWrapper);
......
......@@ -34,8 +34,8 @@ public class AlarmCustomRuleConfigServiceImpl extends ServiceImpl<AlarmCustomRul
@Autowired
private IAlarmRuleLevelConfigTemplateService alarmRuleLevelConfigTemplateService;
@Autowired
private AlarmRuleLevelConfigService alarmRuleLevelConfigService;
private AlarmRuleLevelConfigService alarmRuleLevelConfigService;
@Override
public boolean save(AlarmCustomRuleConfigVO alarmCustomRuleConfigVO) {
AlarmCustomRuleConfig alarmCustomRuleConfig = new AlarmCustomRuleConfig();
......@@ -97,11 +97,13 @@ public class AlarmCustomRuleConfigServiceImpl extends ServiceImpl<AlarmCustomRul
String destLevelName = tempAlarmRuleLevelConfig.getAlarmRuleLevelName();//报警级别名称
int destLevelSort = tempAlarmRuleLevelConfig.getSort();//报警级别排序
String templateType = tempAlarmRuleLevelConfig.getTemplateType();//报警模板类型
String departId = tempAlarmRuleLevelConfig.getDepartId();//所属厂区
//通过报警级别名称+报警级别排序,确定报警模板
QueryWrapper<AlarmRuleLevelConfigTemplate> alarmRuleLevelConfigTemplateQueryWrapper = new QueryWrapper<AlarmRuleLevelConfigTemplate>();
alarmRuleLevelConfigTemplateQueryWrapper.eq("alarm_template_level_name", destLevelName);
alarmRuleLevelConfigTemplateQueryWrapper.eq("alarm_template_type", templateType);
alarmRuleLevelConfigTemplateQueryWrapper.eq("sort", destLevelSort);
alarmRuleLevelConfigTemplateQueryWrapper.eq("depart_id", departId);
AlarmRuleLevelConfigTemplate alarmRuleLevelConfigTemplate = alarmRuleLevelConfigTemplateService.getOne(alarmRuleLevelConfigTemplateQueryWrapper);
if(alarmRuleLevelConfigTemplate!=null&&!alarmRuleLevelConfigTemplate.getAlarmTemplateName().equals(alarmTemplateName)) {
if(StringUtils.isNotBlank(alarmCustomRuleConfigVO.getId())) {
......@@ -120,6 +122,7 @@ public class AlarmCustomRuleConfigServiceImpl extends ServiceImpl<AlarmCustomRul
AlarmRuleLevelConfigTemplate template = alarmRuleLevelConfigTemplateList.get(0);
//构造报警级别对象集合
AlarmRuleLevelConfig alarmRuleLevelConfig = new AlarmRuleLevelConfig();
alarmRuleLevelConfig.setDepartId(template.getDepartId());
alarmRuleLevelConfig.setAlarmRuleId(id);
alarmRuleLevelConfig.setAlarmRuleLevelName(template.getAlarmTemplateLevelName());
alarmRuleLevelConfig.setIsSendSms(template.getIsSendSms());
......@@ -147,6 +150,7 @@ public class AlarmCustomRuleConfigServiceImpl extends ServiceImpl<AlarmCustomRul
AlarmRuleLevelConfigTemplate template = alarmRuleLevelConfigTemplateList.get(0);
//构造报警级别对象集合
AlarmRuleLevelConfig alarmRuleLevelConfig = new AlarmRuleLevelConfig();
alarmRuleLevelConfig.setDepartId(template.getDepartId());
alarmRuleLevelConfig.setAlarmRuleId(id);
alarmRuleLevelConfig.setAlarmRuleLevelName(template.getAlarmTemplateLevelName());
alarmRuleLevelConfig.setIsSendSms(template.getIsSendSms());
......@@ -165,7 +169,7 @@ public class AlarmCustomRuleConfigServiceImpl extends ServiceImpl<AlarmCustomRul
} catch (Exception e) {
e.printStackTrace();
return false;
}
}
return true;
}
@Override
......
......@@ -96,6 +96,9 @@ public class AlarmCustomRuleConfigController {
if(StringUtils.isNotEmpty(alarmCustomRuleConfigVO.getAlarmRuleName())) {
queryWrapper.eq("a.alarm_rule_name", alarmCustomRuleConfigVO.getAlarmRuleName());
}
if(StringUtils.isNotEmpty(alarmCustomRuleConfigVO.getDepartId())) {
queryWrapper.eq("a.depart_id", alarmCustomRuleConfigVO.getDepartId());
}
IPage<AlarmCustomRuleConfigVO> pageList = alarmCustomRuleConfigService.getPage(page, queryWrapper);
result.setSuccess(true);
result.setResult(pageList);
......
......@@ -225,7 +225,7 @@ public class DangerousOperationController {
return Result.ok("删除成功!");
}
//
//指派作业任务给某人
@PostMapping(value = "/complete-task-choose-user-pass")
public Result<?> completeTaskChooseUserPass(@RequestBody DangerousOperation dangerousOperation) throws Exception {
Result<?> result = new Result();
......@@ -237,7 +237,7 @@ public class DangerousOperationController {
Map<String, Object> mapVariable = new HashMap<String,Object>();
mapVariable.put("dangerDeal", "taskUser_"+dangerousOperation.getOperationUser());
flowService.configureVariables(executionId, mapVariable);
//动态设置流程接
//动态设置流程接
flowBusinessService.completeTask(ProcessConstant.PASS_KEY, dangerousOperation.getFlow());
result.success("成功");
return result;
......
package com.skua.modules.emergency.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.skua.core.api.vo.Result;
import com.skua.core.aspect.annotation.AutoLog;
import com.skua.modules.emergency.entity.EmergencyRiskEvent;
import com.skua.modules.emergency.service.IEmergencyRiskEventService;
import com.skua.modules.emergency.vo.DangerDatabaseResult;
import com.skua.modules.emergency.vo.MapDatabaseResult;
......
......@@ -32,6 +32,7 @@ public class DangerousOperation extends FlowEntity {
/**作业类型*/
@Excel(name = "作业类型", width = 15)
@ApiModelProperty(value = "作业类型")
@Dict(dicCode = "dangerous_work_type")
private String operationType;
/**作业名称*/
@Excel(name = "作业名称", width = 15)
......@@ -44,6 +45,7 @@ public class DangerousOperation extends FlowEntity {
/**作业地点(构筑物)*/
@Excel(name = "作业地点(构筑物)", width = 15)
@ApiModelProperty(value = "作业地点(构筑物)")
@Dict(dictTable = "sys_struct_dict", dicCode="id", dicText = "struct_name")
private String operationLocation;
/**申请时间*/
@Excel(name = "申请时间", width = 15)
......@@ -64,6 +66,7 @@ public class DangerousOperation extends FlowEntity {
/**作业人员类型*/
@Excel(name = "作业人员类型", width = 15)
@ApiModelProperty(value = "作业人员类型")
@Dict(dicCode = "operationUser_type")
private String operationUserType;
/**作业人员*/
@Excel(name = "作业人员", width = 15)
......@@ -89,6 +92,7 @@ public class DangerousOperation extends FlowEntity {
/**作业状态*/
@Excel(name = "作业状态", width = 15)
@ApiModelProperty(value = "作业状态")
@Dict(dicCode = "operation_status")
private String operationStatus;
/**所属厂站*/
@Excel(name = "所属厂站", width = 15)
......
......@@ -5,18 +5,25 @@
<select id="getRiskList" resultType="com.skua.modules.emergency.vo.RiskDatabaseResult">
SELECT
d.id AS depart_id,
0 AS fxk_count,
0 AS yhpc_num,
0 AS yhpcsj_num
d.depart_name AS depart_name,
ifnull( dl.fxk_count, 0 ) AS fxk_count,
ifnull( di.yhpc_count, 0 ) AS yhpc_count,
ifnull( aq.aqyh_count, 0 ) AS aqyh_count
FROM
sys_depart d
LEFT JOIN ( SELECT depart_id, count( id ) fxk_count FROM danger_level_manage WHERE create_time LIKE CONCAT(#{year},'%') GROUP BY depart_id ) dl ON dl.depart_id = d.id
LEFT JOIN ( SELECT depart_id, count( id ) yhpc_count FROM danger_inspection_record WHERE create_time LIKE CONCAT(#{year},'%') GROUP BY depart_id ) di ON di.depart_id = d.id
LEFT JOIN ( SELECT depart_id, count( id ) aqyh_count FROM ajh_rectification_info WHERE create_time LIKE CONCAT(#{year},'%') GROUP BY depart_id ) aq ON aq.depart_id = d.id
WHERE
d.depart_type = 1
ORDER BY
dl.fxk_count DESC
</select>
<select id="getDangerList" resultType="com.skua.modules.emergency.vo.DangerDatabaseResult">
SELECT
d.id AS depart_id,
d.depart_name AS depart_name,
NULL AS danger_date,
NULL AS danger_location,
NULL AS is_fault
......@@ -29,6 +36,7 @@
<select id="getMapData" resultType="com.skua.modules.emergency.vo.MapDatabaseResult">
SELECT
d.id AS depart_id,
d.depart_name AS depart_name,
f.pro_longitude AS longitude,
f.pro_latitude AS latitude
FROM
......
......@@ -13,6 +13,9 @@ public class DangerDatabaseResult {
/**厂站ID*/
@ApiModelProperty(value = "厂站ID")
private String departId;
/**厂站名称*/
@ApiModelProperty(value = "厂站名称")
private String departName;
/**最近风险时间*/
@ApiModelProperty(value = "最近风险时间")
private String dangerDate;
......
......@@ -16,6 +16,9 @@ public class MapDatabaseResult {
/**厂站ID*/
@ApiModelProperty(value = "厂站ID")
private String departId;
/**厂站名称*/
@ApiModelProperty(value = "厂站名称")
private String departName;
/**经度*/
@ApiModelProperty(value = "经度")
private String longitude;
......
......@@ -13,14 +13,17 @@ public class RiskDatabaseResult {
/**厂站ID*/
@ApiModelProperty(value = "厂站ID")
private String departId;
/**厂站名称*/
@ApiModelProperty(value = "厂站名称")
private String departName;
/**风险库数量*/
@ApiModelProperty(value = "风险库数量")
private Integer fxkCount;
/**隐患排查数量*/
@ApiModelProperty(value = "隐患排查数量")
private Integer yhpcNum;
private Integer yhpcCount;
/**隐患排查事件数量*/
@ApiModelProperty(value = "隐患排查事件数量")
private Integer yhpcsjNum;
private Integer aqyhCount;
}
......
......@@ -120,7 +120,8 @@ public class ShiroConfig {
filterChainDefinitionMap.put("/example/**","anon");
//基础配置接口过滤
filterChainDefinitionMap.put("/system/sysBaseConfig/getSysBaseConfig","anon");
//安全环保地图
filterChainDefinitionMap.put("/safetyEnviron/map/**","anon");
// 统计查询
filterChainDefinitionMap.put("/statisticsQuery/**","anon");
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!