Browse Source

监督端预警添加月季年,企业类型筛选

v2
zouyx 2 years ago
parent
commit
851f21072d
  1. 3
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/information/edit.html
  2. 2
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/information/information.html
  3. 11
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/ruleItemList/add.html
  4. 20
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/ruleItemList/edit.html
  5. 20
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/ruleItemList/ruleItemList.html
  6. 6
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnterpriseInformationController.java
  7. 13
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/RuleItemList.java
  8. 2
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnterpriseInformationMapper.xml
  9. 6
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/RuleItemListMapper.xml

3
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/information/edit.html

@ -23,8 +23,9 @@
<div class="form-group">
<label class="col-sm-3 control-label">企业类型:</label>
<div class="col-sm-8">
<select name="enterpriseType" class="form-control m-b">
<select name="companyOrgType" class="form-control m-b" th:with="type=${@dict.getType('enterpriseType')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{companyOrgType}"></option>
</select>
</div>
</div>

2
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/information/information.html

@ -20,7 +20,7 @@
</li>
<li>
<p>企业类型:</p>
<select name="enterpriseType" th:with="type=${@dict.getType('enterpriseType')}">
<select name="companyOrgType" th:with="type=${@dict.getType('enterpriseType')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>

11
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/ruleItemList/add.html

@ -12,7 +12,16 @@
<div class="col-sm-8">
<input name="cycleTime" class="form-control" type="text">
</div>
<label>月</label>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<select name="timeType" class="form-control m-b" id="timeType">
<option value="month">月</option>
<option value="quarter">季</option>
<option value="year">年</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">告警次数:</label>

20
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/ruleItemList/edit.html

