Browse Source

事件确认增加激光换疲劳设备操控

预案管理页面增加条件查询和降序
develop
Mr.Wang 11 months ago
parent
commit
3221e00389
  1. 29
      zc-business/src/main/java/com/zc/business/service/impl/DcEmergencyPlansServiceImpl.java
  2. 6
      zc-business/src/main/resources/mapper/business/DcEmergencyPlansMapper.xml

29
zc-business/src/main/java/com/zc/business/service/impl/DcEmergencyPlansServiceImpl.java

@ -597,13 +597,11 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService {
if (controlModel.equals("1")) {
props.put("mode", "00");
} else if (controlModel.equals("2")) {
Date date = new Date();
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
String format = dateFormat.format(date);
String[] times = otherConfig.get("time").toString().split("-");
String startTime = otherConfig.get("startTime").toString();
String endTime = otherConfig.get("endTime").toString();
props.put("mode", "01");
props.put("startDisplayTime", format + " " + times[0]);
props.put("endDisplayTime", format + " " + times[1]);
props.put("startDisplayTime", startTime);
props.put("endDisplayTime", endTime);
} else {
props.put("mode", "02");
}
@ -704,7 +702,24 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService {
result.put("result", returnResult);
resultArray.add(result);
}
else {
else if (device.getDeviceType().equals(DeviceTypeConstants.LASER_FATIGUE_AWAKENING)) {
// 激光疲劳唤醒
functionId = otherConfig.get("state").toString();
AjaxResult ajaxResultState = dcDeviceController.invokedFunction(iotDeviceId, functionId, new HashMap<>());
// 将调用结果存入到 resultArray(操作结果) 中
JSONObject result = new JSONObject();
result.put("device", device.getId());
result.put("result", ajaxResultState);
resultArray.add(result);
// 操作时长
String operationDuration = "SETTM" + otherConfig.get("operationDuration").toString();
AjaxResult ajaxResult = dcDeviceController.invokedFunction(iotDeviceId, operationDuration, new HashMap<>());
JSONObject resultTime = new JSONObject();
resultTime.put("device", device.getId());
resultTime.put("result", ajaxResult);
resultArray.add(resultTime);
} else {
break;
}

6
zc-business/src/main/resources/mapper/business/DcEmergencyPlansMapper.xml

@ -118,6 +118,12 @@
t1.control_command,
t1.event_category
from dc_emergency_plans t1
<where>
<if test="planName != null and planName != ''"> and plan_name like concat('%', #{planName}, '%')</if>
<if test="eventType != 0 "> and event_type = #{eventType}</if>
<if test="eventCategory != 0"> and event_category = #{eventCategory}</if>
</where>
order by t1.id desc
</select>
<select id="selectDcEmergencyPlans" parameterType="Integer" resultMap="DcEmergencyPlansResult">

Loading…
Cancel
Save