一张图-巡检相关接口
parent
88bab3545a
commit
f079928d65
|
|
@ -5,6 +5,6 @@ $dst_port=22
|
|||
$user="root"
|
||||
$identity="deploy_rsa"
|
||||
|
||||
scp -i $identity -P $dst_port $src $user@${dst_host}:${dst_dir}
|
||||
scp -P $dst_port $src $user@${dst_host}:${dst_dir}
|
||||
|
||||
ssh -i $identity -p $dst_port $user@${dst_host} "cd ${dst_dir}; docker compose restart"
|
||||
ssh -p $dst_port $user@${dst_host} "cd ${dst_dir}; docker compose restart"
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ public class OpenApiConfig {
|
|||
"com.gunshi.project.xyt.controller",
|
||||
};
|
||||
return GroupedOpenApi.builder()
|
||||
.group("xyt")
|
||||
.group("tsg")
|
||||
.packagesToScan(packagesToScan)
|
||||
.build();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,6 +74,18 @@ public class InspectTaskController extends AbstractCommonFileController{
|
|||
return R.ok(service.listQuery(so));
|
||||
}
|
||||
|
||||
@Operation(summary = "本月巡查记录")
|
||||
@PostMapping("/month")
|
||||
public R<List<InspectTask>> month() {
|
||||
return R.ok(service.month());
|
||||
}
|
||||
|
||||
@Operation(summary = "本年巡查")
|
||||
@PostMapping("/year")
|
||||
public R<Integer> year() {
|
||||
return R.ok(service.year());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getGroupId() {
|
||||
|
|
|
|||
|
|
@ -53,6 +53,10 @@ public class InspectTaskDetailController{
|
|||
}
|
||||
|
||||
|
||||
|
||||
@Operation(summary = "待处理问题清单")
|
||||
@PostMapping("/handle/list")
|
||||
public R<List<InspectProblemVo>> handelList() {
|
||||
return R.ok(service.handelList());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -53,4 +53,15 @@ public interface InspectTaskDetailMapper extends BaseMapper<InspectTaskDetail> {
|
|||
</script>
|
||||
""")
|
||||
Page<InspectProblemVo> pageQuery(Page<InspectProblemVo> page,@Param("obj") InspectProblemPageSo page1);
|
||||
|
||||
@Select("""
|
||||
<script>
|
||||
select t1.*,t2.name,t3.item_desc,t4.task_title,t4.inspect_user_id,t4.inspect_user_name,t4.finish_time from public.inspect_task_detail t1
|
||||
left join public.inspect_point t2 on t1.point_id = t2.id
|
||||
left join public.inspect_item t3 on t1.item_id = t3.id
|
||||
left join public.inspect_task t4 on t1.task_id =t4.id
|
||||
where t1.is_handle = 0
|
||||
</script>
|
||||
""")
|
||||
List<InspectProblemVo> handleList();
|
||||
}
|
||||
|
|
@ -8,6 +8,8 @@ import org.apache.ibatis.annotations.Mapper;
|
|||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 描述: 巡检任务
|
||||
* author: xusan
|
||||
|
|
@ -48,4 +50,29 @@ public interface InspectTaskMapper extends BaseMapper<InspectTask> {
|
|||
""")
|
||||
Page<InspectTask> pageQuery(Page<InspectTask> page,@Param("obj") InspectTaskPageSo pageSo);
|
||||
|
||||
@Select("""
|
||||
<script>
|
||||
with m1 as (
|
||||
select t.* from public.inspect_task t
|
||||
where t.status = 2
|
||||
and to_char(t.finish_time,'MM') = #{month}
|
||||
),
|
||||
m2 as (select task_id,count(is_normal) as problemNum from inspect_task_detail where is_normal = 0 GROUP BY task_id),
|
||||
m3 as (select task_id,count(is_handle) as handleNum from inspect_task_detail where is_handle = 0 GROUP BY task_id)
|
||||
select m1.*,m2.problemNum,m3.handleNum from m1
|
||||
left join m2 on m1.id = m2.task_id
|
||||
left join m3 on m1.id = m3.task_id
|
||||
order by m1.create_time desc
|
||||
</script>
|
||||
""")
|
||||
List<InspectTask> month(@Param("month") String monthValue);
|
||||
|
||||
@Select("""
|
||||
<script>
|
||||
select count(t.id) from public.inspect_task t
|
||||
where t.status = 2
|
||||
and to_char(t.finish_time,'YYYY') = #{year}
|
||||
</script>
|
||||
""")
|
||||
Integer year(@Param("year") String year);
|
||||
}
|
||||
|
|
@ -152,6 +152,14 @@ public class InspectTaskDetailService extends ServiceImpl<InspectTaskDetailMappe
|
|||
fileService.save(vo.getHandleVideos(),vo.getId().toString(),getGroupId(),getHandleVideoType());
|
||||
return "处理成功";
|
||||
}
|
||||
|
||||
public List<InspectProblemVo> handelList() {
|
||||
List<InspectProblemVo> list = this.baseMapper.handleList();
|
||||
if(CollectionUtils.isNotEmpty(list)){
|
||||
fillAttach(list);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
|
@ -121,6 +122,21 @@ public class InspectTaskService extends ServiceImpl<InspectTaskMapper, InspectTa
|
|||
}
|
||||
return this.list(queryWrapper);
|
||||
}
|
||||
|
||||
public List<InspectTask> month() {
|
||||
LocalDate now = LocalDate.now();
|
||||
String monthValue = String.valueOf(now.getMonthValue());
|
||||
if(now.getMonthValue() < 10){
|
||||
monthValue = "0"+monthValue;
|
||||
}
|
||||
return this.baseMapper.month(monthValue);
|
||||
}
|
||||
|
||||
public Integer year() {
|
||||
LocalDate now = LocalDate.now();
|
||||
String year = String.valueOf(now.getYear());
|
||||
return this.baseMapper.year(year);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ public class StQxWarnRService extends ServiceImpl<StQxWarnRMapper, StQxWarnR> {
|
|||
|
||||
for (WarningData.Warning warning : warnList) {
|
||||
String cnnm = warning.getEffectArea();
|
||||
if("麻城".equals(cnnm)){
|
||||
if("红安".equals(cnnm)){
|
||||
QXWarningVo vo = new QXWarningVo();
|
||||
String publishUnit = warning.getPublishUnit();
|
||||
vo.setCtnm(ctnm);//市级名称
|
||||
|
|
|
|||
Loading…
Reference in New Issue