Commit f71b1240 authored by KeYong's avatar KeYong

Merge branch 'develop_dl_plan6' into develop_dl_plan6_temp

parents eb9f9b81 5c1aa910
......@@ -66,12 +66,6 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.amosframework.boot</groupId>
<artifactId>amos-boot-module-tzs-api</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
......@@ -3,10 +3,10 @@ package com.yeejoin.equipmanage.controller;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yeejoin.amos.boot.module.tzs.flc.api.feign.IdxFeignService;
import com.yeejoin.equipmanage.common.entity.EquipmentSpecificAlarmLog;
import com.yeejoin.equipmanage.common.entity.MonitorEvent;
import com.yeejoin.equipmanage.common.entity.vo.IdxBizDefectVo;
import com.yeejoin.equipmanage.fegin.IdxFeign;
import com.yeejoin.equipmanage.mapper.EquipmentSpecificAlarmLogMapper;
import com.yeejoin.equipmanage.service.IConfirmAlarmService;
import com.yeejoin.equipmanage.service.impl.MonitorEventService;
......@@ -41,7 +41,7 @@ public class ConfirmAlarmController extends AbstractBaseController {
@Autowired
private MonitorEventService monitorEventService;
@Autowired
private IdxFeignService idxFeignService;
private IdxFeign idxFeign;
@GetMapping(value = "/getDetailsById")
@TycloudOperation(ApiLevel = UserType.AGENCY)
......@@ -120,7 +120,7 @@ public class ConfirmAlarmController extends AbstractBaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "缺陷处理状态")
public IdxBizDefectVo getDefectStatus(@PathVariable String id) {
ResponseModel<JSONObject> responseModel = idxFeignService.queryDefectByAlarmLogId(id);
ResponseModel<JSONObject> responseModel = idxFeign.queryDefectByAlarmLogId(id);
JSONObject result = responseModel.getResult();
IdxBizDefectVo vo = JSON.parseObject(JSON.toJSONString(result), IdxBizDefectVo.class);
return vo;
......
package com.yeejoin.equipmanage.fegin;
import com.alibaba.fastjson.JSONObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
/**
* @author DELL
*/
@FeignClient(name = "${idx.feign.name}", path = "idx", configuration = {FeignConfiguration.class})
public interface IdxFeign {
/***
* <pre>
* @Description: 根据告警id查询缺陷治理情况
* </pre>
*
* @MethodName:
* @Param:
* @Return: null
* @Throws
* @Author keyong
* @Date 2022/9/27 17:46
*/
@RequestMapping(value = "/defect/alarm/{alarmLogId}", method = RequestMethod.GET)
ResponseModel<JSONObject> queryDefectByAlarmLogId(@PathVariable String alarmLogId);
}
......@@ -39,6 +39,7 @@ equipManage.name=AMOS-EQUIPMANAGE
iot.vehicle.track=AMOS-API-IOT
jcs.fegin.name=JCS
video.fegin.name=VIDEO
idx.feign.name=AMOS-IDX
#项目初始化画布id
morphic.projectSeq=1390314016458514433
#wl_equipment_category 表id (取火灾报警系统id)
......
......@@ -3005,11 +3005,11 @@
</preConditions>
<comment>删除不需要的属性字段</comment>
<sql>
ALTER TABLE `wl_equipment_specific_alarm` DROP COLUMN `confirm_type`,
ALTER TABLE `wl_equipment_specific_alarm` DROP COLUMN `alam_reason`,
ALTER TABLE `wl_equipment_specific_alarm` DROP COLUMN `resolve_result`,
ALTER TABLE `wl_equipment_specific_alarm` DROP COLUMN `confirm_user`,
ALTER TABLE `wl_equipment_specific_alarm` DROP COLUMN `confirm_user_name`,
ALTER TABLE `wl_equipment_specific_alarm` DROP COLUMN `confirm_type`;
ALTER TABLE `wl_equipment_specific_alarm` DROP COLUMN `alam_reason`;
ALTER TABLE `wl_equipment_specific_alarm` DROP COLUMN `resolve_result`;
ALTER TABLE `wl_equipment_specific_alarm` DROP COLUMN `confirm_user`;
ALTER TABLE `wl_equipment_specific_alarm` DROP COLUMN `confirm_user_name`;
ALTER TABLE `wl_equipment_specific_alarm` DROP COLUMN `confirm_date`;
</sql>
</changeSet>
......
......@@ -17,7 +17,7 @@ public interface CheckResultMapper extends BaseMapper<CheckResult> {
IPage<CheckResultDto> selectResult(IPage<CheckResultDto> page,String code);
List<CheckResultDto> selectTotal(String modelId, String amosOrgCode);
List<CheckResultDto> selectTotal(String modelId, String batchNo);
Map<String, Object> getTables(String tableName, String amosOrgCode);
......
......@@ -16,9 +16,9 @@ public interface CheckResultService extends IService<CheckResult> {
IPage<CheckResultDto> selectResult(int current,int size,String code);
List<CheckResult> selectCheckResult(String modelId,String amosOrgCode);
List<CheckResult> selectCheckResult(String modelId,String batchNo);
List<CheckResultDto> selectTotal(String modelId, String amosOrgCode);
List<CheckResultDto> selectTotal(String modelId, String batchNo);
List<CheckResultDto> selectStatistion(String batchNo,String amosOrgCode);
......@@ -47,5 +47,4 @@ public interface CheckResultService extends IService<CheckResult> {
*/
Integer selectItemCount(String batchNo);
}
......@@ -8,7 +8,7 @@
<select id="selectTotal" resultType="com.yeejoin.amos.boot.module.tdc.api.dto.CheckResultDto">
SELECT count(1) as total, COUNT(CASE WHEN (check_item_result=1) THEN check_item_result END) AS aaa
FROM tdc_check_result WHERE model_id = #{modelId} and amos_org_code = #{amosOrgCode}
FROM tdc_check_result WHERE model_id = #{modelId} and batch_no = #{batchNo}
</select>
......
......@@ -130,6 +130,7 @@ public class CheckModelAction {
// 所有属性已全部入库,给前端发送消息
HashMap<String, Object> map = new HashMap<>();
map.put("itemCount", itemCount);
map.put("batchNo", batchNo);
String json=JSONObject.toJSONString(map, SerializerFeature.PrettyFormat,
SerializerFeature.WriteMapNullValue);
try {
......
......@@ -52,7 +52,7 @@ public class CheckModelController {
*/
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@GetMapping(value = "/CheckAllModel/{amosOrgCode}")
@ApiOperation(httpMethod = "GET",value = "查询最后一次校验模型", notes = "查询最后一次校验模型")
@ApiOperation(httpMethod = "GET",value = "点击全站校验", notes = "根据机构code校验模型")
public void CheckAllModel(@PathVariable(value = "amosOrgCode") String amosOrgCode) {
checkModelService.checkAllMode(amosOrgCode);
}
......@@ -62,7 +62,7 @@ public class CheckModelController {
*/
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@GetMapping(value = "/checkSingleMode/{modelId}")
@ApiOperation(httpMethod = "GET",value = "查询最后一次校验模型", notes = "查询最后一次校验模型")
@ApiOperation(httpMethod = "GET",value = "点击单独模型校验", notes = "根据modelId校验模型")
public void checkSingleMode(@PathVariable(value = "modelId") String modelId) {
checkModelService.checkSingleMode(modelId);
}
......
......@@ -52,15 +52,15 @@ public class CheckResultController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@GetMapping(value = "/selectCheckResult")
@ApiOperation(httpMethod = "GET",value = "查询最后一次校验模型", notes = "查询最后一次校验模型")
public ResponseModel<List<CheckResult>> selectCheckResult( String modelId, String amosOrgCode) {
return ResponseHelper.buildResponse(checkResultService.selectCheckResult(modelId,amosOrgCode));
public ResponseModel<List<CheckResult>> selectCheckResult(String modelId, String batchNo) {
return ResponseHelper.buildResponse(checkResultService.selectCheckResult(modelId,batchNo));
}
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@GetMapping(value = "/selectTotal")
@ApiOperation(httpMethod = "GET", value = "result", notes = "result")
public ResponseModel<List<CheckResultDto>> selectTotal(String modelId, String amosOrgCode) {
return ResponseHelper.buildResponse(checkResultService.selectTotal(modelId, amosOrgCode));
public ResponseModel<List<CheckResultDto>> selectTotal(String modelId, String batchNo) {
return ResponseHelper.buildResponse(checkResultService.selectTotal(modelId, batchNo));
}
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
......
......@@ -70,17 +70,17 @@ public class CheckResultImpl extends ServiceImpl<CheckResultMapper, CheckResult>
}
@Override
public List<CheckResult> selectCheckResult(String modelId,String amosOrgCode) {
public List<CheckResult> selectCheckResult(String modelId,String batchNo) {
LambdaQueryWrapper<CheckResult> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(CheckResult::getCheckItemResult, "1")
.eq(CheckResult::getAmosOrgCode, amosOrgCode)
.eq(CheckResult::getBatchNo, batchNo)
.eq(CheckResult::getModelId, modelId);
return baseMapper.selectList(wrapper);
}
@Override
public List<CheckResultDto> selectTotal(String modelId, String amosOrgCode) {
return checkResultMapper.selectTotal(modelId, amosOrgCode);
public List<CheckResultDto> selectTotal(String modelId, String batchNo) {
return checkResultMapper.selectTotal(modelId, batchNo);
}
@Override
......
......@@ -42,4 +42,4 @@ spring.redis.lettuce.pool.min-idle=0
redis.cache.failure.time=10800
#校验完成发送消息
mqtt.topic.check.complete=tdc/check/complete
mqtt.topic.check.complete=/tdc/check/complete
......@@ -26,18 +26,4 @@ public interface IdxFeignService {
@RequestMapping(value = "/table/{tableId}", method = RequestMethod.GET)
ResponseModel<JSONObject> queryByTableId(@PathVariable String tableId);
/***
* <pre>
* @Description: 根据告警id查询缺陷治理情况
* </pre>
*
* @MethodName:
* @Param:
* @Return: null
* @Throws
* @Author keyong
* @Date 2022/9/27 17:46
*/
@RequestMapping(value = "/defect/alarm/{alarmLogId}", method = RequestMethod.GET)
ResponseModel<JSONObject> queryDefectByAlarmLogId(@PathVariable String alarmLogId);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment