Commit 726006bb authored by chenhao's avatar chenhao

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

parents bc39f947 a0c9c348
package com.yeejoin.amos.boot.biz.config; package com.yeejoin.amos.boot.biz.config;
import io.swagger.annotations.ApiOperation; import java.util.ArrayList;
import java.util.List;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.yeejoin.amos.boot.biz.common.constants.CommonConstant;
import io.swagger.annotations.ApiOperation;
import springfox.documentation.builders.ApiInfoBuilder; import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.ParameterBuilder;
import springfox.documentation.builders.PathSelectors; import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors; import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.schema.ModelRef;
import springfox.documentation.service.ApiInfo; import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.Parameter;
import springfox.documentation.spi.DocumentationType; import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket; import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc; import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
...@@ -52,10 +61,10 @@ public class Swagger2Config { ...@@ -52,10 +61,10 @@ public class Swagger2Config {
.apis(RequestHandlerSelectors.withClassAnnotation(RestController.class)) .apis(RequestHandlerSelectors.withClassAnnotation(RestController.class))
.apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class)) .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
.paths(PathSelectors.any()) .paths(PathSelectors.any())
.build(); .build()
// .securitySchemes(Collections.singletonList(securityScheme())) // .securitySchemes(Collections.singletonList(securityScheme()))
// .securityContexts(securityContexts()); // .securityContexts(securityContexts());
//.globalOperationParameters(setHeaderToken()); .globalOperationParameters(setHeaderToken());
} }
/*** /***
...@@ -72,13 +81,19 @@ public class Swagger2Config { ...@@ -72,13 +81,19 @@ public class Swagger2Config {
* JWT token * JWT token
* @return * @return
*/ */
// private List<Parameter> setHeaderToken() { private List<Parameter> setHeaderToken() {
// ParameterBuilder tokenPar = new ParameterBuilder(); List<Parameter> pars = new ArrayList<>();
// List<Parameter> pars = new ArrayList<>(); ParameterBuilder tokenPar = new ParameterBuilder();
// tokenPar.name(CommonConstant.X_ACCESS_TOKEN).description("token").modelRef(new ModelRef("string")).parameterType("header").required(false).build(); tokenPar.name(CommonConstant.X_ACCESS_TOKEN).description("token").modelRef(new ModelRef("string")).parameterType("header").required(false).build();
// pars.add(tokenPar.build()); ParameterBuilder appKey = new ParameterBuilder();
// return pars; appKey.name("appKey").modelRef(new ModelRef("string")).parameterType("header").required(false).build();
// } ParameterBuilder product = new ParameterBuilder();
product.name("product").modelRef(new ModelRef("string")).parameterType("header").required(false).build();
pars.add(tokenPar.build());
pars.add(appKey.build());
pars.add(product.build());
return pars;
}
/** /**
* api文档的详细信息函数,注意这里的注解引用的是哪个 * api文档的详细信息函数,注意这里的注解引用的是哪个
......
package com.yeejoin.amos.boot.module.command.api.dto;
import com.yeejoin.amos.boot.module.command.api.entity.BasEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
*
*
* @author system_generator
* @date 2021-07-22
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="AlertSummaryDto", description="")
public class AlertSummaryDto extends BasEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "警情id")
private Long alertCalledId;
@ApiModelProperty(value = "文件名称")
private String name;
@ApiModelProperty(value = "文件地址")
private String url;
}
package com.yeejoin.amos.boot.module.command.api.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
import com.yeejoin.amos.boot.module.command.api.entity.BasEntity;
/**
* 前线联络员
*
* @author system_generator
* @date 2021-07-22
*/
@Data
@ApiModel(value="FrontlineLiaisonDto", description="前线联络员")
public class FrontlineLiaisonDto extends BasEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "姓名")
private String name;
@ApiModelProperty(value = "联系电话")
private String phone;
@ApiModelProperty(value = "岗位名称")
private String jobTitle;
@ApiModelProperty(value = "岗位数据字典code")
private String jobTitleCode;
@ApiModelProperty(value = "灾情信息id")
private Long alertCalledId;
}
package com.yeejoin.amos.boot.module.command.api.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.util.Date;
/**
*
*
* @author system_generator
* @date 2021-07-22
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("jc_alert_summary")
public class AlertSummary extends BasEntity {
private static final long serialVersionUID = 1L;
/**
* 警情id
*/
@TableField("alert_called_id")
private Long alertCalledId;
/**
* 文件名称
*/
@TableField("name")
private String name;
/**
* 文件地址
*/
@TableField("url")
private String url;
}
package com.yeejoin.amos.boot.module.command.api.entity;
/**
* @description:
* @author: tw
* @createDate: 2021/7/22
*/
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 公共实体类
*
* @author DELL
*/
@Data
public class BasEntity implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "sequence_nbr", type = IdType.ID_WORKER)
protected Long sequenceNbr;
@TableField(value = "rec_date", fill = FieldFill.INSERT_UPDATE)
protected Date recDate;
@TableField(value = "rec_user_id", fill = FieldFill.INSERT_UPDATE)
protected String recUserId;
@TableField(value = "rec_user_name", fill = FieldFill.INSERT_UPDATE)
protected String recUserName;
/**
* 是否删除
*/
@TableField(value = "is_delete")
private Boolean isDelete;
}
package com.yeejoin.amos.boot.module.command.api.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.util.Date;
/**
* 前线联络员
*
* @author system_generator
* @date 2021-07-22
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("jc_frontline_liaison")
public class FrontlineLiaison extends BasEntity {
private static final long serialVersionUID = 1L;
/**
* 姓名
*/
@TableField("name")
private String name;
/**
* 联系电话
*/
@TableField("phone")
private String phone;
/**
* 岗位名称
*/
@TableField("job_title")
private String jobTitle;
/**
* 岗位数据字典code
*/
@TableField("job_title_code")
private String jobTitleCode;
/**
* 灾情信息id
*/
@TableField("alert_called_id")
private Long alertCalledId;
}
package com.yeejoin.amos.boot.module.command.api.mapper;
import com.yeejoin.amos.boot.module.command.api.entity.AlertSummary;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* Mapper 接口
*
* @author system_generator
* @date 2021-07-22
*/
public interface AlertSummaryMapper extends BaseMapper<AlertSummary> {
}
package com.yeejoin.amos.boot.module.command.api.mapper;
import com.yeejoin.amos.boot.module.command.api.entity.FrontlineLiaison;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* 前线联络员 Mapper 接口
*
* @author system_generator
* @date 2021-07-22
*/
public interface FrontlineLiaisonMapper extends BaseMapper<FrontlineLiaison> {
}
package com.yeejoin.amos.boot.module.command.api.service;
/**
* 接口类
*
* @author system_generator
* @date 2021-07-22
*/
public interface IAlertSummaryService {
}
package com.yeejoin.amos.boot.module.command.api.service;
/**
* 前线联络员接口类
*
* @author system_generator
* @date 2021-07-22
*/
public interface IFrontlineLiaisonService {
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.boot.module.command.api.mapper.AlertSummaryMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.boot.module.command.api.mapper.FrontlineLiaisonMapper">
</mapper>
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
FROM FROM
cb_org_usr cb_org_usr
WHERE WHERE
sequence_nbr IN ( SELECT DISTINCT signed_company_id FROM cb_contract WHERE company_id = 1 ) sequence_nbr IN ( SELECT DISTINCT signed_company_id FROM cb_contract WHERE company_id = #{seq} )
AND biz_org_type = "COMPANY" AND biz_org_type = "COMPANY"
AND is_delete = 0 AND is_delete = 0
</select> </select>
...@@ -33,7 +33,7 @@ WHERE ...@@ -33,7 +33,7 @@ WHERE
FROM FROM
cb_org_usr cb_org_usr
WHERE WHERE
sequence_nbr IN ( SELECT DISTINCT signed_company_id FROM cb_contract WHERE company_id = 1 ) sequence_nbr IN ( SELECT DISTINCT signed_company_id FROM cb_contract WHERE company_id = #{seq} )
AND biz_org_type = "COMPANY" AND biz_org_type = "COMPANY"
AND is_delete = 0 AND is_delete = 0
limit #{pageNum},#{pageSize} limit #{pageNum},#{pageSize}
......
...@@ -28,6 +28,10 @@ public class InstructionsZHDto { ...@@ -28,6 +28,10 @@ public class InstructionsZHDto {
@ApiModelProperty(value = "报送内容") @ApiModelProperty(value = "报送内容")
private String content; private String content;
@ApiModelProperty(value = "发送单位")
private String company="119值班中心";
public InstructionsZHDto(Long sequenceNbr, String type, Date submissionTime, String content) { public InstructionsZHDto(Long sequenceNbr, String type, Date submissionTime, String content) {
this.sequenceNbr = sequenceNbr; this.sequenceNbr = sequenceNbr;
......
package com.yeejoin.amos.boot.module.jcs.api.dto;
import lombok.Data;
@Data
public class KeyValueLabel {
private String key;
private String label;
private Object value;
public KeyValueLabel( String label,String key, Object value) {
super();
this.label = label;
this.key = key;
this.value = value;
}
public KeyValueLabel() {
super();
}
}
\ No newline at end of file
...@@ -2,10 +2,12 @@ package com.yeejoin.amos.boot.module.jcs.api.service; ...@@ -2,10 +2,12 @@ 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.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.entity.AlertCalled; import com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* 警情接警记录 服务类 * 警情接警记录 服务类
...@@ -34,4 +36,7 @@ public interface IAlertCalledService { ...@@ -34,4 +36,7 @@ public interface IAlertCalledService {
* *
* **/ * **/
Object selectAlertCalledById( Long id); Object selectAlertCalledById( Long id);
Map<String,Object> selectAlertCalledKeyValueLabelById( Long id);
} }
package com.yeejoin.amos.boot.module.command.biz.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RestController;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import java.util.List;
import com.yeejoin.amos.boot.module.command.biz.service.impl.AlertSummaryServiceImpl;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import org.springframework.beans.factory.annotation.Autowired;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.command.api.dto.AlertSummaryDto;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
/**
*
*
* @author system_generator
* @date 2021-07-22
*/
@RestController
@Api(tags = "战评总结Api")
@RequestMapping(value = "/command/alert-summary")
public class AlertSummaryController extends BaseController {
@Autowired
AlertSummaryServiceImpl alertSummaryServiceImpl;
/**
* 新增
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/save")
@ApiOperation(httpMethod = "POST", value = "新增", notes = "新增")
public ResponseModel<AlertSummaryDto> save(@RequestBody AlertSummaryDto model) {
model = alertSummaryServiceImpl.createWithModel(model);
return ResponseHelper.buildResponse(model);
}
/**
* 根据sequenceNbr更新
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PutMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新", notes = "根据sequenceNbr更新")
public ResponseModel<AlertSummaryDto> updateBySequenceNbrAlertSummary(@RequestBody AlertSummaryDto model,@PathVariable(value = "sequenceNbr") Long sequenceNbr) {
model.setSequenceNbr(sequenceNbr);
return ResponseHelper.buildResponse(alertSummaryServiceImpl.updateWithModel(model));
}
/**
* 根据sequenceNbr删除
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@DeleteMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "DELETE", value = "根据sequenceNbr删除", notes = "根据sequenceNbr删除")
public ResponseModel<Boolean> deleteBySequenceNbr(HttpServletRequest request, @PathVariable(value = "sequenceNbr") Long sequenceNbr){
return ResponseHelper.buildResponse(alertSummaryServiceImpl.removeById(sequenceNbr));
}
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "GET",value = "根据sequenceNbr查询单个", notes = "根据sequenceNbr查询单个")
public ResponseModel<AlertSummaryDto> selectOne(@PathVariable Long sequenceNbr) {
return ResponseHelper.buildResponse(alertSummaryServiceImpl.queryBySeq(sequenceNbr));
}
/**
* 列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/page")
@ApiOperation(httpMethod = "GET",value = "分页查询", notes = "分页查询")
public ResponseModel<Page<AlertSummaryDto>> queryForPage(@RequestParam(value = "current") int current,@RequestParam
(value = "size") int size) {
Page<AlertSummaryDto> page = new Page<AlertSummaryDto>();
page.setCurrent(current);
page.setSize(size);
return ResponseHelper.buildResponse(alertSummaryServiceImpl.queryForAlertSummaryPage(page));
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "列表全部数据查询", notes = "列表全部数据查询")
@GetMapping(value = "/list")
public ResponseModel<List<AlertSummaryDto>> selectForList() {
return ResponseHelper.buildResponse(alertSummaryServiceImpl.queryForAlertSummaryList());
}
}
package com.yeejoin.amos.boot.module.command.biz.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RestController;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import java.util.List;
import com.yeejoin.amos.boot.module.command.biz.service.impl.FrontlineLiaisonServiceImpl;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import org.springframework.beans.factory.annotation.Autowired;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.command.api.dto.FrontlineLiaisonDto;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
/**
* 前线联络员
*
* @author system_generator
* @date 2021-07-22
*/
@RestController
@Api(tags = "前线联络员Api")
@RequestMapping(value = "/command/frontline-liaison")
public class FrontlineLiaisonController extends BaseController {
@Autowired
FrontlineLiaisonServiceImpl frontlineLiaisonServiceImpl;
/**
* 新增前线联络员
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/save")
@ApiOperation(httpMethod = "POST", value = "新增前线联络员", notes = "新增前线联络员")
public ResponseModel<FrontlineLiaisonDto> save(@RequestBody FrontlineLiaisonDto model) {
model = frontlineLiaisonServiceImpl.createWithModel(model);
return ResponseHelper.buildResponse(model);
}
/**
* 根据sequenceNbr更新
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PutMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新前线联络员", notes = "根据sequenceNbr更新前线联络员")
public ResponseModel<FrontlineLiaisonDto> updateBySequenceNbrFrontlineLiaison(@RequestBody FrontlineLiaisonDto model,@PathVariable(value = "sequenceNbr") Long sequenceNbr) {
model.setSequenceNbr(sequenceNbr);
return ResponseHelper.buildResponse(frontlineLiaisonServiceImpl.updateWithModel(model));
}
/**
* 根据sequenceNbr删除
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@DeleteMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "DELETE", value = "根据sequenceNbr删除前线联络员", notes = "根据sequenceNbr删除前线联络员")
public ResponseModel<Boolean> deleteBySequenceNbr(HttpServletRequest request, @PathVariable(value = "sequenceNbr") Long sequenceNbr){
return ResponseHelper.buildResponse(frontlineLiaisonServiceImpl.removeById(sequenceNbr));
}
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "GET",value = "根据sequenceNbr查询单个前线联络员", notes = "根据sequenceNbr查询单个前线联络员")
public ResponseModel<FrontlineLiaisonDto> selectOne(@PathVariable Long sequenceNbr) {
return ResponseHelper.buildResponse(frontlineLiaisonServiceImpl.queryBySeq(sequenceNbr));
}
/**
* 列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/page")
@ApiOperation(httpMethod = "GET",value = "前线联络员分页查询", notes = "前线联络员分页查询")
public ResponseModel<Page<FrontlineLiaisonDto>> queryForPage(@RequestParam(value = "current") int current,@RequestParam
(value = "size") int size) {
Page<FrontlineLiaisonDto> page = new Page<FrontlineLiaisonDto>();
page.setCurrent(current);
page.setSize(size);
return ResponseHelper.buildResponse(frontlineLiaisonServiceImpl.queryForFrontlineLiaisonPage(page));
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "前线联络员列表全部数据查询", notes = "前线联络员列表全部数据查询")
@GetMapping(value = "/list")
public ResponseModel<List<FrontlineLiaisonDto>> selectForList() {
return ResponseHelper.buildResponse(frontlineLiaisonServiceImpl.queryForFrontlineLiaisonList());
}
}
package com.yeejoin.amos.boot.module.command.biz.service.impl;
import com.yeejoin.amos.boot.module.command.api.entity.AlertSummary;
import com.yeejoin.amos.boot.module.command.api.mapper.AlertSummaryMapper;
import com.yeejoin.amos.boot.module.command.api.service.IAlertSummaryService;
import com.yeejoin.amos.boot.module.command.api.dto.AlertSummaryDto;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.List;
/**
* 服务实现类
*
* @author system_generator
* @date 2021-07-22
*/
@Service
public class AlertSummaryServiceImpl extends BaseService<AlertSummaryDto,AlertSummary,AlertSummaryMapper> implements IAlertSummaryService {
/**
* 分页查询
*/
public Page<AlertSummaryDto> queryForAlertSummaryPage(Page<AlertSummaryDto> page) {
return this.queryForPage(page, null, false);
}
/**
* 列表查询 示例
*/
public List<AlertSummaryDto> queryForAlertSummaryList() {
return this.queryForList("" , false);
}
}
\ No newline at end of file
package com.yeejoin.amos.boot.module.command.biz.service.impl;
import com.yeejoin.amos.boot.module.command.api.entity.FrontlineLiaison;
import com.yeejoin.amos.boot.module.command.api.mapper.FrontlineLiaisonMapper;
import com.yeejoin.amos.boot.module.command.api.service.IFrontlineLiaisonService;
import com.yeejoin.amos.boot.module.command.api.dto.FrontlineLiaisonDto;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.List;
/**
* 前线联络员服务实现类
*
* @author system_generator
* @date 2021-07-22
*/
@Service
public class FrontlineLiaisonServiceImpl extends BaseService<FrontlineLiaisonDto,FrontlineLiaison,FrontlineLiaisonMapper> implements IFrontlineLiaisonService {
/**
* 分页查询
*/
public Page<FrontlineLiaisonDto> queryForFrontlineLiaisonPage(Page<FrontlineLiaisonDto> page) {
return this.queryForPage(page, null, false);
}
/**
* 列表查询 示例
*/
public List<FrontlineLiaisonDto> queryForFrontlineLiaisonList() {
return this.queryForList("" , false);
}
}
\ No newline at end of file
...@@ -19,11 +19,14 @@ import org.springframework.web.bind.annotation.*; ...@@ -19,11 +19,14 @@ import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import org.typroject.tyboot.core.foundation.enumeration.UserType; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil; import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.annotation.Condition;
import org.typroject.tyboot.core.rdbms.annotation.Operator;
import org.typroject.tyboot.core.restful.doc.TycloudOperation; import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper; import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -305,12 +308,15 @@ public class WaterResourceController extends BaseController { ...@@ -305,12 +308,15 @@ public class WaterResourceController extends BaseController {
@ApiOperation(httpMethod = "GET", value = "分页查询", notes = "分页查询") @ApiOperation(httpMethod = "GET", value = "分页查询", notes = "分页查询")
public ResponseModel<Page<WaterResourceDto>> queryForPage(@RequestParam(value = "current") int current, public ResponseModel<Page<WaterResourceDto>> queryForPage(@RequestParam(value = "current") int current,
@RequestParam(value = "size") int size, String name, @RequestParam(value = "size") int size, String name,
@RequestParam(value = "belongBuildingId")ArrayList<Long> belongBuildingId,
Long belongFightingSystemId, Long sequenceNbr,
String resourceType) { String resourceType) {
Page<WaterResourceDto> page = new Page<>(); Page<WaterResourceDto> page = new Page<>();
page.setCurrent(current); page.setCurrent(current);
page.setSize(size); page.setSize(size);
return ResponseHelper.buildResponse(waterResourceServiceImpl.queryForWaterResourcePage(page, name, return ResponseHelper.buildResponse(waterResourceServiceImpl.queryForWaterResourcePage(page, name,
resourceType, true)); resourceType, belongBuildingId, belongFightingSystemId,
sequenceNbr, true));
} }
/** /**
...@@ -349,6 +355,7 @@ public class WaterResourceController extends BaseController { ...@@ -349,6 +355,7 @@ public class WaterResourceController extends BaseController {
/** /**
* 查询水资源类型列表 * 查询水资源类型列表
*
* @return * @return
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
......
package com.yeejoin.amos.boot.module.common.biz.service.impl; package com.yeejoin.amos.boot.module.common.biz.service.impl;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;
...@@ -52,8 +53,12 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate ...@@ -52,8 +53,12 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate
public Page<WaterResourceDto> queryForWaterResourcePage(Page<WaterResourceDto> page, public Page<WaterResourceDto> queryForWaterResourcePage(Page<WaterResourceDto> page,
@Condition(Operator.like) String name, @Condition(Operator.like) String name,
@Condition(Operator.eq) String resourceType, @Condition(Operator.eq) String resourceType,
@Condition(Operator.in) ArrayList<Long> belongBuildingId,
@Condition(Operator.eq) Long belongFightingSystemId,
@Condition(Operator.eq) Long sequenceNbr,
@Condition(Operator.eq) Boolean isDelete) { @Condition(Operator.eq) Boolean isDelete) {
return this.queryForPage(page, null, false, name, resourceType, isDelete); return this.queryForPage(page, null, false, name, resourceType, belongBuildingId, belongFightingSystemId,
sequenceNbr, isDelete);
} }
/** /**
......
package com.yeejoin.amos.boot.module.jcs.biz.service.impl; package com.yeejoin.amos.boot.module.jcs.biz.service.impl;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
...@@ -15,6 +16,7 @@ import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledDto; ...@@ -15,6 +16,7 @@ import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledFormDto; import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledFormDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledObjsDto; import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledObjsDto;
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.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.entity.Template; import com.yeejoin.amos.boot.module.jcs.api.entity.Template;
...@@ -37,10 +39,7 @@ import org.typroject.tyboot.core.rdbms.service.BaseService; ...@@ -37,10 +39,7 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.typroject.tyboot.core.restful.utils.ResponseHelper; import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.ArrayList; import java.util.*;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.function.Function; import java.util.function.Function;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -340,4 +339,33 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall ...@@ -340,4 +339,33 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
} }
return StringUtils.replaceEach(tempContent, keys, strList.toArray(new String[strList.size()])); return StringUtils.replaceEach(tempContent, keys, strList.toArray(new String[strList.size()]));
} }
@Override
public Map<String,Object> selectAlertCalledKeyValueLabelById(Long id) {
// 警情基本信息
AlertCalled alertCalled = this.getById(id);
QueryWrapper<AlertFormValue> queryWrapper = new QueryWrapper<>();
Map<String,Object> map=new HashMap();
map.put("title","【"+alertCalled.getAlertType()+"】"+alertCalled.getAddress());
queryWrapper.eq("alert_called_id", id);
// 警情动态表单数据
List<KeyValueLabel> listdate =new ArrayList<>();
List<AlertFormValue> list = iAlertFormValueService.list(queryWrapper);
listdate.add(new KeyValueLabel("接警时间","callTime",alertCalled.getCallTime()));
listdate.add(new KeyValueLabel("警情地点","address",alertCalled.getAddress()));
listdate.add(new KeyValueLabel("警情类型","alertType",alertCalled.getAlertType()));
listdate.add(new KeyValueLabel("警情阶段","alertStage",alertCalled.getAlertStage()));
listdate.add(new KeyValueLabel("警情等级","responseLevel","无"));
listdate.add(new KeyValueLabel("被困人数","trappedNum",alertCalled.getTrappedNum()));
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()));
list.stream().forEach(AlertFormValue->{
listdate.add(new KeyValueLabel(AlertFormValue.getFieldName(),AlertFormValue.getFieldCode(), AlertFormValue.getFieldValue()));
});
map.put("data",listdate);
return map;
}
} }
...@@ -443,21 +443,21 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al ...@@ -443,21 +443,21 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
case "警情初报": case "警情初报":
content="通知"+AlertSubmittedZHDto.getUserName()+","+js.getString("address")+"发生"+js.getString("alertType"); content="通知"+ AlertSubmittedZHDto.getCompanyName()+":"+AlertSubmittedZHDto.getUserName()+","+js.getString("address")+"发生"+js.getString("alertType");
break; break;
case "警情续报": case "警情续报":
content="通知"+AlertSubmittedZHDto.getUserName()+","+"现场被困人数:"+js.getString("trappedNum")+"人伤亡人数:"+js.getString("casualtiesNum")+"人。"; content="通知"+ AlertSubmittedZHDto.getCompanyName()+":"+AlertSubmittedZHDto.getUserName()+","+"现场被困人数:"+js.getString("trappedNum")+"人伤亡人数:"+js.getString("casualtiesNum")+"人。";
break; break;
case "非警情确认": case "非警情确认":
content="通知"+AlertSubmittedZHDto.getUserName()+","+"此警情现场确认为假警情。"; content="通知"+ AlertSubmittedZHDto.getCompanyName()+":"+AlertSubmittedZHDto.getUserName()+","+"此警情现场确认为假警情。";
break; break;
case "警情结案": case "警情结案":
content="通知"+AlertSubmittedZHDto.getUserName()+","+"此警情已完场警情处置,警情已结案。"; content="通知"+ AlertSubmittedZHDto.getCompanyName()+":"+AlertSubmittedZHDto.getUserName()+","+"此警情已完场警情处置,警情已结案。";
break; break;
default: default:
......
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