Commit 4b258a54 authored by maoying's avatar maoying

解决pom文件冲突

parents f2df9b7b ba46a271
...@@ -11,21 +11,21 @@ ...@@ -11,21 +11,21 @@
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java"> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes> <attributes>
<attribute name="test" value="true"/>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"> <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes> <attributes>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> <classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes> <attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="output" path="target/classes"/> <classpathentry kind="output" path="target/classes"/>
......
...@@ -4,10 +4,6 @@ ...@@ -4,10 +4,6 @@
<artifactId>amos-boot-biz-common</artifactId> <artifactId>amos-boot-biz-common</artifactId>
<packaging>jar</packaging> <packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<parent> <parent>
<artifactId>amos-biz-boot</artifactId> <artifactId>amos-biz-boot</artifactId>
<groupId>com.amosframework.boot</groupId> <groupId>com.amosframework.boot</groupId>
...@@ -15,19 +11,87 @@ ...@@ -15,19 +11,87 @@
</parent> </parent>
<dependencies> <dependencies>
<!-- knife4j -->
<dependency> <dependency>
<groupId>com.github.xiaoymin</groupId> <groupId>com.yeejoin</groupId>
<artifactId>knife4j-spring-boot-starter</artifactId> <artifactId>amos-feign-systemctl</artifactId>
<version>${knife4j-spring-boot-starter.version}</version> <version>${amos.version}</version>
</dependency>
<dependency>
<groupId>org.typroject</groupId>
<artifactId>tyboot-core-rdbms</artifactId>
<version>${tyboot-version}</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>org.javassist</groupId> <groupId>org.typroject</groupId>
<artifactId>javassist</artifactId> <artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
</exclusion>
<exclusion>
<artifactId>mysql-connector-java</artifactId>
<groupId>mysql</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<artifactId>mysql-connector-java</artifactId>
<groupId>mysql</groupId>
</dependency>
<dependency>
<groupId>org.typroject</groupId>
<artifactId>tyboot-core-restful</artifactId>
<version>${tyboot-version}</version>
<exclusions>
<exclusion>
<groupId>org.typroject</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
</exclusion>
<exclusion>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-undertow</artifactId>
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.typroject</groupId>
<artifactId>tyboot-core-auth</artifactId>
<version>${tyboot-version}</version>
<exclusions>
<exclusion>
<groupId>org.typroject</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.amosframework.boot</groupId>
<artifactId>amos-boot-core</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-generator</artifactId>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.javassist</groupId> <groupId>org.javassist</groupId>
<artifactId>javassist</artifactId> <artifactId>javassist</artifactId>
<version>3.21.0-GA</version> <version>3.21.0-GA</version>
...@@ -59,6 +123,12 @@ ...@@ -59,6 +123,12 @@
<artifactId>itext-asian</artifactId> <artifactId>itext-asian</artifactId>
<version>5.2.0</version> <version>5.2.0</version>
</dependency> </dependency>
<dependency>
<groupId>com.google.zxing</groupId>
<artifactId>core</artifactId>
<version>3.3.0</version>
<scope>compile</scope>
</dependency>
</dependencies> </dependencies>
</project> </project>
package com.yeejoin.amos.boot.biz.common.aop; package com.yeejoin.amos.boot.biz.common.aop;
import java.util.Arrays; import com.alibaba.fastjson.JSONObject;
import java.util.List; import com.yeejoin.amos.boot.biz.common.bo.CompanyBo;
import java.util.Map; import com.yeejoin.amos.boot.biz.common.bo.DepartmentBo;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import javax.servlet.http.HttpServletRequest; import com.yeejoin.amos.boot.biz.common.bo.RoleBo;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.component.feign.model.FeignClientResult;
import com.yeejoin.amos.feign.privilege.Privilege;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import com.yeejoin.amos.feign.privilege.model.CompanyModel;
import com.yeejoin.amos.feign.privilege.model.DepartmentModel;
import com.yeejoin.amos.feign.privilege.model.RoleModel;
import org.aspectj.lang.JoinPoint; import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.AfterReturning; import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Aspect;
...@@ -17,20 +24,15 @@ import org.springframework.core.annotation.Order; ...@@ -17,20 +24,15 @@ import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes; import org.springframework.web.context.request.ServletRequestAttributes;
import org.typroject.tyboot.core.auth.exception.AuthException;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.utils.Bean; import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import com.alibaba.fastjson.JSONObject; import javax.servlet.http.HttpServletRequest;
import com.yeejoin.amos.boot.biz.common.bo.CompanyBo; import java.util.Arrays;
import com.yeejoin.amos.boot.biz.common.bo.DepartmentBo; import java.util.List;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams; import java.util.Map;
import com.yeejoin.amos.boot.biz.common.bo.RoleBo;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.component.feign.model.FeignClientResult;
import com.yeejoin.amos.feign.privilege.Privilege;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import com.yeejoin.amos.feign.privilege.model.CompanyModel;
import com.yeejoin.amos.feign.privilege.model.DepartmentModel;
import com.yeejoin.amos.feign.privilege.model.RoleModel;
/** /**
* controller层切面 用于用户数据缓存 供 sql自动填充使用 * controller层切面 用于用户数据缓存 供 sql自动填充使用
...@@ -56,23 +58,24 @@ public class ControllerAop { ...@@ -56,23 +58,24 @@ public class ControllerAop {
} }
@Before("userCache()") @Before("userCache()")
public void doBefore(JoinPoint joinPoint) throws Throwable { public void doBefore(JoinPoint joinPoint) {
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
HttpServletRequest request = attributes.getRequest(); HttpServletRequest request = attributes.getRequest();
String token = request.getHeader("token"); //TODO tyboot 框架拦截器已缓存数据
if (token == null) { String token = RequestContext.getToken();
token = request.getHeader("X-Access-Token"); // 平台studio配置的下载接口token从url里取
} if (ValidationUtil.isEmpty(token)) {
String authProduct = request.getHeader("product"); fillRequestContext(request);
if (authProduct == null) { token = RequestContext.getToken();
authProduct = request.getParameter("product");
} }
String authAppKey = request.getHeader("appKey"); // 不需要添加请求头的接口
if (authAppKey == null) { String[] url = new String[]{"/api/user/selectInfo", "/api/user/save/curCompany", "/jcs/command/lookHtmlText"};
authAppKey = request.getParameter("appKey"); // 获取请求路径
if (Arrays.asList(url).contains(request.getRequestURI())) {
return;
} }
String authToken = buildKey(token);
if (token != null) { if (token != null) {
String pattern = RedisKey.buildPatternKey(token);
//验证token有效性,防止token失效 //验证token有效性,防止token失效
AgencyUserModel userModel; AgencyUserModel userModel;
try { try {
...@@ -83,25 +86,20 @@ public class ControllerAop { ...@@ -83,25 +86,20 @@ public class ControllerAop {
} }
} catch (Exception e) { } catch (Exception e) {
//删除失效token缓存 //删除失效token缓存
redisUtils.del(authToken); redisUtils.getAndDeletePatternKeys(pattern);
throw new RuntimeException(e.getMessage()); throw new RuntimeException(e.getMessage());
} }
// 不需要添加请求头的接口
String[] url = new String[]{"/api/user/selectInfo", "/api/user/save/curCompany", "/jcs/command/lookHtmlText"};
// 获取请求路径
if (Arrays.asList(url).contains(request.getRequestURI())) {
// 暂无需要
} else {
if (!redisUtils.hasKey(authToken)) {
saveUserRedis(userModel, token); saveUserRedis(userModel, token);
} else {
throw new AuthException("请求未包含认证信息.");
} }
} }
}
// buildRequestCxt(authToken,authProduct,authAppKey);
System.out.println(redisUtils.get(authToken));
}
public void saveUserRedis(AgencyUserModel user, String token) { private void saveUserRedis(AgencyUserModel user, String token) {
String authToken = RedisKey.buildReginKey(user.getUserId(), token);
if (redisUtils.hasKey(authToken)) {
return;
}
CompanyBo company = new CompanyBo(); CompanyBo company = new CompanyBo();
DepartmentBo department = new DepartmentBo(); DepartmentBo department = new DepartmentBo();
RoleBo role = new RoleBo(); RoleBo role = new RoleBo();
...@@ -129,14 +127,8 @@ public class ControllerAop { ...@@ -129,14 +127,8 @@ public class ControllerAop {
reginParams.setRole(role); reginParams.setRole(role);
reginParams.setDepartment(department); reginParams.setDepartment(department);
reginParams.setUserModel(user); reginParams.setUserModel(user);
String authToken = buildKey(token);
redisUtils.set(authToken, JSONObject.toJSONString(reginParams), redisRegionTimeSecond); redisUtils.set(authToken, JSONObject.toJSONString(reginParams), redisRegionTimeSecond);
} }
public String buildKey(String token) {
//由于用户id 不是接口携带参数,为了避免,公共字段填充时频繁访问平台,缓存用户信息时,
//return "region_" + userId + "_" + token;
return "region_"+ token;
}
@AfterReturning(returning = "ret", pointcut = "userCache()") @AfterReturning(returning = "ret", pointcut = "userCache()")
public void doAfterReturning(Object ret) throws Throwable { public void doAfterReturning(Object ret) throws Throwable {
...@@ -148,9 +140,13 @@ public class ControllerAop { ...@@ -148,9 +140,13 @@ public class ControllerAop {
// GlobalCache.paramMap.remove(token); // GlobalCache.paramMap.remove(token);
// } // }
} }
// public void buildRequestCxt(String token,String product,String appKey){
// RequestContext.setToken(token); private void fillRequestContext(HttpServletRequest request) {
// RequestContext.setProduct(product); String token = request.getParameterMap().get("token")[0];
// RequestContext.setAppKey(appKey); String product = request.getParameterMap().get("product")[0];
//} String appKey = request.getParameterMap().get("appKey")[0];
RequestContext.setToken(token);
RequestContext.setProduct(product);
RequestContext.setAppKey(appKey);
}
} }
package com.yeejoin.amos.boot.biz.common.bo; package com.yeejoin.amos.boot.biz.common.bo;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel; import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import lombok.Builder;
import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
...@@ -17,51 +19,13 @@ public class ReginParams implements Serializable { ...@@ -17,51 +19,13 @@ public class ReginParams implements Serializable {
private AgencyUserModel userModel; private AgencyUserModel userModel;
private PersonIdentity personIdentity; private PersonIdentity personIdentity;
@Data
public static class PersonIdentity implements Serializable { public static class PersonIdentity implements Serializable {
private String identityType; private String identityType;
private String personSeq; private String personSeq;
private String personName; private String personName;
private String companyId; private String companyId;
private String companyName;
public PersonIdentity(String identityType, String personSeq, String personName,String companyId){
this.identityType = identityType;
this.personSeq = personSeq;
this.personName = personName;
this.companyId = companyId;
}
public String getPersonSeq() {
return personSeq;
}
public void setPersonSeq(String personSeq) {
this.personSeq = personSeq;
}
public String getIdentityType() {
return identityType;
}
public void setIdentityType(String identityType) {
this.identityType = identityType;
}
public String getPersonName() {
return personName;
}
public void setPersonName(String personName) {
this.personName = personName;
}
public String getCompanyId() {
return companyId;
}
public void setCompanyId(String companyId) {
this.companyId = companyId;
}
} }
public PersonIdentity getPersonIdentity() { public PersonIdentity getPersonIdentity() {
......
package com.yeejoin.amos.boot.biz.common.constants;
/**
* @Description: 业务通用常量类
* @Author: DELL
* @Date: 2021/5/26
*/
public interface BizConstant {
/**
* 经度
*/
public final static String LONGITUDE = "longitude";
/**
* 纬度
*/
public final static String LATITUDE = "latitude";
/**
* 地址
*/
public final static String ADDRESS = "address";
}
package com.yeejoin.amos.boot.biz.common.controller; package com.yeejoin.amos.boot.biz.common.controller;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams; import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils; import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel; import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import springfox.documentation.annotations.ApiIgnore; import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletRequest;
/** /**
* 基础控制器 * 基础控制器
* *
...@@ -35,16 +34,12 @@ public class BaseController { ...@@ -35,16 +34,12 @@ public class BaseController {
protected String getToken() { protected String getToken() {
return RequestContext.getToken(); return RequestContext.getToken();
} }
public String buildKey(String token) {
//由于用户id 不是接口携带参数,为了避免,公共字段填充时频繁访问平台,缓存用户信息时,
//return "region_" + userId + "_" + token;
return "region_"+ token;
}
/** /**
* 用户选择信心redis获取 * 用户选择信心redis获取
**/ **/
protected ReginParams getSelectedOrgInfo() { protected ReginParams getSelectedOrgInfo() {
return JSONObject.parseObject(redisUtils.get(buildKey(RequestContext.getToken())).toString(), ReginParams.class); return JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
} }
protected String getOrgCode(ReginParams reginParams) { protected String getOrgCode(ReginParams reginParams) {
......
package com.yeejoin.amos.boot.biz.common.dao.mapper; package com.yeejoin.amos.boot.biz.common.dao.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.biz.common.entity.DataDictionary; import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
...@@ -10,5 +12,20 @@ import com.yeejoin.amos.boot.biz.common.entity.DataDictionary; ...@@ -10,5 +12,20 @@ import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
* @date 2021-06-07 * @date 2021-06-07
*/ */
public interface DataDictionaryMapper extends BaseMapper<DataDictionary> { public interface DataDictionaryMapper extends BaseMapper<DataDictionary> {
/**
* 获取领域专家的列表信息,且带有该领域下的专家统计数量
* @return
*/
public List<DataDictionary> getDataDictionaryListAndCount();
/**
* 获取包含联动单位的联动单位树信息
* @return
*/
public List<DataDictionary> getNoInLinkUnit();
/**
* 根据code值查询
* @return
*/
public DataDictionary getByCode(String code,String type);
} }
package com.yeejoin.amos.boot.biz.common.dto;
import com.yeejoin.amos.feign.privilege.model.PermissionModel;
import lombok.Data;
/**
* @description:
* @author: tw
* @createDate: 2021/9/8
*/
@Data
public class PermissionModelDto {
private Double value;
private String permissionName;
private Long parentId;
private String permissionType;
private String frontComponent;
private String icon;
private String extraIcon;
private String path;
private String defaultRoute;
private Boolean isRoute;
private Boolean isBlank;
private String authCode;
private String authType;
private Integer sort;
private String menuAgent;
private String agencyCode;
private String appCode;
private String appName;
private Boolean hasPermission;
private Boolean isWarp;
private Boolean fixed;
private String warpProps;
private Long warpGroupSeq;
private java.util.Collection<PermissionModelDto> children;
private Long sequenceNbr;
}
package com.yeejoin.amos.boot.biz.common.entity; package com.yeejoin.amos.boot.biz.common.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
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;
...@@ -36,8 +37,15 @@ public class DataDictionary extends BaseEntity { ...@@ -36,8 +37,15 @@ public class DataDictionary extends BaseEntity {
@ApiModelProperty(value = "父级") @ApiModelProperty(value = "父级")
private Long parent; private Long parent;
@ApiModelProperty(value = "类型说明")
private String typeDesc;
//新加排序字段 //新加排序字段
@ApiModelProperty(value = "排序字段") @ApiModelProperty(value = "排序字段")
private int sortNum; private int sortNum;
@ApiModelProperty(value = "对应消防专家的数量,仅适应与消防资源专家领域树结构的展示")
@TableField(exist = false)
private int count;
} }
package com.yeejoin.amos.boot.biz.common.enums;
import lombok.AllArgsConstructor;
/**
* @description:
* @author: tw
* @createDate: 2021/9/8
*/
@AllArgsConstructor
public enum HomePageEnum {
DISPATCHMAP("dispatchMap", "com.yeejoin.amos.boot.module.command.biz.service.impl.DispatchMapServiceImpl");
private String code;//对应菜单组件名称
private String url;//组件值对应实现类的包名
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public static HomePageEnum statOf(String code) {
for (HomePageEnum state : values())
if (state.getCode().equals(code))
return state;
return null;
}
}
package com.yeejoin.amos.boot.biz.common.feign; package com.yeejoin.amos.boot.biz.common.feign;
import com.yeejoin.amos.boot.biz.common.dto.OptionDto; import com.yeejoin.amos.boot.biz.common.dto.OptionDto;
import com.yeejoin.amos.component.feign.model.FeignClientResult;
import com.yeejoin.amos.component.feign.utils.FeignUtil; import com.yeejoin.amos.component.feign.utils.FeignUtil;
import com.yeejoin.amos.feign.privilege.Privilege;
import com.yeejoin.amos.feign.privilege.client.AgencyUserClient;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import com.yeejoin.amos.feign.systemctl.Systemctl; import com.yeejoin.amos.feign.systemctl.Systemctl;
import com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel; import com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
...@@ -76,4 +80,20 @@ public class AmosFeignService { ...@@ -76,4 +80,20 @@ public class AmosFeignService {
); );
return optionsMoList; return optionsMoList;
} }
/**
* 根据用户id查询指定平台用户信息.
*
* @param userId
* @return
*/
public AgencyUserModel queryAgencyUserByUserId(String userId) {
AgencyUserModel userModel = null;
try {
userModel = FeignUtil.remoteCall(() -> Privilege.agencyUserClient.queryByUserId(userId));
return userModel;
} catch (Exception e) {
throw new RuntimeException("获取平台用户数据出错");
}
}
} }
package com.yeejoin.amos.boot.biz.common.service.impl; package com.yeejoin.amos.boot.biz.common.service.impl;
import java.util.Collection;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeejoin.amos.boot.biz.common.dao.mapper.DataDictionaryMapper; import com.yeejoin.amos.boot.biz.common.dao.mapper.DataDictionaryMapper;
import com.yeejoin.amos.boot.biz.common.dto.DataDictionaryDto; import com.yeejoin.amos.boot.biz.common.dto.DataDictionaryDto;
import com.yeejoin.amos.boot.biz.common.entity.DataDictionary; import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
import com.yeejoin.amos.boot.biz.common.service.IDataDictionaryService; import com.yeejoin.amos.boot.biz.common.service.IDataDictionaryService;
import com.yeejoin.amos.boot.biz.common.utils.*; import com.yeejoin.amos.boot.biz.common.utils.Menu;
import org.springframework.beans.factory.annotation.Autowired; import com.yeejoin.amos.boot.biz.common.utils.MenuFrom;
import org.springframework.beans.factory.annotation.Value; import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import org.springframework.stereotype.Service; import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import org.typroject.tyboot.core.rdbms.service.BaseService; import com.yeejoin.amos.boot.biz.common.utils.TreeParser;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import java.util.Collection;
import java.util.List;
/** /**
* 数据字典 服务实现类 * 数据字典 服务实现类
...@@ -30,7 +34,8 @@ public class DataDictionaryServiceImpl extends BaseService<DataDictionaryDto, Da ...@@ -30,7 +34,8 @@ public class DataDictionaryServiceImpl extends BaseService<DataDictionaryDto, Da
@Value("${redis.cache.failure.time}") @Value("${redis.cache.failure.time}")
private long time; private long time;
@Autowired
DataDictionaryMapper dataDictionaryMapper;
@Override @Override
public Object getFireChemical(String type) throws Exception { public Object getFireChemical(String type) throws Exception {
...@@ -43,7 +48,8 @@ public class DataDictionaryServiceImpl extends BaseService<DataDictionaryDto, Da ...@@ -43,7 +48,8 @@ public class DataDictionaryServiceImpl extends BaseService<DataDictionaryDto, Da
return obj; return obj;
} else { } else {
Collection<DataDictionary> list = this.list(queryWrapper); Collection<DataDictionary> list = this.list(queryWrapper);
List<MenuFrom> menus = TreeParser.getTreexin(null, list, DataDictionary.class.getName(), "getCode", 0, // 数据字典生成树方法 原先通过getCode做主键 现修改为 getSequenceNbr 后期数据字典parent字段保存id 而不要保存code by kongfm 2021-09-08
List<MenuFrom> menus = TreeParser.getTreexin(null, list, DataDictionary.class.getName(), "getSequenceNbr", 2,
"getName", "getParent", null); "getName", "getParent", null);
MenuFrom Me = new MenuFrom("-1", "-1", "-1", "危化品库", "危化品库", "危化品库", "-1", null); MenuFrom Me = new MenuFrom("-1", "-1", "-1", "危化品库", "危化品库", "危化品库", "-1", null);
Me.setIsLeaf(false); Me.setIsLeaf(false);
...@@ -64,7 +70,8 @@ public class DataDictionaryServiceImpl extends BaseService<DataDictionaryDto, Da ...@@ -64,7 +70,8 @@ public class DataDictionaryServiceImpl extends BaseService<DataDictionaryDto, Da
return obj; return obj;
} else { } else {
Collection<DataDictionary> list = this.list(queryWrapper); Collection<DataDictionary> list = this.list(queryWrapper);
List<Menu> menus = TreeParser.getTree(null, list, DataDictionary.class.getName(), "getCode", 0, "getName" // 数据字典生成树方法 原先通过getCode做主键 现修改为 getSequenceNbr 后期数据字典parent字段保存id 而不要保存code by kongfm 2021-09-08
List<Menu> menus = TreeParser.getTree(null, list, DataDictionary.class.getName(), "getSequenceNbr", 2, "getName"
, "getParent", null); , "getParent", null);
redisUtils.set(RedisKey.DATA_DICTIONARY_CODE + type, JSON.toJSON(menus), time); redisUtils.set(RedisKey.DATA_DICTIONARY_CODE + type, JSON.toJSON(menus), time);
return menus; return menus;
...@@ -77,9 +84,23 @@ public class DataDictionaryServiceImpl extends BaseService<DataDictionaryDto, Da ...@@ -77,9 +84,23 @@ public class DataDictionaryServiceImpl extends BaseService<DataDictionaryDto, Da
queryWrapper.orderByAsc("sort_num"); queryWrapper.orderByAsc("sort_num");
Collection<DataDictionary> list = this.list(queryWrapper); Collection<DataDictionary> list = this.list(queryWrapper);
List<MenuFrom> menus = TreeParser.getTreexin(null, list, DataDictionary.class.getName(), "getCode", 0, "getName" // 数据字典生成树方法 原先通过getCode做主键 现修改为 getSequenceNbr 后期数据字典parent字段保存id 而不要保存code by kongfm 2021-09-08
List<MenuFrom> menus = TreeParser.getTreexin(null, list, DataDictionary.class.getName(), "getSequenceNbr", 2, "getName"
, "getParent", null); , "getParent", null);
return menus; return menus;
} }
public DataDictionary getByCode(String code,String type) {
DataDictionary byCode = dataDictionaryMapper.getByCode(code,type);
return byCode;
}
public List<DataDictionary> getDataDictionaryAndCount(){
List<DataDictionary> list= dataDictionaryMapper.getDataDictionaryListAndCount();
return list;
}
} }
...@@ -34,6 +34,11 @@ public class DateUtils { ...@@ -34,6 +34,11 @@ public class DateUtils {
private static final SimpleDateFormat shortDateNew = new SimpleDateFormat("yyyy/M/d"); private static final SimpleDateFormat shortDateNew = new SimpleDateFormat("yyyy/M/d");
/** /**
* 获取时分秒
*/
private static final SimpleDateFormat timeSdf = new SimpleDateFormat("HH:mm:ss");
/**
* 获取当前时间 * 获取当前时间
* *
* @return 当前日期时间 * @return 当前日期时间
...@@ -58,13 +63,13 @@ public class DateUtils { ...@@ -58,13 +63,13 @@ public class DateUtils {
} }
/** /**
* 获取现在时间字符串 * 获取现在日期字符串
* *
* @return返回字符串格式 yyyy-MM-dd HH:mm:ss * @return返回字符串格式 yyyy-MM-dd
*/ */
public static String getNowStrLong() { public static String getDateNowShortStr() {
Date currentTime = new Date(); Date currentTime = new Date();
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat formatter = new SimpleDateFormat(DATE_PATTERN);
String dateString = formatter.format(currentTime); String dateString = formatter.format(currentTime);
return dateString; return dateString;
} }
...@@ -150,7 +155,7 @@ public class DateUtils { ...@@ -150,7 +155,7 @@ public class DateUtils {
* @throws ParseException * @throws ParseException
*/ */
public static String dateFormat(Date date, String pattern) throws ParseException { public static String dateFormat(Date date, String pattern) throws ParseException {
if (StringUtils.isNotEmpty(pattern)) { if (StringUtils.isEmpty(pattern)) {
pattern = DateUtils.DATE_PATTERN; pattern = DateUtils.DATE_PATTERN;
} }
SimpleDateFormat sdf = new SimpleDateFormat(pattern); SimpleDateFormat sdf = new SimpleDateFormat(pattern);
...@@ -198,7 +203,7 @@ public class DateUtils { ...@@ -198,7 +203,7 @@ public class DateUtils {
* @throws ParseException * @throws ParseException
*/ */
public static Date dateParse(String dateTimeString, String pattern) throws ParseException { public static Date dateParse(String dateTimeString, String pattern) throws ParseException {
if (StringUtils.isNotEmpty(pattern)) { if (StringUtils.isEmpty(pattern)) {
pattern = DateUtils.DATE_PATTERN; pattern = DateUtils.DATE_PATTERN;
} }
SimpleDateFormat sdf = new SimpleDateFormat(pattern); SimpleDateFormat sdf = new SimpleDateFormat(pattern);
...@@ -687,4 +692,19 @@ public class DateUtils { ...@@ -687,4 +692,19 @@ public class DateUtils {
int age = birth.until(now).getYears(); int age = birth.until(now).getYears();
return age; return age;
} }
/**
* 根据两个日期返回相差的时分秒
* @param newTime 靠后时间
* @param oldTime 靠前时间
* @return
*/
public static String getTimestr(Date newTime, Date oldTime) {
Long newTimes = newTime.getTime();
Long oldTimes = oldTime.getTime();
// 不改时间会多加八个小时
timeSdf.setTimeZone(TimeZone.getTimeZone("GMT+00:00"));
return timeSdf.format(newTimes-oldTimes);
}
} }
package com.yeejoin.amos.boot.biz.common.utils; package com.yeejoin.amos.boot.biz.common.utils;
import com.yeejoin.amos.boot.biz.common.dto.PermissionModelDto;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import java.util.List;
/*** /***
* *
*文件类 *文件类
...@@ -10,4 +13,5 @@ import org.springframework.web.multipart.MultipartFile; ...@@ -10,4 +13,5 @@ import org.springframework.web.multipart.MultipartFile;
public interface FileService { public interface FileService {
String uploadFile(MultipartFile file,String product,String appKey,String token ); String uploadFile(MultipartFile file,String product,String appKey,String token );
List<PermissionModelDto> currentPermissionTree();
} }
package com.yeejoin.amos.boot.biz.common.utils;
import org.apache.commons.io.IOUtils;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.client.HttpClient;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
import org.apache.http.conn.ssl.TrustStrategy;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.ssl.SSLContextBuilder;
import org.apache.http.util.EntityUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSession;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.Charset;
import java.security.GeneralSecurityException;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class HttpUtils {
private static PoolingHttpClientConnectionManager connMgr;
private static RequestConfig requestConfig;
private static final int MAX_TIMEOUT = 50000;
private static final Logger logger = LoggerFactory.getLogger(HttpUtils.class);
static {
// 设置连接池
connMgr = new PoolingHttpClientConnectionManager();
// 设置连接池大小
connMgr.setMaxTotal(100);
connMgr.setDefaultMaxPerRoute(connMgr.getMaxTotal());
// Validate connections after 1 sec of inactivity
connMgr.setValidateAfterInactivity(5000);
RequestConfig.Builder configBuilder = RequestConfig.custom();
// 设置连接超时
configBuilder.setConnectTimeout(MAX_TIMEOUT);
// 设置读取超时
configBuilder.setSocketTimeout(MAX_TIMEOUT);
// 设置从连接池获取连接实例的超时
configBuilder.setConnectionRequestTimeout(MAX_TIMEOUT);
requestConfig = configBuilder.build();
}
/**
* 发送 GET 请求(HTTP),不带输入数据
*
* @param url
* @return
*/
public static String doGet(String url) {
return doGet(url, new HashMap<String, Object>());
}
/**
* 发送 GET 请求(HTTP),K-V形式
*
* @param url
* @param params
* @return
*/
public static String doGet(String url, Map<String, Object> params) {
String apiUrl = url;
StringBuffer param = new StringBuffer();
int i = 0;
for (String key : params.keySet()) {
if (i == 0)
param.append("?");
else
param.append("&");
param.append(key).append("=").append(params.get(key));
i++;
}
apiUrl += param;
String result = null;
HttpClient httpClient = null;
if (apiUrl.startsWith("https")) {
httpClient = HttpClients.custom().setSSLSocketFactory(createSSLConnSocketFactory())
.setConnectionManager(connMgr).setDefaultRequestConfig(requestConfig).build();
} else {
httpClient = HttpClients.createDefault();
}
try {
HttpGet httpGet = new HttpGet(apiUrl);
HttpResponse response = httpClient.execute(httpGet);
HttpEntity entity = response.getEntity();
if (entity != null) {
InputStream instream = entity.getContent();
result = IOUtils.toString(instream, "UTF-8");
}
} catch (IOException e) {
e.printStackTrace();
}
return result;
}
/**
* 发送 POST 请求(HTTP),不带输入数据
*
* @param apiUrl
* @return
*/
public static String doPost(String apiUrl) {
return doPost(apiUrl, new HashMap<String, Object>());
}
/**
* 发送 POST 请求,K-V形式
*
* @param apiUrl
* API接口URL
* @param params
* 参数map
* @return
*/
public static String doPost(String apiUrl, Map<String, Object> params) {
CloseableHttpClient httpClient = null;
if (apiUrl.startsWith("https")) {
httpClient = HttpClients.custom().setSSLSocketFactory(createSSLConnSocketFactory())
.setConnectionManager(connMgr).setDefaultRequestConfig(requestConfig).build();
} else {
httpClient = HttpClients.createDefault();
}
String httpStr = null;
HttpPost httpPost = new HttpPost(apiUrl);
CloseableHttpResponse response = null;
try {
httpPost.setConfig(requestConfig);
List<NameValuePair> pairList = new ArrayList<>(params.size());
for (Map.Entry<String, Object> entry : params.entrySet()) {
NameValuePair pair = new BasicNameValuePair(entry.getKey(), entry.getValue()!=null?entry.getValue().toString():"");
pairList.add(pair);
}
httpPost.setEntity(new UrlEncodedFormEntity(pairList, Charset.forName("UTF-8")));
response = httpClient.execute(httpPost);
HttpEntity entity = response.getEntity();
httpStr = EntityUtils.toString(entity, "UTF-8");
} catch (IOException e) {
e.printStackTrace();
} finally {
if (response != null) {
try {
EntityUtils.consume(response.getEntity());
} catch (IOException e) {
e.printStackTrace();
}
}
}
return httpStr;
}
/**
* 发送 POST 请求,JSON形式,接收端需要支持json形式,否则取不到数据
*
* @param apiUrl
* @param json
* json对象
* @return
*/
public static String doPost(String apiUrl, String json) {
CloseableHttpClient httpClient = null;
if (apiUrl.startsWith("https")) {
httpClient = HttpClients.custom().setSSLSocketFactory(createSSLConnSocketFactory()).setConnectionManager(connMgr).setDefaultRequestConfig(requestConfig).build();
} else {
httpClient = HttpClients.createDefault();
}
String httpStr = null;
HttpPost httpPost = new HttpPost(apiUrl);
CloseableHttpResponse response = null;
try {
httpPost.setConfig(requestConfig);
StringEntity stringEntity = new StringEntity(json, "UTF-8");// 解决中文乱码问题
stringEntity.setContentEncoding("UTF-8");
stringEntity.setContentType("application/json");
httpPost.setEntity(stringEntity);
response = httpClient.execute(httpPost);
HttpEntity entity = response.getEntity();
httpStr = EntityUtils.toString(entity, "UTF-8");
} catch (IOException e) {
e.printStackTrace();
} finally {
if (response != null) {
try {
EntityUtils.consume(response.getEntity());
} catch (IOException e) {
e.printStackTrace();
}
}
}
return httpStr;
}
/**
* 创建SSL安全连接
*
* @return
*/
private static SSLConnectionSocketFactory createSSLConnSocketFactory() {
SSLConnectionSocketFactory sslsf = null;
try {
SSLContext sslContext = new SSLContextBuilder().loadTrustMaterial(null, new TrustStrategy() {
public boolean isTrusted(X509Certificate[] chain, String authType) throws CertificateException {
return true;
}
}).build();
sslsf = new SSLConnectionSocketFactory(sslContext, new HostnameVerifier() {
@Override
public boolean verify(String arg0, SSLSession arg1) {
return true;
}
});
} catch (GeneralSecurityException e) {
e.printStackTrace();
}
return sslsf;
}
}
package com.yeejoin.amos.boot.biz.common.utils;
/**
* tweeter的snowflake 移植到Java:
* (a) id构成: 42位的时间前缀 + 10位的节点标识 + 12位的sequence避免并发的数字(12位不够用时强制得到新的时间前缀)
* 注意这里进行了小改动: snowkflake是5位的datacenter加5位的机器id; 这里变成使用10位的机器id
* (b) 对系统时间的依赖性非常强,需关闭ntp的时间同步功能。当检测到ntp时间调整后,将会拒绝分配id
*/
public class IdWorker {
private final long workerId;
private final long epoch = 1403854494756L; // 时间起始标记点,作为基准,一般取系统的最近时间
private final long workerIdBits = 10L; // 机器标识位数
private final long maxWorkerId = -1L ^ -1L << this.workerIdBits;// 机器ID最大值: 1023
private long sequence = 0L; // 0,并发控制
private final long sequenceBits = 12L; //毫秒内自增位
private final long workerIdShift = this.sequenceBits; // 12
private final long timestampLeftShift = this.sequenceBits + this.workerIdBits;// 22
private final long sequenceMask = -1L ^ -1L << this.sequenceBits; // 4095,111111111111,12位
private long lastTimestamp = -1L;
private IdWorker(long workerId) {
if (workerId > this.maxWorkerId || workerId < 0) {
throw new IllegalArgumentException(String.format("worker Id can't be greater than %d or less than 0", this.maxWorkerId));
}
this.workerId = workerId;
}
public synchronized long nextId() throws Exception {
long timestamp = this.timeGen();
if (this.lastTimestamp == timestamp) { // 如果上一个timestamp与新产生的相等,则sequence加一(0-4095循环); 对新的timestamp,sequence从0开始
this.sequence = this.sequence + 1 & this.sequenceMask;
if (this.sequence == 0) {
timestamp = this.tilNextMillis(this.lastTimestamp);// 重新生成timestamp
}
} else {
this.sequence = 0;
}
if (timestamp < this.lastTimestamp) {
throw new Exception(String.format("clock moved backwards.Refusing to generate id for %d milliseconds", (this.lastTimestamp - timestamp)));
}
this.lastTimestamp = timestamp;
return timestamp - this.epoch << this.timestampLeftShift | this.workerId << this.workerIdShift | this.sequence;
}
private static IdWorker flowIdWorker = new IdWorker(1);
public static IdWorker getFlowIdWorkerInstance() {
return flowIdWorker;
}
/**
* 等待下一个毫秒的到来, 保证返回的毫秒数在参数lastTimestamp之后
*/
private long tilNextMillis(long lastTimestamp) throws InterruptedException {
long timestamp = this.timeGen();
while (timestamp <= lastTimestamp) {
timestamp = this.timeGen();
}
return timestamp;
}
/**
* 获得系统当前毫秒数
*/
private static long timeGen() throws InterruptedException {
return System.currentTimeMillis();
}
}
\ No newline at end of file
package com.yeejoin.amos.boot.biz.common.utils;
import com.google.zxing.BarcodeFormat;
import com.google.zxing.EncodeHintType;
import com.google.zxing.MultiFormatWriter;
import com.google.zxing.common.BitMatrix;
import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;
import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Hashtable;
import java.util.Random;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
/**
* 二维码工具类
*
* @author Administrator
*/
public class QRCodeUtil {
private static final String CHARSET = "utf-8";
private static final int QRCODE_SIZE = 45;
private static Random random = new Random();
private static int randomNumForQrCode;
/**
* <pre>
* 根据当前记录ID生成QRCode
* </pre>
*
* @return
*/
public static String generateQRCode(Date dateCreated, String pointNo) {
return String.valueOf(dateCreated.getTime() + pointNo);
}
/**
* <pre>
* 生成QRCode
* </pre>
*
* @return
*/
public static String generateQRCode() {
String res;
//加锁生成随机数,保证自增后释放
Lock lock = new ReentrantLock();
lock.lock();
randomNumForQrCode += 1;
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
try {
res = simpleDateFormat.format(new Date(System.currentTimeMillis())).substring(5, 8) + String.valueOf(IdWorker.getFlowIdWorkerInstance().nextId()).substring(0, 10) + randomNumForQrCode;
} catch (Exception e) {
Random random = new Random(System.currentTimeMillis());
String tmp = "";
for (int i = 0; i < 13; i++) {
tmp += random.nextInt(10);
}
res = simpleDateFormat.format(new Date(System.currentTimeMillis())).substring(2, 8) + tmp.substring(0, 10) + randomNumForQrCode;
} finally {
lock.unlock();
}
return res;
}
/**
* 生成临时的qrCode
*
* @return
*/
public static String temporaryQrCode() {
long qrCode = -1 * System.currentTimeMillis();
qrCode += (long) (random.nextDouble() * 10000000);
return String.valueOf(qrCode);
}
/**
* 根据二维码信息,生成二维码图片 用户excel,word等导出图片
*
* @param content
* @return
*/
public static byte[] generateQRCodeImageByteData(String content) {
ByteArrayOutputStream out = new ByteArrayOutputStream();
try {
Hashtable<EncodeHintType, Object> hints = new Hashtable<EncodeHintType, Object>();
hints.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.H);
hints.put(EncodeHintType.CHARACTER_SET, CHARSET);
hints.put(EncodeHintType.MARGIN, 1);
BitMatrix bitMatrix = new MultiFormatWriter().encode(
content
, BarcodeFormat.QR_CODE
, QRCODE_SIZE
, QRCODE_SIZE,
hints);
int width = bitMatrix.getWidth();
int height = bitMatrix.getHeight();
BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
for (int x = 0; x < width; x++) {
for (int y = 0; y < height; y++) {
image.setRGB(x, y, bitMatrix.get(x, y) ? 0xFF000000 : 0xFFFFFFFF);
}
}
ImageIO.write(image, "png", out);
return out.toByteArray();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
out.close();
} catch (IOException e) {
e.printStackTrace();
}
}
return null;
}
}
...@@ -28,20 +28,34 @@ public class RedisKey { ...@@ -28,20 +28,34 @@ public class RedisKey {
public static final String ALERTCALLED_ID="alertcalled_id_"; public static final String ALERTCALLED_ID="alertcalled_id_";
/**特种设备根据警情id查询警情详情记录*/ /**特种设备根据警情id查询警情详情记录*/
public static final String TZS_ALERTCALLED_ID="tzs_alertcalled_id_"; public static final String TZS_ALERTCALLED_ID="tzs_alertcalled_id_";
/**联通CTI token */
public static final String CTI_TOKEN = "cti_token";
/** 驼峰转下划线(简单写法,效率低于{@link #humpToLine2(String)}) */ /** 驼峰转下划线(简单写法,效率低于 ) */
public static String humpToLine(String str) { public static String humpToLine(String str) {
return str.replaceAll("[A-Z]", "_$0").toLowerCase(); return str.replaceAll("[A-Z]", "_$0").toLowerCase();
} }
/** /**
* 创建redis key * 用户新缓存前缀
*
* @param token
* @return
*/ */
public static String buildKey(String token) { public static final String REGION_REDIS_PREFIX = "biz_";
return "region_" + token; /**
* 创建区域key
* @param token 权限
* @return String
*/
public static String buildReginKey(String userId, String token) {
return REGION_REDIS_PREFIX + userId + "_" + token;
}
/**
* 模糊重新区域key
* @param token 权限
* @return String
*/
public static String buildPatternKey(String token) {
return REGION_REDIS_PREFIX + "*" + "_" + token;
} }
/** /**
......
...@@ -442,4 +442,12 @@ public class RedisUtils { ...@@ -442,4 +442,12 @@ public class RedisUtils {
redisTemplate.opsForList().set(key, index, value); redisTemplate.opsForList().set(key, index, value);
return true; return true;
} }
public Long getAndDeletePatternKeys(String pattern) {
Set<String> keys = redisTemplate.keys(pattern);
if (!CollectionUtils.isEmpty(keys)) {
return redisTemplate.delete(keys);
}
return null;
}
} }
...@@ -11,6 +11,8 @@ import org.springframework.web.bind.annotation.RequestParam; ...@@ -11,6 +11,8 @@ import org.springframework.web.bind.annotation.RequestParam;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import feign.Response;
@FeignClient(name = "AMOS-API-WORKFLOW", path = "workflow", configuration = { CommonMultipartSupportConfig.class }) @FeignClient(name = "AMOS-API-WORKFLOW", path = "workflow", configuration = { CommonMultipartSupportConfig.class })
public interface WorkflowFeignService { public interface WorkflowFeignService {
/** /**
...@@ -74,7 +76,44 @@ public interface WorkflowFeignService { ...@@ -74,7 +76,44 @@ public interface WorkflowFeignService {
* @param processInstanceId * @param processInstanceId
* @return * @return
*/ */
@RequestMapping(value = "/activitiHistory/tasks/{processInstanceId}", method = RequestMethod.GET) @RequestMapping(value = "/activitiHistory/historyTask/{processInstanceId}", method = RequestMethod.GET)
JSONObject queryTasksByProcessInstanceId(@PathVariable("processInstanceId") String processInstanceId); JSONObject queryHistoryTasksByProcessInstanceId(@PathVariable("processInstanceId") String processInstanceId);
/**
* 拾取任务
* @param taskID
* @return
*/
@RequestMapping(value = "/task/pickuptask/{taskID}", method = RequestMethod.PUT)
JSONObject pickuptask(@PathVariable("taskID") String taskID) ;
/**
* 直接完成任务
* @param taskId
* @param variable
* @return
*/
@RequestMapping(value = "/task/complete/{taskId}", method = RequestMethod.POST)
JSONObject completeByVariable(@PathVariable("taskId") String taskId, @RequestBody HashMap<String, Object> variable);
@RequestMapping(value = "/task/getTaskAssign/{taskId}", method = RequestMethod.GET)
JSONObject getTaskAssign(@PathVariable("taskId") String taskId) ;
/**
* 不操作FormInstance直接完成任务
* @param taskID
* @param variable
* @return
* @throws Exception
*/
@RequestMapping(value = "/task/completeTask/noFromInstanceAdd/{taskID}", method = RequestMethod.POST)
JSONObject completeNoExecuteFromInstanceAdd(@PathVariable("taskID") String taskID, @RequestBody(required = false) HashMap<String, Object> variable) throws Exception;
/**
* 流程图高亮
* */
@RequestMapping(value = "/activitiHistory/gethighLineImg/{processInstanceId}", method = RequestMethod.GET)
Response thighLineImg(@PathVariable("processInstanceId") String processInstanceId) ;
/**
* 流程图高亮图片
* */
@RequestMapping(value = "/activitiHistory/gethighLine",method = RequestMethod.GET)
Response thighLine(@RequestParam("instanceId") String instanceId);
} }
...@@ -14,6 +14,7 @@ import org.springframework.util.ObjectUtils; ...@@ -14,6 +14,7 @@ import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.core.foundation.context.RequestContext; import org.typroject.tyboot.core.foundation.context.RequestContext;
import java.util.Date; import java.util.Date;
import java.util.Map;
/** /**
* @author Dell * @author Dell
...@@ -39,27 +40,26 @@ public class MetaHandler implements MetaObjectHandler { ...@@ -39,27 +40,26 @@ public class MetaHandler implements MetaObjectHandler {
*/ */
@Override @Override
public void insertFill(MetaObject metaObject) { public void insertFill(MetaObject metaObject) {
autoFillUser(metaObject); autoFillUser(metaObject, metaObject.getOriginalObject());
} }
private void autoFillUser(MetaObject metaObject) { private void autoFillUser(MetaObject metaObject, Object entity) {
//获取用户信息 以及当前用户登录公司部门,角色 //获取用户信息 以及当前用户登录公司部门,角色
String userId = RequestContext.getExeUserId();
ReginParams reginParams = ReginParams reginParams =
JSONObject.parseObject(null != redisUtils.get(RedisKey.buildKey(getToken())) ? JSONObject.parseObject(null != redisUtils.get(RedisKey.buildReginKey(userId, getToken())) ?
redisUtils.get(RedisKey.buildKey(getToken())).toString() : null, ReginParams.class); redisUtils.get(RedisKey.buildReginKey(userId, getToken())).toString() : null, ReginParams.class);
if (ObjectUtils.isEmpty(reginParams)) { if (ObjectUtils.isEmpty(reginParams)) {
return; return;
} }
AgencyUserModel agencyUserModel = reginParams.getUserModel(); AgencyUserModel agencyUserModel = reginParams.getUserModel();
if(ObjectUtils.isEmpty(reginParams) || ObjectUtils.isEmpty(agencyUserModel)){ if (ObjectUtils.isEmpty(reginParams) || ObjectUtils.isEmpty(agencyUserModel)) {
return; return;
} }
Object entity = metaObject.getOriginalObject();
if (isExistField("recUserId", entity)) { if (isExistField("recUserId", entity)) {
this.setFieldValByName("recUserId", agencyUserModel.getUserId(), metaObject); this.setFieldValByName("recUserId", agencyUserModel.getUserId(), metaObject);
} }
if (isExistField("recUserName", entity)) { if (isExistField("recUserName", entity)) {
this.setFieldValByName("recUserName", agencyUserModel.getUserName(), metaObject); this.setFieldValByName("recUserName", agencyUserModel.getUserName(), metaObject);
} }
...@@ -71,16 +71,12 @@ public class MetaHandler implements MetaObjectHandler { ...@@ -71,16 +71,12 @@ public class MetaHandler implements MetaObjectHandler {
Date currentDate = new Date(); Date currentDate = new Date();
this.setFieldValByName("recDate", currentDate, metaObject); this.setFieldValByName("recDate", currentDate, metaObject);
} }
// if (isExistField("companyCode", entity)) { // if (isExistField("companyCode", entity)) {
// this.setFieldValByName("companyCode", reginParams.getDepartment().getOrgCode(), metaObject); // this.setFieldValByName("companyCode", reginParams.getDepartment().getOrgCode(), metaObject);
// } // }
// if (isExistField("companyName", entity)) { // if (isExistField("companyName", entity)) {
// this.setFieldValByName("companyName", reginParams.getDepartment().getDepartmentName(), metaObject); // this.setFieldValByName("companyName", reginParams.getDepartment().getDepartmentName(), metaObject);
// } // }
} }
private Boolean isExistField(String field, Object obj) { private Boolean isExistField(String field, Object obj) {
...@@ -102,6 +98,8 @@ public class MetaHandler implements MetaObjectHandler { ...@@ -102,6 +98,8 @@ public class MetaHandler implements MetaObjectHandler {
*/ */
@Override @Override
public void updateFill(MetaObject metaObject) { public void updateFill(MetaObject metaObject) {
Object updateEntity = ((Map) metaObject.getOriginalObject()).get("et");
autoFillUser(metaObject, updateEntity);
Date currentDate = new Date(); Date currentDate = new Date();
this.setFieldValByName("updateTime", currentDate, metaObject); this.setFieldValByName("updateTime", currentDate, metaObject);
} }
......
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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.common.api.mapper.DataDictionaryMapper"> <mapper namespace="com.yeejoin.amos.boot.biz.common.dao.mapper.DataDictionaryMapper">
<select id="getDataDictionaryListAndCount" resultType="com.yeejoin.amos.boot.biz.common.entity.DataDictionary">
SELECT
cdd.*, count(cfe.sequence_nbr) AS count
FROM
cb_data_dictionary cdd
LEFT JOIN (
SELECT
*
FROM
cb_fire_experts
WHERE
is_delete = 0
) cfe ON cdd.`code` = cfe.expert_code
WHERE
cdd.type = 'ZJLY'
AND cdd.is_delete = 0
GROUP BY
cdd. CODE ORDER BY sort_num
</select>
<select id ="getNoInLinkUnit" resultType="com.yeejoin.amos.boot.biz.common.entity.DataDictionary">
SELECT
CONCAT(cbb.`name`,' (',elink.count,')') as `name`,
cbb.*,
elink.count as count
FROM
cb_data_dictionary cbb
LEFT JOIN (
SELECT
emergency_linkage_unit_code,
COUNT(1) count
FROM
cb_linkage_unit
GROUP BY
emergency_linkage_unit_code
) elink ON elink.emergency_linkage_unit_code = cbb.`code`
WHERE
cbb.type = 'YJLDDW' and cbb.is_delete = 0
AND elink.count IS NOT NULL
</select>
<select id ="getByCode" resultType="com.yeejoin.amos.boot.biz.common.entity.DataDictionary">
SELECT
*
FROM
cb_data_dictionary cbb
WHERE
cbb.code = #{code} and cbb.is_delete = 0 and cbb.type = #{type}
</select>
</mapper> </mapper>
...@@ -35,7 +35,7 @@ import org.typroject.tyboot.core.foundation.enumeration.UserType; ...@@ -35,7 +35,7 @@ import org.typroject.tyboot.core.foundation.enumeration.UserType;
<#else> <#else>
@Controller @Controller
</#if> </#if>
@RequestMapping(value = "<#if package.ModuleName??>/${package.ModuleName}</#if>/<#if controllerMappingHyphenStyle??>${controllerMappingHyphen}<#else>${table.entityPath}</#if>") @RequestMapping(value = "/<#if controllerMappingHyphenStyle??>${controllerMappingHyphen}<#else>${table.entityPath}</#if>")
<#if kotlin> <#if kotlin>
class ${table.controllerName}<#if superControllerClass??> : ${superControllerClass}()</#if> class ${table.controllerName}<#if superControllerClass??> : ${superControllerClass}()</#if>
<#else> <#else>
......
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>amos-boot-core</artifactId>
<packaging>jar</packaging>
<parent>
<artifactId>amos-biz-boot</artifactId>
<groupId>com.amosframework.boot</groupId>
<version>1.0.0</version>
</parent>
<dependencies>
</dependencies>
</project>
package com.yeejoin.amos.boot.biz.config; package com.yeejoin.amos.boot.core.config;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
...@@ -7,8 +7,6 @@ import org.springframework.context.annotation.Bean; ...@@ -7,8 +7,6 @@ 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 io.swagger.annotations.ApiOperation;
import springfox.documentation.builders.ApiInfoBuilder; import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.ParameterBuilder; import springfox.documentation.builders.ParameterBuilder;
...@@ -23,10 +21,6 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc; ...@@ -23,10 +21,6 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
/** /**
* @Author lichenglong * @Author lichenglong
*/ */
//@Configuration
//@EnableSwagger2
//@EnableKnife4j
//@Import(BeanValidatorPluginsConfiguration.class)
@Configuration @Configuration
@EnableSwagger2WebMvc @EnableSwagger2WebMvc
public class Swagger2Config { public class Swagger2Config {
...@@ -67,16 +61,6 @@ public class Swagger2Config { ...@@ -67,16 +61,6 @@ public class Swagger2Config {
.globalOperationParameters(setHeaderToken()); .globalOperationParameters(setHeaderToken());
} }
/***
* oauth2配置
* 需要增加swagger授权回调地址
* http://localhost:8888/webjars/springfox-swagger-ui/o2c.html
* @return
*/
// @Bean
// SecurityScheme securityScheme() {
// return new ApiKey(CommonConstant.X_ACCESS_TOKEN, CommonConstant.X_ACCESS_TOKEN, "header");
// }
/** /**
* JWT token * JWT token
* @return * @return
...@@ -116,25 +100,5 @@ public class Swagger2Config { ...@@ -116,25 +100,5 @@ public class Swagger2Config {
.build(); .build();
} }
/**
* 新增 securityContexts 保持登录状态
*/
// private List<SecurityContext> securityContexts() {
// return new ArrayList(
// Collections.singleton(SecurityContext.builder()
// .securityReferences(defaultAuth())
// .forPaths(PathSelectors.regex("^(?!auth).*$"))
// .build())
// );
// }
//
// private List<SecurityReference> defaultAuth() {
// AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything");
// AuthorizationScope[] authorizationScopes = new AuthorizationScope[1];
// authorizationScopes[0] = authorizationScope;
// return new ArrayList(
// Collections.singleton(new SecurityReference(CommonConstant.X_ACCESS_TOKEN, authorizationScopes)));
// }
} }
package com.yeejoin.amos.boot.core.restTemplate;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.client.SimpleClientHttpRequestFactory;
import org.springframework.web.client.RestTemplate;
@Configuration
public class RestTemplateConfig {
// @Bean
// public RestTemplate restTemplate(){
// SimpleClientHttpRequestFactory factory = new SimpleClientHttpRequestFactory();
// factory.setConnectTimeout(15000);
// factory.setReadTimeout(5000);
// return new RestTemplate(factory);
// }
}
package com.yeejoin.amos.boot.core.restTemplate;
import org.springframework.http.MediaType;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import java.util.ArrayList;
import java.util.List;
/**
* @program: api
* @description:
* @author: lll
* @create: 2021-09-1 18:00
*/
public class WxMappingJackson2HttpMessageConverter extends MappingJackson2HttpMessageConverter {
public WxMappingJackson2HttpMessageConverter(){
List<MediaType> mediaTypes=new ArrayList<>();
//添加text/html类型的支持
mediaTypes.add(MediaType.TEXT_HTML);
//添加text/plain类型的支持.微信接口会用到
mediaTypes.add(MediaType.TEXT_PLAIN);
setSupportedMediaTypes(mediaTypes);
}
}
package com.yeejoin.amos.boot.core.utils;
import java.util.List;
import java.util.Map;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.http.client.SimpleClientHttpRequestFactory;
import org.springframework.http.converter.FormHttpMessageConverter;
import org.springframework.util.concurrent.ListenableFutureCallback;
import org.springframework.web.client.AsyncRestTemplate;
import org.springframework.web.client.RestTemplate;
import com.yeejoin.amos.boot.core.restTemplate.WxMappingJackson2HttpMessageConverter;
/**
* @program: api
* @description:
* @author: lll
* @create: 2021-09-1 18:00
*/
public class RestTemplateUtil {
/**
* 发送表单参数的post请求
*
* @param url 请求url
* @param param 参数
* @param respType 返回类型
* @return T
*/
public static <T> T postForm(String url, Map<String, List<Object>> param, Class<T> respType) {
return getRestInstance().postForEntity(url, getHttpEntity(param, false), respType).getBody();
}
/**
* 发送表单参数的异步post请求
*
* @param url 请求url
* @param callback 回调接口
* @param respType 返回类型
*/
public static <T> void asyncPostForm(String url, Map<String, List<Object>> param,
Class<T> respType, ListenableFutureCallback<ResponseEntity<T>> callback) {
getAsyncRestInstance().postForEntity(url, getHttpEntity(param, false), respType).addCallback(callback);
}
/**
* 发送表单有参数get请求
*
* @param url 请求url
* @param param 参数对象
* @param respType 返回类型
* @return T
*/
public static <T> T getForm(String url, Class<T> respType, Map<String,String> param) {
return getRestInstance().getForEntity(url, respType, param).getBody();
}
/**
* @Description: 发送表单无参数的get请求
* @Param: [url, param, respType]
* @return: T
* @Author: tonyzhang
* @Date: 2019-01-18 17:23
*/
public static <T> T getForm(String url, Class<T> respType) {
return getRestInstance().getForObject(url, respType);
}
/**
* 获取HttpEntity实例对象
*
* @param param 参数对象
* @param isJson true 发送json请求,false发送表单请求
* @return HttpEntity
*/
private static <P> HttpEntity<P> getHttpEntity(P param, boolean isJson) {
HttpHeaders headers = new HttpHeaders();
if (isJson) {
headers.setContentType(MediaType.APPLICATION_JSON_UTF8);
} else {
headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);
}
return new HttpEntity<>(param, headers);
}
/*-----------------生产单例对象,方便自定义如何构造对象------------------*/
private static RestTemplate restInit() {
//设置连接超时和读取超时时间
SimpleClientHttpRequestFactory factory=new SimpleClientHttpRequestFactory();
factory.setConnectTimeout(5000);
factory.setReadTimeout(5000);
RestTemplate restTemplate = new RestTemplate(factory);
FormHttpMessageConverter fastConverter = new FormHttpMessageConverter();
WxMappingJackson2HttpMessageConverter wmc=new WxMappingJackson2HttpMessageConverter();
restTemplate.getMessageConverters().add(fastConverter);
restTemplate.getMessageConverters().add(wmc);
return restTemplate;
}
private static AsyncRestTemplate asyncRestInit() {
return new AsyncRestTemplate();
}
private static RestTemplate getRestInstance() {
return RestSingle.INSTANCE;
}
private static AsyncRestTemplate getAsyncRestInstance() {
return AsyncRestSingle.INSTANCE;
}
private static class RestSingle {
private static final RestTemplate INSTANCE = restInit();
}
private static class AsyncRestSingle {
private static final AsyncRestTemplate INSTANCE = asyncRestInit();
}
}
\ No newline at end of file
package org.typroject.tyboot.core.restful.doc;
/**
* 此类是为了覆盖原有类,为空,不用写具体实现
* @author lichenglong
*
*/
public class Swagger2 {
}
package com.yeejoin.amos.boot.module.command.api.service;
/**
*
* 首页实现类
* */
public interface IHomePageService {
/**
* 首页标签统一填充数据接口
*
* ***/
public Object getHomePageData();
}
...@@ -9,13 +9,18 @@ ...@@ -9,13 +9,18 @@
<artifactId>amos-boot-module-common-api</artifactId> <artifactId>amos-boot-module-common-api</artifactId>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>com.amosframework.boot</groupId>
<artifactId>amos-boot-biz-common</artifactId>
<version>${amos-biz-boot.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-elasticsearch</artifactId> <artifactId>spring-boot-starter-data-elasticsearch</artifactId>
</dependency> </dependency>
<dependency>
<groupId>com.yeejoin</groupId>
<artifactId>amos-component-rule</artifactId>
<exclusions>
<exclusion>
<groupId>org.typroject</groupId>
<artifactId>tyboot-core-auth</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies> </dependencies>
</project> </project>
package com.yeejoin.amos.boot.module.common.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 lombok.experimental.Accessors;
import java.io.Serializable;
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value = "CheckObjectDto", description = "机构重点部位")
public class CheckObjectDto extends BaseDto implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "机构名称")
private String bizOrgName;
@ApiModelProperty(value = "机构编码")
private String bizOrgCode;
@ApiModelProperty(value = "重点部位数量")
private int num;
@ApiModelProperty(value = "归属机构")
private String parentId;
@ApiModelProperty(value = "单位性质")
private String companyNature;
@ApiModelProperty(value = "机构类型(部门:DEPARTMENT,单位:COMPANY,人员:PERSON)")
private String bizOrgType;
}
...@@ -38,4 +38,7 @@ public class CompanyDto { ...@@ -38,4 +38,7 @@ public class CompanyDto {
@ApiModelProperty(value = "单位名称") @ApiModelProperty(value = "单位名称")
private String name; private String name;
@ApiModelProperty(value = "重点部位数量")
private int keySiteNum;
} }
package com.yeejoin.amos.boot.module.common.api.dto;
import lombok.Data;
@Data
public class CurrentStatusDto {
private String cutrentStatusName;
private Integer cutrentStatusCount;
}
...@@ -37,11 +37,14 @@ public class DynamicFormInitDto implements Serializable{ ...@@ -37,11 +37,14 @@ public class DynamicFormInitDto implements Serializable{
@ApiModelProperty(value = "提交表单附加字段") @ApiModelProperty(value = "提交表单附加字段")
private DynamicFormInstanceDto formItemDescr; private DynamicFormInstanceDto formItemDescr;
@ApiModelProperty(value = "接口地址") @ApiModelProperty(value = "配置")
private String columnConfig; private String columnConfig;
private int sort; private int sort;
@ApiModelProperty(value = "接口地址")
private String url;
public DynamicFormInitDto() { public DynamicFormInitDto() {
super(); super();
......
package com.yeejoin.amos.boot.module.common.api.dto; package com.yeejoin.amos.boot.module.common.api.dto;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto; import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
...@@ -36,7 +37,7 @@ public class FailureAuditDto extends BaseDto { ...@@ -36,7 +37,7 @@ public class FailureAuditDto extends BaseDto {
private String auditOpinion; private String auditOpinion;
@ApiModelProperty(value = "审核结果") @ApiModelProperty(value = "审核结果")
private Integer auditResult; private int auditResult;
@ApiModelProperty(value = "设备故障报修单id") @ApiModelProperty(value = "设备故障报修单id")
private Long faultId; private Long faultId;
......
...@@ -21,6 +21,8 @@ public class FailureDetailsDto extends BaseDto { ...@@ -21,6 +21,8 @@ public class FailureDetailsDto extends BaseDto {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "当前状态名")
private String currentStatusName;
@ApiModelProperty(value = "当前状态") @ApiModelProperty(value = "当前状态")
private Integer currentStatus; private Integer currentStatus;
...@@ -47,7 +49,7 @@ public class FailureDetailsDto extends BaseDto { ...@@ -47,7 +49,7 @@ public class FailureDetailsDto extends BaseDto {
private Integer submissionPid; private Integer submissionPid;
@ApiModelProperty(value = "组织code") @ApiModelProperty(value = "组织code")
private String bizCode; private Long bizCode;
@ApiModelProperty(value = "报送时间") @ApiModelProperty(value = "报送时间")
private Date submissionTime; private Date submissionTime;
......
...@@ -32,7 +32,7 @@ public class FailureMaintainDto extends BaseDto { ...@@ -32,7 +32,7 @@ public class FailureMaintainDto extends BaseDto {
private Long maintainPhone; private Long maintainPhone;
@ApiModelProperty(value = "所属部门ID") @ApiModelProperty(value = "所属部门ID")
private String bizId; private Long bizId;
@ApiModelProperty(value = "所属部门") @ApiModelProperty(value = "所属部门")
private String department; private String department;
...@@ -52,7 +52,7 @@ public class FailureMaintainDto extends BaseDto { ...@@ -52,7 +52,7 @@ public class FailureMaintainDto extends BaseDto {
@ApiModelProperty(value = "附件") @ApiModelProperty(value = "附件")
private List<SourceFile> attachment; private List<SourceFile> attachment;
@ApiModelProperty(value = "审核结果条件判断,0同意,1拒绝,2驳回") @ApiModelProperty(value = "审核结果条件判断,0完成,1保存")
private String condition; private String condition;
} }
...@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty; ...@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto; import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import java.util.Date; import java.util.Date;
/** /**
...@@ -15,18 +16,20 @@ import java.util.Date; ...@@ -15,18 +16,20 @@ import java.util.Date;
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@ApiModel(value="FailureRepairlogDto", description="流程日志") @ApiModel(value = "FailureRepairlogDto", description = "流程日志")
public class FailureRepairlogDto extends BaseDto { public class FailureRepairlogDto extends BaseDto {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "流程处理人Id")
@ApiModelProperty(value = "流程处理人") private Integer processAuditorId;
private String processAuditor;
@ApiModelProperty(value = "处理人所属部门") @ApiModelProperty(value = "处理人所属部门")
private String processDepartment; private String processDepartment;
@ApiModelProperty(value = "处理人所属部门Id")
private Long processDepartmentId;
@ApiModelProperty(value = "流程处理结果") @ApiModelProperty(value = "流程处理结果")
private String processResult; private String processResult;
...@@ -36,4 +39,7 @@ public class FailureRepairlogDto extends BaseDto { ...@@ -36,4 +39,7 @@ public class FailureRepairlogDto extends BaseDto {
@ApiModelProperty(value = "设备故障报修主表ID") @ApiModelProperty(value = "设备故障报修主表ID")
private Long faultId; private Long faultId;
@ApiModelProperty(value = "流程处理人")
private String processAuditorName;
} }
package com.yeejoin.amos.boot.module.common.api.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 故障报修验收记录
*
* @author system_generator
* @date 2021-08-18
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="FailureVerifyDto", description="故障报修验收记录")
public class FailureVerifyDto extends BaseDto {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "验收人")
private String acceptor;
@ApiModelProperty(value = "验收部门")
private String verifyDepartment;
@ApiModelProperty(value = "验收部门的id")
private Long verifyDepartmentId;
@ApiModelProperty(value = "审核结果 0:同意 1:拒绝 ")
private Integer verifyResult;
@ApiModelProperty(value = "验收时间")
private Date verifyTime;
@ApiModelProperty(value = "验收意见")
private String verifyOpinion;
@ApiModelProperty(value = "设备故障报修单id")
private Long faultId;
@ApiModelProperty(value = "审核结果条件判断,0同意,1拒绝")
private String condition;
}
...@@ -7,6 +7,8 @@ import lombok.Data; ...@@ -7,6 +7,8 @@ import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import java.util.Date; import java.util.Date;
import java.util.List;
import java.util.Map;
/** /**
* 消防员合同 * 消防员合同
* *
...@@ -35,6 +37,9 @@ public class FirefightersContractDto extends BaseDto { ...@@ -35,6 +37,9 @@ public class FirefightersContractDto extends BaseDto {
@ApiModelProperty(value = "到期时间") @ApiModelProperty(value = "到期时间")
private Date expireTime; private Date expireTime;
@ApiModelProperty(value = "起始时间")
private Date startTime;
@ApiModelProperty(value = "服务内容") @ApiModelProperty(value = "服务内容")
private String serviceContent; private String serviceContent;
...@@ -53,4 +58,10 @@ public class FirefightersContractDto extends BaseDto { ...@@ -53,4 +58,10 @@ public class FirefightersContractDto extends BaseDto {
@ApiModelProperty(value = "操作人名称") @ApiModelProperty(value = "操作人名称")
private String recUserName; private String recUserName;
@ApiModelProperty(value = "附件")
private Map<String, List<AttachmentDto>> attachments;
@ApiModelProperty(value = "合同类型字典code")
private String contractTypeCode;
} }
...@@ -50,7 +50,7 @@ public class FirefightersExcelDto extends BaseDto { ...@@ -50,7 +50,7 @@ public class FirefightersExcelDto extends BaseDto {
@ApiModelProperty(value = "机构code") @ApiModelProperty(value = "机构code")
private String companyCode; private String companyCode;
@ExplicitConstraint(indexNum = 3, sourceClass = RoleNameExplicitConstraint.class,method="getCompany") //动态下拉内容// BUG 2760 修改消防人员导出模板和 导入问题 bykongfm
@ExcelProperty(value = "所属部门", index = 3) @ExcelProperty(value = "所属部门", index = 3)
@ApiModelProperty(value = "机构名称") @ApiModelProperty(value = "机构名称")
private String companyName; private String companyName;
...@@ -83,15 +83,21 @@ public class FirefightersExcelDto extends BaseDto { ...@@ -83,15 +83,21 @@ public class FirefightersExcelDto extends BaseDto {
@ApiModelProperty(value = "婚姻状况") @ApiModelProperty(value = "婚姻状况")
private String maritalStatus; private String maritalStatus;
@ExcelProperty(value = "户籍所在地", index = 10) @ExcelIgnore
@ApiModelProperty(value = "籍贯/户口所在地") @ApiModelProperty(value = "籍贯/户口所在地")
private String nativePlace; private String nativePlace;
@ExplicitConstraint(indexNum = 10, sourceClass = RoleNameExplicitConstraint.class,method="getCitys") //动态下拉内容// BUG 2760 修改消防人员导出模板和 导入问题 bykongfm
@ExcelProperty(value = "户籍所在地", index = 10)
@ApiModelProperty(value = "籍贯/户口所在地的值")
private String nativePlaceValue;
@ExplicitConstraint(indexNum = 11, sourceClass = RoleNameExplicitConstraint.class, method = "getPoliticalOutlook") //固定下拉内容 @ExplicitConstraint(indexNum = 11, sourceClass = RoleNameExplicitConstraint.class, method = "getPoliticalOutlook") //固定下拉内容
@ExcelProperty(value = "政治面貌", index = 11) @ExcelProperty(value = "政治面貌", index = 11)
@ApiModelProperty(value = "政治面貌代码") @ApiModelProperty(value = "政治面貌代码")
private String politicalOutlook; private String politicalOutlook;
@ExplicitConstraint(indexNum = 12, sourceClass = RoleNameExplicitConstraint.class,method="getCitys") //动态下拉内容// BUG 2760 修改消防人员导出模板和 导入问题 bykongfm
@ExcelProperty(value = "现居住地", index = 12) @ExcelProperty(value = "现居住地", index = 12)
@ApiModelProperty(value = "现居住地") @ApiModelProperty(value = "现居住地")
private String residence; private String residence;
......
...@@ -31,10 +31,24 @@ public class FormValue implements Serializable{ ...@@ -31,10 +31,24 @@ public class FormValue implements Serializable{
@ApiModelProperty(value = "是否一行显示") @ApiModelProperty(value = "是否一行显示")
private boolean block; private boolean block;
@ApiModelProperty(value = "value 所对应的字符名称")
private String valueName;
public FormValue() { public FormValue() {
} }
public FormValue(String key, String label, String type, String value,boolean block,String valueName) {
super();
this.key = key;
this.label = label;
this.type = type;
this.value = value;
this.block = block;
this.valueName =valueName;
}
public FormValue(String key, String label, String type, String value,boolean block) { public FormValue(String key, String label, String type, String value,boolean block) {
super(); super();
this.key = key; this.key = key;
......
...@@ -46,5 +46,6 @@ public class OrgUsrzhDto { ...@@ -46,5 +46,6 @@ public class OrgUsrzhDto {
private String companyPhoto; private String companyPhoto;
@ApiModelProperty(value = "管理类别") @ApiModelProperty(value = "管理类别")
private String managementType; private String managementType;
@ApiModelProperty(value = "重点单位数量")
private Integer keySiteCount;
} }
...@@ -36,4 +36,7 @@ public class RequestData { ...@@ -36,4 +36,7 @@ public class RequestData {
@ApiModelProperty(value = "灾情状态") @ApiModelProperty(value = "灾情状态")
private int status =0; private int status =0;
@ApiModelProperty(value = "灾情ID")
private Long alertId ;
} }
package com.yeejoin.amos.boot.module.common.api.dto; package com.yeejoin.amos.boot.module.common.api.dto;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import com.yeejoin.amos.boot.module.common.api.excel.ExplicitConstraint;
import com.yeejoin.amos.boot.module.common.api.excel.RoleNameExplicitConstraint;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import java.util.Date;
/** /**
* 救援装备 * 救援装备
* *
...@@ -19,27 +22,37 @@ import java.util.Date; ...@@ -19,27 +22,37 @@ import java.util.Date;
@ApiModel(value = "RescueEquipmentDto", description = "救援装备") @ApiModel(value = "RescueEquipmentDto", description = "救援装备")
public class RescueEquipmentDto extends BaseDto { public class RescueEquipmentDto extends BaseDto {
@ExcelIgnore
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ExcelProperty(value = "车辆类型", index = 0)
@ExplicitConstraint(type = "JYZBLX", indexNum = 0, sourceClass = RoleNameExplicitConstraint.class) //动态下拉内容
@ApiModelProperty(value = "车辆类型") @ApiModelProperty(value = "车辆类型")
private String vehicleType; private String vehicleType;
@ExcelIgnore
@ApiModelProperty(value = "车辆类型code") @ApiModelProperty(value = "车辆类型code")
private String vehicleTypeCode; private String vehicleTypeCode;
@ExcelProperty(value = "车辆数量", index = 1)
@ApiModelProperty(value = "车辆数量") @ApiModelProperty(value = "车辆数量")
private Long vehicleNumber; private Long vehicleNumber;
@ExcelProperty(value = "费用", index = 2)
@ApiModelProperty(value = "费用") @ApiModelProperty(value = "费用")
private Integer fee; private Double fee;
@ExcelProperty(value = "单位名称", index =3)
@ExplicitConstraint(indexNum = 3, sourceClass = RoleNameExplicitConstraint.class,method="getUnitTeam") //动态下拉内容
@ApiModelProperty(value = "单位名称") @ApiModelProperty(value = "单位名称")
private String company; private String company;
@ExcelIgnore
@ApiModelProperty(value = "单位id") @ApiModelProperty(value = "单位id")
private Long companyId; private Long companyId;
@ExcelIgnore
@ApiModelProperty(value = "更新人名称") @ApiModelProperty(value = "更新人名称")
private String recUserName; private String recUserName;
......
package com.yeejoin.amos.boot.module.common.api.dto; package com.yeejoin.amos.boot.module.common.api.dto;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.yeejoin.amos.boot.module.common.api.excel.ExplicitConstraint;
import com.yeejoin.amos.boot.module.common.api.excel.RoleNameExplicitConstraint;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto; import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
...@@ -19,24 +23,32 @@ import java.util.Date; ...@@ -19,24 +23,32 @@ import java.util.Date;
@ApiModel(value = "SpecialPositionStaffDto", description = "特岗人员") @ApiModel(value = "SpecialPositionStaffDto", description = "特岗人员")
public class SpecialPositionStaffDto extends BaseDto { public class SpecialPositionStaffDto extends BaseDto {
@ExcelIgnore
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ExcelProperty(value = "岗位名称", index = 0)
@ExplicitConstraint(type = "GWMC", indexNum = 0, sourceClass = RoleNameExplicitConstraint.class) //动态下拉内容
@ApiModelProperty(value = "岗位名称") @ApiModelProperty(value = "岗位名称")
private String positionName; private String positionName;
@ExcelIgnore
@ApiModelProperty(value = "岗位名称code") @ApiModelProperty(value = "岗位名称code")
private String positionNameCode; private String positionNameCode;
@ExcelProperty(value = "人数", index = 1)
@ApiModelProperty(value = "人数") @ApiModelProperty(value = "人数")
private Long personNumber; private Long personNumber;
@ExcelProperty(value = "单位名称", index = 2)
@ExplicitConstraint(indexNum = 2, sourceClass = RoleNameExplicitConstraint.class,method="getUnitTeam") //动态下拉内容
@ApiModelProperty(value = "单位名称") @ApiModelProperty(value = "单位名称")
private String company; private String company;
@ExcelIgnore
@ApiModelProperty(value = "单位id") @ApiModelProperty(value = "单位id")
private Long companyId; private Long companyId;
@ExcelIgnore
@ApiModelProperty(value = "更新人名称") @ApiModelProperty(value = "更新人名称")
private String recUserName; private String recUserName;
......
package com.yeejoin.amos.boot.module.common.api.dto;
import lombok.Data;
@Data
public class StatusDto {
private Integer currentStatus;
private Integer currentStatusCount;
}
package com.yeejoin.amos.boot.module.common.api.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* 单位归属
*
* @author gaojianqiang
* @date 2021-08-19
*/
@Data
@ApiModel(value = "UserUnitDto", description = "用户单位归属")
public class UserUnitDto {
@ApiModelProperty(value = "人员类型1-维保公司;2-业主单位")
private String identityType;
@ApiModelProperty(value = "人员id")
private String personSeq;
@ApiModelProperty(value = "人员名称")
private String personName;
@ApiModelProperty(value = "公司id")
private String companyId;
@ApiModelProperty(value = "公司名称")
private String companyName;
}
...@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.common.api.dto; ...@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.common.api.dto;
import com.alibaba.excel.annotation.ExcelIgnore; import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto; import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import com.yeejoin.amos.boot.module.common.api.excel.ExplicitConstraint; import com.yeejoin.amos.boot.module.common.api.excel.ExplicitConstraint;
import com.yeejoin.amos.boot.module.common.api.excel.RoleNameExplicitConstraint; import com.yeejoin.amos.boot.module.common.api.excel.RoleNameExplicitConstraint;
...@@ -33,10 +34,6 @@ public class WaterResourceDto extends BaseDto { ...@@ -33,10 +34,6 @@ public class WaterResourceDto extends BaseDto {
@ApiModelProperty(value = "地址") @ApiModelProperty(value = "地址")
private String address; private String address;
// @ApiModelProperty(value = "经纬度坐标")
// private String latLang;
@ExcelIgnore @ExcelIgnore
@ApiModelProperty(value = "经度") @ApiModelProperty(value = "经度")
private Double longitude; private Double longitude;
...@@ -308,4 +305,26 @@ public class WaterResourceDto extends BaseDto { ...@@ -308,4 +305,26 @@ public class WaterResourceDto extends BaseDto {
@ExcelIgnore @ExcelIgnore
@ApiModelProperty(value = "物联参数") @ApiModelProperty(value = "物联参数")
private WaterResourceIotDto waterResourceIotDto; private WaterResourceIotDto waterResourceIotDto;
@ApiModelProperty("设施定义id")
private Long equipId;
@ApiModelProperty("设施定义名称")
@ExcelProperty(value = "设施定义名称", index = 44)
private String equipName;
@ApiModelProperty("设施分类id")
private Long equipCategoryId;
@ApiModelProperty("设施分类名称")
@ExcelProperty(value = "设施分类名称", index = 45)
private String equipCategoryName;
@ApiModelProperty("设施编码")
@ExcelProperty(value = "设施编码", index = 46)
private String equipCode;
@ApiModelProperty("维保周期")
@ExcelProperty(value = "维保周期(月)", index = 47)
private String maintenancePeriod;
} }
...@@ -34,7 +34,9 @@ public class FailureAudit extends BaseEntity { ...@@ -34,7 +34,9 @@ public class FailureAudit extends BaseEntity {
*/ */
@TableField("audit_department") @TableField("audit_department")
private String auditDepartment; private String auditDepartment;
/**
* 审核部门id
*/
@TableField("audit_department_id") @TableField("audit_department_id")
private Long auditDepartmentId; private Long auditDepartmentId;
...@@ -62,6 +64,12 @@ public class FailureAudit extends BaseEntity { ...@@ -62,6 +64,12 @@ public class FailureAudit extends BaseEntity {
@TableField("fault_id") @TableField("fault_id")
private Long faultId; private Long faultId;
/**
* 审核结果
*/
@TableField("audit_result")
private int auditResult;
} }
...@@ -76,7 +76,7 @@ public class FailureDetails extends BaseEntity { ...@@ -76,7 +76,7 @@ public class FailureDetails extends BaseEntity {
* 组织code * 组织code
*/ */
@TableField("biz_code") @TableField("biz_code")
private String bizCode; private Long bizCode;
/** /**
* 报送时间 * 报送时间
......
...@@ -45,7 +45,7 @@ public class FailureMaintain extends BaseEntity { ...@@ -45,7 +45,7 @@ public class FailureMaintain extends BaseEntity {
* 所属部门ID * 所属部门ID
*/ */
@TableField("biz_id") @TableField("biz_id")
private String bizId; private Long bizId;
/** /**
* 所属部门 * 所属部门
......
...@@ -26,12 +26,13 @@ public class FailureRepairlog extends BaseEntity { ...@@ -26,12 +26,13 @@ public class FailureRepairlog extends BaseEntity {
* 流程处理人 * 流程处理人
*/ */
@TableField("process_auditor_id") @TableField("process_auditor_id")
private Long processAuditorId; private Integer processAuditorId;
/** /**
* 流程处理人 * 流程处理人
*/ */
@TableField("process_auditor") @TableField("process_auditor_name")
private String processAuditor; private String processAuditorName;
/** /**
* 处理人所属部门 * 处理人所属部门
......
package com.yeejoin.amos.boot.module.common.api.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.util.Date;
/**
* 故障报修验收记录
*
* @author system_generator
* @date 2021-08-18
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("cb_failure_verify")
public class FailureVerify extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 验收人
*/
@TableField("acceptor")
private String acceptor;
/**
* 验收部门
*/
@TableField("verify_department")
private String verifyDepartment;
/**
* 验收部门的id
*/
@TableField("verify_department_id")
private Long verifyDepartmentId;
/**
* 审核结果 0:同意 1:拒绝
*/
@TableField("verify_result")
private Integer verifyResult;
/**
* 验收时间
*/
@TableField("verify_time")
private Date verifyTime;
/**
* 验收意见
*/
@TableField("verify_opinion")
private String verifyOpinion;
/**
* 设备故障报修单id
*/
@TableField("fault_id")
private Long faultId;
}
...@@ -119,4 +119,7 @@ public class Firefighters extends BaseEntity { ...@@ -119,4 +119,7 @@ public class Firefighters extends BaseEntity {
@ApiModelProperty(value = "机构名称") @ApiModelProperty(value = "机构名称")
private String companyName; private String companyName;
@ApiModelProperty(value = "籍贯/户口所在地的值")
private String nativePlaceValue;
} }
...@@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.annotation.FieldFill; ...@@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity; import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto;
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;
...@@ -12,6 +14,8 @@ import lombok.experimental.Accessors; ...@@ -12,6 +14,8 @@ import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date; import java.util.Date;
import java.util.List;
import java.util.Map;
/** /**
* 消防员合同 * 消防员合同
* *
...@@ -41,6 +45,11 @@ public class FirefightersContract extends BaseEntity { ...@@ -41,6 +45,11 @@ public class FirefightersContract extends BaseEntity {
@ApiModelProperty(value = "签订日期") @ApiModelProperty(value = "签订日期")
@DateTimeFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd")
private Date signedTime; private Date signedTime;
@DateTimeFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(value = "起始时间")
private Date startTime;
@DateTimeFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(value = "到期时间") @ApiModelProperty(value = "到期时间")
private Date expireTime; private Date expireTime;
...@@ -61,4 +70,9 @@ public class FirefightersContract extends BaseEntity { ...@@ -61,4 +70,9 @@ public class FirefightersContract extends BaseEntity {
@ApiModelProperty(value = "更新时间") @ApiModelProperty(value = "更新时间")
@TableField(fill=FieldFill.UPDATE) @TableField(fill=FieldFill.UPDATE)
private Date updateTime; private Date updateTime;
@TableField(exist = false)
@ApiModelProperty(value = "附件")
private Map<String, List<AttachmentDto>> attachments;
} }
...@@ -32,7 +32,7 @@ public class FirefightersThought extends BaseEntity { ...@@ -32,7 +32,7 @@ public class FirefightersThought extends BaseEntity {
@ApiModelProperty(value = "消防救援人员") @ApiModelProperty(value = "消防救援人员")
private Long firefightersId; private Long firefightersId;
@DateTimeFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "谈话时间") @ApiModelProperty(value = "谈话时间")
private Date talkingTime; private Date talkingTime;
......
...@@ -11,6 +11,8 @@ import lombok.EqualsAndHashCode; ...@@ -11,6 +11,8 @@ import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import java.util.Date; import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
/** /**
* 工作经历 * 工作经历
* *
...@@ -29,9 +31,11 @@ public class FirefightersWorkexperience extends BaseEntity { ...@@ -29,9 +31,11 @@ public class FirefightersWorkexperience extends BaseEntity {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "参加工作时间") @ApiModelProperty(value = "参加工作时间")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date workingHours; private Date workingHours;
@ApiModelProperty(value = "参加消防部门工作时间") @ApiModelProperty(value = "参加消防部门工作时间")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date fireWorkingHours; private Date fireWorkingHours;
@ApiModelProperty(value = "人员id") @ApiModelProperty(value = "人员id")
......
...@@ -3,12 +3,11 @@ package com.yeejoin.amos.boot.module.common.api.entity; ...@@ -3,12 +3,11 @@ package com.yeejoin.amos.boot.module.common.api.entity;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity; import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import java.util.Date;
/** /**
* 救援装备 * 救援装备
* *
...@@ -45,7 +44,7 @@ public class RescueEquipment extends BaseEntity { ...@@ -45,7 +44,7 @@ public class RescueEquipment extends BaseEntity {
* 费用 * 费用
*/ */
@TableField("fee") @TableField("fee")
private Integer fee; private Double fee;
/** /**
* 单位名称 * 单位名称
......
...@@ -36,116 +36,157 @@ public class WaterResource extends BaseEntity { ...@@ -36,116 +36,157 @@ public class WaterResource extends BaseEntity {
*/ */
@TableField("address") @TableField("address")
private String address; private String address;
/** /**
* 经纬度坐标 * 经纬度坐标
*/ */
// @TableField("lat_lang")
// private String latLang;
@ApiModelProperty(value = "经度") @ApiModelProperty(value = "经度")
private Double longitude; private Double longitude;
@ApiModelProperty(value = "纬度") @ApiModelProperty(value = "纬度")
private Double latitude; private Double latitude;
/** /**
* 资源类型(消火栓、消防水鹤、天然水源、消防水池) * 资源类型(消火栓、消防水鹤、天然水源、消防水池)
*/ */
@TableField("resource_type") @TableField("resource_type")
private String resourceType; private String resourceType;
/** /**
* 资源类型名称(消火栓、消防水鹤、天然水源、消防水池) * 资源类型名称(消火栓、消防水鹤、天然水源、消防水池)
*/ */
@TableField("resource_type_name") @TableField("resource_type_name")
private String resourceTypeName; private String resourceTypeName;
/** /**
* 所在建筑id * 所在建筑id
*/ */
@TableField("belong_building_id") @TableField("belong_building_id")
private Long belongBuildingId; private Long belongBuildingId;
/** /**
* 所在建筑 * 所在建筑
*/ */
@TableField("belong_building") @TableField("belong_building")
private String belongBuilding; private String belongBuilding;
/** /**
* 所属消防系统id * 所属消防系统id
*/ */
@TableField("belong_fighting_system_id") @TableField("belong_fighting_system_id")
private Long belongFightingSystemId; private Long belongFightingSystemId;
/** /**
* 所属消防系统 * 所属消防系统
*/ */
@TableField("belong_fighting_system") @TableField("belong_fighting_system")
private String belongFightingSystem; private String belongFightingSystem;
/** /**
* 管理单位id * 管理单位id
*/ */
@TableField("management_unit_id") @TableField("management_unit_id")
private Long managementUnitId; private Long managementUnitId;
/** /**
* 管理单位 * 管理单位
*/ */
@TableField("management_unit") @TableField("management_unit")
private String managementUnit; private String managementUnit;
/** /**
* 维保单位id * 维保单位id
*/ */
@TableField("maintenance_unit_id") @TableField("maintenance_unit_id")
private Long maintenanceUnitId; private Long maintenanceUnitId;
/** /**
* 维保单位 * 维保单位
*/ */
@TableField("maintenance_unit") @TableField("maintenance_unit")
private String maintenanceUnit; private String maintenanceUnit;
/** /**
* 建造日期 * 建造日期
*/ */
@TableField("build_date") @TableField("build_date")
private Date buildDate; private Date buildDate;
/** /**
* 启用日期 * 启用日期
*/ */
@TableField("enable_date") @TableField("enable_date")
private Date enableDate; private Date enableDate;
/** /**
* 方位图 * 方位图
*/ */
@TableField("orientation_img") @TableField("orientation_img")
private String orientationImg; private String orientationImg;
/** /**
* 实景图 * 实景图
*/ */
@TableField("reality_img") @TableField("reality_img")
private String realityImg; private String realityImg;
/** /**
* 联系人姓名 * 联系人姓名
*/ */
@TableField("contact_user") @TableField("contact_user")
private String contactUser; private String contactUser;
/** /**
* 联系人电话 * 联系人电话
*/ */
@TableField("contact_phone") @TableField("contact_phone")
private String contactPhone; private String contactPhone;
/** /**
* 是否有物联参数(1有,0没有) * 是否有物联参数(1有,0没有)
*/ */
@TableField("is_iot") @TableField("is_iot")
private Boolean isIot; private Boolean isIot;
/** /**
* 消防救援机构_通用唯一识别码 * 消防救援机构_通用唯一识别码
*/ */
@TableField("rescue_org_code") @TableField("rescue_org_code")
private String rescueOrgCode; private String rescueOrgCode;
/** /**
* 行政区划代码 * 行政区划代码
*/ */
@TableField("administrative_code") @TableField("administrative_code")
private String administrativeCode; private String administrativeCode;
/** /**
* 组织机构代码 * 组织机构代码
*/ */
@TableField("org_code") @TableField("org_code")
private String orgCode; private String orgCode;
@ApiModelProperty("设施定义")
@TableField("equip_id")
private Long equipId;
@ApiModelProperty("设施定义名称")
@TableField("equip_name")
private String equipName;
@ApiModelProperty("设施分类")
@TableField("equip_category_id")
private Long equipCategoryId;
@ApiModelProperty("设施分类名称")
@TableField("equip_category_name")
private String equipCategoryName;
@ApiModelProperty("设施编码")
@TableField("equip_code")
private String equipCode;
@ApiModelProperty("维保周期")
@TableField("maintenance_period")
private String maintenancePeriod;
} }
package com.yeejoin.amos.boot.module.common.api.enums; package com.yeejoin.amos.boot.module.common.api.enums;
import java.util.ArrayList;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.List;
public enum FailureStatuEnum { public enum FailureStatuEnum {
WAITING_AUDIT(0,"待审核"), WAITING_AUDIT(0,"待审核"),
...@@ -7,8 +12,8 @@ public enum FailureStatuEnum { ...@@ -7,8 +12,8 @@ public enum FailureStatuEnum {
WAITING_MAINTAIN(2,"待维修"), WAITING_MAINTAIN(2,"待维修"),
WAITING_ACCEPTANCE(3,"待验收"), WAITING_ACCEPTANCE(3,"待验收"),
REFUSE(4,"已拒绝"), REFUSE(4,"已拒绝"),
FINISH(5,"已完结"); FINISH(5,"已完结"),
IN_MAINTENANCE(6,"维修中");
private FailureStatuEnum(Integer code, String name){ private FailureStatuEnum(Integer code, String name){
this.code=code; this.code=code;
...@@ -27,5 +32,14 @@ public enum FailureStatuEnum { ...@@ -27,5 +32,14 @@ public enum FailureStatuEnum {
return name; return name;
} }
public static List<HashMap<String,String>> getEnumList() {
List<HashMap<String, String>> list = new ArrayList<>();
for (FailureStatuEnum testEnum : EnumSet.allOf(FailureStatuEnum.class)) {
HashMap<String, String> map = new HashMap<>();
map.put(testEnum.name,testEnum.code.toString());
list.add(map);
}
return list;
} }
}
package com.yeejoin.amos.maintenance.common.enums; package com.yeejoin.amos.boot.module.common.api.enums;
public enum RiskJudgmentSelectStatusEnum { public enum UserRolesEnum {
可控("可控", "1"),
不可控("不可控", "2"); ADMIN("admin","机场单位"),
AIRPORTUNIT("AIRPORTUNIT","机场单位");
/**
* 名称,描述
*/
private String name;
/**
* 编码
*/
private String code; private String code;
private String name;
RiskJudgmentSelectStatusEnum(String name, String code) { UserRolesEnum(String code, String name){
this.name = name;
this.code = code; this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name; this.name = name;
} }
...@@ -33,4 +20,12 @@ public enum RiskJudgmentSelectStatusEnum { ...@@ -33,4 +20,12 @@ public enum RiskJudgmentSelectStatusEnum {
public void setCode(String code) { public void setCode(String code) {
this.code = code; this.code = code;
} }
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
} }
package com.yeejoin.amos.boot.module.common.api.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
@Getter
@AllArgsConstructor
public enum UserUnitTypeEnum {
MAINTENANCE_COMPANY("1", "维保公司"),
OWNER_UNIT("2", "业主单位");
private String value;
private String name;
}
...@@ -139,7 +139,25 @@ public interface EquipFeignClient { ...@@ -139,7 +139,25 @@ public interface EquipFeignClient {
* @param * @param
* @return * @return
*/ */
@RequestMapping(value = "//building/video/page", method = RequestMethod.GET) @RequestMapping(value = "/building/video/page", method = RequestMethod.GET)
ResponseModel<Page<Map<String, Object>>> getVideo( @RequestParam Page page, @RequestParam Long buildingId); ResponseModel<Page<Map<String, Object>>> getVideo( @RequestParam long current, @RequestParam long size, @RequestParam Long buildingId);
/**
*
*获取视频列表
* @param
* @return
*/
@RequestMapping(value = "/video/pageVideo", method = RequestMethod.GET)
ResponseModel<Page<Map<String, Object>>> pageVideo( @RequestParam Integer pageNum, @RequestParam Integer pageSize, @RequestParam Double longitude,@RequestParam Double latitude,@RequestParam Double distance);
/**
*
*获取视频列表
* @param
* @return
*/
@RequestMapping(value = "/video/getByid", method = RequestMethod.GET)
ResponseModel<Map<String, Object>> getByid( @RequestParam Long id);
} }
...@@ -29,4 +29,6 @@ public interface IotFeignClient { ...@@ -29,4 +29,6 @@ public interface IotFeignClient {
@RequestMapping(value = "/v1/iot/DynamicFlightInfo/list", method = RequestMethod.GET) @RequestMapping(value = "/v1/iot/DynamicFlightInfo/list", method = RequestMethod.GET)
ResponseModel<List<Map<String, Object>>> findImgByFileCategory(); ResponseModel<List<Map<String, Object>>> findImgByFileCategory();
@RequestMapping(value = "/v1/iot/DynamicFlightInfo/detail/{dynamicFlightId}", method = RequestMethod.GET)
ResponseModel<Map<String, Object>> findImgByDynamicFlightId(@PathVariable String dynamicFlightId);
} }
package com.yeejoin.amos.boot.module.common.api.feign;
import com.yeejoin.amos.component.feign.model.FeignClientResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
/**
*
* <pre>
* 设备联动服务(车库门、广播、警铃)
* </pre>
*
* @author gwb
* @version $Id: JcsControlServerClient.java, v 0.1 2021年8月19日 上午9:41:10 gwb Exp $
*/
@FeignClient(name = "${control.fegin.name}", configuration = {MultipartSupportConfig.class})
public interface JcsControlServerClient {
/**
*
* <pre>
* 打开/关闭消防警铃
* </pre>
*
* @param areasStr
* @param type(1 为开启 0为关闭)
* @return
*/
@GetMapping(value = "/v1/wksendbell/{codestr}/{type}")
FeignClientResult<String> sendBellAction(@PathVariable("codestr") String areasStr, @PathVariable("type") String type);
/**
*
* <pre>
* 播放广播
* </pre>
*
* @param areasStr
* @param fileUrlsStr
* @return
*/
@GetMapping(value = "/v1/wksend/{codestr}/{urlstr}")
FeignClientResult<String> sendFileAction(@PathVariable("codestr") String areasStr,@PathVariable("urlstr") String fileUrlsStr);
/**
*
* <pre>
* 获取单个设备状态(车库门)
* </pre>
*
* @param ip
* @param port
* @param whichone
* @return
*/
@GetMapping(value = "/v1/controlequip/kndread/{ip}/{port}/{num}")
FeignClientResult<String> readStateAction(@PathVariable("ip") String ip, @PathVariable("port") int port,
@PathVariable("num") int whichone);
/**
*
* <pre>
* 获取连续设备状态(车库门)
* </pre>
*
* @param ip
* @param port
* @param whichone
* @param count
* @return
*/
@GetMapping(value = "/v1/controlequip/kndread/{ip}/{port}/{num}/{count}")
FeignClientResult<String> readMoreStateAction(@PathVariable("ip") String ip,@PathVariable("port") int port,
@PathVariable("num") int whichone, @PathVariable("count") int count);
/**
*
* <pre>
* 设置设备状态(车库门)
* </pre>
*
* @param ip
* @param port
* @param whichone
* @param stateStr
* @return
*/
@GetMapping(value = "/v1/controlequip/kndwrite/{ip}/{port}/{num}/{result}")
FeignClientResult<String> writeStateAction(@PathVariable("ip") String ip,@PathVariable("port") int port,
@PathVariable("num") int whichone, @PathVariable("result") String stateStr);
}
...@@ -84,4 +84,6 @@ public interface DynamicFormInstanceMapper extends BaseMapper<DynamicFormInstanc ...@@ -84,4 +84,6 @@ public interface DynamicFormInstanceMapper extends BaseMapper<DynamicFormInstanc
@Param("shiftId") String shiftIds, @Param("shiftId") String shiftIds,
@Param("fieldCodes") Map<String, Object> fieldCodes, @Param("fieldCodes") Map<String, Object> fieldCodes,
@Param("groupCode") String groupCode); @Param("groupCode") String groupCode);
List<DynamicFormInstance> getInstanceByCodeAndValue(String code, String value);
} }
package com.yeejoin.amos.boot.module.common.api.mapper; package com.yeejoin.amos.boot.module.common.api.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.common.api.dto.FailureDetailsDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgUsrDto;
import com.yeejoin.amos.boot.module.common.api.dto.StatusDto;
import com.yeejoin.amos.boot.module.common.api.entity.FailureDetails; import com.yeejoin.amos.boot.module.common.api.entity.FailureDetails;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/** /**
* Mapper 接口 * Mapper 接口
...@@ -10,4 +19,127 @@ import com.yeejoin.amos.boot.module.common.api.entity.FailureDetails; ...@@ -10,4 +19,127 @@ import com.yeejoin.amos.boot.module.common.api.entity.FailureDetails;
* @date 2021-08-04 * @date 2021-08-04
*/ */
public interface FailureDetailsMapper extends BaseMapper<FailureDetails> { public interface FailureDetailsMapper extends BaseMapper<FailureDetails> {
/**
* 查询全部 分页
* @param currentStatus 当前任务状态
* * @param startTime 起始时间
* * @param endTime 结束时间
* * @param submissionPid 报送人
* @param current 当前页
* @return
*/
List<FailureDetails> selectAllPage(Long current,Long size, Long currentStatus,
String startTime,String endTime, Integer submissionPid);
/**
* 查询我发起的 分页
* current 当前页
* size 条数
* @param currentStatus 当前任务状态
* * @param startTime 起始时间
* * @param endTime 结束时间
* * @param submissionPid 报送人
* @return
*/
List<FailureDetails> selectISubPage(Long current,Long size, Long currentStatus,
String startTime,String endTime, Integer submissionPid);
/**
* 查询待处理 分页
* @param currentStatus 当前任务状态
* * @param startTime 起始时间
* * @param endTime 结束时间
* * @param submissionPid 报送人
* @param
* @return
*/
List<FailureDetails> selectInProcessing(Long current,Long size,Long currentStatus,
String startTime,String endTime, Integer submissionPid);
/**
* 查询待处理 应急指挥科人员分页
*
* @param
* @return
*/
List<FailureDetails> selectStatusWaitTj(Long current,Long size,Long currentStatus,
String startTime,String endTime, Integer submissionPid);
/**
* 查询待处理 维修人员分页
* @param currentStatus 当前任务状态
* * @param startTime 起始时间
* * @param endTime 结束时间
* * @param submissionPid 报送人
* @param
* @return
*/
List<FailureDetails> selectStatusWaitWx(Long current,Long size,Long currentStatus,
String startTime,String endTime, Integer submissionPid);
/**
* 统计 全部
*
* @param currentStatus 状态
* @param startTime 起始时间
* @param endTime 结束时间
* @param submissionPid 报送人
*
* @return
*/
List<StatusDto> selectStatusCount(Long currentStatus,String startTime,String endTime, Integer submissionPid);
/**
* 统计 维修人员
*
* @param currentStatus 状态
* @param startTime 起始时间
* @param endTime 结束时间
* @param submissionPid 报送人
*
* @return
*/
List<StatusDto> selectStatusWx(Long currentStatus,String startTime,String endTime, Integer submissionPid);
/**
* 统计 应急指挥科人员
*
* @param currentStatus 状态
* @param startTime 起始时间
* @param endTime 结束时间
* @param submissionPid 报送人
*
* @return
*/
List<StatusDto> selectStatusFq(Long currentStatus,String startTime,String endTime, Integer submissionPid);
/**
* 统计 我发起
*
* @param currentStatus 状态
* @param startTime 起始时间
* @param endTime 结束时间
* @param submissionPid 报送人
*
* @return
*/
List<StatusDto> selectStatusFqp(Long currentStatus,String startTime,String endTime, Integer submissionPid);
/**
* 统计 领导
*
* @param currentStatus 状态
* @param startTime 起始时间
* @param endTime 结束时间
* @param submissionPid 报送人
*
* @return
*/
List<StatusDto> selectStatusLeader(Long currentStatus,String startTime,String endTime, Integer submissionPid);
} }
package com.yeejoin.amos.boot.module.common.api.mapper;
import com.yeejoin.amos.boot.module.common.api.entity.FailureVerify;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* 故障报修验收记录 Mapper 接口
*
* @author system_generator
* @date 2021-08-18
*/
public interface FailureVerifyMapper extends BaseMapper<FailureVerify> {
}
...@@ -20,14 +20,14 @@ import java.util.Map; ...@@ -20,14 +20,14 @@ import java.util.Map;
*/ */
public interface FireStationMapper extends BaseMapper<FireStation> { public interface FireStationMapper extends BaseMapper<FireStation> {
// 微型消防站按时间倒叙排列add order by cb_fire_station.rec_date desc 2021-09-08 by kongfm
@Select("<script>" @Select("<script>"
+ "select * from cb_fire_station where cb_fire_station.is_delete=0 " + "select * from cb_fire_station where cb_fire_station.is_delete=0 "
+ "<if test='par.name!=null'> and cb_fire_station.name like CONCAT('%',#{par.name},'%') </if>" + "<if test='par.name!=null'> and cb_fire_station.name like CONCAT('%',#{par.name},'%') </if>"
+ "<if test='par.bizCompanyId!=null'> and cb_fire_station.biz_company_id = #{par.bizCompanyId} </if>" + "<if test='par.bizCompanyId!=null'> and cb_fire_station.biz_company_id = #{par.bizCompanyId} </if>"
+ "<if test='par.bizCompanyCode!=null'> and cb_fire_station.biz_company_code like CONCAT('',#{par.bizCompanyCode},'%') </if>" + "<if test='par.bizCompanyCode!=null'> and cb_fire_station.biz_company_code like CONCAT('',#{par.bizCompanyCode},'%') </if>"
+"limit #{pageNum},#{pageSize}" +" order by cb_fire_station.rec_date desc limit #{pageNum},#{pageSize}"
+ "</script>") + "</script>")
List<FireStationDto>getFireStation(@Param("pageNum")int pageNum,@Param("pageSize")int pageSize,@Param("par")FireStationDto par); List<FireStationDto>getFireStation(@Param("pageNum")int pageNum,@Param("pageSize")int pageSize,@Param("par")FireStationDto par);
@Select("<script>" @Select("<script>"
......
...@@ -91,9 +91,12 @@ public interface FireTeamMapper extends BaseMapper<FireTeam> { ...@@ -91,9 +91,12 @@ public interface FireTeamMapper extends BaseMapper<FireTeam> {
List<FireTeamZhDto> getFireTeamCountList(); List<FireTeamZhDto> getFireTeamCountList();
/**
* 根据teamId 返回队伍底下人员数量
* @param teamId
* @return
*/
Integer getFighterNumByTeamId(Long teamId);
} }
package com.yeejoin.amos.boot.module.common.api.mapper; package com.yeejoin.amos.boot.module.common.api.mapper;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...@@ -12,6 +7,10 @@ import com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitDto; ...@@ -12,6 +7,10 @@ import com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitDto;
import com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitZhDto; import com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitZhDto;
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.common.api.entity.LinkageUnit; import com.yeejoin.amos.boot.module.common.api.entity.LinkageUnit;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/** /**
* 联动单位 Mapper 接口 * 联动单位 Mapper 接口
...@@ -59,7 +58,7 @@ public interface LinkageUnitMapper extends BaseMapper<LinkageUnit> { ...@@ -59,7 +58,7 @@ public interface LinkageUnitMapper extends BaseMapper<LinkageUnit> {
* @return * @return
*/ */
Page<List<LinkageUnitDto>> getEmergencyLinkageUnitList(IPage<LinkageUnitDto> page,String unitName, Page<List<LinkageUnitDto>> getEmergencyLinkageUnitList(IPage<LinkageUnitDto> page,String unitName,
String linkageUnitTypeCode, String emergencyLinkageUnitCode); String linkageUnitType, String linkageUnitTypeCode, String emergencyLinkageUnitCode);
List<LinkageUnitDto> exportToExcel(); List<LinkageUnitDto> exportToExcel();
......
...@@ -29,4 +29,8 @@ public interface MaintenanceCompanyMapper extends BaseMapper<MaintenanceCompany> ...@@ -29,4 +29,8 @@ public interface MaintenanceCompanyMapper extends BaseMapper<MaintenanceCompany>
* @return * @return
*/ */
public Page<OrgUsrDto> selectOrgUsrPageList(Page page, @Param("seq") Long seq); public Page<OrgUsrDto> selectOrgUsrPageList(Page page, @Param("seq") Long seq);
List<MaintenanceCompany> findByCodeAndType(String code, String type);
List<MaintenanceCompany> findByInstanceIdAndType(Long instanceId, String type);
} }
...@@ -21,7 +21,7 @@ public interface OrgUsrMapper extends BaseMapper<OrgUsr> { ...@@ -21,7 +21,7 @@ public interface OrgUsrMapper extends BaseMapper<OrgUsr> {
int selectPersonListCount(Map<String, Object> map); int selectPersonListCount(Map<String, Object> map);
List<Map<String, Object>> selectPersonList(Map<String, Object> map); List<Map<String, Object>> selectPersonList(@Param("map")Map<String, Object> map);
List<OrgUsr> selectCompanyDepartmentMsg(); List<OrgUsr> selectCompanyDepartmentMsg();
...@@ -63,4 +63,18 @@ public interface OrgUsrMapper extends BaseMapper<OrgUsr> { ...@@ -63,4 +63,18 @@ public interface OrgUsrMapper extends BaseMapper<OrgUsr> {
List< Map<String,Object>> getparent(); List< Map<String,Object>> getparent();
List< OrgUsrExcelDto> exportToExcel(); List< OrgUsrExcelDto> exportToExcel();
/**
* 查询单位基本信息列表和单位下所有的重点部位数量。
*/
List<CheckObjectDto> getCompanyAndKeySite(Long companyId);
List<UserUnitDto> getUserUnit(String id, String type, String code);
/**
* 导出机场单位带过滤 bug2657 by kongfm
* @param parentId
* @return
*/
List< OrgUsrExcelDto> exportPersonToExcelByParentId(Long parentId);
} }
...@@ -2,7 +2,6 @@ package com.yeejoin.amos.boot.module.common.api.mapper; ...@@ -2,7 +2,6 @@ package com.yeejoin.amos.boot.module.common.api.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.utils.MenuFrom;
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.common.api.dto.WaterResourceDto; import com.yeejoin.amos.boot.module.common.api.dto.WaterResourceDto;
import com.yeejoin.amos.boot.module.common.api.dto.WaterResourceTypeDto; import com.yeejoin.amos.boot.module.common.api.dto.WaterResourceTypeDto;
...@@ -45,5 +44,7 @@ public interface WaterResourceMapper extends BaseMapper<WaterResource> { ...@@ -45,5 +44,7 @@ public interface WaterResourceMapper extends BaseMapper<WaterResource> {
* 根据参数查询 * 根据参数查询
* *
*/ */
Page<WaterResourceDto> getWaterResourcePageByParams(Page<WaterResourceDto> page, String name, String resourceType, ArrayList<Long> belongBuildingId, Long belongFightingSystemId, Long sequenceNbr); Page<WaterResourceDto> getWaterResourcePageByParams(Page<WaterResourceDto> page, String name, String resourceType,
ArrayList<Long> belongBuildingId, Long belongFightingSystemId,
Long sequenceNbr, String equipId);
} }
...@@ -37,7 +37,7 @@ public interface IDutyCommonService { ...@@ -37,7 +37,7 @@ public interface IDutyCommonService {
* @param endDate 结束日期 * @param endDate 结束日期
* @return ResponseModel * @return ResponseModel
*/ */
List<Map<String, Object>> list(String beginDate, String endDate) throws ParseException; List<Map<String, Object>> list(Long teamId,String beginDate, String endDate) throws ParseException;
/** /**
* 获取表单参数 * 获取表单参数
...@@ -79,4 +79,11 @@ public interface IDutyCommonService { ...@@ -79,4 +79,11 @@ public interface IDutyCommonService {
* @return List<Map < String, Object>> * @return List<Map < String, Object>>
*/ */
List<Map<String, Object>> listOnDutyPerson(); List<Map<String, Object>> listOnDutyPerson();
/**
* 根据当前时间获取值班班次id列表
*
* @return
*/
List<Long> getDutyShiftIdList();
} }
...@@ -4,13 +4,13 @@ package com.yeejoin.amos.boot.module.common.api.service; ...@@ -4,13 +4,13 @@ package com.yeejoin.amos.boot.module.common.api.service;
import com.yeejoin.amos.boot.module.common.api.entity.DynamicFormInstance; import com.yeejoin.amos.boot.module.common.api.entity.DynamicFormInstance;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* 动态表单实例表接口类 * 动态表单实例表接口类
* *
* @author system_generator * @author system_generator
* @date 2021-07-06 * @date 2021-07-06
*/ */
public interface IDynamicFormInstanceService { public interface IDynamicFormInstanceService {
List<DynamicFormInstance> getInstanceByCodeAndValue(String code, String value);
} }
...@@ -9,7 +9,7 @@ import com.yeejoin.amos.boot.module.common.api.entity.FailureRepairlog; ...@@ -9,7 +9,7 @@ import com.yeejoin.amos.boot.module.common.api.entity.FailureRepairlog;
* @date 2021-08-12 * @date 2021-08-12
*/ */
public interface IFailureRepairlogService { public interface IFailureRepairlogService {
public FailureRepairlog findByprocessAuditorId(Long userId); public FailureRepairlog findByprocessAuditor(String userId);
public FailureRepairlog findByFaultId(Long faultId) ; public FailureRepairlog findByFaultId(Long faultId) ;
......
package com.yeejoin.amos.boot.module.common.api.service;
/**
* 故障报修验收记录接口类
*
* @author system_generator
* @date 2021-08-18
*/
public interface IFailureVerifyService {
}
package com.yeejoin.amos.boot.module.common.api.service; package com.yeejoin.amos.boot.module.common.api.service;
import com.yeejoin.amos.boot.module.common.api.dto.FirefightersContractDto;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
/** /**
* 消防员合同 服务类 * 消防员合同 服务类
* *
...@@ -8,4 +11,13 @@ package com.yeejoin.amos.boot.module.common.api.service; ...@@ -8,4 +11,13 @@ package com.yeejoin.amos.boot.module.common.api.service;
*/ */
public interface IFirefightersContractService { public interface IFirefightersContractService {
/**
* 保存
* @param firefightersContract
* @return
*/
public FirefightersContractDto save(FirefightersContractDto firefightersContract);
public FirefightersContractDto updateById(FirefightersContractDto firefightersContract, AgencyUserModel userInfo);
} }
...@@ -2,16 +2,12 @@ package com.yeejoin.amos.boot.module.common.api.service; ...@@ -2,16 +2,12 @@ package com.yeejoin.amos.boot.module.common.api.service;
import java.util.List; import java.util.List;
import org.typroject.tyboot.core.rdbms.annotation.Condition;
import org.typroject.tyboot.core.rdbms.annotation.Operator;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.utils.Menu; import com.yeejoin.amos.boot.biz.common.utils.Menu;
import com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitDto; import com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitDto;
import com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitZhDto; import com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitZhDto;
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.common.api.entity.LinkageUnit;
/** /**
* 联动单位接口类 * 联动单位接口类
...@@ -37,17 +33,17 @@ public interface ILinkageUnitService { ...@@ -37,17 +33,17 @@ public interface ILinkageUnitService {
* @param emergencyLinkageUnitCode 紧急联动单位类型code * @param emergencyLinkageUnitCode 紧急联动单位类型code
* @return * @return
*/ */
Page<LinkageUnitDto> queryForLinkageUnitPage(IPage<LinkageUnitDto> page, Page<LinkageUnitDto> queryForLinkageUnitPage(IPage<LinkageUnitDto> page, Boolean isDelete, String unitName,
@Condition(Operator.eq) Boolean isDelete, String linkageUnitTypeCode, String linkageUnitType, String emergencyLinkageUnitCode, String inAgreement);
@Condition(Operator.like) String unitName,
@Condition(Operator.eq) String linkageUnitTypeCode,
@Condition(Operator.eq) String emergencyLinkageUnitCode,
String inAgreement);
/** /**
* 获取当前存在的联动单位的类型组code * 获取当前存在的联动单位的类型组code
*
* @return * @return
*/ */
public List<Menu> getEmergencyLinkageUnitCodeGroupBy(String type, String rootName) ; public List<Menu> getEmergencyLinkageUnitCodeGroupBy(String type, String rootName);
List<LinkageUnitDto> exportToExcel(); List<LinkageUnitDto> exportToExcel();
List<LinkageUnitDto> queryForLinkageUnitList(Boolean isDelete);
} }
...@@ -161,4 +161,8 @@ public interface IMaintenanceCompanyService { ...@@ -161,4 +161,8 @@ public interface IMaintenanceCompanyService {
* @return * @return
*/ */
public List<MaintenancePersonExcleDto> exportToMaintenancePersonExcel(); public List<MaintenancePersonExcleDto> exportToMaintenancePersonExcel();
List<MaintenanceCompany> findByInstanceIdAndType(Long instanceId, String type);
List<MaintenanceCompany> findByCodeAndType(String code, String type);
} }
...@@ -5,12 +5,24 @@ import java.util.List; ...@@ -5,12 +5,24 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yeejoin.amos.boot.module.common.api.dto.*; import com.yeejoin.amos.boot.module.common.api.dto.CheckObjectDto;
import com.yeejoin.amos.boot.module.common.api.dto.CompanyDto;
import com.yeejoin.amos.boot.module.common.api.dto.ESOrgUsrDto;
import com.yeejoin.amos.boot.module.common.api.dto.FormValue;
import com.yeejoin.amos.boot.module.common.api.dto.OrgDepartmentDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgDepartmentFormDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgMenuDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgPersonDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgPersonFormDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgUsrDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgUsrExcelDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgUsrFormDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgUsrzhDto;
import com.yeejoin.amos.boot.module.common.api.dto.RequestData;
import com.yeejoin.amos.boot.module.common.api.dto.UserUnitDto;
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.entity.OrgUsr; import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
/** /**
* 机构/部门/人员表 服务类 * 机构/部门/人员表 服务类
...@@ -21,6 +33,7 @@ import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr; ...@@ -21,6 +33,7 @@ import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr;
public interface IOrgUsrService { public interface IOrgUsrService {
/** /**
* 查询上级单位 * 查询上级单位
*
* @param parent_id * @param parent_id
* @return * @return
*/ */
...@@ -28,6 +41,7 @@ public interface IOrgUsrService { ...@@ -28,6 +41,7 @@ public interface IOrgUsrService {
/** /**
* 获取父级 * 获取父级
*
* @param topId * @param topId
* @param entityList * @param entityList
* @param packageURL * @param packageURL
...@@ -44,6 +58,7 @@ public interface IOrgUsrService { ...@@ -44,6 +58,7 @@ public interface IOrgUsrService {
/** /**
* 获取子数据集合 * 获取子数据集合
*
* @param topId * @param topId
* @param entityList * @param entityList
* @param packageURL * @param packageURL
...@@ -60,6 +75,7 @@ public interface IOrgUsrService { ...@@ -60,6 +75,7 @@ public interface IOrgUsrService {
/** /**
* 组装融合调度单位人员信息 * 组装融合调度单位人员信息
*
* @param ids * @param ids
* @return * @return
* @throws Exception * @throws Exception
...@@ -68,6 +84,7 @@ public interface IOrgUsrService { ...@@ -68,6 +84,7 @@ public interface IOrgUsrService {
/** /**
* 获取动态表单数据 * 获取动态表单数据
*
* @param id * @param id
* @return * @return
* @throws Exception * @throws Exception
...@@ -76,17 +93,19 @@ public interface IOrgUsrService { ...@@ -76,17 +93,19 @@ public interface IOrgUsrService {
/** /**
* 保存 机构/部门/人员基本信息 * 保存 机构/部门/人员基本信息
*
* @param * @param
* @throws Exception * @throws Exception
*/ */
void saveOrgUsr (OrgUsr orgUsr, OrgUsr oriOrgUsr) throws Exception; void saveOrgUsr(OrgUsr orgUsr, OrgUsr oriOrgUsr) throws Exception;
/** /**
* 新增机构/部门/人员基本信息和动态表单数据 * 新增机构/部门/人员基本信息和动态表单数据
*
* @param orgUsr * @param orgUsr
* @param alertFromValuelist * @param alertFromValuelist
*/ */
void saveOrgUsrDynamicFormInstance (OrgUsr orgUsr,List<DynamicFormInstance> alertFromValuelist)throws Exception; void saveOrgUsrDynamicFormInstance(OrgUsr orgUsr, List<DynamicFormInstance> alertFromValuelist) throws Exception;
/** /**
* 更新机构/部门/人员基本信息和动态表单数据 * 更新机构/部门/人员基本信息和动态表单数据
...@@ -95,32 +114,31 @@ public interface IOrgUsrService { ...@@ -95,32 +114,31 @@ public interface IOrgUsrService {
* @param fromValueList 动态表单数据列表 * @param fromValueList 动态表单数据列表
* @throws Exception * @throws Exception
*/ */
void updateDynamicFormInstance(Long instanceId, List<DynamicFormInstance> fromValueList)throws Exception; void updateDynamicFormInstance(Long instanceId, List<DynamicFormInstance> fromValueList) throws Exception;
/** /**
*
* @param id * @param id
* @throws Exception * @throws Exception
*/ */
Map<String, Object> selectForShowById (OrgUsr orgUsr,Long id) throws Exception; Map<String, Object> selectForShowById(OrgUsr orgUsr, Long id) throws Exception;
List<OrgUsr> selectCompanyDepartmentMsg(); List<OrgUsr> selectCompanyDepartmentMsg();
void saveOrgUsr( OrgUsrDto OrgUsrDto) throws Exception; void saveOrgUsr(OrgUsrDto OrgUsrDto) throws Exception;
void saveOrgPerson( OrgPersonDto OrgPersonDto) throws Exception; void saveOrgPerson(OrgPersonDto OrgPersonDto) throws Exception;
void updateByIdOrgUsr(OrgUsrDto OrgUsrDto,Long id) throws Exception; void updateByIdOrgUsr(OrgUsrDto OrgUsrDto, Long id) throws Exception;
void updateByIdOrgPerson(OrgPersonDto OrgPersonDto,Long id) throws Exception; void updateByIdOrgPerson(OrgPersonDto OrgPersonDto, Long id) throws Exception;
OrgUsrFormDto selectCompanyById(Long id) throws Exception; OrgUsrFormDto selectCompanyById(Long id) throws Exception;
IPage bizOrgTypeListPage(String pageNum, String pageSize, String bizOrgType) throws Exception; IPage bizOrgTypeListPage(String pageNum, String pageSize, String bizOrgType) throws Exception;
void saveDepartment(List<OrgDepartmentDto> OrgDepartmentDto, Long id)throws Exception; void saveDepartment(List<OrgDepartmentDto> OrgDepartmentDto, Long id) throws Exception;
void saveCompany(List<OrgUsrDto> OrgUsrDto)throws Exception; void saveCompany(List<OrgUsrDto> OrgUsrDto) throws Exception;
OrgPersonFormDto selectPersonById(Long id) throws Exception; OrgPersonFormDto selectPersonById(Long id) throws Exception;
...@@ -128,41 +146,49 @@ public interface IOrgUsrService { ...@@ -128,41 +146,49 @@ public interface IOrgUsrService {
List<OrgMenuDto> selectPersonTree() throws Exception; List<OrgMenuDto> selectPersonTree() throws Exception;
void savePersonList (List <OrgPersonDto> OrgPersonDto)throws Exception; void savePersonList(List<OrgPersonDto> OrgPersonDto) throws Exception;
void saveOrgDepartment(OrgDepartmentDto OrgDepartmentDto) throws Exception; void saveOrgDepartment(OrgDepartmentDto OrgDepartmentDto) throws Exception;
void updateByIdOrgDepartment ( OrgDepartmentDto OrgDepartmentDto,Long id) throws Exception; void updateByIdOrgDepartment(OrgDepartmentDto OrgDepartmentDto, Long id) throws Exception;
OrgDepartmentFormDto selectDepartmentById(Long id) throws Exception; OrgDepartmentFormDto selectDepartmentById(Long id) throws Exception;
List<Map<String, Object>> selectForShowByListId(List<Long> ids) throws Exception; List<Map<String, Object>> selectForShowByListId(List<Long> ids) throws Exception;
/** /**
* * @param null * * @param null
*
* @return * @return
*
* <PRE> * <PRE>
* author tw * author tw
* date 2021/7/20 * date 2021/7/20
* </PRE> * </PRE>
*
* 列表 * 列表
*/ */
List<CompanyDto> listContractDto(Integer pageNum, Integer pageSize, RequestData requestData); List<CompanyDto> listContractDto(Integer pageNum, Integer pageSize, RequestData requestData);
/** /**
* * @param null * * @param null
*
* @return * @return
*
* <PRE> * <PRE>
* author tw * author tw
* date 2021/7/20 * date 2021/7/20
* </PRE> * </PRE>
*
* 统计 * 统计
*/ */
Integer listContractDtoCount(RequestData par); Integer listContractDtoCount(RequestData par);
/** /**
* * @param null * * @param null
*
* @return * @return
*
* <PRE> * <PRE>
* author tw * author tw
* date 2021/7/26 * date 2021/7/26
...@@ -171,9 +197,41 @@ public interface IOrgUsrService { ...@@ -171,9 +197,41 @@ public interface IOrgUsrService {
List<OrgUsrzhDto> getOrgUsrzhDto(String name); List<OrgUsrzhDto> getOrgUsrzhDto(String name);
List<ESOrgUsrDto> selectByIddata(String name); List<ESOrgUsrDto> selectByIddata(String name);
List< Map<String,Object>> getparent(); List<Map<String, Object>> getparent();
List< OrgUsrExcelDto> exportToExcel();
List<OrgUsrExcelDto> exportToExcel();
UserUnitDto getUserUnit(String userId);
/**
* 根据登陆人获取公司部门人员树
*/
List<OrgMenuDto> companyUserTreeByUser(AgencyUserModel user);
/**
* 根据登陆人获取公司部门树
*/
List<OrgMenuDto> companyTreeByUser(AgencyUserModel user);
/**
* 根据登陆人获取公司列表(关联重点部位)
*/
List<CheckObjectDto> companyListByUser(AgencyUserModel user);
/**
* 获取登陆人关联机场单位人员信息,部门信息
*/
List<Map<String, Object>> getLoginUserDetails(AgencyUserModel user);
List<OrgUsr> getPersonListByParentId(Long id);
/**
* 根据parentId 导出机场单位人员 bug2657 by kongfm
* @param parentId
* @return
*/
List<OrgUsrExcelDto> exportPersonToExcelByParentId(Long parentId);
} }
...@@ -184,4 +184,18 @@ ...@@ -184,4 +184,18 @@
</if> </if>
order by instanceId desc order by instanceId desc
</select> </select>
<select id="getInstanceByCodeAndValue" resultType="com.yeejoin.amos.boot.module.common.api.entity.DynamicFormInstance">
SELECT
f.instance_id
FROM
`cb_dynamic_form_instance` f
<where>
<if test="code != null and code != ''">
f.field_code = #{code}
</if>
<if test="value != null and value != ''">
AND f.field_value = #{value}
</if>
</where>
</select>
</mapper> </mapper>
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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.common.api.mapper.FailureDetailsMapper"> <mapper namespace="com.yeejoin.amos.boot.module.common.api.mapper.FailureDetailsMapper">
<select id="selectAllPage" resultType="com.yeejoin.amos.boot.module.common.api.entity.FailureDetails">
SELECT
sequence_nbr,
current_status,
failure_equipment_id,
failure_equipment,
fault_time,
fault_phenomenon,
submission_name,
submission_pid,
biz_code,
submission_time,
submission_branch,
submission_branch_id
FROM
cb_failure_details
<where>
<if test="currentStatus!= null ">
and current_status = #{currentStatus}
</if>
<if test="startTime!= null and endTime != null">
and submission_time between #{startTime} and #{endTime}
</if>
<if test="submissionPid!= null ">
and submission_pid = #{submissionPid}
</if>
</where>
order by submission_time DESC limit #{current},#{size}
</select>
<select id="selectISubPage" resultType="com.yeejoin.amos.boot.module.common.api.entity.FailureDetails">
SELECT sequence_nbr,
current_status,
failure_equipment_id,
failure_equipment,
fault_time,
fault_phenomenon,
submission_name,
submission_pid,
biz_code,
submission_time,
submission_branch,
submission_branch_id
FROM cb_failure_details
<where>
<if test="currentStatus!= null ">
and current_status = #{currentStatus}
</if>
<if test="startTime!= null and endTime != null">
and submission_time between #{startTime} and #{endTime}
</if>
<if test="submissionPid!= null ">
and submission_pid = #{submissionPid}
</if>
</where>
order by submission_time DESC
limit #{current},#{size}
</select>
<select id="selectInProcessing" resultType="com.yeejoin.amos.boot.module.common.api.entity.FailureDetails">
SELECT sequence_nbr,
current_status,
failure_equipment_id,
failure_equipment,
fault_time,
fault_phenomenon,
submission_name,
submission_pid,
biz_code,
submission_time,
submission_branch,
submission_branch_id
FROM cb_failure_details
<where>
<if test="currentStatus == null ">
and current_status in (0,3)
</if>
<if test="currentStatus != null ">
current_status = #{currentStatus}
</if>
<if test="startTime!= null and endTime != null">
and submission_time between #{startTime} and #{endTime}
</if>
<if test="submissionPid!= null ">
and submission_pid = #{submissionPid}
</if>
</where>
order by submission_time DESC
limit #{current},#{size}
</select>
<select id="selectStatusWaitTj" resultType="com.yeejoin.amos.boot.module.common.api.entity.FailureDetails">
SELECT sequence_nbr,
current_status,
failure_equipment_id,
failure_equipment,
fault_time,
fault_phenomenon,
submission_name,
submission_pid,
biz_code,
submission_time,
submission_branch,
submission_branch_id
FROM cb_failure_details
<where>
<if test="currentStatus != null ">
and current_status = #{currentStatus}
</if>
<if test="startTime!= null and endTime != null">
and submission_time between #{startTime} and #{endTime}
</if>
<if test="submissionPid!= null ">
and submission_pid = #{submissionPid}
</if>
</where>
order by submission_time DESC
limit #{current},#{size}
</select>
<select id="selectStatusWaitWx" resultType="com.yeejoin.amos.boot.module.common.api.entity.FailureDetails">
SELECT sequence_nbr,
current_status,
failure_equipment_id,
failure_equipment,
fault_time,
fault_phenomenon,
submission_name,
submission_pid,
biz_code,
submission_time,
submission_branch,
submission_branch_id
FROM cb_failure_details
<where>
<if test="currentStatus == null ">
current_status IN (2,6)
</if>
<if test="currentStatus != null ">
current_status = #{currentStatus}
</if>
<if test="startTime!= null and endTime != null">
and submission_time between #{startTime} and #{endTime}
</if>
<if test="submissionPid!= null ">
and submission_pid = #{submissionPid}
</if>
</where>
order by submission_time DESC
limit #{current},#{size}
</select>
<select id="selectStatusCount" resultType="com.yeejoin.amos.boot.module.common.api.dto.StatusDto">
SELECT cb_failure_details.current_status,
count(cb_failure_details.current_status)
AS currentStatusCount
FROM cb_failure_details
<where>
<if test="currentStatus!= null ">
and current_status = #{currentStatus}
</if>
<if test="startTime!= null and endTime != null">
and submission_time between #{startTime} and #{endTime}
</if>
<if test="submissionPid!= null ">
and submission_pid = #{submissionPid}
</if>
</where>
GROUP BY cb_failure_details.current_status
</select>
<select id="selectStatusWx" resultType="com.yeejoin.amos.boot.module.common.api.dto.StatusDto">
SELECT cb_failure_details.current_status,
count(cb_failure_details.current_status)
AS currentStatusCount
FROM cb_failure_details
<where>
<if test="currentStatus == null ">
and current_status in (2,6)
</if>
<if test="currentStatus != null ">
and current_status #{currentStatus}
</if>
<if test="startTime!= null and endTime != null">
and submission_time between #{startTime} and #{endTime}
</if>
<if test="submissionPid!= null ">
and submission_pid = #{submissionPid}
</if>
</where>
GROUP BY cb_failure_details.current_status
</select>
<select id="selectStatusFq" resultType="com.yeejoin.amos.boot.module.common.api.dto.StatusDto">
SELECT cb_failure_details.current_status,
count(cb_failure_details.current_status)
AS currentStatusCount
FROM cb_failure_details
<where>
<if test="currentStatus == null ">
and current_status = 1
</if>
<if test="startTime!= null and endTime != null">
and submission_time between #{startTime} and #{endTime}
</if>
<if test="submissionPid!= null ">
and submission_pid = #{submissionPid}
</if>
</where>
GROUP BY cb_failure_details.current_status
</select>
<select id="selectStatusLeader" resultType="com.yeejoin.amos.boot.module.common.api.dto.StatusDto">
SELECT cb_failure_details.current_status,
count(cb_failure_details.current_status)
AS currentStatusCount
FROM cb_failure_details
<where>
<if test="currentStatus == null ">
and current_status in (0,3)
</if>
<if test="startTime!= null and endTime != null">
and submission_time between #{startTime} and #{endTime}
</if>
<if test="submissionPid!= null ">
and submission_pid = #{submissionPid}
</if>
</where>
GROUP BY cb_failure_details.current_status
</select>
<select id="selectStatusFqp" parameterType="integer"
resultType="com.yeejoin.amos.boot.module.common.api.dto.StatusDto">
SELECT cb_failure_details.current_status,
count(cb_failure_details.current_status)
AS currentStatusCount
FROM cb_failure_details
<where>
<if test="currentStatus!= null ">
and current_status = #{currentStatus}
</if>
<if test="startTime!= null and endTime != null">
and submission_time between #{startTime} and #{endTime}
</if>
<if test="submissionPid!= null ">
and submission_pid = #{submissionPid}
</if>
</where>
GROUP BY cb_failure_details.current_status
</select>
</mapper> </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.common.api.mapper.FailureVerifyMapper">
</mapper>
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
</if> </if>
</select> </select>
<!--消防队伍列表按时间倒叙排列order by x.rec_date desc 2021-09-08 by kongfm -->
<select id="getFireTeamForPage" resultType="com.yeejoin.amos.boot.module.common.api.dto.FireTeamCardDto"> <select id="getFireTeamForPage" resultType="com.yeejoin.amos.boot.module.common.api.dto.FireTeamCardDto">
SELECT SELECT
a.sequence_nbr sequenceNbr, a.sequence_nbr sequenceNbr,
...@@ -36,8 +36,7 @@ ...@@ -36,8 +36,7 @@
a.NAME, a.NAME,
a.contact_user contactUser, a.contact_user contactUser,
a.contact_phone contactPhone, a.contact_phone contactPhone,
a.address, a.address
( SELECT count( 1 ) FROM cb_firefighters WHERE fire_team_id = a.sequence_nbr AND is_delete = 0 ) fighterNum
FROM FROM
cb_fire_team a cb_fire_team a
WHERE WHERE
...@@ -64,6 +63,7 @@ ...@@ -64,6 +63,7 @@
and a.sequence_nbr = #{par.nodeId} and a.sequence_nbr = #{par.nodeId}
</if> </if>
</if> </if>
order by a.rec_date desc
</select> </select>
<select id="listFireTeamDto" resultType="com.yeejoin.amos.boot.module.common.api.dto.FireTeamDto"> <select id="listFireTeamDto" resultType="com.yeejoin.amos.boot.module.common.api.dto.FireTeamDto">
select t.*, p.name parentName select t.*, p.name parentName
...@@ -71,6 +71,8 @@ ...@@ -71,6 +71,8 @@
left join cb_fire_team p on t.parent = p.sequence_nbr left join cb_fire_team p on t.parent = p.sequence_nbr
where t.is_delete = #{isDelete} where t.is_delete = #{isDelete}
</select> </select>
<!--消防队伍列表按时间倒叙排列order by x.rec_date desc 2021-09-08 by kongfm -->
<select id="listFireTeamById" resultType="com.yeejoin.amos.boot.module.common.api.entity.FireTeam"> <select id="listFireTeamById" resultType="com.yeejoin.amos.boot.module.common.api.entity.FireTeam">
SELECT * SELECT *
FROM cb_fire_team FROM cb_fire_team
...@@ -78,6 +80,7 @@ ...@@ -78,6 +80,7 @@
<if test="teamId != null"> <if test="teamId != null">
AND tree_code LIKE CONCAT((SELECT tree_code FROM cb_fire_team WHERE sequence_nbr = #{teamId}),'%'); AND tree_code LIKE CONCAT((SELECT tree_code FROM cb_fire_team WHERE sequence_nbr = #{teamId}),'%');
</if> </if>
order by cb_fire_team.rec_date desc
</select> </select>
...@@ -136,14 +139,15 @@ ...@@ -136,14 +139,15 @@
</select> </select>
<select id="getFighterNumByTeamId" resultType="Integer">
SELECT
count(1)
FROM
cb_firefighters
WHERE
fire_team_id = #{teamId}
AND is_delete = 0
</select>
......
...@@ -9,36 +9,36 @@ ...@@ -9,36 +9,36 @@
where a.is_delete = 0 where a.is_delete = 0
GROUP BY a.job_title_code GROUP BY a.job_title_code
</select> </select>
<!--消防队员列表按时间倒叙排列add desc 2021-09-08 by kongfm -->
<select id="getFirefighters" <select id="getFirefighters"
resultType="com.yeejoin.amos.boot.module.common.api.dto.FirefightersZhDto"> resultType="com.yeejoin.amos.boot.module.common.api.dto.FirefightersZhDto">
select a.*,b.areas_expertise areasExpertise ,b.areas_expertise_code areasExpertiseCode from cb_firefighters a LEFT JOIN cb_firefighters_post b on select a.*,b.areas_expertise areasExpertise ,b.areas_expertise_code areasExpertiseCode from cb_firefighters a LEFT JOIN cb_firefighters_post b on
a.sequence_nbr=b.firefighters_id where a.is_delete=0 a.sequence_nbr=b.firefighters_id where a.is_delete=0
<if test='par.postQualification!=null'>and b.post_qualification_code = #{par.postQualification}</if> <if test='par.postQualification!=null'>and b.post_qualification_code = #{par.postQualification}</if>
<if test='par.areasExpertise!=null'>and b.areas_expertise_code= #{par.areasExpertise}"</if> <if test='par.areasExpertise!=null'>and b.areas_expertise_code= #{par.areasExpertise}</if>
<if test='par.name!=null'>and a.name= #{par.name}</if> <if test='par.name!=null'>and a.name like concat ('%',#{par.name},'%')</if>
<if test='par.state!=null'>and a.state_code= #{par.state}</if> <if test='par.state!=null'>and a.state_code= #{par.state}</if>
<if test='par.fireTeamId!=null'>and a.fire_team_id= #{par.fireTeamId}</if> <if test='par.fireTeamId!=null'>and a.fire_team_id= #{par.fireTeamId}</if>
<if test='par.jobTitle!=null'>and a.job_title_code =#{par.jobTitle}</if> <if test='par.jobTitle!=null'>and a.job_title_code =#{par.jobTitle}</if>
<if test='par.areasExpertiseCode!=null and par.areasExpertiseCode!="0"'>and b.areas_expertise_code =#{par.areasExpertiseCode}</if> <if test='par.areasExpertiseCode!=null and par.areasExpertiseCode!="0"'>and b.areas_expertise_code =#{par.areasExpertiseCode}</if>
<if test='par.areasExpertiseCode=="0"'>and b.areas_expertise_code is not null</if> <if test='par.areasExpertiseCode=="0"'>and b.areas_expertise_code is not null</if>
ORDER BY a.rec_date limit #{pageNum},#{pageSize} ORDER BY a.rec_date desc limit #{pageNum},#{pageSize}
</select> </select>
<!--消防队员列表按时间倒叙排列add desc 2021-09-08 by kongfm -->
<select id="getFirefightersCount" resultType="Map"> <select id="getFirefightersCount" resultType="Map">
select COUNT(a.sequence_nbr) num from cb_firefighters a LEFT JOIN select COUNT(a.sequence_nbr) num from cb_firefighters a LEFT JOIN
cb_firefighters_post b on a.sequence_nbr=b.firefighters_id where cb_firefighters_post b on a.sequence_nbr=b.firefighters_id where
a.is_delete=0 a.is_delete=0
<if test='par.postQualification!=null'>and b.post_qualification_code = #{par.postQualification}</if> <if test='par.postQualification!=null'>and b.post_qualification_code = #{par.postQualification}</if>
<if test='par.areasExpertise!=null'>and b.areas_expertise_code= #{par.areasExpertise}"</if> <if test='par.areasExpertise!=null'>and b.areas_expertise_code= #{par.areasExpertise}</if>
<if test='par.name!=null'>and a.name= #{par.name}</if> <if test='par.name!=null'>and a.name like concat ('%',#{par.name},'%')</if>
<if test='par.state!=null'>and a.state_code= #{par.state}</if> <if test='par.state!=null'>and a.state_code= #{par.state}</if>
<if test='par.fireTeamId!=null'>and a.fire_team_id= #{par.fireTeamId}</if> <if test='par.fireTeamId!=null'>and a.fire_team_id= #{par.fireTeamId}</if>
<if test='par.jobTitle!=null'>and a.job_title_code =#{par.jobTitle}</if> <if test='par.jobTitle!=null'>and a.job_title_code =#{par.jobTitle}</if>
<if test='par.areasExpertiseCode!=null and par.areasExpertiseCode!="0"'>and b.areas_expertise_code =#{par.areasExpertiseCode}</if> <if test='par.areasExpertiseCode!=null and par.areasExpertiseCode!="0"'>and b.areas_expertise_code =#{par.areasExpertiseCode}</if>
<if test='par.areasExpertiseCode=="0"'>and b.areas_expertise_code is not null</if> <if test='par.areasExpertiseCode=="0"'>and b.areas_expertise_code is not null</if>
ORDER BY a.rec_date ORDER BY a.rec_date desc
</select> </select>
...@@ -68,10 +68,12 @@ ...@@ -68,10 +68,12 @@
and a.sequence_nbr=#{id} and a.sequence_nbr=#{id}
</select> </select>
<!-- BUG3553 BY kongfm 人员关系显示汉字-->
<select id="exportToExcel" resultType="com.yeejoin.amos.boot.module.common.api.dto.FirefightersExcelDto"> <select id="exportToExcel" resultType="com.yeejoin.amos.boot.module.common.api.dto.FirefightersExcelDto">
select f.*, select f.*,
(select cb_fire_team.name from cb_fire_team where cb_fire_team.sequence_nbr=f.fire_team_id) fireTeam, (select cb_fire_team.name from cb_fire_team where cb_fire_team.sequence_nbr=f.fire_team_id) fireTeam,
emergency_contact, relationship, emergency_contact_phone emergency_contact, (select da.name from cb_data_dictionary da where da.code = fc.relationship) as relationship , emergency_contact_phone
from cb_firefighters f from cb_firefighters f
left join cb_firefighters_contacts fc on f.sequence_nbr = fc.firefighters_id left join cb_firefighters_contacts fc on f.sequence_nbr = fc.firefighters_id
where f.is_delete = #{isDelete} where f.is_delete = #{isDelete}
......
...@@ -3,10 +3,8 @@ ...@@ -3,10 +3,8 @@
<mapper <mapper
namespace="com.yeejoin.amos.boot.module.common.api.mapper.KeySiteMapper"> namespace="com.yeejoin.amos.boot.module.common.api.mapper.KeySiteMapper">
<select id="getPageList" resultType="com.yeejoin.amos.boot.module.common.api.dto.KeySiteDto"> <select id="getPageList" resultType="com.yeejoin.amos.boot.module.common.api.dto.KeySiteDto">
SELECT SELECT
c.`name` as name, c.`name` as name,
c.belong_id as belongId, c.belong_id as belongId,
cou.biz_org_name as belongName, cou.biz_org_name as belongName,
...@@ -33,35 +31,33 @@ SELECT ...@@ -33,35 +31,33 @@ SELECT
c.rec_date AS recDate, c.rec_date AS recDate,
c.fire_endurance_rate_name as fireEnduranceRateName, c.fire_endurance_rate_name as fireEnduranceRateName,
c.use_nature_name as useNatureName c.use_nature_name as useNatureName
FROM FROM
cb_key_site c cb_key_site c
left join cb_org_usr cou on c.belong_id =cou.sequence_nbr left join cb_org_usr cou on c.belong_id =cou.sequence_nbr
where c.is_delete=FALSE where c.is_delete=FALSE
<if test="name != null and name != ''"> <if test="name != null and name != ''">
AND c.`name` like concat(#{name}, '%') AND c.`name` like concat('%',#{name}, '%')
</if> </if>
<if test="buildingId != null and buildingId != -1"> <if test="buildingId != null and buildingId != -1">
AND c.`building_id`= #{buildingId} AND c.`building_id`= #{buildingId}
</if> </if>
<if test="fireEnduranceRate != null and fireEnduranceRate != ''"> <if test="fireEnduranceRate != null and fireEnduranceRate != ''">
AND c.`fire_endurance_rate`= #{fireEnduranceRate} AND c.`fire_endurance_rate`= #{fireEnduranceRate}
</if> </if>
<if test="useNature != null and useNature != ''"> <if test="useNature != null and useNature != ''">
AND c.`use_nature`= #{useNature} AND c.`use_nature`= #{useNature}
</if> </if>
<if test="fireFacilitiesInfo != null and fireFacilitiesInfo != ''"> <if test="fireFacilitiesInfo != null and fireFacilitiesInfo != ''">
AND c.`fire_facilities_info`= #{fireFacilitiesInfo} AND c.`fire_facilities_info`= #{fireFacilitiesInfo}
</if> </if>
<if test="belongId != null and belongId!='-1' and belongId != -1"> <if test="belongId != null and belongId!='-1' and belongId != -1">
AND c.`belong_id`= #{belongId} AND c.`belong_id`= #{belongId}
</if> </if>
order by c.rec_date desc
</select> </select>
<select id="getSequenceNbr" resultType="com.yeejoin.amos.boot.module.common.api.dto.KeySiteDto"> <select id="getSequenceNbr" resultType="com.yeejoin.amos.boot.module.common.api.dto.KeySiteDto">
SELECT c.`name` as name,
SELECT
c.`name` as name,
c.belong_id as belongId, c.belong_id as belongId,
cou.biz_org_name as belongName, cou.biz_org_name as belongName,
c.building_id as buildingId, c.building_id as buildingId,
...@@ -87,16 +83,14 @@ where c.is_delete=FALSE ...@@ -87,16 +83,14 @@ where c.is_delete=FALSE
c.rec_date AS recDate, c.rec_date AS recDate,
c.fire_endurance_rate_name as fireEnduranceRateName, c.fire_endurance_rate_name as fireEnduranceRateName,
c.use_nature_name as useNatureName c.use_nature_name as useNatureName
FROM FROM cb_key_site c
cb_key_site c left join cb_org_usr cou on c.belong_id = cou.sequence_nbr
left join cb_org_usr cou on c.belong_id =cou.sequence_nbr where c.sequence_nbr = #{sequenceNbr}
where c.sequence_nbr=#{sequenceNbr} and c.is_delete=FALSE; and c.is_delete = FALSE;
</select> </select>
<select id="getKeySiteList" resultType="com.yeejoin.amos.boot.module.common.api.dto.KeySiteDto"> <select id="getKeySiteList" resultType="com.yeejoin.amos.boot.module.common.api.dto.KeySiteDto">
SELECT c.`name` as name,
SELECT
c.`name` as name,
c.belong_id as belongId, c.belong_id as belongId,
cou.biz_org_name as belongName, cou.biz_org_name as belongName,
c.building_id as buildingId, c.building_id as buildingId,
...@@ -122,10 +116,9 @@ where c.sequence_nbr=#{sequenceNbr} and c.is_delete=FALSE; ...@@ -122,10 +116,9 @@ where c.sequence_nbr=#{sequenceNbr} and c.is_delete=FALSE;
c.rec_date AS recDate, c.rec_date AS recDate,
c.fire_endurance_rate_name as fireEnduranceRateName, c.fire_endurance_rate_name as fireEnduranceRateName,
c.use_nature_name as useNatureName c.use_nature_name as useNatureName
FROM FROM cb_key_site c
cb_key_site c left join cb_org_usr cou on c.belong_id = cou.sequence_nbr
left join cb_org_usr cou on c.belong_id =cou.sequence_nbr where c.is_delete = FALSE;
where c.is_delete=FALSE; </select>
</select>
</mapper> </mapper>
...@@ -45,8 +45,17 @@ ...@@ -45,8 +45,17 @@
a.latitude, a.latitude,
a.longitude, a.longitude,
Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1) Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1)
AS distance AS distance,
FROM cb_linkage_unit a case when csps.person_number is null then 0 else
csps.person_number end as userNum,
case when cre.vehicle_number is null then 0 else cre.vehicle_number end as
carNum
FROM
cb_linkage_unit a
LEFT JOIN cb_special_position_staff csps ON a.sequence_nbr =
csps.company_id
LEFT JOIN cb_rescue_equipment cre on a.sequence_nbr = cre.company_id
where a.longitude is not null and where a.longitude is not null and
a.latitude is not null a.latitude is not null
<if test='par.distance!=null'> <if test='par.distance!=null'>
...@@ -87,31 +96,41 @@ ...@@ -87,31 +96,41 @@
emergency_linkage_unit_code emergency_linkage_unit_code
</select> </select>
<select id="exportToExcel" resultType="com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitDto"> <select id="exportToExcel"
resultType="com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitDto">
select select
a.unit_name unitName, a.unit_name unitName,
a.linkage_unit_type linkageUnitType, a.linkage_unit_type
linkageUnitType,
a.address , a.address ,
a.latitude, a.latitude,
a.longitude, a.longitude,
a.agreement_start_date agreementStartDate, a.agreement_start_date agreementStartDate,
a.agreement_end_date agreementEndDate, a.agreement_end_date
agreementEndDate,
a.contact_user contactUser, a.contact_user contactUser,
a.contact_phone contactPhone, a.contact_phone
contactPhone,
b.* b.*
from cb_linkage_unit a LEFT JOIN from cb_linkage_unit a LEFT JOIN
(SELECT (SELECT
m.instance_id, m.instance_id,
max(case m.field_code when 'emergencyServiceContent' then m.field_value end) emergencyServiceContent, max(case m.field_code when 'emergencyServiceContent' then
max(case m.field_code when 'fireRescueCapability' then m.field_value end) fireRescueCapability, m.field_value end) emergencyServiceContent,
max(case m.field_code when 'responsibilitiesSituation' then m.field_value end) responsibilitiesSituation, max(case m.field_code when
max(case m.field_code when 'unitSituation' then m.field_value end) unitSituation 'fireRescueCapability' then m.field_value end) fireRescueCapability,
FROM cb_dynamic_form_instance m GROUP BY m.instance_id) b max(case m.field_code when 'responsibilitiesSituation' then
m.field_value end) responsibilitiesSituation,
max(case m.field_code
when 'unitSituation' then m.field_value end) unitSituation
FROM
cb_dynamic_form_instance m GROUP BY m.instance_id) b
on b.instance_id=a.instance_id where a.unit_name is not null on
b.instance_id=a.instance_id where a.unit_name is not null
</select> </select>
<!--联动单位列表按时间倒叙排列add order by clu.rec_date desc 同时处理单位根节点-1时查询全部数据问题 2021-09-08 by kongfm -->
<select id="getEmergencyLinkageUnitList" <select id="getEmergencyLinkageUnitList"
resultType="java.util.Map"> resultType="java.util.Map">
SELECT SELECT
...@@ -120,13 +139,18 @@ ...@@ -120,13 +139,18 @@
clu.unit_code AS unitCode, clu.unit_code AS unitCode,
clu.parent_id AS parentId, clu.parent_id AS parentId,
clu.linkage_unit_type AS linkageUnitType, clu.linkage_unit_type AS linkageUnitType,
clu.linkage_unit_type_code AS linkageUnitTypeCode, clu.linkage_unit_type_code AS
clu.administrative_divisions AS administrativeDivisions, linkageUnitTypeCode,
clu.administrative_divisions_code AS administrativeDivisionsCode, clu.administrative_divisions AS
administrativeDivisions,
clu.administrative_divisions_code AS
administrativeDivisionsCode,
clu.address AS address, clu.address AS address,
clu.longitude AS longitude, clu.longitude AS
longitude,
clu.latitude AS latitude, clu.latitude AS latitude,
clu.agreement_start_date AS agreementStartDate, clu.agreement_start_date AS
agreementStartDate,
clu.agreement_end_date AS agreementEndDate, clu.agreement_end_date AS agreementEndDate,
clu.emergency_linkage_unit AS emergencyLinkageUnit, clu.emergency_linkage_unit AS emergencyLinkageUnit,
clu.emergency_linkage_unit_code AS emergencyLinkageUnitCode, clu.emergency_linkage_unit_code AS emergencyLinkageUnitCode,
...@@ -138,22 +162,42 @@ ...@@ -138,22 +162,42 @@
clu.rec_user_id AS recUserId, clu.rec_user_id AS recUserId,
clu.rec_date AS recDate, clu.rec_date AS recDate,
clu.is_delete AS isDelete, clu.is_delete AS isDelete,
cre.vehicle_number AS vehicleNumber, (
csps.person_number AS personNumber SELECT
sum(cre.vehicle_number)
FROM
cb_rescue_equipment cre
WHERE
clu.sequence_nbr = cre.company_id
) AS vehicleNumber,
(
SELECT
sum(csps.person_number)
FROM
cb_special_position_staff csps
WHERE
clu.sequence_nbr = csps.company_id
) AS personNumber
FROM FROM
cb_linkage_unit clu cb_linkage_unit clu
LEFT JOIN cb_rescue_equipment cre ON clu.sequence_nbr = cre.company_id
LEFT JOIN cb_special_position_staff csps ON clu.sequence_nbr =
csps.company_id
WHERE clu.is_delete=0 WHERE clu.is_delete=0
<if test="unitName != null and unitName != ''"> <if test="unitName != null and unitName != ''">
AND clu.unit_name LIKE concat(#{unitName}, '%') AND clu.unit_name LIKE concat(#{unitName}, '%')
</if> </if>
<if test="linkageUnitTypeCode != null and linkageUnitTypeCode != ''"> <if
AND clu.linkage_unit_type_code =#{linkageUnitTypeCode} test="linkageUnitType != null and linkageUnitType != ''">
AND clu.linkage_unit_type =#{linkageUnitType}
</if> </if>
<if test="emergencyLinkageUnitCode != null and emergencyLinkageUnitCode != ''"> <if
test="emergencyLinkageUnitCode != null and emergencyLinkageUnitCode != '' ">
<if test="emergencyLinkageUnitCode != '-1'">
AND clu.emergency_linkage_unit_code =#{emergencyLinkageUnitCode} AND clu.emergency_linkage_unit_code =#{emergencyLinkageUnitCode}
</if> </if>
</if>
<if
test="linkageUnitTypeCode != null and linkageUnitTypeCode != ''">
AND clu.linkage_unit_type_code =#{linkageUnitTypeCode}
</if>
order by clu.rec_date desc
</select> </select>
</mapper> </mapper>
...@@ -37,4 +37,42 @@ WHERE ...@@ -37,4 +37,42 @@ WHERE
AND biz_org_type = "COMPANY" AND biz_org_type = "COMPANY"
AND is_delete = 0 AND is_delete = 0
</select> </select>
<select id="findByInstanceIdAndType" resultType="com.yeejoin.amos.boot.module.common.api.entity.MaintenanceCompany">
SELECT
m.sequence_nbr,
m.`name`,
m.`code`,
m.type,
m.instance_id
FROM
cb_maintenance_company m
<where>
<if test="instanceId != null">
m.instance_id = #{instanceId}
</if>
<if test="type != null and type != ''">
AND m.type = #{type}
</if>
</where>
</select>
<select id="findByCodeAndType" resultType="com.yeejoin.amos.boot.module.common.api.entity.MaintenanceCompany">
SELECT
m.sequence_nbr,
m.`name`,
m.`code`,
m.type,
m.instance_id
FROM
cb_maintenance_company m
<where>
<if test="code != null and code != ''">
m.code LIKE CONCAT(#{code}, '%')
</if>
<if test="type != null and type != ''">
AND m.type = #{type}
</if>
</where>
ORDER BY
m.sequence_nbr DESC
</select>
</mapper> </mapper>
...@@ -105,33 +105,36 @@ ...@@ -105,33 +105,36 @@
select distinct (case select distinct (case
when ISNULL(belong_fighting_system_id) = 0 and LENGTH(trim(belong_fighting_system_id)) > 0 when ISNULL(belong_fighting_system_id) = 0 and LENGTH(trim(belong_fighting_system_id)) > 0
then belong_fighting_system_id then belong_fighting_system_id
else 0 end) belong_fighting_system_id, else -2 end) belong_fighting_system_id,
(case (case
when ISNULL(belong_fighting_system) = 0 and LENGTH(trim(belong_fighting_system)) > 0 when ISNULL(belong_fighting_system) = 0 and LENGTH(trim(belong_fighting_system)) > 0
then belong_fighting_system then belong_fighting_system
else '其他' end) belong_fighting_system, else '其他' end) belong_fighting_system,
resource_type, equip_id as resource_type,
resource_type_name equip_name as resource_type_name
from cb_water_resource from cb_water_resource
where is_delete = #{isDelete} where is_delete = #{isDelete}
</select> </select>
<!--消防水源按时间倒叙排列add order by cb_water_resource.rec_date desc 2021-09-08 by kongfm -->
<select id="getWaterResourcePageByParams" <select id="getWaterResourcePageByParams"
resultType="com.yeejoin.amos.boot.module.common.api.dto.WaterResourceDto"> resultType="com.yeejoin.amos.boot.module.common.api.dto.WaterResourceDto">
select * from cb_water_resource where is_delete = 1 select * from cb_water_resource where is_delete = 1
<if test="sequenceNbr != null and sequenceNbr != ''">and sequence_nbr = #{sequenceNbr}</if> <if test="sequenceNbr != null and sequenceNbr != ''">and sequence_nbr = #{sequenceNbr}</if>
<if test="resourceType != null and resourceType != ''">and resource_type = #{resourceType}</if> <if test="resourceType != null and resourceType != ''">and resource_type = #{resourceType}</if>
<if test="equipId != null and equipId != ''">and equip_id = #{equipId}</if>
<if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if> <if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
<if test="belongFightingSystemId != null"> <if test="belongFightingSystemId != null">
<if test="belongFightingSystemId > -1"> <if test="belongFightingSystemId > -1">
and belong_fighting_system_id = #{belongFightingSystemId} and belong_fighting_system_id = #{belongFightingSystemId}
</if> </if>
<if test="belongFightingSystemId == -1"> <if test="belongFightingSystemId == -2">
and belong_fighting_system_id is null and belong_fighting_system_id is null
</if> </if>
</if> </if>
<if test="belongBuildingId != null and belongBuildingId.size() > 0"> <if test="belongBuildingId != null and belongBuildingId.size() > 0">
and find_in_set(belong_building_id, #{belongBuildingId}) > 0 and find_in_set(belong_building_id, #{belongBuildingId}) > 0
</if> </if>
order by cb_water_resource.rec_date desc
</select> </select>
......
...@@ -14,11 +14,6 @@ ...@@ -14,11 +14,6 @@
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>com.amosframework.boot</groupId>
<artifactId>amos-boot-biz-common</artifactId>
<version>${amos-biz-boot.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId> <artifactId>spring-boot-starter-data-jpa</artifactId>
<exclusions> <exclusions>
...@@ -48,6 +43,11 @@ ...@@ -48,6 +43,11 @@
<artifactId>jsoup</artifactId> <artifactId>jsoup</artifactId>
<version>1.11.2</version> <version>1.11.2</version>
</dependency> </dependency>
<dependency>
<groupId>cn.jpush.api</groupId>
<artifactId>jpush-client</artifactId>
<version>3.3.10</version>
</dependency>
</dependencies> </dependencies>
</project> </project>
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<artifactId>amos-boot-module-api</artifactId> <artifactId>amos-boot-module-api</artifactId>
...@@ -12,16 +14,19 @@ ...@@ -12,16 +14,19 @@
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>com.amosframework.boot</groupId> <groupId>com.amosframework.boot</groupId>
<artifactId>amos-boot-biz-common</artifactId> <artifactId>amos-boot-module-common-api</artifactId>
<version>${amos-biz-boot.version}</version> <version>${amos-biz-boot.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.amosframework.boot</groupId> <groupId>com.yeejoin</groupId>
<artifactId>amos-boot-module-common-api</artifactId> <artifactId>amos-component-rule</artifactId>
<version>${amos-biz-boot.version}</version> <exclusions>
<exclusion>
<groupId>org.typroject</groupId>
<artifactId>tyboot-core-auth</artifactId>
</exclusion>
</exclusions>
</dependency> </dependency>
</dependencies> </dependencies>
</project> </project>
...@@ -149,26 +149,27 @@ public class AircraftDto extends BaseDto { ...@@ -149,26 +149,27 @@ public class AircraftDto extends BaseDto {
@ApiModelProperty(value = "备注") @ApiModelProperty(value = "备注")
private String remark; private String remark;
@ExcelProperty(value = "外观图", index = 28) @ExcelIgnore // BUG2676 隐藏导出多余图片字段 by kongfm
@ApiModelProperty(value = "外观图") @ApiModelProperty(value = "外观图")
private String appearanceImages; private String appearanceImages;
@ExcelProperty(value = "平面图", index = 29) @ExcelIgnore// BUG2676 隐藏导出多余图片字段 by kongfm
@ApiModelProperty(value = "平面图") @ApiModelProperty(value = "平面图")
private String planeImages; private String planeImages;
@ExcelProperty(value = "救援图", index = 30) @ExcelIgnore// BUG2676 隐藏导出多余图片字段 by kongfm
@ApiModelProperty(value = "救援图") @ApiModelProperty(value = "救援图")
private String rescueImages; private String rescueImages;
@ExcelProperty(value = "方位图", index = 31) @ExcelIgnore// BUG2676 隐藏导出多余图片字段 by kongfm
@ApiModelProperty(value = "方位图") @ApiModelProperty(value = "方位图")
private String positionImages; private String positionImages;
@ExcelProperty(value = "三维模型", index = 32) @ExcelIgnore// BUG2676 隐藏导出多余图片字段 by kongfm
@ApiModelProperty(value = "三维模型") @ApiModelProperty(value = "三维模型")
private String models; private String models;
@ExcelIgnore// BUG2676 隐藏导出多余图片字段 by kongfm
@ApiModelProperty(value = "现场图片") @ApiModelProperty(value = "现场图片")
private List<String> scenePicture; private List<String> scenePicture;
......
package com.yeejoin.amos.boot.module.jcs.api.dto;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.metadata.BaseRowModel;
import com.yeejoin.amos.boot.module.common.api.excel.ExplicitConstraint;
import com.yeejoin.amos.boot.module.common.api.excel.RoleNameExplicitConstraint;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@Data
public class AircraftDtos extends BaseRowModel {
@ExcelIgnore
private static final long serialVersionUID = 1L;
@ExcelProperty(value = "飞机型号", index = 0)
@ApiModelProperty(value = "飞机型号")
private String aircraftModel;
@ExcelProperty(value = "中文全称", index = 1)
@ApiModelProperty(value = "中文全称")
private String fullName;
@ExcelProperty(value = "飞机长度", index = 2)
@ApiModelProperty(value = "飞机长度")
private Double aircraftLength;
@ExcelProperty(value = "机舱长度", index = 3)
@ApiModelProperty(value = "机舱长度")
private Double cabinLength;
@ExcelProperty(value = "尾翼高度", index = 4)
@ApiModelProperty(value = "尾翼高度")
private Double tailHeight;
@ExcelProperty(value = "翼展", index = 5)
@ApiModelProperty(value = "翼展")
private Double wingspan;
@ExcelProperty(value = "机身直径", index = 6)
@ApiModelProperty(value = "机身直径")
private Double fuselageDiameter;
@ExcelProperty(value = "翼展面积", index = 7)
@ApiModelProperty(value = "翼展面积")
private Double wingspanArea;
@ExplicitConstraint(type = "FDJLX", indexNum = 8, sourceClass = RoleNameExplicitConstraint.class) //动态下拉内容
@ExcelProperty(value = "发动机类型", index = 8)
@ApiModelProperty(value = "发动机类型")
private String engineType;
@ExcelIgnore
@ApiModelProperty(value = "发动机类型code")
private String engineTypeCode;
@ExcelProperty(value = "发动机数量", index = 9)
@ApiModelProperty(value = "发动机数量")
private Integer enginesmNum;
@ExcelProperty(value = "发动机型号", index = 10)
@ApiModelProperty(value = "发动机型号")
private String engineModel;
@ExplicitConstraint(type = "RYLX", indexNum = 11, sourceClass = RoleNameExplicitConstraint.class) //动态下拉内容
@ExcelProperty(value = "燃油类型", index = 11)
@ApiModelProperty(value = "燃油类型")
private String fuelType;
@ExcelIgnore
@ApiModelProperty(value = "燃油类型code")
private String fuelTypeCode;
@ExcelProperty(value = "最大载油量", index = 12)
@ApiModelProperty(value = "最大载油量")
private Double oilLoadMax;
@ExcelProperty(value = "标准燃油", index = 13)
@ApiModelProperty(value = "标准燃油")
private Double standardFuel;
@ExcelProperty(value = "空重", index = 14)
@ApiModelProperty(value = "空重")
private Double emptyWeight;
@ExcelProperty(value = "飞机主要构造材料", index = 15)
@ApiModelProperty(value = "飞机主要构造材料")
private String structuralMaterial;
@ExcelProperty(value = "氧气瓶数量", index = 16)
@ApiModelProperty(value = "氧气瓶数量")
private Integer oxygenCylinderNum;
@ExcelProperty(value = "氧气瓶位置描述", index = 17)
@ApiModelProperty(value = "氧气瓶位置描述")
private String oxygenCylinderLocation;
@ExcelProperty(value = "标准坐席数", index = 18)
@ApiModelProperty(value = "标准坐席数")
private Integer seatNum;
@ExcelProperty(value = "商载(吨)", index = 19)
@ApiModelProperty(value = "商载(吨)")
private Double commercialLoad;
@ExcelProperty(value = "货仓容积(立方米)", index = 20)
@ApiModelProperty(value = "货仓容积(立方米)")
private Double warehouseVolume;
@ExcelProperty(value = "最大起飞总重(吨)", index = 21)
@ApiModelProperty(value = "最大起飞总重(吨)")
private Double takeoffWeightNum;
@ExcelProperty(value = "最大巡航速度(马赫)", index = 22)
@ApiModelProperty(value = "最大巡航速度(马赫)")
private Double cruiseSpeedNum;
@ExcelProperty(value = "航程", index = 23)
@ApiModelProperty(value = "航程")
private Double voyage;
@ExcelProperty(value = "主要设施", index = 24)
@ApiModelProperty(value = "主要设施")
private String facilitie;
@ExcelProperty(value = "主要燃烧物质", index = 25)
@ApiModelProperty(value = "主要燃烧物质")
private String combustionMaterial;
@ExcelProperty(value = "疏散出口及安全通道", index = 26)
@ApiModelProperty(value = "疏散出口及安全通道")
private String exitPassage;
@ExcelProperty(value = "备注", index = 27)
@ApiModelProperty(value = "备注")
private String remark;
@ExcelProperty(value = "外观图", index = 28)
@ApiModelProperty(value = "外观图")
private String appearanceImages;
@ExcelProperty(value = "平面图", index = 29)
@ApiModelProperty(value = "平面图")
private String planeImages;
@ExcelProperty(value = "救援图", index = 30)
@ApiModelProperty(value = "救援图")
private String rescueImages;
@ExcelProperty(value = "方位图", index = 31)
@ApiModelProperty(value = "方位图")
private String positionImages;
@ExcelProperty(value = "三维模型", index = 32)
@ApiModelProperty(value = "三维模型")
private String models;
@ApiModelProperty(value = "现场图片")
private List<String> scenePicture;
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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