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;
import com.alibaba.fastjson.JSONObject;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import java.util.List;
/**
* 警情报送记录
*
......@@ -29,4 +33,15 @@ public class AlertSubmittedDto {
*/
@ApiModelProperty(value = "报送方式code(电话、短信)")
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 {
private String companyCode;
@ApiModelProperty(value = "联系人id")
private Integer contactUserId;
private Long contactUserId;
@ApiModelProperty(value = "联系人")
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> {
* @return SchedulingReportingVo
*/
SchedulingReportingVo listReportingByParam(AlertSubmittedDto queryParam);
/**
* 警情报送保存
*
* @param alertSubmittedDto
* @return
*/
Object save(AlertSubmittedDto alertSubmittedDto);
}
......@@ -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.module.jcs.api.dto.AlertSubmittedDto;
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 io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
......@@ -47,8 +48,8 @@ public class AlertSubmittedController extends BaseController {
@TycloudOperation(needAuth = true, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/save", method = RequestMethod.POST)
@ApiOperation(httpMethod = "POST", value = "新增警情报送记录", notes = "新增警情报送记录")
public ResponseModel saveAlertSubmitted(HttpServletRequest request, @RequestBody AlertSubmitted alertSubmitted){
return CommonResponseUtil.success(iAlertSubmittedService.save(alertSubmitted));
public ResponseModel saveAlertSubmitted(HttpServletRequest request, @RequestBody AlertSubmittedDto alertSubmittedDto) {
return CommonResponseUtil.success(iAlertSubmittedService.save(alertSubmittedDto));
}
/**
......@@ -63,9 +64,6 @@ public class AlertSubmittedController extends BaseController {
return CommonResponseUtil.success(iAlertSubmittedService.removeById(id));
}
/**
* 修改警情报送记录
* @return
......@@ -77,8 +75,6 @@ public class AlertSubmittedController extends BaseController {
return CommonResponseUtil.success(iAlertSubmittedService.updateById(alertSubmitted));
}
/**
* 根据id查询
* @param id
......@@ -95,6 +91,7 @@ public class AlertSubmittedController extends BaseController {
@RequestMapping(value = "/scheduling/list", method = RequestMethod.POST)
@ApiOperation(httpMethod = "POST", value = "根据警情id查询融合调度列表", notes = "根据警情id查询融合调度列表")
public ResponseModel listSchedulingByParam(@RequestBody AlertSubmittedDto queryParam) {
queryParam.setSubmissionMethodCode(SubmissionMethodEnum.SMS.getCode());
return CommonResponseUtil.success(iAlertSubmittedService.listSchedulingByParam(queryParam));
}
......@@ -102,6 +99,7 @@ public class AlertSubmittedController extends BaseController {
@RequestMapping(value = "/reporting/list", method = RequestMethod.POST)
@ApiOperation(httpMethod = "POST", value = "根据警情id查询警情报送列表", notes = "根据警情id查询警情报送列表")
public ResponseModel listReportingByParam(@RequestBody AlertSubmittedDto queryParam) {
queryParam.setSubmissionMethodCode(SubmissionMethodEnum.SMS.getCode());
return CommonResponseUtil.success(iAlertSubmittedService.listReportingByParam(queryParam));
}
......
package com.yeejoin.amos.boot.module.jcs.biz.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Api;
import org.apache.commons.lang3.StringUtils;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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.IFirefightersContractService;
import com.yeejoin.amos.boot.module.jcs.api.service.IFirefightersEducationService;
......@@ -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.vo.FirefightersListVo;
import com.yeejoin.amos.boot.module.jcs.api.vo.FirefightersVo;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletRequest;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jcs.api.entity.FireTeam;
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.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
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.List;
import java.util.Map;
......@@ -220,11 +219,15 @@ public class FirefightersController extends BaseController {
@ApiOperation(httpMethod = "GET", value = "新列表分页查询", notes = "新表分页查询")
public ResponseModel getFirefighters(Integer pageNum,Integer pageSize, FirefightersListVo firefighters){
//条件分页
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);
return CommonResponseUtil.success(pageBean);
}
if (null == pageNum || null == pageSize) {
pageNum = 1;
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);
return CommonResponseUtil.success(pageBean);
}
}
......@@ -7,6 +7,7 @@ import com.yeejoin.amos.boot.module.jcs.api.service.IAlertSubmittedService;
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.SchedulingReportingVo;
import org.checkerframework.checker.units.qual.A;
import org.springframework.stereotype.Service;
import java.util.List;
......@@ -39,4 +40,15 @@ public class AlertSubmittedServiceImpl extends ServiceImpl<AlertSubmittedMapper,
schedulingReportingVo.setExtraInfo(extraInfo);
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