Commit 2b0d143d authored by tangwei's avatar tangwei

修改bug ,增加app 二级列表

parent ff3db551
......@@ -82,8 +82,8 @@
and a.resource_type= #{par.resourceType}
</if>
<if test='par.distance!=null'>
<!-- and Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1) &lt;=
#{par.distance} -->
and Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1) &lt;=
#{par.distance}
</if>
ORDER BY distance limit #{pageNum},#{pageSize}
</select>
......@@ -97,8 +97,8 @@
and a.resource_type= #{par.resourceType}
</if>
<if test='par.distance!=null'>
<!-- and Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1) &lt;=
#{par.distance} -->
and Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1) &lt;=
#{par.distance}
</if>
</select>
<select id="getWaterResourceTypeList" resultType="com.yeejoin.amos.boot.module.common.api.dto.WaterResourceTypeDto">
......
......@@ -47,4 +47,7 @@ public interface AlertCalledMapper extends BaseMapper<AlertCalled> {
Integer AlertCalledcount(@Param("alertStatus")int alertStatus);
//未结束灾情列表
List<AlertCalled> AlertCalledStatusPage(@Param("current")Integer current, @Param("size")Integer size);
}
......@@ -75,4 +75,6 @@ public interface IAlertCalledService {
Integer AlertCalledcount(int type);
List<AlertCalled> AlertCalledStatusPage(Integer current, Integer size);
}
......@@ -186,5 +186,18 @@
</select>
<!-- 未结束警情列表 -->
<select id="AlertCalledStatusPage" resultType="com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled">
select * from jc_alert_called where is_delete=0 and alert_status = 0 ORDER BY call_time limit #{current},#{size}
</select>
</mapper>
......@@ -580,15 +580,11 @@ public class CommandController extends BaseController {
@TycloudOperation( needAuth = true,ApiLevel = UserType.AGENCY)
@GetMapping(value = "LinkageUnitDto/page")
@ApiOperation(httpMethod = "GET", value = "联动单位分页查询", notes = "联动单位分页查询")
public ResponseModel<Page<LinkageUnitDto>> LinkageUnitDtoQueryForPage(@RequestParam(value = "pageNum") int pageNum,
@RequestParam(value = "pageSize") int pageSize,
String unitName,String linkageUnitTypeCode, String linkageUnitType, String inAgreement) {
public ResponseModel<Page<LinkageUnitDto>> LinkageUnitDtoQueryForPage(@RequestParam(value = "pageNum") int pageNum, @RequestParam(value = "pageSize") int pageSize,String unitName,String linkageUnitTypeCode, String linkageUnitType, String inAgreement) {
Page<LinkageUnitDto> page = new Page<LinkageUnitDto>();
page.setCurrent(pageNum);
page.setSize(pageSize);
Page<LinkageUnitDto> linkageUnitDtoPage = iLinkageUnitService.queryForLinkageUnitPage(page, false,
unitName,linkageUnitTypeCode, linkageUnitType, null, inAgreement);
Page<LinkageUnitDto> linkageUnitDtoPage = iLinkageUnitService.queryForLinkageUnitPage(page, false, unitName,linkageUnitTypeCode, linkageUnitType, null, inAgreement);
return ResponseHelper.buildResponse(linkageUnitDtoPage);
}
......@@ -627,9 +623,7 @@ public class CommandController extends BaseController {
@GetMapping(value = "statistics/{id}")
@ApiOperation(httpMethod = "GET", value = "火灾现场统计", notes = "火灾现场统计")
public ResponseModel<Object> getStatistics(@PathVariable Long id) {
return ResponseHelper.buildResponse(iAlertCalledService.selectAlertCalledcount(id));
}
/**
* * @param null
......@@ -673,7 +667,6 @@ public class CommandController extends BaseController {
@ApiOperation(httpMethod = "GET", value = "获取灾情当前阶段", notes = "获取灾情当前阶段")
public ResponseModel<Object> getstate(@PathVariable Long id) {
AlertCalled AlertCalled=iAlertCalledService.getAlertCalledById(id);
List<StateDot> list=new ArrayList<>();
list.add(new StateDot("警情接报"));
list.add(new StateDot("力量调派"));
......@@ -779,16 +772,12 @@ public class CommandController extends BaseController {
@ApiOperation(value = "查看文件内容", notes = "查看文件内容")
public ResponseModel<Object> lookHtmlText( HttpServletResponse response,@RequestParam(value = "fileUrl")String fileUrl ,@RequestParam(value = "product")String product,@RequestParam(value = "appKey")String appKey,@RequestParam(value = "token")String token /* @PathVariable String fileName */)
throws Exception {
String fileName =readUrl+fileUrl; //目标文件
String fileName =readUrl+fileUrl; //目标文件
if (fileName.endsWith(".doc") || fileName.endsWith(".docx")) {
String htmlPath= System.getProperty("user.dir")+File.separator+"lookHtml"+File.separator+"file"+File.separator;
String imagePathStr= System.getProperty("user.dir")+File.separator+"lookHtml"+File.separator+"image"+File.separator;
String name = fileUrl.substring(fileUrl.lastIndexOf('/')+1);
String htmlFileName = htmlPath + name.substring(0, name.indexOf(".")) +".html";
String htmlFileName = htmlPath + name.substring(0, name.indexOf(".")) +".html";
File htmlP = new File(htmlPath);
if (!htmlP.exists()) {
htmlP.mkdirs();
......@@ -827,24 +816,18 @@ public class CommandController extends BaseController {
@GetMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "GET", value = "根据灾情查询单个航空器信息", notes = "根据灾情查询单个航空器信息")
public ResponseModel<AircraftDto> seleteaircraftOne(@PathVariable Long sequenceNbr) {
// 警情动态表单数据
List<AlertFormValue> list = alertFormValueService.getzqlist(sequenceNbr);
for (AlertFormValue alertFormValue : list) {
if("aircraftModel".equals(alertFormValue.getFieldCode())) {
String aircraftModel=alertFormValue.getFieldValue();
if(aircraftModel!=null&&!"".equals(aircraftModel)) {
AircraftDto aircraftDto=aircraftService.queryByAircraftSeq(RequestContext.getAgencyCode(),1411994005943717890L);
//现场照片 待完成,
return ResponseHelper.buildResponse(aircraftDto);
}
}
}
return ResponseHelper.buildResponse(null);
}
......@@ -852,7 +835,6 @@ public class CommandController extends BaseController {
@GetMapping(value = "/getOrgUsrzhDto/{id}")
@ApiOperation(httpMethod = "GET", value = "根据灾情id处置对象单位详情", notes = "根据灾情id处置对象单位详情")
public ResponseModel<OrgusrDataxDto> getOrgUsrzhDto(@PathVariable Long id) {
AlertCalled AlertCalled = iAlertCalledService.getAlertCalledById(id);
String buildId = null;
OrgusrDataxDto orgusrDataxDto = new OrgusrDataxDto();
......@@ -949,8 +931,6 @@ public class CommandController extends BaseController {
@RequestMapping(value = "/getVideo", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "分页获取视频", notes = "分页获取视频")
public ResponseModel<Object> getVideo(long current, long size)throws Exception {
Page page = new Page(current, size);
List<OrderItem> list= OrderItem.ascs("id");
page.setOrders(list);
......@@ -1011,7 +991,6 @@ public class CommandController extends BaseController {
OrgusrDataxDto orgusrDataxDto=new OrgusrDataxDto();
if(AlertCalled.getUnitInvolved()!=null&&!"".equals(AlertCalled.getUnitInvolved())) {
List<OrgUsrzhDto> orgUsrzhDto= iOrgUsrService.getOrgUsrzhDto( AlertCalled.getUnitInvolved());
if(orgUsrzhDto!=null&&orgUsrzhDto.size()>0&&orgUsrzhDto.get(0)!=null){
buildId=orgUsrzhDto.get(0).getBuildId()==null?null:Long.valueOf(orgUsrzhDto.get(0).getBuildId());
}
......@@ -1046,10 +1025,7 @@ public class CommandController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "app-根据警情id查询力量调派列表", notes = "app-根据警情id查询力量调派列表")
@GetMapping(value = "/app/transferList")
public ResponseModel getPowerTransferList(@RequestParam String alertId,
@RequestParam(defaultValue = "team") String type,
@RequestParam(value = "current") int current,
@RequestParam(value = "size") int size) {
public ResponseModel getPowerTransferList(@RequestParam String alertId,@RequestParam(defaultValue = "team") String type, @RequestParam(value = "current") int current, @RequestParam(value = "size") int size) {
Page page = new Page();
page.setSize(size);
page.setCurrent(current);
......@@ -1059,8 +1035,7 @@ public class CommandController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "app-根据警情id查询力量调派资源统计", notes = "app-根据警情id查询力量调派资源统计")
@GetMapping(value = "/app/transfer/statistics")
public ResponseModel getPowerTransferStatistics(@RequestParam String alertId,
@RequestParam(defaultValue = "team") String type) {
public ResponseModel getPowerTransferStatistics(@RequestParam String alertId, @RequestParam(defaultValue = "team") String type) {
return ResponseHelper.buildResponse(powerTransferService.getPowerTransferStatistics(Long.valueOf(alertId), type));
}
......@@ -1076,7 +1051,6 @@ public class CommandController extends BaseController {
} catch (Exception e) {
throw new BaseException("更新车辆状态异常", "", e.getMessage());
}
return ResponseHelper.buildResponse(true);
}
......@@ -1149,20 +1123,29 @@ public class CommandController extends BaseController {
@GetMapping(value = "/DynamicFlightInfo/{dynamicFlightId}")
@ApiOperation(httpMethod = "GET", value = "航班信息", notes = "航班信息")
public ResponseModel<Object> DynamicFlightInfo(@PathVariable String dynamicFlightId) {
ResponseModel<Object> dataModel = iotFeignClient.DynamicFlightInfo(dynamicFlightId);
if (dataModel != null) {
return ResponseHelper.buildResponse(dataModel.getResult());
}
return ResponseHelper.buildResponse(null);
}
@TycloudOperation( needAuth = true, ApiLevel = UserType.AGENCY)
@GetMapping(value = "AlertCalledStatusPage")
@ApiOperation(httpMethod = "GET", value = "未结束的灾情列表", notes = "未结束的灾情列表")
public ResponseModel<Page<AlertCalled>> AlertCalledStatusPage( @RequestParam(value = "current") Integer current, @RequestParam(value = "size") Integer size) {
if (null == current || null == size) {
current = 1;
size = Integer.MAX_VALUE;
}
List<AlertCalled> list= iAlertCalledService.AlertCalledStatusPage( current, size);
int num= iAlertCalledService.AlertCalledcount(0);
Page<AlertCalled> pageBean = new Page<>(current, size, num);
pageBean.setRecords(list);
return ResponseHelper.buildResponse(pageBean);
}
......
......@@ -449,7 +449,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
listdate.add(new KeyValueLabel("伤亡人数", "casualtiesNum", alertCalled.getCasualtiesNum()));
listdate.add(new KeyValueLabel("联系人", "contactUser", alertCalled.getContactUser()));
listdate.add(new KeyValueLabel("联系电话", "contactPhone", alertCalled.getContactPhone()));
listdate.add(new KeyValueLabel("联系人电话", "contactPhone", alertCalled.getContactPhone()));
// listdate.add(new KeyValueLabel("联系人电话", "contactPhone", alertCalled.getContactPhone()));
list.stream().forEach(alertFormValue -> {
String valueCode = alertFormValue.getFieldValueCode();
if(null == valueCode) {
......@@ -674,11 +674,13 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
//未结案警情统计
@Override
public Integer AlertCalledcount(int type) {
return alertCalledMapper.AlertCalledcount(1);
return alertCalledMapper.AlertCalledcount(0);
}
@Override
public List<AlertCalled> AlertCalledStatusPage(Integer current, Integer size) {
return alertCalledMapper.AlertCalledStatusPage( current, size);
}
@Override
......
......@@ -29,7 +29,7 @@ public class DispatchMapServiceImpl implements IHomePageService {
@Override
public Object getHomePageData() {
Integer num= alertCalledMapper1.AlertCalledcount(1);
Integer num= alertCalledMapper1.AlertCalledcount(0);
return num;
}
}
......@@ -28,7 +28,7 @@ public class DispatchTaskServiceImpl implements IHomePageService {
@Override
public Object getHomePageData() {
Integer num= alertCalledMapper1.AlertCalledcount(1);
Integer num= alertCalledMapper1.AlertCalledcount(0);
return num;
}
}
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