Commit 204cd27f authored by tangwei's avatar tangwei

Merge branch 'developer' of http://172.16.10.76/moa/amos-boot-biz into developer

parents ac8ce0d5 a25205ab
package com.yeejoin.amos.boot.module.jcs.api.dto; package com.yeejoin.amos.boot.module.jcs.api.dto;
import com.alibaba.fastjson.JSONObject;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import java.util.List;
/** /**
* 警情报送记录 * 警情报送记录
* *
...@@ -29,4 +33,15 @@ public class AlertSubmittedDto { ...@@ -29,4 +33,15 @@ public class AlertSubmittedDto {
*/ */
@ApiModelProperty(value = "报送方式code(电话、短信)") @ApiModelProperty(value = "报送方式code(电话、短信)")
private String submissionMethodCode; private String submissionMethodCode;
/**
* 报送对象
*/
@ApiModelProperty(value = "报送对象")
private List<SubmitTargetCompanyDto> submitTargetList;
/**
* 报送内容
*/
private JSONObject submitContent;
} }
package com.yeejoin.amos.boot.module.jcs.api.dto;
import java.util.List;
/**
* 警情报送公司对象dto
* @author DELL
*/
public class SubmitTargetCompanyDto {
/**
* 单位id
*/
private Long companyId;
/**
* 单位名称
*/
private String companyName;
/**
* 值班电话
*/
private List<SubmitTargetPersonDto> personList;
}
package com.yeejoin.amos.boot.module.jcs.api.dto;
/**
* 警情报送目标人员dto
* @author DELL
*/
public class SubmitTargetPersonDto {
/**
* 人员id
*/
private Long personId;
/**
* 人员名称
*/
private String personName;
/**
* 人员电话
*/
private String personPhone;
}
...@@ -48,7 +48,7 @@ public class FireTeam extends BaseEntity { ...@@ -48,7 +48,7 @@ public class FireTeam extends BaseEntity {
private String companyCode; private String companyCode;
@ApiModelProperty(value = "联系人id") @ApiModelProperty(value = "联系人id")
private Integer contactUserId; private Long contactUserId;
@ApiModelProperty(value = "联系人") @ApiModelProperty(value = "联系人")
private String contactUser; private String contactUser;
......
package com.yeejoin.amos.boot.module.jcs.api.enums;
/**
* 警情填报类型枚举
*
* @author DELL
*/
public enum AlertBusinessTypeEnum {
/**
* 警情续报,非警情确认,警情结案
*/
警情续报("reportAlert", "313", "警情续报"),
非警情确认("notAlert", "314", "非警情确认"),
警情结案("endAlert", "315", "警情结案");
private String key;
private String code;
private String name;
AlertBusinessTypeEnum(String key, String code, String name) {
}
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
package com.yeejoin.amos.boot.module.jcs.api.enums;
/**
* 警情调度类型枚举
*
* @author DELL
*/
public enum AlertSchedulingTypeEnum {
/**
* 融合调度,外部协调
*/
融合调度("integrated", "331", "融合调度"),
外部协调("external", "332", "外部协调");
private String key;
private String code;
private String name;
AlertSchedulingTypeEnum(String key, String code, String name) {
}
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
package com.yeejoin.amos.boot.module.jcs.api.enums;
/**
* 报送方式枚举
*
* @author DELL
*/
public enum SubmissionMethodEnum {
PHONE("phone", "311", "电话"),
SMS("sms", "312", "短信");
private String key;
private String code;
private String name;
SubmissionMethodEnum(String key, String code, String name) {
}
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
...@@ -28,4 +28,12 @@ public interface IAlertSubmittedService extends IService<AlertSubmitted> { ...@@ -28,4 +28,12 @@ public interface IAlertSubmittedService extends IService<AlertSubmitted> {
* @return SchedulingReportingVo * @return SchedulingReportingVo
*/ */
SchedulingReportingVo listReportingByParam(AlertSubmittedDto queryParam); SchedulingReportingVo listReportingByParam(AlertSubmittedDto queryParam);
/**
* 警情报送保存
*
* @param alertSubmittedDto
* @return
*/
Object save(AlertSubmittedDto alertSubmittedDto);
} }
...@@ -8,6 +8,7 @@ import com.yeejoin.amos.boot.biz.common.utils.CommonResponseUtil; ...@@ -8,6 +8,7 @@ import com.yeejoin.amos.boot.biz.common.utils.CommonResponseUtil;
import com.yeejoin.amos.boot.biz.common.utils.NameUtils; import com.yeejoin.amos.boot.biz.common.utils.NameUtils;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertSubmittedDto; import com.yeejoin.amos.boot.module.jcs.api.dto.AlertSubmittedDto;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertSubmitted; import com.yeejoin.amos.boot.module.jcs.api.entity.AlertSubmitted;
import com.yeejoin.amos.boot.module.jcs.api.enums.SubmissionMethodEnum;
import com.yeejoin.amos.boot.module.jcs.api.service.IAlertSubmittedService; import com.yeejoin.amos.boot.module.jcs.api.service.IAlertSubmittedService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
...@@ -47,8 +48,8 @@ public class AlertSubmittedController extends BaseController { ...@@ -47,8 +48,8 @@ public class AlertSubmittedController extends BaseController {
@TycloudOperation(needAuth = true, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = true, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/save", method = RequestMethod.POST) @RequestMapping(value = "/save", method = RequestMethod.POST)
@ApiOperation(httpMethod = "POST", value = "新增警情报送记录", notes = "新增警情报送记录") @ApiOperation(httpMethod = "POST", value = "新增警情报送记录", notes = "新增警情报送记录")
public ResponseModel saveAlertSubmitted(HttpServletRequest request, @RequestBody AlertSubmitted alertSubmitted){ public ResponseModel saveAlertSubmitted(HttpServletRequest request, @RequestBody AlertSubmittedDto alertSubmittedDto) {
return CommonResponseUtil.success(iAlertSubmittedService.save(alertSubmitted)); return CommonResponseUtil.success(iAlertSubmittedService.save(alertSubmittedDto));
} }
/** /**
...@@ -63,9 +64,6 @@ public class AlertSubmittedController extends BaseController { ...@@ -63,9 +64,6 @@ public class AlertSubmittedController extends BaseController {
return CommonResponseUtil.success(iAlertSubmittedService.removeById(id)); return CommonResponseUtil.success(iAlertSubmittedService.removeById(id));
} }
/** /**
* 修改警情报送记录 * 修改警情报送记录
* @return * @return
...@@ -77,8 +75,6 @@ public class AlertSubmittedController extends BaseController { ...@@ -77,8 +75,6 @@ public class AlertSubmittedController extends BaseController {
return CommonResponseUtil.success(iAlertSubmittedService.updateById(alertSubmitted)); return CommonResponseUtil.success(iAlertSubmittedService.updateById(alertSubmitted));
} }
/** /**
* 根据id查询 * 根据id查询
* @param id * @param id
...@@ -95,6 +91,7 @@ public class AlertSubmittedController extends BaseController { ...@@ -95,6 +91,7 @@ public class AlertSubmittedController extends BaseController {
@RequestMapping(value = "/scheduling/list", method = RequestMethod.POST) @RequestMapping(value = "/scheduling/list", method = RequestMethod.POST)
@ApiOperation(httpMethod = "POST", value = "根据警情id查询融合调度列表", notes = "根据警情id查询融合调度列表") @ApiOperation(httpMethod = "POST", value = "根据警情id查询融合调度列表", notes = "根据警情id查询融合调度列表")
public ResponseModel listSchedulingByParam(@RequestBody AlertSubmittedDto queryParam) { public ResponseModel listSchedulingByParam(@RequestBody AlertSubmittedDto queryParam) {
queryParam.setSubmissionMethodCode(SubmissionMethodEnum.SMS.getCode());
return CommonResponseUtil.success(iAlertSubmittedService.listSchedulingByParam(queryParam)); return CommonResponseUtil.success(iAlertSubmittedService.listSchedulingByParam(queryParam));
} }
...@@ -102,6 +99,7 @@ public class AlertSubmittedController extends BaseController { ...@@ -102,6 +99,7 @@ public class AlertSubmittedController extends BaseController {
@RequestMapping(value = "/reporting/list", method = RequestMethod.POST) @RequestMapping(value = "/reporting/list", method = RequestMethod.POST)
@ApiOperation(httpMethod = "POST", value = "根据警情id查询警情报送列表", notes = "根据警情id查询警情报送列表") @ApiOperation(httpMethod = "POST", value = "根据警情id查询警情报送列表", notes = "根据警情id查询警情报送列表")
public ResponseModel listReportingByParam(@RequestBody AlertSubmittedDto queryParam) { public ResponseModel listReportingByParam(@RequestBody AlertSubmittedDto queryParam) {
queryParam.setSubmissionMethodCode(SubmissionMethodEnum.SMS.getCode());
return CommonResponseUtil.success(iAlertSubmittedService.listReportingByParam(queryParam)); return CommonResponseUtil.success(iAlertSubmittedService.listReportingByParam(queryParam));
} }
......
package com.yeejoin.amos.boot.module.jcs.biz.controller; package com.yeejoin.amos.boot.module.jcs.biz.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.swagger.annotations.Api; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import org.apache.commons.lang3.StringUtils; import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springframework.web.bind.annotation.RestController; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.biz.common.utils.CommonResponseUtil;
import com.yeejoin.amos.boot.biz.common.utils.NameUtils;
import com.yeejoin.amos.boot.module.jcs.api.entity.Firefighters;
import com.yeejoin.amos.boot.module.jcs.api.entity.FirefightersContacts;
import com.yeejoin.amos.boot.module.jcs.api.entity.FirefightersContract;
import com.yeejoin.amos.boot.module.jcs.api.entity.FirefightersEducation;
import com.yeejoin.amos.boot.module.jcs.api.entity.FirefightersJacket;
import com.yeejoin.amos.boot.module.jcs.api.entity.FirefightersPost;
import com.yeejoin.amos.boot.module.jcs.api.entity.FirefightersThought;
import com.yeejoin.amos.boot.module.jcs.api.service.IFirefightersContactsService; import com.yeejoin.amos.boot.module.jcs.api.service.IFirefightersContactsService;
import com.yeejoin.amos.boot.module.jcs.api.service.IFirefightersContractService; import com.yeejoin.amos.boot.module.jcs.api.service.IFirefightersContractService;
import com.yeejoin.amos.boot.module.jcs.api.service.IFirefightersEducationService; import com.yeejoin.amos.boot.module.jcs.api.service.IFirefightersEducationService;
...@@ -14,31 +23,21 @@ import com.yeejoin.amos.boot.module.jcs.api.service.IFirefightersService; ...@@ -14,31 +23,21 @@ import com.yeejoin.amos.boot.module.jcs.api.service.IFirefightersService;
import com.yeejoin.amos.boot.module.jcs.api.service.IFirefightersThoughtService; import com.yeejoin.amos.boot.module.jcs.api.service.IFirefightersThoughtService;
import com.yeejoin.amos.boot.module.jcs.api.vo.FirefightersListVo; import com.yeejoin.amos.boot.module.jcs.api.vo.FirefightersListVo;
import com.yeejoin.amos.boot.module.jcs.api.vo.FirefightersVo; import com.yeejoin.amos.boot.module.jcs.api.vo.FirefightersVo;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import io.swagger.annotations.Api;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.PathVariable;
import javax.servlet.http.HttpServletRequest; import org.springframework.web.bind.annotation.RequestBody;
import com.baomidou.mybatisplus.core.metadata.IPage; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.RequestMethod;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.springframework.web.bind.annotation.RestController;
import com.yeejoin.amos.boot.module.jcs.api.entity.FireTeam; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import com.yeejoin.amos.boot.module.jcs.api.entity.Firefighters;
import com.yeejoin.amos.boot.module.jcs.api.entity.FirefightersContacts;
import com.yeejoin.amos.boot.module.jcs.api.entity.FirefightersContract;
import com.yeejoin.amos.boot.module.jcs.api.entity.FirefightersEducation;
import com.yeejoin.amos.boot.module.jcs.api.entity.FirefightersJacket;
import com.yeejoin.amos.boot.module.jcs.api.entity.FirefightersPost;
import com.yeejoin.amos.boot.module.jcs.api.entity.FirefightersThought;
import com.yeejoin.amos.boot.biz.common.utils.CommonResponseUtil;
import com.yeejoin.amos.boot.biz.common.utils.NameUtils;
import org.typroject.tyboot.core.restful.doc.TycloudOperation; import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.foundation.exception.BaseException;
import javax.servlet.http.HttpServletRequest;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -220,9 +219,13 @@ public class FirefightersController extends BaseController { ...@@ -220,9 +219,13 @@ public class FirefightersController extends BaseController {
@ApiOperation(httpMethod = "GET", value = "新列表分页查询", notes = "新表分页查询") @ApiOperation(httpMethod = "GET", value = "新列表分页查询", notes = "新表分页查询")
public ResponseModel getFirefighters(Integer pageNum,Integer pageSize, FirefightersListVo firefighters){ public ResponseModel getFirefighters(Integer pageNum,Integer pageSize, FirefightersListVo firefighters){
//条件分页 //条件分页
List<Firefighters> list= iFirefightersService.getFirefighters((pageNum - 1) * pageSize, pageSize, firefighters); if (null == pageNum || null == pageSize) {
Map<String, Long> num= iFirefightersService.getFirefightersCount((pageNum - 1) * pageSize, pageSize, firefighters); pageNum = 1;
Page<Firefighters> pageBean =new Page<>(pageNum, pageSize,num.get("num")); pageSize = Integer.MAX_VALUE;
}
List<Firefighters> list = iFirefightersService.getFirefighters((pageNum - 1) * pageSize, pageSize, firefighters);
Map<String, Long> num = iFirefightersService.getFirefightersCount((pageNum - 1) * pageSize, pageSize, firefighters);
Page<Firefighters> pageBean = new Page<>(pageNum, pageSize, num.get("num"));
pageBean.setRecords(list); pageBean.setRecords(list);
return CommonResponseUtil.success(pageBean); return CommonResponseUtil.success(pageBean);
} }
......
...@@ -7,6 +7,7 @@ import com.yeejoin.amos.boot.module.jcs.api.service.IAlertSubmittedService; ...@@ -7,6 +7,7 @@ import com.yeejoin.amos.boot.module.jcs.api.service.IAlertSubmittedService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yeejoin.amos.boot.module.jcs.api.vo.AlertSubmittedExtVo; import com.yeejoin.amos.boot.module.jcs.api.vo.AlertSubmittedExtVo;
import com.yeejoin.amos.boot.module.jcs.api.vo.SchedulingReportingVo; import com.yeejoin.amos.boot.module.jcs.api.vo.SchedulingReportingVo;
import org.checkerframework.checker.units.qual.A;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List; import java.util.List;
...@@ -39,4 +40,15 @@ public class AlertSubmittedServiceImpl extends ServiceImpl<AlertSubmittedMapper, ...@@ -39,4 +40,15 @@ public class AlertSubmittedServiceImpl extends ServiceImpl<AlertSubmittedMapper,
schedulingReportingVo.setExtraInfo(extraInfo); schedulingReportingVo.setExtraInfo(extraInfo);
return schedulingReportingVo; return schedulingReportingVo;
} }
@Override
public Object save(AlertSubmittedDto alertSubmittedDto) {
// 1.保存警情记录主表
AlertSubmitted alertSubmitted = new AlertSubmitted();
alertSubmitted.setAlertCalledId(alertSubmittedDto.getAlertCalledId());
alertSubmitted.setBusinessTypeCode(alertSubmittedDto.getBusinessTypeCode());
// 2.保存任务表
// 3.发送任务消息
return null;
}
} }
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