Commit eb454497 authored by tangwei's avatar tangwei

执勤动态接口

parent f96b83bf
...@@ -53,6 +53,41 @@ public class SeismometeorologyDtoDao { ...@@ -53,6 +53,41 @@ public class SeismometeorologyDtoDao {
return gpsList; return gpsList;
} }
/**
*
*当天气象预警
*
* **/
public List<SeismometeorologyDto> findDutyCarStateBy(){
System.out.println(new Date().getTime());
Query query = new Query(Criteria.where("releaseTime").gte(getStartTime().getTime())
.lte(getEndTime().getTime()));
Sort sort= Sort.by(Sort.Direction.DESC, "releaseTime");
query.with(sort);
List<SeismometeorologyDto> gpsList = mongoTemplate.find(query, SeismometeorologyDto.class);
return gpsList;
}
private static Date getStartTime() {
Calendar todayStart = Calendar.getInstance();
todayStart.set(Calendar.HOUR_OF_DAY,0);
todayStart.set(Calendar.MINUTE,0);
todayStart.set(Calendar.SECOND,0);
todayStart.set(Calendar.MILLISECOND,0);
return todayStart.getTime();
}
private static Date getEndTime() {
Calendar todayEnd = Calendar.getInstance();
todayEnd.set(Calendar.HOUR_OF_DAY,23);
todayEnd.set(Calendar.MINUTE,59);
todayEnd.set(Calendar.SECOND,59);
todayEnd.set(Calendar.MILLISECOND,999);
return todayEnd.getTime();
}
} }
...@@ -88,6 +88,7 @@ public interface FireTeamMapper extends BaseMapper<FireTeam> { ...@@ -88,6 +88,7 @@ public interface FireTeamMapper extends BaseMapper<FireTeam> {
List<FireTeamZhDto> getFireTeamCountList();
......
package com.yeejoin.amos.boot.module.common.api.service;
import com.yeejoin.amos.boot.module.common.api.dto.DutyCarDto;
/**
* @author DELL
*/
public interface IDutyCarService extends IDutyCommonService {
/**
* 值班信息保存
* @param dutyCarDto 对象
* @return List<DutyCarDto>
*/
DutyCarDto save(DutyCarDto dutyCarDto);
/**
* 更新
* @param instanceId 实例id
* @param dutyCarDto 业务对象
* @return List<DutyCarDto>
*/
DutyCarDto update(Long instanceId, DutyCarDto dutyCarDto);
}
package com.yeejoin.amos.boot.module.common.api.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.text.ParseException;
import java.util.List;
import java.util.Map;
/**
* @author DELL
*/
public interface IDutyCommonService {
/**
* 分页查询
*
* @param current 当前页
* @param size 页大小
* @param beginDate 开始日期
* @param endDate 结束日期
* @return IPage<Map < String, Object>>
*/
IPage<Map<String, Object>> pageList(int current, int size, String beginDate, String endDate) throws ParseException;
/**
* 值班明细
*
* @param beginDate 开始日期
* @param endDate 结束日期
* @return ResponseModel
*/
List<Map<String, Object>> statisticsDay(String beginDate, String endDate) throws ParseException;
/**
* 不分页查询
*
* @param beginDate 开始日期
* @param endDate 结束日期
* @return ResponseModel
*/
List<Map<String, Object>> list(String beginDate, String endDate) throws ParseException;
/**
* 获取表单参数
*
* @return String
*/
String getGroupCode();
List downloadList(String beginDate, String endDate) throws ParseException;
/**
* 值班数据入库
*
* @param dataList 数据
*/
void saveImportData(List<Map<String, Object>> dataList);
/**
* 删除值班数据
*
* @param instanceId 实例id
* @return Boolean
*/
Boolean deleteDutyData(Long instanceId);
/**
* 查询指定条件的值班人信息
*
* @param dutyDay 查询条件
* @param shiftId 班次
* @param postType 岗位
* @return List<Map < String, Object>>
*/
List<Map<String, Object>> dayDutyPersonList(String dutyDay, Long shiftId, String postType);
/**
* 查询当前值班人信息
*
* @return List<Map < String, Object>>
*/
List<Map<String, Object>> listOnDutyPerson();
}
package com.yeejoin.amos.boot.module.common.api.service;
import com.yeejoin.amos.boot.module.common.api.dto.DutyPersonDto;
/**
* @author DELL
*/
public interface IDutyPersonService extends IDutyCommonService {
/**
* 保存
*
* @param dutyPersonDto 业务对象
* @return List<DutyPersonDto>
*/
DutyPersonDto save(DutyPersonDto dutyPersonDto);
/**
* 更新
*
* @param instanceId 实例id
* @param dutyPersonDto 业务对象
* @return List<DutyCarDto>
*/
DutyPersonDto update(Long instanceId, DutyPersonDto dutyPersonDto);
}
...@@ -37,6 +37,11 @@ public interface IFireTeamService { ...@@ -37,6 +37,11 @@ public interface IFireTeamService {
* **/ * **/
FireTeam getFireTeamBySequenceNbr(Long id); FireTeam getFireTeamBySequenceNbr(Long id);
/***
*
* 指挥队伍资源 列表
*
* **/
List<FireTeamZhDto> getFireTeamCountList();
} }
...@@ -123,7 +123,16 @@ ...@@ -123,7 +123,16 @@
</select> </select>
<select id="getFireTeamCountList" resultType="com.yeejoin.amos.boot.module.common.api.dto.FireTeamZhDto">
SELECT
a.name ,
( SELECT count( 1 ) FROM cb_firefighters WHERE fire_team_id = a.sequence_nbr AND is_delete = 0 ) userNum
FROM cb_fire_team a
where a.is_delete=0
</select>
......
package com.yeejoin.amos.boot.module.jcs.api.dto;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 警情接警记录
*
* @author tb
* @date 2021-06-17
*/
@Data
@ApiModel(value="AlertCalledTodyDto", description="警情接警记录")
public class AlertCalledTodyDto {
@ApiModelProperty(value = "报警类型")
private String alarmType;
@ApiModelProperty(value = "地址")
private String address;
@ApiModelProperty(value = "接警时间")
private Date callTime;
}
...@@ -5,7 +5,7 @@ import io.swagger.annotations.ApiModelProperty; ...@@ -5,7 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
@Data @Data
@ApiModel(value = "AircraftDto", description = "航空器信息") @ApiModel(value = "PowerData", description = "力量信息")
public class PowerData { public class PowerData {
......
package com.yeejoin.amos.boot.module.jcs.api.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
@Data
@ApiModel(value = "PowerTodayData", description = "力量调派")
public class PowerTodayData {
@ApiModelProperty(value = "所属单位")
private String companyName;
@ApiModelProperty(value = "车辆名称")
private String carName;
@ApiModelProperty(value = "调派时间")
private Date time;
}
...@@ -21,7 +21,7 @@ import java.util.Map; ...@@ -21,7 +21,7 @@ import java.util.Map;
* *
* @author Dell * @author Dell
*/ */
@FeignClient(name = "AMOS-EQUIPMANAGE", path = "equip", configuration = {MultipartSupportConfig.class}) @FeignClient(name = "AMOS-EQUIPMANAGE-122", path = "equip", configuration = {MultipartSupportConfig.class})
public interface EquipFeignClient { public interface EquipFeignClient {
/** /**
...@@ -101,4 +101,15 @@ public interface EquipFeignClient { ...@@ -101,4 +101,15 @@ public interface EquipFeignClient {
*/ */
@RequestMapping(value = "/car/status", method = RequestMethod.POST) @RequestMapping(value = "/car/status", method = RequestMethod.POST)
ResponseModel<Object> updateCarStatus(@RequestBody List<CarStatusInfoDto> carStatusInfo); ResponseModel<Object> updateCarStatus(@RequestBody List<CarStatusInfoDto> carStatusInfo);
/**
* 获取装备平面图
*
* @return
*/
@RequestMapping(value = "/sourceFile/findImgByFileCategory", method = RequestMethod.GET)
ResponseModel<List<Map<String,Object>>> findImgByFileCategory(@RequestParam String id,@RequestParam String fileCategory);
} }
...@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jcs.api.mapper; ...@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jcs.api.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.common.api.dto.RequestData; import com.yeejoin.amos.boot.module.common.api.dto.RequestData;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledTodyDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledZhDto; import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledZhDto;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled; import com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -27,4 +28,8 @@ public interface AlertCalledMapper extends BaseMapper<AlertCalled> { ...@@ -27,4 +28,8 @@ public interface AlertCalledMapper extends BaseMapper<AlertCalled> {
Map<String, Integer> queryAlertStatusCount(@Param("beginDate") String beginDate, @Param("endDate") String endDate); Map<String, Integer> queryAlertStatusCount(@Param("beginDate") String beginDate, @Param("endDate") String endDate);
List<AlertCalledZhDto> alertCalledListByAlertStatus(@Param("par")RequestData par); List<AlertCalledZhDto> alertCalledListByAlertStatus(@Param("par")RequestData par);
Integer AlertCalledcountTime(@Param("type")int type);
List<AlertCalledTodyDto> getTodayAlertCalled();
} }
...@@ -2,7 +2,9 @@ package com.yeejoin.amos.boot.module.jcs.api.mapper; ...@@ -2,7 +2,9 @@ package com.yeejoin.amos.boot.module.jcs.api.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertSubmittedZHDto; import com.yeejoin.amos.boot.module.jcs.api.dto.AlertSubmittedZHDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.PowerTodayData;
import com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferCompanyZHDto; import com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferCompanyZHDto;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled;
import com.yeejoin.amos.boot.module.jcs.api.entity.PowerTransferCompany; import com.yeejoin.amos.boot.module.jcs.api.entity.PowerTransferCompany;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -26,4 +28,5 @@ public interface PowerTransferCompanyMapper extends BaseMapper<PowerTransferComp ...@@ -26,4 +28,5 @@ public interface PowerTransferCompanyMapper extends BaseMapper<PowerTransferComp
*/ */
List<PowerTransferCompanyZHDto> listPowerTransferCompanyZHDto(@Param("id") Long id); List<PowerTransferCompanyZHDto> listPowerTransferCompanyZHDto(@Param("id") Long id);
List<PowerTodayData> getTodayPowerTransferCompany();
} }
package com.yeejoin.amos.boot.module.jcs.api.service; package com.yeejoin.amos.boot.module.jcs.api.service;
import com.yeejoin.amos.boot.module.common.api.dto.RequestData; import com.yeejoin.amos.boot.module.common.api.dto.RequestData;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledTodyDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledZhDto; import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledZhDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.KeyValueLabel; import com.yeejoin.amos.boot.module.jcs.api.dto.KeyValueLabel;
import com.yeejoin.amos.boot.module.jcs.api.dto.PowerData; import com.yeejoin.amos.boot.module.jcs.api.dto.PowerData;
...@@ -48,4 +49,8 @@ public interface IAlertCalledService { ...@@ -48,4 +49,8 @@ public interface IAlertCalledService {
List<PowerData> getPowerDataList(Long id); List<PowerData> getPowerDataList(Long id);
AlertCalled getAlertCalledById(Long id); AlertCalled getAlertCalledById(Long id);
Integer AlertCalledcountTime(int type);
List<AlertCalledTodyDto> getTodayAlertCalled();
} }
package com.yeejoin.amos.boot.module.jcs.api.service; package com.yeejoin.amos.boot.module.jcs.api.service;
import com.yeejoin.amos.boot.module.jcs.api.dto.PowerTodayData;
import java.util.List;
/** /**
* 调派单位 服务类 * 调派单位 服务类
* *
...@@ -8,4 +12,6 @@ package com.yeejoin.amos.boot.module.jcs.api.service; ...@@ -8,4 +12,6 @@ package com.yeejoin.amos.boot.module.jcs.api.service;
*/ */
public interface IPowerTransferCompanyService { public interface IPowerTransferCompanyService {
List<PowerTodayData> getTodayPowerTransferCompany();
} }
...@@ -56,10 +56,37 @@ ...@@ -56,10 +56,37 @@
<select id="AlertCalledcountTime" resultType="Integer">
select COUNT(*) from jc_alert_called where is_delete=0
<if test='type==1'>
and YEAR(call_time)=YEAR(NOW())
</if>
<if test='type==2'>
and DATE_FORMAT( call_time, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )
</if>
<if test='type==3'>
and to_days(call_time) = to_days(now());
</if>
<if test='type==4'>
and TO_DAYS( NOW( ) ) - TO_DAYS( call_time) = 1
</if>
</select>
<select id="getTodayAlertCalled" resultType="com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledTodyDto">
select
jc_alert_called.alarm_type alarmType,
jc_alert_called.address,
jc_alert_called.call_time callTime
from jc_alert_called where is_delete=0
and to_days(call_time) = to_days(now())
ORDER BY call_time DESC
</select>
</mapper> </mapper>
...@@ -38,4 +38,15 @@ GROUP BY ...@@ -38,4 +38,15 @@ GROUP BY
g.sequence_nbr; g.sequence_nbr;
</select> </select>
<select id="getTodayPowerTransferCompany" resultType="com.yeejoin.amos.boot.module.jcs.api.dto.PowerTodayData">
select
jc_power_transfer_company.company_name companyName ,
jc_power_transfer_company_resources.resources_name carName,
jc_power_transfer_company.rec_date time
from jc_power_transfer_company LEFT JOIN jc_power_transfer_company_resources on jc_power_transfer_company.sequence_nbr= jc_power_transfer_company_resources.power_transfer_company_id where jc_power_transfer_company.is_delete=0
and to_days(jc_power_transfer_company.rec_date) = to_days(now()) ORDER BY jc_power_transfer_company.rec_date DESC
</select>
</mapper> </mapper>
...@@ -11,18 +11,12 @@ import com.yeejoin.amos.boot.module.command.biz.service.impl.RemoteSecurityServi ...@@ -11,18 +11,12 @@ import com.yeejoin.amos.boot.module.command.biz.service.impl.RemoteSecurityServi
import com.yeejoin.amos.boot.module.common.api.dto.*; import com.yeejoin.amos.boot.module.common.api.dto.*;
import com.yeejoin.amos.boot.module.common.api.entity.FireTeam; import com.yeejoin.amos.boot.module.common.api.entity.FireTeam;
import com.yeejoin.amos.boot.module.common.api.service.*; import com.yeejoin.amos.boot.module.common.api.service.*;
import com.yeejoin.amos.boot.module.jcs.api.dto.AircraftDto; import com.yeejoin.amos.boot.module.jcs.api.dto.*;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledZhDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.InstructionsZHDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.StateDot;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled; import com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue; import com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue;
import com.yeejoin.amos.boot.module.jcs.api.enums.AlertStageEnums; import com.yeejoin.amos.boot.module.jcs.api.enums.AlertStageEnums;
import com.yeejoin.amos.boot.module.jcs.api.service.IAircraftService; import com.yeejoin.amos.boot.module.jcs.api.feign.EquipFeignClient;
import com.yeejoin.amos.boot.module.jcs.api.service.IAlertCalledService; import com.yeejoin.amos.boot.module.jcs.api.service.*;
import com.yeejoin.amos.boot.module.jcs.api.service.IAlertFormValueService;
import com.yeejoin.amos.boot.module.jcs.api.service.IAlertSubmittedService;
import com.yeejoin.amos.boot.module.jcs.api.service.IPowerTransferService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
...@@ -101,7 +95,15 @@ public class CommandController extends BaseController { ...@@ -101,7 +95,15 @@ public class CommandController extends BaseController {
// 文件读取参数 // 文件读取参数
@Value("${file.url}") @Value("${file.url}")
private String readUrl; private String readUrl;
@Autowired
EquipFeignClient equipFeignClient;
@Autowired
IPowerTransferCompanyService powerTransferCompanyService;
@Autowired
IDutyPersonService iDutyPersonService;
/** /**
* 警情列表 * 警情列表
* *
...@@ -608,18 +610,14 @@ public class CommandController extends BaseController { ...@@ -608,18 +610,14 @@ public class CommandController extends BaseController {
if (!htmlP.exists()) { if (!htmlP.exists()) {
htmlP.mkdirs(); htmlP.mkdirs();
} }
File htmlFile = new File(htmlFileName); File htmlFile = new File(htmlFileName);
WordConverterUtils.wordToHtml(fileName, htmlFileName, imagePathStr,readUrl, remoteSecurityService,product, appKey, token); WordConverterUtils.wordToHtml(fileName, htmlFileName, imagePathStr,readUrl, remoteSecurityService,product, appKey, token);
FileInputStream fis = new FileInputStream(htmlFile); FileInputStream fis = new FileInputStream(htmlFile);
response.setContentType("multipart/form-data"); response.setContentType("multipart/form-data");
response.setCharacterEncoding("UTF-8"); response.setCharacterEncoding("UTF-8");
response.setContentType("text/html"); response.setContentType("text/html");
// 2.设置文件头:最后一个参数是设置下载文件名 ServletOutputStream out;
ServletOutputStream out; out = response.getOutputStream();
// 3.通过response获取ServletOutputStream对象(out)
out = response.getOutputStream();
int b = 0; int b = 0;
byte[] buffer = new byte[1024]; byte[] buffer = new byte[1024];
while ((b = fis.read(buffer)) != -1) { while ((b = fis.read(buffer)) != -1) {
...@@ -667,7 +665,7 @@ public class CommandController extends BaseController { ...@@ -667,7 +665,7 @@ public class CommandController extends BaseController {
} }
@TycloudOperation( needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation( needAuth = false, ApiLevel = UserType.AGENCY)
@GetMapping(value = "getOrgUsrzhDto/{id}") @GetMapping(value = "/getOrgUsrzhDto/{id}")
@ApiOperation(httpMethod = "GET", value = "处置对象单位详情", notes = "处置对象单位详情") @ApiOperation(httpMethod = "GET", value = "处置对象单位详情", notes = "处置对象单位详情")
public ResponseModel<OrgusrDataxDto> getOrgUsrzhDto(@PathVariable Long id) { public ResponseModel<OrgusrDataxDto> getOrgUsrzhDto(@PathVariable Long id) {
...@@ -677,9 +675,87 @@ public class CommandController extends BaseController { ...@@ -677,9 +675,87 @@ public class CommandController extends BaseController {
//现场照片 待完成, //现场照片 待完成,
//平面图。待完成
//平面图。待完成orgUsrzhDto.getBuildId()
List<Map<String,Object>> list= equipFeignClient.findImgByFileCategory(orgUsrzhDto.getBuildId(),"fourImg").getResult();
List<String> url=new ArrayList<>();
if(list!=null&&list.size()>0) {
list.stream().forEach(map->{
url.add(map.get("filePath").toString());
});
}
orgusrDataxDto.setPlanePicture(url);
return ResponseHelper.buildResponse(orgusrDataxDto); return ResponseHelper.buildResponse(orgusrDataxDto);
} }
@TycloudOperation( needAuth = false, ApiLevel = UserType.AGENCY)
@GetMapping(value = "/AlertCalledcountTime")
@ApiOperation(httpMethod = "GET", value = "执勤动态警情信息统计", notes = "执勤动态警情信息统计")
public ResponseModel<Object> AlertCalledcountTime() {
List<KeyValueLabel> listdate =new ArrayList<>();
listdate.add(new KeyValueLabel("今年警情数量","",iAlertCalledService.AlertCalledcountTime(1)));
listdate.add(new KeyValueLabel("当月警情数量","",iAlertCalledService.AlertCalledcountTime(2)));
listdate.add(new KeyValueLabel("昨天警情数量","",iAlertCalledService.AlertCalledcountTime(4)));
listdate.add(new KeyValueLabel("今天警情数量","",iAlertCalledService.AlertCalledcountTime(3)));
return ResponseHelper.buildResponse(listdate);
}
@TycloudOperation( needAuth = false, ApiLevel = UserType.AGENCY)
@GetMapping(value = "/getTodayPowerTransferCompany")
@ApiOperation(httpMethod = "GET", value = "当天力量调派", notes = "当天力量调派")
public ResponseModel<Object> getTodayPowerTransferCompany() {
return ResponseHelper.buildResponse(powerTransferCompanyService.getTodayPowerTransferCompany());
}
@TycloudOperation( needAuth = false, ApiLevel = UserType.AGENCY)
@GetMapping(value = "/getTodayAlertCalled")
@ApiOperation(httpMethod = "GET", value = "当天接警记录", notes = "当天接警记录")
public ResponseModel<Object> getTodayAlertCalled() {
return ResponseHelper.buildResponse(iAlertCalledService.getTodayAlertCalled());
}
@TycloudOperation( needAuth = false, ApiLevel = UserType.AGENCY)
@GetMapping(value = "/getFireTeamCountList")
@ApiOperation(httpMethod = "GET", value = "执勤力量", notes = "执勤力量")
public ResponseModel<Object> getFireTeamCountList() {
return ResponseHelper.buildResponse(iFireTeamService.getFireTeamCountList());
}
@TycloudOperation(needAuth = false,ApiLevel = UserType.AGENCY)
@ApiOperation("当天值班人信息列表")
@GetMapping("/getonDuty/list")
public ResponseModel listOnDutyPerson() {
return ResponseHelper.buildResponse(iDutyPersonService.listOnDutyPerson());
}
/**
* 跑马灯
*
* @param
* @return
*/
@TycloudOperation( needAuth = true,ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/findDutyCarStateBy", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "当日气象预警", notes = "当日气象预警")
public ResponseModel<Object> findDutyCarStateBy()throws Exception {
List<SeismometeorologyDto> li= seismometeorologyDtoDao.findDutyCarStateBy();
return ResponseHelper.buildResponse(li);
}
} }
\ No newline at end of file
...@@ -3,7 +3,8 @@ package com.yeejoin.amos.boot.module.common.biz.controller; ...@@ -3,7 +3,8 @@ package com.yeejoin.amos.boot.module.common.biz.controller;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.common.api.dto.DutyCarDto; import com.yeejoin.amos.boot.module.common.api.dto.DutyCarDto;
import com.yeejoin.amos.boot.module.common.biz.service.IDutyCarService; import com.yeejoin.amos.boot.module.common.api.service.IDutyCarService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
......
...@@ -3,7 +3,8 @@ package com.yeejoin.amos.boot.module.common.biz.controller; ...@@ -3,7 +3,8 @@ package com.yeejoin.amos.boot.module.common.biz.controller;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.common.api.dto.DutyPersonDto; import com.yeejoin.amos.boot.module.common.api.dto.DutyPersonDto;
import com.yeejoin.amos.boot.module.common.biz.service.IDutyPersonService; import com.yeejoin.amos.boot.module.common.api.service.IDutyPersonService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
......
package com.yeejoin.amos.boot.module.common.biz.service; //package com.yeejoin.amos.boot.module.common.biz.service;
//
import com.yeejoin.amos.boot.module.common.api.dto.DutyCarDto; //import com.yeejoin.amos.boot.module.common.api.dto.DutyCarDto;
//
/** ///**
* @author DELL // * @author DELL
*/ // */
public interface IDutyCarService extends IDutyCommonService { //public interface IDutyCarService extends IDutyCommonService {
//
/** // /**
* 值班信息保存 // * 值班信息保存
* @param dutyCarDto 对象 // * @param dutyCarDto 对象
* @return List<DutyCarDto> // * @return List<DutyCarDto>
*/ // */
DutyCarDto save(DutyCarDto dutyCarDto); // DutyCarDto save(DutyCarDto dutyCarDto);
//
/** // /**
* 更新 // * 更新
* @param instanceId 实例id // * @param instanceId 实例id
* @param dutyCarDto 业务对象 // * @param dutyCarDto 业务对象
* @return List<DutyCarDto> // * @return List<DutyCarDto>
*/ // */
DutyCarDto update(Long instanceId, DutyCarDto dutyCarDto); // DutyCarDto update(Long instanceId, DutyCarDto dutyCarDto);
} //}
package com.yeejoin.amos.boot.module.common.biz.service; //package com.yeejoin.amos.boot.module.common.biz.service;
//
import com.baomidou.mybatisplus.core.metadata.IPage; //import com.baomidou.mybatisplus.core.metadata.IPage;
//
import java.text.ParseException; //import java.text.ParseException;
import java.util.List; //import java.util.List;
import java.util.Map; //import java.util.Map;
//
/** ///**
* @author DELL // * @author DELL
*/ // */
public interface IDutyCommonService { //public interface IDutyCommonService {
/** // /**
* 分页查询 // * 分页查询
* // *
* @param current 当前页 // * @param current 当前页
* @param size 页大小 // * @param size 页大小
* @param beginDate 开始日期 // * @param beginDate 开始日期
* @param endDate 结束日期 // * @param endDate 结束日期
* @return IPage<Map < String, Object>> // * @return IPage<Map < String, Object>>
*/ // */
IPage<Map<String, Object>> pageList(int current, int size, String beginDate, String endDate) throws ParseException; // IPage<Map<String, Object>> pageList(int current, int size, String beginDate, String endDate) throws ParseException;
//
/** // /**
* 值班明细 // * 值班明细
* // *
* @param beginDate 开始日期 // * @param beginDate 开始日期
* @param endDate 结束日期 // * @param endDate 结束日期
* @return ResponseModel // * @return ResponseModel
*/ // */
List<Map<String, Object>> statisticsDay(String beginDate, String endDate) throws ParseException; // List<Map<String, Object>> statisticsDay(String beginDate, String endDate) throws ParseException;
//
/** // /**
* 不分页查询 // * 不分页查询
* // *
* @param beginDate 开始日期 // * @param beginDate 开始日期
* @param endDate 结束日期 // * @param endDate 结束日期
* @return ResponseModel // * @return ResponseModel
*/ // */
List<Map<String, Object>> list(String beginDate, String endDate) throws ParseException; // List<Map<String, Object>> list(String beginDate, String endDate) throws ParseException;
//
/** // /**
* 获取表单参数 // * 获取表单参数
* // *
* @return String // * @return String
*/ // */
String getGroupCode(); // String getGroupCode();
//
List downloadList(String beginDate, String endDate) throws ParseException; // List downloadList(String beginDate, String endDate) throws ParseException;
//
/** // /**
* 值班数据入库 // * 值班数据入库
* // *
* @param dataList 数据 // * @param dataList 数据
*/ // */
void saveImportData(List<Map<String, Object>> dataList); // void saveImportData(List<Map<String, Object>> dataList);
//
/** // /**
* 删除值班数据 // * 删除值班数据
* // *
* @param instanceId 实例id // * @param instanceId 实例id
* @return Boolean // * @return Boolean
*/ // */
Boolean deleteDutyData(Long instanceId); // Boolean deleteDutyData(Long instanceId);
//
/** // /**
* 查询指定条件的值班人信息 // * 查询指定条件的值班人信息
* // *
* @param dutyDay 查询条件 // * @param dutyDay 查询条件
* @param shiftId 班次 // * @param shiftId 班次
* @param postType 岗位 // * @param postType 岗位
* @return List<Map < String, Object>> // * @return List<Map < String, Object>>
*/ // */
List<Map<String, Object>> dayDutyPersonList(String dutyDay, Long shiftId, String postType); // List<Map<String, Object>> dayDutyPersonList(String dutyDay, Long shiftId, String postType);
//
/** // /**
* 查询当前值班人信息 // * 查询当前值班人信息
* // *
* @return List<Map < String, Object>> // * @return List<Map < String, Object>>
*/ // */
List<Map<String, Object>> listOnDutyPerson(); // List<Map<String, Object>> listOnDutyPerson();
} //}
package com.yeejoin.amos.boot.module.common.biz.service; //package com.yeejoin.amos.boot.module.common.biz.service;
//
import com.yeejoin.amos.boot.module.common.api.dto.DutyPersonDto; //import com.yeejoin.amos.boot.module.common.api.dto.DutyPersonDto;
//
/** ///**
* @author DELL // * @author DELL
*/ // */
public interface IDutyPersonService extends IDutyCommonService { //public interface IDutyPersonService extends IDutyCommonService {
/** // /**
* 保存 // * 保存
* // *
* @param dutyPersonDto 业务对象 // * @param dutyPersonDto 业务对象
* @return List<DutyPersonDto> // * @return List<DutyPersonDto>
*/ // */
DutyPersonDto save(DutyPersonDto dutyPersonDto); // DutyPersonDto save(DutyPersonDto dutyPersonDto);
//
//
/** // /**
* 更新 // * 更新
* // *
* @param instanceId 实例id // * @param instanceId 实例id
* @param dutyPersonDto 业务对象 // * @param dutyPersonDto 业务对象
* @return List<DutyCarDto> // * @return List<DutyCarDto>
*/ // */
DutyPersonDto update(Long instanceId, DutyPersonDto dutyPersonDto); // DutyPersonDto update(Long instanceId, DutyPersonDto dutyPersonDto);
} //}
...@@ -5,7 +5,8 @@ import com.yeejoin.amos.boot.module.common.api.dto.DutyCarDto; ...@@ -5,7 +5,8 @@ import com.yeejoin.amos.boot.module.common.api.dto.DutyCarDto;
import com.yeejoin.amos.boot.module.common.api.entity.DutyPersonShift; import com.yeejoin.amos.boot.module.common.api.entity.DutyPersonShift;
import com.yeejoin.amos.boot.module.common.api.entity.DynamicFormColumn; import com.yeejoin.amos.boot.module.common.api.entity.DynamicFormColumn;
import com.yeejoin.amos.boot.module.common.api.entity.DynamicFormInstance; import com.yeejoin.amos.boot.module.common.api.entity.DynamicFormInstance;
import com.yeejoin.amos.boot.module.common.biz.service.IDutyCarService; import com.yeejoin.amos.boot.module.common.api.service.IDutyCarService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.foundation.context.RequestContext; import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.utils.Bean; import org.typroject.tyboot.core.foundation.utils.Bean;
......
...@@ -15,7 +15,8 @@ import com.yeejoin.amos.boot.module.common.api.entity.DutyShift; ...@@ -15,7 +15,8 @@ import com.yeejoin.amos.boot.module.common.api.entity.DutyShift;
import com.yeejoin.amos.boot.module.common.api.entity.DynamicFormColumn; import com.yeejoin.amos.boot.module.common.api.entity.DynamicFormColumn;
import com.yeejoin.amos.boot.module.common.api.entity.DynamicFormInstance; import com.yeejoin.amos.boot.module.common.api.entity.DynamicFormInstance;
import com.yeejoin.amos.boot.module.common.api.enums.DutyViewTypeEnum; import com.yeejoin.amos.boot.module.common.api.enums.DutyViewTypeEnum;
import com.yeejoin.amos.boot.module.common.biz.service.IDutyCommonService; import com.yeejoin.amos.boot.module.common.api.service.IDutyCommonService;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.joda.time.DateTime; import org.joda.time.DateTime;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
......
...@@ -5,7 +5,8 @@ import com.yeejoin.amos.boot.module.common.api.dto.DutyPersonDto; ...@@ -5,7 +5,8 @@ import com.yeejoin.amos.boot.module.common.api.dto.DutyPersonDto;
import com.yeejoin.amos.boot.module.common.api.entity.DutyPersonShift; import com.yeejoin.amos.boot.module.common.api.entity.DutyPersonShift;
import com.yeejoin.amos.boot.module.common.api.entity.DynamicFormColumn; import com.yeejoin.amos.boot.module.common.api.entity.DynamicFormColumn;
import com.yeejoin.amos.boot.module.common.api.entity.DynamicFormInstance; import com.yeejoin.amos.boot.module.common.api.entity.DynamicFormInstance;
import com.yeejoin.amos.boot.module.common.biz.service.IDutyPersonService; import com.yeejoin.amos.boot.module.common.api.service.IDutyPersonService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.core.foundation.context.RequestContext; import org.typroject.tyboot.core.foundation.context.RequestContext;
......
...@@ -65,8 +65,8 @@ import com.yeejoin.amos.boot.module.common.api.entity.Firefighters; ...@@ -65,8 +65,8 @@ import com.yeejoin.amos.boot.module.common.api.entity.Firefighters;
import com.yeejoin.amos.boot.module.common.api.entity.FirefightersContacts; import com.yeejoin.amos.boot.module.common.api.entity.FirefightersContacts;
import com.yeejoin.amos.boot.module.common.api.entity.MaintenanceCompany; import com.yeejoin.amos.boot.module.common.api.entity.MaintenanceCompany;
import com.yeejoin.amos.boot.module.common.api.excel.ExcelUtil; import com.yeejoin.amos.boot.module.common.api.excel.ExcelUtil;
import com.yeejoin.amos.boot.module.common.api.service.IDutyPersonService;
import com.yeejoin.amos.boot.module.common.api.service.IMaintenanceCompanyService; import com.yeejoin.amos.boot.module.common.api.service.IMaintenanceCompanyService;
import com.yeejoin.amos.boot.module.common.biz.service.IDutyPersonService;
import com.yeejoin.amos.boot.module.common.biz.service.impl.DutyCarServiceImpl; import com.yeejoin.amos.boot.module.common.biz.service.impl.DutyCarServiceImpl;
import com.yeejoin.amos.boot.module.common.biz.service.impl.DutyCommonServiceImpl; import com.yeejoin.amos.boot.module.common.biz.service.impl.DutyCommonServiceImpl;
import com.yeejoin.amos.boot.module.common.biz.service.impl.DutyPersonServiceImpl; import com.yeejoin.amos.boot.module.common.biz.service.impl.DutyPersonServiceImpl;
......
...@@ -53,7 +53,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall ...@@ -53,7 +53,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
@Autowired @Autowired
RedisUtils redisUtils; RedisUtils redisUtils;
@Autowired @Autowired
AlertCalledMapper alertCalledMapper; AlertCalledMapper alertCalledMapper;
@Autowired @Autowired
...@@ -427,10 +427,15 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall ...@@ -427,10 +427,15 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
return this.getById(id); return this.getById(id);
} }
@Override
public Integer AlertCalledcountTime(int type) {
return alertCalledMapper.AlertCalledcountTime(type);
}
@Override
public List<AlertCalledTodyDto> getTodayAlertCalled() {
return alertCalledMapper.getTodayAlertCalled();
}
} }
...@@ -235,4 +235,30 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire ...@@ -235,4 +235,30 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
public FireTeam getFireTeamBySequenceNbr(Long id) { public FireTeam getFireTeamBySequenceNbr(Long id) {
return this.getById(id); return this.getById(id);
} }
@Override
public List<FireTeamZhDto> getFireTeamCountList() {
List<FireTeamZhDto> list= fireTeamMapper.getFireTeamCountList();
// 获取消防车辆列表
ResponseModel<List<Map<String,Object>>> result = equipFeignClient.getFireCarListAllcount();
List<Map<String,Object>> result1 = result.getResult();
if(result1!=null&&result1.size()>0){
Map<String, Object> combineResultMap = new HashMap<String, Object>();
result1.stream().forEach(obj ->{
combineResultMap.putAll(obj);
});
list.stream().forEach(obj ->{
if(combineResultMap.containsKey(obj.getSequenceNbr())){
obj.setCarNum(Integer.valueOf(combineResultMap.get(obj.getSequenceNbr()).toString()));
}
});
}
return list;
}
} }
package com.yeejoin.amos.boot.module.jcs.biz.service.impl; package com.yeejoin.amos.boot.module.jcs.biz.service.impl;
import com.yeejoin.amos.boot.module.common.api.mapper.FireTeamMapper;
import com.yeejoin.amos.boot.module.jcs.api.dto.PowerTodayData;
import com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferCompanyDto; import com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferCompanyDto;
import com.yeejoin.amos.boot.module.jcs.api.entity.PowerTransferCompany; import com.yeejoin.amos.boot.module.jcs.api.entity.PowerTransferCompany;
import com.yeejoin.amos.boot.module.jcs.api.mapper.PowerTransferCompanyMapper; import com.yeejoin.amos.boot.module.jcs.api.mapper.PowerTransferCompanyMapper;
...@@ -7,6 +9,9 @@ import com.yeejoin.amos.boot.module.jcs.api.service.IPowerTransferCompanyService ...@@ -7,6 +9,9 @@ import com.yeejoin.amos.boot.module.jcs.api.service.IPowerTransferCompanyService
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.rdbms.service.BaseService; import org.typroject.tyboot.core.rdbms.service.BaseService;
import javax.annotation.Resource;
import java.util.List;
/** /**
* 调派单位 服务实现类 * 调派单位 服务实现类
* *
...@@ -16,4 +21,11 @@ import org.typroject.tyboot.core.rdbms.service.BaseService; ...@@ -16,4 +21,11 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
@Service @Service
public class PowerTransferCompanyServiceImpl extends BaseService<PowerTransferCompanyDto,PowerTransferCompany,PowerTransferCompanyMapper> implements IPowerTransferCompanyService { public class PowerTransferCompanyServiceImpl extends BaseService<PowerTransferCompanyDto,PowerTransferCompany,PowerTransferCompanyMapper> implements IPowerTransferCompanyService {
@Resource
PowerTransferCompanyMapper powerTransferCompanyMapper;
@Override
public List<PowerTodayData> getTodayPowerTransferCompany() {
return powerTransferCompanyMapper.getTodayPowerTransferCompany();
}
} }
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