@ -12,7 +12,16 @@
<div class="col-sm-8">
<input name="cycleTime" th:field="*{cycleTime}" class="form-control" type="text">
</div>
<label>月</label>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<select name="timeType" class="form-control m-b" id="timeType" th:field="*{timeType}">
<option value="month">月</option>
<option value="quarter">季</option>
<option value="year">年</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">告警次数:</label>
@ -25,7 +34,7 @@
<div class="col-sm-8">
<select name="alarmType" class="form-control m-b" th:with="type=${@dict.getType('warnLevel')}" id="alarmType" onclick="colorChange()">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{alarmType}"></option>
</select>
</div>
<label id="firstColor" style="color: red;margin-top: 10px;">红色</label>
@ -35,7 +44,7 @@
<div class="form-group">
<label class="col-sm-3 control-label">状态:</label>
<div class="col-sm-8">
<select name="status" class="form-control m-b">
<select name="status" class="form-control m-b" th:field="*{status}">
<option value="0">启用</option>
<option value="1">禁用</option>
</select>
@ -47,9 +56,10 @@
<script type="text/javascript">
var prefix = ctx + "code/ruleItemList";
window.onload = function () {
$("#firstColor").hide();
/*$("#firstColor").hide();
$("#secondColor").hide();
$("#thirdColor").hide();
$("#thirdColor").hide();*/
colorChange();
}
$("#form-list-edit").validate({
focusCleanup: true

20
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/ruleItemList/ruleItemList.html

@ -12,7 +12,13 @@
<ul>
<li>
<p>周期:</p>
<input type="text" name="cycleTime"/>
<input type="text" name="cycleTime" style="width: 80px;"/>
<select name="timeType">
<option value="">所有</option>
<option value="month">月</option>
<option value="quarter">季</option>
<option value="year">年</option>
</select>
</li>
<li>
<p>告警次数:</p>
@ -88,7 +94,17 @@
},
{
field : 'cycleTime',
title : '周期(月)'
title : '周期',
formatter:function (value,row,index){
console.log(row)
if(row.timeType=="year"){
return '<span>'+value+'年</span>'
}else if(row.timeType=="quarter"){
return '<span>'+value+'季</span>'
}else{
return '<span>'+value+'月</span>'
}
}
},
{
field : 'existAlarm',

6
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnterpriseInformationController.java

@ -5,6 +5,7 @@ import java.util.List;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.StrUtil;
import com.zdxt.auth.project.system.dict.mapper.DictDataMapper;
import com.zdxt.code.domain.QrCodeGenerateHistory;
import com.zdxt.code.service.IQrCodeGenerateHistoryService;
import com.zdxt.code.utils.PasswordTools;
@ -37,6 +38,8 @@ public class EnterpriseInformationController extends BaseController
@Autowired
private IQrCodeGenerateHistoryService iQrCodeGenerateHistoryService;
@Autowired
private DictDataMapper dictDataMapper;
@RequiresPermissions("code:information:view")
@GetMapping()
@ -55,6 +58,9 @@ public class EnterpriseInformationController extends BaseController
@ResponseBody
public TableDataInfo list(EnterpriseInformation enterpriseInformation)
{
if(StrUtil.isNotEmpty(enterpriseInformation.getEnterpriseType())){
enterpriseInformation.setCompanyOrgType(dictDataMapper.selectDictLabel("enterpriseType",enterpriseInformation.getCompanyOrgType()));
}
startPage();
List<EnterpriseInformation> list = enterpriseInformationService.selectEnterpriseInformationList(enterpriseInformation);
return getDataTable(list);

13
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/RuleItemList.java

@ -20,8 +20,9 @@ public class RuleItemList extends BaseDomain
/** 关联主表ID */
private String ruleId;
/** 周期内,多少个月内 */
/** 周期 */
private Long cycleTime;
private String timeType;
/** 告警次数 */
private Long existAlarm;
@ -98,12 +99,22 @@ public class RuleItemList extends BaseDomain
return status;
}
public String getTimeType() {
return timeType;
}
public void setTimeType(String timeType) {
this.timeType = timeType;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("ruleId", getRuleId())
.append("cycleTime", getCycleTime())
.append("timeType", getTimeType())
.append("existAlarm", getExistAlarm())
.append("alarmType", getAlarmType())
.append("status", getStatus())

2
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnterpriseInformationMapper.xml

@ -38,7 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="enterpriseName != null and enterpriseName != ''"> and enterprise_name like concat('%', #{enterpriseName}, '%')</if>
<if test="enterpriseNumber != null and enterpriseNumber != ''"> and enterprise_number like concat('%', #{enterpriseNumber}, '%')</if>
<if test="enterpriseType != null and enterpriseType != ''"> and enterprise_type = #{enterpriseType}</if>
<if test="companyOrgType != null and companyOrgType != ''"> and company_org_type = #{companyOrgType}</if>
<if test="companyOrgType != null and companyOrgType != ''"> and company_org_type like concat('%', #{companyOrgType}, '%')</if>
<if test="enterpriseAddress != null and enterpriseAddress != ''"> and enterprise_address like concat('%', #{enterpriseAddress}, '%')</if>
<if test="legalPerson != null and legalPerson != ''"> and legal_person = #{legalPerson}</if>
<if test="registeredCapital != null and registeredCapital != ''"> and registered_capital = #{registeredCapital}</if>

6
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/RuleItemListMapper.xml

@ -15,7 +15,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectRuleItemListVo">
select id, rule_id, cycle_time, exist_alarm, exist_alarm_end, alarm_type, status from rule_item_list
select id, rule_id, cycle_time,time_type, exist_alarm, exist_alarm_end, alarm_type, status from rule_item_list
</sql>
<select id="selectRuleItemListList" parameterType="RuleItemList" resultMap="RuleItemListResult">
@ -23,6 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where>
<if test="ruleId != null and ruleId != ''"> and rule_id = #{ruleId}</if>
<if test="cycleTime != null "> and cycle_time = #{cycleTime}</if>
<if test="timeType != null and timeType != ''"> and time_type = #{timeType}</if>
<if test="existAlarm != null "> and exist_alarm = #{existAlarm}</if>
<if test="alarmType != null and alarmType != ''"> and alarm_type = #{alarmType}</if>
<if test="status != null "> and status = #{status}</if>
@ -41,6 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="id != null and id != ''">id,</if>
<if test="ruleId != null and ruleId != ''">rule_id,</if>
<if test="cycleTime != null ">cycle_time,</if>
<if test="timeType != null and timeType != ''">time_type,</if>
<if test="existAlarm != null ">exist_alarm,</if>
<if test="alarmType != null and alarmType != ''">alarm_type,</if>
<if test="status != null ">status,</if>
@ -49,6 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="id != null and id != ''">#{id},</if>
<if test="ruleId != null and ruleId != ''">#{ruleId},</if>
<if test="cycleTime != null ">#{cycleTime},</if>
<if test="timeType != null and timeType != ''">#{timeType},</if>
<if test="existAlarm != null ">#{existAlarm},</if>
<if test="alarmType != null and alarmType != ''">#{alarmType},</if>
<if test="status != null ">#{status},</if>
@ -60,6 +63,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="SET" suffixOverrides=",">
<if test="ruleId != null and ruleId != ''">rule_id = #{ruleId},</if>
<if test="cycleTime != null ">cycle_time = #{cycleTime},</if>
<if test="timeType != null and timeType != ''">time_type = #{timeType},</if>
<if test="existAlarm != null ">exist_alarm = #{existAlarm},</if>
<if test="alarmType != null and alarmType != ''">alarm_type = #{alarmType},</if>
<if test="status != null ">status = #{status},</if>

Loading…
Cancel
Save