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 @@ ...@@ -66,12 +66,6 @@
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
<dependency>
<groupId>com.amosframework.boot</groupId>
<artifactId>amos-boot-module-tzs-api</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
</dependencies> </dependencies>
</project> </project>
...@@ -3,10 +3,10 @@ package com.yeejoin.equipmanage.controller; ...@@ -3,10 +3,10 @@ package com.yeejoin.equipmanage.controller;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; 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.EquipmentSpecificAlarmLog;
import com.yeejoin.equipmanage.common.entity.MonitorEvent; import com.yeejoin.equipmanage.common.entity.MonitorEvent;
import com.yeejoin.equipmanage.common.entity.vo.IdxBizDefectVo; import com.yeejoin.equipmanage.common.entity.vo.IdxBizDefectVo;
import com.yeejoin.equipmanage.fegin.IdxFeign;
import com.yeejoin.equipmanage.mapper.EquipmentSpecificAlarmLogMapper; import com.yeejoin.equipmanage.mapper.EquipmentSpecificAlarmLogMapper;
import com.yeejoin.equipmanage.service.IConfirmAlarmService; import com.yeejoin.equipmanage.service.IConfirmAlarmService;
import com.yeejoin.equipmanage.service.impl.MonitorEventService; import com.yeejoin.equipmanage.service.impl.MonitorEventService;
...@@ -41,7 +41,7 @@ public class ConfirmAlarmController extends AbstractBaseController { ...@@ -41,7 +41,7 @@ public class ConfirmAlarmController extends AbstractBaseController {
@Autowired @Autowired
private MonitorEventService monitorEventService; private MonitorEventService monitorEventService;
@Autowired @Autowired
private IdxFeignService idxFeignService; private IdxFeign idxFeign;
@GetMapping(value = "/getDetailsById") @GetMapping(value = "/getDetailsById")
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
...@@ -120,7 +120,7 @@ public class ConfirmAlarmController extends AbstractBaseController { ...@@ -120,7 +120,7 @@ public class ConfirmAlarmController extends AbstractBaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "缺陷处理状态") @ApiOperation(value = "缺陷处理状态")
public IdxBizDefectVo getDefectStatus(@PathVariable String id) { public IdxBizDefectVo getDefectStatus(@PathVariable String id) {
ResponseModel<JSONObject> responseModel = idxFeignService.queryDefectByAlarmLogId(id); ResponseModel<JSONObject> responseModel = idxFeign.queryDefectByAlarmLogId(id);
JSONObject result = responseModel.getResult(); JSONObject result = responseModel.getResult();
IdxBizDefectVo vo = JSON.parseObject(JSON.toJSONString(result), IdxBizDefectVo.class); IdxBizDefectVo vo = JSON.parseObject(JSON.toJSONString(result), IdxBizDefectVo.class);
return vo; 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 ...@@ -39,6 +39,7 @@ equipManage.name=AMOS-EQUIPMANAGE
iot.vehicle.track=AMOS-API-IOT iot.vehicle.track=AMOS-API-IOT
jcs.fegin.name=JCS jcs.fegin.name=JCS
video.fegin.name=VIDEO video.fegin.name=VIDEO
idx.feign.name=AMOS-IDX
#项目初始化画布id #项目初始化画布id
morphic.projectSeq=1390314016458514433 morphic.projectSeq=1390314016458514433
#wl_equipment_category 表id (取火灾报警系统id) #wl_equipment_category 表id (取火灾报警系统id)
......
...@@ -3005,11 +3005,11 @@ ...@@ -3005,11 +3005,11 @@
</preConditions> </preConditions>
<comment>删除不需要的属性字段</comment> <comment>删除不需要的属性字段</comment>
<sql> <sql>
ALTER TABLE `wl_equipment_specific_alarm` DROP COLUMN `confirm_type`, 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 `alam_reason`;
ALTER TABLE `wl_equipment_specific_alarm` DROP COLUMN `resolve_result`, 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`;
ALTER TABLE `wl_equipment_specific_alarm` DROP COLUMN `confirm_user_name`, ALTER TABLE `wl_equipment_specific_alarm` DROP COLUMN `confirm_user_name`;
ALTER TABLE `wl_equipment_specific_alarm` DROP COLUMN `confirm_date`; ALTER TABLE `wl_equipment_specific_alarm` DROP COLUMN `confirm_date`;
</sql> </sql>
</changeSet> </changeSet>
......
...@@ -17,7 +17,7 @@ public interface CheckResultMapper extends BaseMapper<CheckResult> { ...@@ -17,7 +17,7 @@ public interface CheckResultMapper extends BaseMapper<CheckResult> {
IPage<CheckResultDto> selectResult(IPage<CheckResultDto> page,String code); 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); Map<String, Object> getTables(String tableName, String amosOrgCode);
......
...@@ -16,9 +16,9 @@ public interface CheckResultService extends IService<CheckResult> { ...@@ -16,9 +16,9 @@ public interface CheckResultService extends IService<CheckResult> {
IPage<CheckResultDto> selectResult(int current,int size,String code); 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); List<CheckResultDto> selectStatistion(String batchNo,String amosOrgCode);
...@@ -47,5 +47,4 @@ public interface CheckResultService extends IService<CheckResult> { ...@@ -47,5 +47,4 @@ public interface CheckResultService extends IService<CheckResult> {
*/ */
Integer selectItemCount(String batchNo); Integer selectItemCount(String batchNo);
} }
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<select id="selectTotal" resultType="com.yeejoin.amos.boot.module.tdc.api.dto.CheckResultDto"> <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 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> </select>
......
...@@ -130,6 +130,7 @@ public class CheckModelAction { ...@@ -130,6 +130,7 @@ public class CheckModelAction {
// 所有属性已全部入库,给前端发送消息 // 所有属性已全部入库,给前端发送消息
HashMap<String, Object> map = new HashMap<>(); HashMap<String, Object> map = new HashMap<>();
map.put("itemCount", itemCount); map.put("itemCount", itemCount);
map.put("batchNo", batchNo);
String json=JSONObject.toJSONString(map, SerializerFeature.PrettyFormat, String json=JSONObject.toJSONString(map, SerializerFeature.PrettyFormat,
SerializerFeature.WriteMapNullValue); SerializerFeature.WriteMapNullValue);
try { try {
......
...@@ -52,7 +52,7 @@ public class CheckModelController { ...@@ -52,7 +52,7 @@ public class CheckModelController {
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false) @TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@GetMapping(value = "/CheckAllModel/{amosOrgCode}") @GetMapping(value = "/CheckAllModel/{amosOrgCode}")
@ApiOperation(httpMethod = "GET",value = "查询最后一次校验模型", notes = "查询最后一次校验模型") @ApiOperation(httpMethod = "GET",value = "点击全站校验", notes = "根据机构code校验模型")
public void CheckAllModel(@PathVariable(value = "amosOrgCode") String amosOrgCode) { public void CheckAllModel(@PathVariable(value = "amosOrgCode") String amosOrgCode) {
checkModelService.checkAllMode(amosOrgCode); checkModelService.checkAllMode(amosOrgCode);
} }
...@@ -62,7 +62,7 @@ public class CheckModelController { ...@@ -62,7 +62,7 @@ public class CheckModelController {
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false) @TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@GetMapping(value = "/checkSingleMode/{modelId}") @GetMapping(value = "/checkSingleMode/{modelId}")
@ApiOperation(httpMethod = "GET",value = "查询最后一次校验模型", notes = "查询最后一次校验模型") @ApiOperation(httpMethod = "GET",value = "点击单独模型校验", notes = "根据modelId校验模型")
public void checkSingleMode(@PathVariable(value = "modelId") String modelId) { public void checkSingleMode(@PathVariable(value = "modelId") String modelId) {
checkModelService.checkSingleMode(modelId); checkModelService.checkSingleMode(modelId);
} }
......
...@@ -52,15 +52,15 @@ public class CheckResultController extends BaseController { ...@@ -52,15 +52,15 @@ public class CheckResultController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false) @TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@GetMapping(value = "/selectCheckResult") @GetMapping(value = "/selectCheckResult")
@ApiOperation(httpMethod = "GET",value = "查询最后一次校验模型", notes = "查询最后一次校验模型") @ApiOperation(httpMethod = "GET",value = "查询最后一次校验模型", notes = "查询最后一次校验模型")
public ResponseModel<List<CheckResult>> selectCheckResult( String modelId, String amosOrgCode) { public ResponseModel<List<CheckResult>> selectCheckResult(String modelId, String batchNo) {
return ResponseHelper.buildResponse(checkResultService.selectCheckResult(modelId,amosOrgCode)); return ResponseHelper.buildResponse(checkResultService.selectCheckResult(modelId,batchNo));
} }
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false) @TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@GetMapping(value = "/selectTotal") @GetMapping(value = "/selectTotal")
@ApiOperation(httpMethod = "GET", value = "result", notes = "result") @ApiOperation(httpMethod = "GET", value = "result", notes = "result")
public ResponseModel<List<CheckResultDto>> selectTotal(String modelId, String amosOrgCode) { public ResponseModel<List<CheckResultDto>> selectTotal(String modelId, String batchNo) {
return ResponseHelper.buildResponse(checkResultService.selectTotal(modelId, amosOrgCode)); return ResponseHelper.buildResponse(checkResultService.selectTotal(modelId, batchNo));
} }
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false) @TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
......
...@@ -70,17 +70,17 @@ public class CheckResultImpl extends ServiceImpl<CheckResultMapper, CheckResult> ...@@ -70,17 +70,17 @@ public class CheckResultImpl extends ServiceImpl<CheckResultMapper, CheckResult>
} }
@Override @Override
public List<CheckResult> selectCheckResult(String modelId,String amosOrgCode) { public List<CheckResult> selectCheckResult(String modelId,String batchNo) {
LambdaQueryWrapper<CheckResult> wrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<CheckResult> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(CheckResult::getCheckItemResult, "1") wrapper.eq(CheckResult::getCheckItemResult, "1")
.eq(CheckResult::getAmosOrgCode, amosOrgCode) .eq(CheckResult::getBatchNo, batchNo)
.eq(CheckResult::getModelId, modelId); .eq(CheckResult::getModelId, modelId);
return baseMapper.selectList(wrapper); return baseMapper.selectList(wrapper);
} }
@Override @Override
public List<CheckResultDto> selectTotal(String modelId, String amosOrgCode) { public List<CheckResultDto> selectTotal(String modelId, String batchNo) {
return checkResultMapper.selectTotal(modelId, amosOrgCode); return checkResultMapper.selectTotal(modelId, batchNo);
} }
@Override @Override
......
...@@ -42,4 +42,4 @@ spring.redis.lettuce.pool.min-idle=0 ...@@ -42,4 +42,4 @@ spring.redis.lettuce.pool.min-idle=0
redis.cache.failure.time=10800 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 { ...@@ -26,18 +26,4 @@ public interface IdxFeignService {
@RequestMapping(value = "/table/{tableId}", method = RequestMethod.GET) @RequestMapping(value = "/table/{tableId}", method = RequestMethod.GET)
ResponseModel<JSONObject> queryByTableId(@PathVariable String tableId); 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