Commit b16ca9db authored by suhuiguang's avatar suhuiguang

1.安全追溯详情接口开发

parent 1b5db157
......@@ -386,10 +386,10 @@
<if test="problemModel.problemTypeCode != null and problemModel.problemTypeCode != ''">
and spt.problem_type_code = #{problemModel.problemTypeCode}
</if>
<if test="problemModel.problemTimeStart != null ">
<if test="problemModel.problemTimeStart != null and problemModel.problemTimeStart != ''">
and cast(spt.problem_time AS DATE) >= #{problemModel.problemTimeStart}
</if>
<if test="problemModel.problemTimeEnd != null">
<if test="problemModel.problemTimeEnd != null and problemModel.problemTimeEnd != ''">
and cast(spt.problem_time AS DATE) <![CDATA[<=]]> #{problemModel.problemTimeEnd}
</if>
<if test="problemModel.problemDesc != null and problemModel.problemDesc != ''">
......
......@@ -317,4 +317,13 @@ public class AQZSDPStatisticsController {
return ResponseHelper.buildResponse(statisticsService.getProblemRecords(page, problemModel));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST", value = "安全追溯-详情-隐患类型", notes = "安全追溯-详情-隐患类型")
@PostMapping(value = "/dict/yh/type")
public ResponseModel<List<Map<String, Object>>> getYhType() {
return ResponseHelper.buildResponse(statisticsService.getYhType());
}
}
package com.yeejoin.amos.boot.module.statistcs.biz.service.impl;
import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.dao.mapper.DataDictionaryMapper;
......@@ -1107,7 +1108,7 @@ public class AQZSDPStatisticsServiceImpl {
}
public Page<SafetyProblemTracingDto> getProblemRecords(Page<SafetyProblemTracingDto> page, SafetyProblemTracingDto problemModel) {
String orgCode = stCommonService.getAndSetOrgCode(problemModel.getRegionCode());
String orgCode = stCommonService.getAndSetOrgCode(problemModel.getCityCode());
if (orgCode == null){
return new Page<>();
}
......@@ -1129,4 +1130,14 @@ public class AQZSDPStatisticsServiceImpl {
}
return statisticsMapper.queryForSafetyProblemTracingPage(page, problemModel);
}
public List<Map<String,Object>> getYhType() {
List<DataDictionary> dictionaries = dataDictionaryMapper.selectList(new LambdaQueryWrapper<DataDictionary>().eq(DataDictionary::getType, "ISSUE_TYPE"));
return dictionaries.stream().map(d->{
Map<String,Object> item = new HashMap<>();
item.put("value",d.getCode());
item.put("label",d.getName());
return item;
}).collect(Collectors.toList());
}
}
\ No newline at end of file
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