Commit 9776c531 authored by chenhao's avatar chenhao

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

parents 94c50284 bbef2b1e
......@@ -9,7 +9,8 @@ import java.lang.annotation.Target;
/**
* @author DELL
*
* 注解在mapper方法上
* 注解需要数据权限过滤的mapper。
* interfacePath对应为平台菜单管理中菜单组件(全局唯一)。
*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
......@@ -20,6 +21,6 @@ public @interface DataAuth {
* 菜单组件
* @return
*/
String interfacePath() default "";
String interfacePath();
}
......@@ -55,36 +55,47 @@ public class PermissionInterceptor implements Interceptor {
@Autowired
RedisUtils redisUtils;
private String falseCondition = " 1=2";
@Override
public Object intercept(Invocation invocation) throws Throwable {
StatementHandler statementHandler = PluginUtils.realTarget(invocation.getTarget());
MetaObject metaObject = SystemMetaObject.forObject(statementHandler);
MappedStatement mappedStatement = (MappedStatement) metaObject.getValue("delegate.mappedStatement");
// TODO 处理mybatis plus
String dataAuthRule = PermissionInterceptorContext.getDataAuthRule();
// 被拦截方法
Method method = getTargetDataAuthMethod(mappedStatement);
DataAuth dataAuth = getTargetDataAuthAnnotation(mappedStatement);
// 没有DataAuth定义注解的跳过
if (null == dataAuth) {
// 没有DataAuth定义注解的跳过及没有手动指定使用数据规则的跳过
if (null == dataAuth && ValidationUtil.isEmpty(dataAuthRule)) {
PermissionInterceptorContext.clean();
return invocation.proceed();
}
// 接口地址为空返回空数据
if (ValidationUtil.isEmpty(dataAuth.interfacePath())) {
// 数据权限地址为空返回空数据
if (ValidationUtil.isEmpty(dataAuth.interfacePath()) && ValidationUtil.isEmpty(dataAuthRule)) {
// method.getReturnType().isPrimitive() = true 是count语句
PermissionInterceptorContext.clean();
return method.getReturnType().isPrimitive() ? invocation.proceed() : null;
}
dataAuthRule = ValidationUtil.isEmpty(dataAuth.interfacePath()) ? dataAuthRule : dataAuth.interfacePath();
ReginParams reginParam = JSON.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId()
, RequestContext.getToken())).toString(), ReginParams.class);
if (ValidationUtil.isEmpty(reginParam) || ValidationUtil.isEmpty(reginParam.getUserModel())) {
// method.getReturnType().isPrimitive() = true 是count语句
PermissionInterceptorContext.clean();
return method.getReturnType().isPrimitive() ? invocation.proceed() : null;
}
// 用户数据权限配置信息
Map<String, List<PermissionDataruleModel>> dataAuthorization = Privilege.permissionDataruleClient.queryByUser(reginParam.getUserModel().getUserId(),
dataAuth.interfacePath()).getResult();
dataAuthRule).getResult();
// 没有数据权限直接返回空数据
if (ValidationUtil.isEmpty(dataAuthorization)) {
PermissionInterceptorContext.clean();
return method.getReturnType().isPrimitive() ? invocation.proceed() : null;
}
......@@ -93,6 +104,7 @@ public class PermissionInterceptor implements Interceptor {
// 将权限规则拼接到原始sql
sql = processSelectSql(sql, dataAuthorization, reginParam, boundSql);
metaObject.setValue("delegate.boundSql.sql", sql);
PermissionInterceptorContext.clean();
return invocation.proceed();
}
......@@ -180,10 +192,10 @@ public class PermissionInterceptor implements Interceptor {
dataAuthorization.entrySet().stream().filter(map -> !ValidationUtil.isEmpty(map.getValue())).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
// 没有配置数据权限直接返回 false 条件
if (ValidationUtil.isEmpty(nonEmptyDataAuthorization)) {
authSql = " 1=2";
authSql = falseCondition;
} else {
// 解析数据权限sql
authSql = parseDataAuthorization(dataAuthorization, reginParams, mainTableAlias, boundSql);
authSql = parseDataAuthorization(nonEmptyDataAuthorization, reginParams, mainTableAlias, boundSql);
}
// 替换数据权限
if (!ValidationUtil.isEmpty(authSql)) {
......@@ -292,7 +304,8 @@ public class PermissionInterceptor implements Interceptor {
getRuleValue(rule, reginParam, boundSql)) + "'";
} else {
// 包含
authSql = mainTableAlias + "." + rule.getRuleColumn() + " like '" + getRuleValue(rule, reginParam, boundSql) + "'";
authSql = mainTableAlias + "." + rule.getRuleColumn() + " like '%" + getRuleValue(rule,
reginParam, boundSql) + "%'";
}
} else {
// =; >; >=; <; <=; !=
......@@ -326,6 +339,26 @@ public class PermissionInterceptor implements Interceptor {
String attrName = ruleValue.substring(2, ruleValue.length() - 1);
ruleValue = ValidationUtil.isEmpty(map.get(attrName)) ? "" : map.get(attrName).toString();
}
// 从查询参数中获取json字段参数值
if (rule.getRuleColumn().contains("->")) {
Map<String, Object> map;
Map<String, Object> map2 = Maps.newHashMap();
if (boundSql.getParameterObject() instanceof Map) {
map = (Map<String, Object>) boundSql.getParameterObject();
for(Map.Entry<String, Object> entry : map.entrySet()) {
if (entry.getValue() instanceof Map) {
map2.putAll((Map<? extends String, ?>) entry.getValue());
}
}
map.putAll(map2);
} else {
map = Bean.BeantoMap(boundSql.getParameterObject());
}
if(map.containsKey(ruleValue)) {
ruleValue = ValidationUtil.isEmpty(map.get(ruleValue)) ? falseCondition : map.get(ruleValue).toString();
}
}
return ruleValue;
}
}
package com.yeejoin.amos.boot.biz.common.interceptors;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class PermissionInterceptorContext {
private static final Logger logger = LoggerFactory.getLogger(PermissionInterceptorContext.class);
private static ThreadLocal<PermissionInterceptorContextModel> requestContext = ThreadLocal.withInitial(PermissionInterceptorContextModel::new);
private static PermissionInterceptorContextModel getPermissionInterceptorContext() {
return requestContext.get();
}
public static String getDataAuthRule() {
return getPermissionInterceptorContext().getDataAuthRule();
}
public static void setDataAuthRule(String dataAuthRule) {
getPermissionInterceptorContext().setDataAuthRule(dataAuthRule);
}
public static void clean() {
if (requestContext != null) {
logger.info("clean RestThreadLocal......Begin");
requestContext.remove();
logger.info("clean RestThreadLocal......Done");
}
}
}
package com.yeejoin.amos.boot.biz.common.interceptors;
import org.typroject.tyboot.core.foundation.context.RequestContextEntityType;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
/**
*
*/
public class PermissionInterceptorContextModel implements Serializable {
private static final long serialVersionUID = 1L;
private String dataAuthRule;
public String getDataAuthRule() {
return dataAuthRule;
}
public void setDataAuthRule(String dataAuthRule) {
this.dataAuthRule = dataAuthRule;
}
public void clean() {
this.dataAuthRule = null;
}
}
......@@ -23,6 +23,7 @@ public class MessageAction {
MessageModel messageModel = JSON.parseObject(JSON.toJSONString(msgObj), MessageModel.class);
messageModel.setTitle(title);
messageModel.setBody(RuleUtils.instedParams(content, msgObj));
log.info(String.format("接收规则返回数据: %s", JSON.toJSONString(msgObj)));
if (!ValidationUtil.isEmpty(messageModel)) {
try {
Systemctl.messageClient.create(messageModel);
......
......@@ -46,7 +46,7 @@ public class ContractDto extends BaseDto {
private String contractNo;
@ApiModelProperty(value = "机构代码用于权限过滤")
private Boolean orgCode;
private String orgCode;
@ApiModelProperty(value = "单位名称")
private String company;
......
......@@ -61,7 +61,7 @@ public class Contract extends BaseEntity {
* 机构代码用于权限过滤
*/
@TableField("org_code")
private Boolean orgCode;
private String orgCode;
/**
* 单位名称
*/
......
......@@ -167,14 +167,18 @@ public class ExcelUtil {
String[] postTypeNamestrings = new String[postTypeNameDetailList.size()];
List<String> userNameDetailList = (List<String>) detail.get(detail.size()-3);
String[] userNamestrings = new String[userNameDetailList.size()];
List<String> companyNameList = (List<String>) detail.get(detail.size()-4);
String[] companyNameLists = new String[companyNameList.size()];
map.put(4, fireStationDetailList.toArray(strings));
map.put(3, postTypeNameDetailList.toArray(postTypeNamestrings));
map.put(2, userNameDetailList.toArray(userNamestrings));
map.put(1, companyNameList.toArray(companyNameLists));
map.putAll(explicitListConstraintMap);
fireStationExplicitListConstraintMap.add(map);
detail.remove(detail.size()-1);
detail.remove(detail.size()-1);
detail.remove(detail.size()-1);
detail.remove(detail.size()-1);
resultList.add(detail);
});
excelWriterSheetBuilder
......
package com.yeejoin.amos.boot.module.common.api.feign;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import com.yeejoin.amos.boot.biz.common.feign.MultipartSupportConfig;
import io.swagger.annotations.ApiOperation;
@FeignClient(name = "${amosTraining.fegin.name:AMOS-TRAININGEXAM}", path = "trainingexam", configuration = {MultipartSupportConfig.class})
public interface AmosTrainingFeignClient {
@RequestMapping(value = "/trainingProject/update/operation/number", method = RequestMethod.PUT)
@ApiOperation(httpMethod = "PUT", value = "修改人员编号", notes = "修改人员编号")
public ResponseModel<Boolean> updOperationNumber(@RequestParam String newNumber,@RequestParam String oldNumber) ;
}
......@@ -188,7 +188,9 @@ public interface EquipFeignClient {
* @return
*/
@RequestMapping(value = "/building/video/page", method = RequestMethod.GET)
ResponseModel<Page<Map<String, Object>>> getVideo( @RequestParam("current") long current, @RequestParam("size") long size, @RequestParam("buildingId") Long buildingId);
ResponseModel<Page<Map<String, Object>>> getVideo( @RequestParam("current") long current,
@RequestParam("size") long size,
@RequestParam("buildingId") Long buildingId);
@RequestMapping(value = "/building/video/page", method = RequestMethod.GET)
ResponseModel<Page<Map<String, Object>>> getVideopag( @RequestParam("current") String current,
......@@ -209,13 +211,11 @@ public interface EquipFeignClient {
);
@RequestMapping(value = "/confirmAlarm/getDetailsById", method = RequestMethod.GET)
public ResponseModel<Map<String, Object>> getDetailsById(@RequestParam Long alamId, @RequestParam(required = false) Long equipId, @RequestParam(required = false) String type, @RequestParam String area) ;
ResponseModel<Map<String, Object>> getDetailsById(@RequestParam Long alamId,
@RequestParam(required = false) Long equipId,
@RequestParam(required = false) String type,
@RequestParam String area) ;
/**
*
*获取视频列表
......@@ -223,7 +223,11 @@ public interface EquipFeignClient {
* @return
*/
@RequestMapping(value = "/video/pageVideo", method = RequestMethod.GET)
ResponseModel<Page<Map<String, Object>>> pageVideo( @RequestParam("pageNum") Integer pageNum, @RequestParam("pageSize") Integer pageSize, @RequestParam("longitude") Double longitude,@RequestParam("latitude") Double latitude,@RequestParam("distance") Double distance);
ResponseModel<Page<Map<String, Object>>> pageVideo(@RequestParam("pageNum") Integer pageNum,
@RequestParam("pageSize") Integer pageSize,
@RequestParam("longitude") Double longitude,
@RequestParam("latitude") Double latitude,
@RequestParam("distance") Double distance);
@RequestMapping(value = "/video/pageList", method = RequestMethod.GET)
......
......@@ -166,4 +166,8 @@ public interface IMaintenanceCompanyService {
List<MaintenanceCompany> findByInstanceIdAndType(Long instanceId, String type);
List<MaintenanceCompany> findByCodeAndType(String code, String type);
List<MaintenanceCompany> findPersonByAmosOrgId(String code, String userId);
MaintenanceCompany getOne(Long parentId);
}
......@@ -109,8 +109,8 @@ public interface IOrgUsrService {
* @throws Exception
*/
Map<String, Object> selectForShowById(OrgUsr orgUsr, Long id) throws Exception;
Map<String, Object> selectForShowByIduser(OrgUsr orgUsr, Long id) throws Exception;
Map<String, Object> selectForShowByIduser(OrgUsr orgUsr, Long id) throws Exception;
List<OrgUsr> selectCompanyDepartmentMsg();
......@@ -146,7 +146,9 @@ public interface IOrgUsrService {
OrgDepartmentFormDto selectDepartmentById(Long id) throws Exception;
List<Map<String, Object>> selectForShowByListId(List<Long> ids) throws Exception;
List<Map<String, Object>> selectForShowByListIdUser(List<Long> ids) throws Exception;
/**
* * @param null
*
......@@ -186,7 +188,7 @@ public interface IOrgUsrService {
List<Map<String, Object>> getparent();
List<OrgUsrExcelDto> exportToExcel( Map par);
List<OrgUsrExcelDto> exportToExcel(Map par);
UserUnitDto getUserUnit(String userId);
......@@ -236,7 +238,7 @@ public interface IOrgUsrService {
*
* @param orgUserId
* @return
* @exception
* @throws
*/
AgencyUserModel getAmosIdByOrgUserId(String orgUserId) throws Exception;
......@@ -245,12 +247,13 @@ public interface IOrgUsrService {
*
* @param orgUserIds
* @return
* @exception
* @throws
*/
List<String> getAmosIdListByOrgUserId(String orgUserIds) throws Exception;
/**
* 查询目标公司下所有人员的简要信息,数据包含:所在公司id和name ,人员id和name,岗位id和name
*
* @param ids
* @return
*/
......@@ -262,12 +265,12 @@ public interface IOrgUsrService {
OrgUsr selectByAmosOrgId(Long id);
public List<OrgUsr> getPersonListByParentIds(List<String> ids) ;
List<OrgUsr> getPersonListByParentIds(List<String> ids);
List<OrgUsrFormDto> getUnSyncOrgCompanyList(List<Long> companyIdList);
public OrgUsr getDetailById( Long id);
OrgUsr getDetailById(Long id);
/**
......@@ -285,7 +288,7 @@ public interface IOrgUsrService {
* @throws Exception
*/
List<OrgMenuDto> getTreeFlc(Long topId, Collection entityList, String packageURL, String IDMethodName, int IDHierarchy,
String NAMEMethodName, String PARENTIDMethodName, String OrgTypeMethodName) throws Exception;
String NAMEMethodName, String PARENTIDMethodName, String OrgTypeMethodName) throws Exception;
OrgUsrDto saveOrgPersonFlc(OrgPersonDto OrgPersonDto) throws Exception;
......
......@@ -60,13 +60,13 @@
and submission_time between #{startTime} and #{endTime}
</if>
<if test="submissionName != null ">
and submission_name = #{submissionName}
and submission_name = like concat (%, #{submissionName},%)
</if>
<if test="submissionBranchId!= null ">
and submission_branch_id = #{submissionBranchId}
and submission_branch_id= #{submissionBranchId}
</if>
<if test="sequenceNbr!= null ">
and sequence_nbr = #{ sequenceNbr}
and sequence_nbr = like concat (%,#{ sequenceNbr},%)
</if>
</where>
order by submission_time DESC limit #{current},#{size}
......
......@@ -135,7 +135,7 @@ public class FireEquipment implements Serializable {
@ApiModelProperty(value = "是否组合设备")
@TableField("combinedequipment")
private String combinedequipment;
private Boolean combinedequipment = false;
@ApiModelProperty(value = "出厂编号")
@TableField("factorynumber")
......@@ -167,7 +167,7 @@ public class FireEquipment implements Serializable {
@ApiModelProperty(value = "重要性")
@TableField("critical")
private String critical;
private Boolean critical = false;
@ApiModelProperty(value = "电子地址")
@TableField("electronicaddress")
......
......@@ -147,4 +147,12 @@ public class EquipmentSpecific extends BaseEntity {
* 存放位置冗余字段
*/
private Long warehouseStructureId;
@ApiModelProperty(value = "告警状态")
@TableField(exist = false)
private Integer status;
@ApiModelProperty(value = "系统名称")
@TableField(exist = false)
private String systemName;
}
......@@ -125,6 +125,10 @@ public class EquipmentSpecificAlarmLog extends BaseEntity {
@TableField("equipment_index_id")
private Long equipmentIndexId;
@ApiModelProperty(value = "报警状态1报警0恢复")
@TableField("status")
private Integer status;
@ApiModelProperty(value = "画布id")
@TableField(exist = false)
private Long sceneId;
......
......@@ -4,6 +4,7 @@ import com.yeejoin.equipmanage.common.entity.*;
import com.yeejoin.equipmanage.common.vo.BuildingTreeVo;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/**
......@@ -18,47 +19,47 @@ public class AppDownloadVO {
/**
* 装备
*/
private List<DownloadEquipmentDataVO> downloadEquipmentDatas;
private List<DownloadEquipmentDataVO> downloadEquipmentDatas = new ArrayList<>();
/**
* 车辆
*/
private List<Car> downloadCarDatas;
private List<Car> downloadCarDatas = new ArrayList<>();
/**
* 建筑
*/
private List<BuildingTreeVo> buildTree;
private List<BuildingTreeVo> buildTree = new ArrayList<>();
/**
*设备对应性能指标
*/
private List<EquipmentSpecificIndex> equipmentSpecificIndexs;
private List<EquipmentSpecificIndex> equipmentSpecificIndexs = new ArrayList<>();
/**
*性能指标模板
*/
private List<EquipmentIndex> equipmentIndex;
private List<EquipmentIndex> equipmentIndex = new ArrayList<>();
/**
*货位
*/
private List<WarehouseStructure> warehouseStructure;
private List<WarehouseStructure> warehouseStructure = new ArrayList<>();
/**
* 车载装备
*/
private List<EquipmentOnCar> equipmentOnCar;
private List<EquipmentOnCar> equipmentOnCar = new ArrayList<>();
/**
* 车载灭火药剂
*/
private List<ExtinguishantOnCar> extinguishantOnCar;
private List<ExtinguishantOnCar> extinguishantOnCar = new ArrayList<>();
/**
*报废原因
*/
private List<SystemDic> reason;
private List<SystemDic> reason = new ArrayList<>();
}
......@@ -68,4 +68,10 @@ public class CarPropertyVo {
@ApiModelProperty(value = "创建日期")
private Date createDate;
/**
* 单位名称
*/
@ApiModelProperty(value = "mRid")
private String mRid;
}
......@@ -20,29 +20,30 @@ import javax.servlet.http.HttpServletRequest;
@RestControllerAdvice
public class GlobalExceptionHandler {
private Logger log = LoggerFactory.getLogger(this.getClass());
public GlobalExceptionHandler() {
}
@ExceptionHandler({ Exception.class })
public ResponseModel<Object> MethodArgumentNotValidHandler(Exception exception) throws Exception {
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes())
.getRequest();
ResponseModel<Object> response = new ResponseModel<>();
//解析平台返回错误信息,统一返回403,app 端统一跳转到登录页面
if(exception.getMessage()!=null&&exception.getMessage().indexOf("账号已经在其他设备登录")!=-1 ||exception.getMessage().indexOf("请重新登录")!=-1){
response.setStatus(HttpStatus.FORBIDDEN.value());
}else{
response.setStatus(HttpStatus.INTERNAL_SERVER_ERROR.value());
}
response.setDevMessage("FAILED");
response.setMessage( exception.getMessage());
response.setTraceId(RequestContext.getTraceId());
response.setPath(request.getServletPath());exception.printStackTrace();
return response;
}
private Logger log = LoggerFactory.getLogger(this.getClass());
public GlobalExceptionHandler() {
}
@ExceptionHandler({Exception.class})
public ResponseModel<Object> MethodArgumentNotValidHandler(Exception exception) throws Exception {
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes())
.getRequest();
ResponseModel<Object> response = new ResponseModel<>();
//解析平台返回错误信息,统一返回403,app 端统一跳转到登录页面
if (exception.getMessage() != null && (exception.getMessage().contains("账号已经在其他设备登录") || exception.getMessage().contains("请重新登录"))) {
response.setStatus(HttpStatus.FORBIDDEN.value());
} else {
response.setStatus(HttpStatus.INTERNAL_SERVER_ERROR.value());
}
response.setDevMessage("FAILED");
response.setMessage(exception.getMessage());
response.setTraceId(RequestContext.getTraceId());
response.setPath(request.getServletPath());
exception.printStackTrace();
return response;
}
}
......@@ -109,6 +109,16 @@ public class CommonPageInfoParam extends CommonPageable {
*/
private List<String> buildIds;
private String status;
public void setStatus(String status) {
this.status = status;
}
public String getStatus() {
return status;
}
public void setWarehouseStructureName(String warehouseStructureName) {
this.warehouseStructureName = warehouseStructureName;
}
......
......@@ -55,6 +55,8 @@ public class CommonPageParamUtil {
param.setBuildId(toString(queryRequests.get(i).getValue()));
} else if("buildIds".equals(name)){
param.setBuildIds((List<String>)queryRequests.get(i).getValue());
} else if("status".equals(name)){
param.setStatus(toString(queryRequests.get(i).getValue()));
}
}
if(commonPageable !=null){
......
package com.yeejoin.equipmanage.common.vo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
/**
* @author keyong
* @title: TopographyAlarmVo
* <pre>
* @description: TODO
* </pre>
* @date 2021/12/29 18:57
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class TopographyAlarmVo {
private Date createDate;
private String fireEquipmentSpecificIndexName;
private String fireEquipmentName;
private String warehouseStructureName;
private String equipmentName;
private String handleStatus;
private String handleType;
private String alarmType;
private String alarmContent;
private String status;
}
package com.yeejoin.equipmanage.common.vo;
import lombok.Data;
/**
* @author keyong
* @title: IotDataVO
* <pre>
* @description: 物联系统发送的增量数据封装VO
* </pre>
* @date 2021/1/7 17:44
*/
@Data
public class TopographyIotDataVO {
private String name;
private Object value;
private String unit;
}
package com.yeejoin.equipmanage.common.vo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* @author keyong
* @title: TopographyAlarmVo
* <pre>
* @description: TODO
* </pre>
* @date 2021/12/29 18:57
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class TopographyIotVo {
private Date time;
private List<TopographyIotDataVO> list;
}
......@@ -41,8 +41,9 @@ public class AlertSubmittedObject extends BaseEntity {
@ApiModelProperty(value = "人员id")
private Long userId;
@TableField("user_name")
@ApiModelProperty(value = "人员名称")
private String userName;
private String theUser;
@ApiModelProperty(value = "人员电话")
private String userPhone;
......
......@@ -85,6 +85,11 @@ public class DangerDto implements Serializable {
private List<String> photoUrl;
/**
* 隐患图片列表
*/
private String photoUrls;
/**
* 检查项名称
*/
private String inputItemName;
......
package com.yeejoin.amos.boot.module.tzs.api.enums;
import lombok.AllArgsConstructor;
@AllArgsConstructor
public enum InformWorkFlowEnum {
企业提交审批("submitInform","企业提交审批","0"),
接收方接收告知书("acceptInform","接收方接收告知书","9"),
接收方移交告知书("transferInform","接收方移交告知书","1"),
企业撤回告知书("withdrawInform","企业撤回告知书","2"),
接收方驳回告知书("dismissInform","接收方驳回告知书","3"),
企业撤销告知书("cancelInform","企业撤销告知书","-1");
private String code;//流程编码
private String stage;//流程阶段
private String processStatus;// 流程状态
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getStage() {
return stage;
}
public void setStage(String stage) {
this.stage = stage;
}
public String getProcessStatus() {
return processStatus;
}
public void setProcessStatus(String processStatus) {
this.processStatus = processStatus;
}
}
......@@ -82,6 +82,6 @@ public class CylinderInfoDto extends BaseDto {
private Boolean syncState;
@ApiModelProperty(value = "对接公司编码")
private String apiCompanyCode;
private String appId;
}
......@@ -90,8 +90,8 @@ public class CylinderUnitDto extends BaseDto {
@ApiModelProperty(value = "1初次同步数据 2上层系统已同步数据 0已删除数据")
private Boolean syncState;
@ApiModelProperty(value = "对接公司编码")
private String apiCompanyCode;
@ApiModelProperty(value = "对接公司编码")
private String appId;
@ApiModelProperty(value = "气瓶数量")
private Long cylinderNumber;
......
......@@ -79,7 +79,7 @@ public class EquipmentDto extends BaseDto {
private String productCode;
@ApiModelProperty(value = "监督检验机构")
private Long supervisionAgency;
private String supervisionAgency;
@ApiModelProperty(value = "检验报告编号")
private String inspectionReportCode;
......@@ -101,4 +101,16 @@ public class EquipmentDto extends BaseDto {
@ApiModelProperty(value = "设备所属单位")
private String equipUnit;
@ApiModelProperty(value = "详细地址")
private String address;
@ApiModelProperty(value = "经度")
private String longitude;
@ApiModelProperty(value = "纬度")
private String latitude;
@ApiModelProperty(value = "所属区域代码")
private String regionCode;
}
package com.yeejoin.amos.boot.module.tzs.flc.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-12-29
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="EquipmentIndexInformDto", description="设备指标")
public class EquipmentIndexInformDto extends BaseDto {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "设备id")
private Long equipmentId;
@ApiModelProperty(value = "设备名称")
private String equipmentName;
@ApiModelProperty(value = "指标值")
private String value;
@ApiModelProperty(value = "装备定义指标id")
private Long defIndexId;
@ApiModelProperty(value = "装备定义指标名称")
private String defIndexName;
@ApiModelProperty(value = "装备定义指标key")
private String defIndexKey;
}
......@@ -130,4 +130,29 @@ public class EquipmentInformDto extends BaseDto {
@TableField(exist = false)
private Map<String, List<AttachmentDto>> attachments;
@ApiModelProperty(value = "设备数量")
private Integer equipmentNum;
@ApiModelProperty(value = "开始-施工告知日期")
private String productInformDateStart;
@ApiModelProperty(value = "结束-施工告知日期")
private String productInformDateEnd;
@ApiModelProperty(value = "开始-计划施工日期")
private String planProductDateStart;
@ApiModelProperty(value = "结束-计划施工日期")
private String planProductDateEnd;
@ApiModelProperty(value = "施工区域")
private String productArea;
@ApiModelProperty(value = "流程ID")
private String processId;
@ApiModelProperty(value = "流程状态")
private String processStatus;
}
......@@ -108,4 +108,16 @@ public class InformEquipmentDto extends BaseDto {
private List<EquipmentIndexDto> equipmentIndex;
@ApiModelProperty(value = "详细地址")
private String address;
@ApiModelProperty(value = "经度")
private String longitude;
@ApiModelProperty(value = "纬度")
private String latitude;
@ApiModelProperty(value = "所属区域代码")
private String regionCode;
}
package com.yeejoin.amos.boot.module.tzs.flc.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-12-27
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="InformProcessInfoDto", description="通话记录附件")
public class InformProcessInfoDto extends BaseDto {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "流转内容")
private String processInfo;
@ApiModelProperty(value = "流程操作人")
private String handler;
@ApiModelProperty(value = "操作人所属单位id")
private Long handlerUnitId;
@ApiModelProperty(value = "流程状态")
private String processStatus;
@ApiModelProperty(value = "流程操作人id")
private Long handlerId;
@ApiModelProperty(value = "操作人所属单位")
private String handlerUnit;
@ApiModelProperty(value = "流程id")
private String processId;
@ApiModelProperty(value = "告知书id")
private Long informId;
}
......@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
......@@ -150,7 +151,6 @@ public class CylinderInfo {
/**
* 对接公司编码
*/
@TableField("api_company_code")
private String apiCompanyCode;
@TableField("app_id")
private String appId;
}
......@@ -168,8 +168,8 @@ public class CylinderUnit {
/**
* 对接公司编码
*/
@TableField("api_company_code")
private String apiCompanyCode;
@TableField("app_id")
private String appId;
/**
* 经度
......
......@@ -129,7 +129,7 @@ public class Equipment extends BaseEntity {
* 监督检验机构
*/
@TableField("supervision_agency")
private Long supervisionAgency;
private String supervisionAgency;
/**
* 检验报告编号
......@@ -155,4 +155,29 @@ public class Equipment extends BaseEntity {
@TableField("equip_unit")
private String equipUnit;
/**
* 详细地址
*/
@TableField("address")
private String address;
/**
* 经度
*/
@TableField("longitude")
private String longitude;
/**
* 纬度
*/
@TableField("latitude")
private String latitude;
/**
* 所属区域代码
*/
@TableField("region_code")
private String regionCode;
}
package com.yeejoin.amos.boot.module.tzs.flc.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-12-29
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("tcb_equipment_index_inform")
public class EquipmentIndexInform extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 设备id
*/
@TableField("equipment_id")
private Long equipmentId;
/**
* 设备名称
*/
@TableField("equipment_name")
private String equipmentName;
/**
* 指标值
*/
@TableField("value")
private String value;
/**
* 装备定义指标id
*/
@TableField("def_index_id")
private Long defIndexId;
/**
* 装备定义指标名称
*/
@TableField("def_index_name")
private String defIndexName;
/**
* 装备定义指标key
*/
@TableField("def_index_key")
private String defIndexKey;
}
......@@ -215,9 +215,20 @@ public class EquipmentInform extends BaseEntity {
private String informCode;
/**
* 告知单状态 0 暂存 1未接收 9已接收
* 告知单状态 0 暂存 1未接收 2已接收
*/
@TableField("inform_status")
private String informStatus;
/**
* 流程ID
*/
@TableField("process_id")
private String processId;
/**
* 流程状态
*/
@TableField("process_status")
private String processStatus;
}
......@@ -165,4 +165,29 @@ public class InformEquipment extends BaseEntity {
*/
@TableField("source_equipment_id")
private Long sourceEquipmentId;
/**
* 详细地址
*/
@TableField("address")
private String address;
/**
* 经度
*/
@TableField("longitude")
private String longitude;
/**
* 纬度
*/
@TableField("latitude")
private String latitude;
/**
* 所属区域代码
*/
@TableField("region_code")
private String regionCode;
}
package com.yeejoin.amos.boot.module.tzs.flc.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-12-27
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("tz_inform_process_info")
public class InformProcessInfo extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 流转内容
*/
@TableField("process_info")
private String processInfo;
/**
* 流程操作人
*/
@TableField("handler")
private String handler;
/**
* 操作人所属单位id
*/
@TableField("handler_unit_id")
private Long handlerUnitId;
/**
* 流程状态
*/
@TableField("process_status")
private String processStatus;
/**
* 流程操作人id
*/
@TableField("handler_id")
private Long handlerId;
/**
* 操作人所属单位
*/
@TableField("handler_unit")
private String handlerUnit;
/**
* 流程id
*/
@TableField("process_id")
private String processId;
/**
* 告知书id
*/
@TableField("inform_id")
private Long informId;
}
......@@ -10,7 +10,8 @@ public enum EquipmentInformStatusEnum {
暂存("0", "暂存"),
未接收("1", "未接收"),
已接收("2", "已接收");
已接收("2", "已接收"),
已驳回("9", "已驳回");
private String code;
......
package com.yeejoin.amos.boot.module.tzs.flc.api.mapper;
import com.yeejoin.amos.boot.module.tzs.flc.api.entity.EquipmentIndexInform;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* 设备指标 Mapper 接口
*
* @author system_generator
* @date 2021-12-29
*/
public interface EquipmentIndexInformMapper extends BaseMapper<EquipmentIndexInform> {
}
package com.yeejoin.amos.boot.module.tzs.flc.api.mapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.tzs.flc.api.dto.EquipmentInformDto;
import com.yeejoin.amos.boot.module.tzs.flc.api.entity.EquipmentInform;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import java.util.Date;
import java.util.List;
/**
* 设备告知单 Mapper 接口
......@@ -11,4 +17,35 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public interface EquipmentInformMapper extends BaseMapper<EquipmentInform> {
Page<List<EquipmentInformDto>> queryDtoList(Page<EquipmentInformDto> page,
@Param("productCode") String productCode,
@Param("productInformDateStart") String productInformDateStart,
@Param("productInformDateEnd") String productInformDateEnd,
@Param("productUnitId") Long productUnitId,
@Param("regionCode") String regionCode,
@Param("address") String address,
@Param("planProductDateStart") String planProductDateStart,
@Param("planProductDateEnd") String planProductDateEnd,
@Param("acceptUnitId") Long acceptUnitId,
@Param("informStatus") String informStatus,
@Param("sortParam") String sortParam,
@Param("sortRule") String sortRule,
@Param("companyId") Long companyId);
Page<List<EquipmentInformDto>> queryDtoListSub(Page<EquipmentInformDto> page,
@Param("productCode") String productCode,
@Param("productInformDateStart") String productInformDateStart,
@Param("productInformDateEnd") String productInformDateEnd,
@Param("productUnitId") Long productUnitId,
@Param("regionCode") String regionCode,
@Param("address") String address,
@Param("planProductDateStart") String planProductDateStart,
@Param("planProductDateEnd") String planProductDateEnd,
@Param("acceptUnitId") Long acceptUnitId,
@Param("informStatus") String informStatus,
@Param("sortParam") String sortParam,
@Param("sortRule") String sortRule,
@Param("companyId") Long companyId);
}
package com.yeejoin.amos.boot.module.tzs.flc.api.mapper;
import com.yeejoin.amos.boot.module.tzs.flc.api.entity.InformProcessInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* 通话记录附件 Mapper 接口
*
* @author system_generator
* @date 2021-12-27
*/
public interface InformProcessInfoMapper extends BaseMapper<InformProcessInfo> {
}
......@@ -16,4 +16,12 @@ import java.util.List;
public interface UnitInfoMapper extends BaseMapper<UnitInfo> {
List<UnitInfoDto> getUnitByType(@Param("typeCode") String typeCode);
List<UnitInfoDto> getAllUnit();
List<UnitInfoDto> getUnitByTypeParams(@Param("typeCode") String typeCode,
@Param("unitType") String unitType,
@Param("address") String address,
@Param("orgName") String orgName,
@Param("organizationCode") String organizationCode);
}
package com.yeejoin.amos.boot.module.tzs.flc.api.service;
/**
* 设备指标接口类
*
* @author system_generator
* @date 2021-12-29
*/
public interface IEquipmentIndexInformService {
}
package com.yeejoin.amos.boot.module.tzs.flc.api.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.module.tzs.flc.api.dto.EquipmentInformDto;
import java.util.List;
/**
* 设备告知单接口类
*
......@@ -11,6 +15,100 @@ import com.yeejoin.amos.boot.module.tzs.flc.api.dto.EquipmentInformDto;
*/
public interface IEquipmentInformService {
EquipmentInformDto createEquipmentInform(EquipmentInformDto model);
EquipmentInformDto createEquipmentInform(EquipmentInformDto model, ReginParams userInfo);
/**
* 获取本单位提交的告知书列表
* @param page
* @param equipmentInformDto
* @param sortParam
* @param sortRule
* @return
*/
Page<EquipmentInformDto> queryDtoList(Page<EquipmentInformDto> page, EquipmentInformDto equipmentInformDto, String sortParam, String sortRule);
/**
* 获取监管端查看的告知书列表
* @param page
* @param equipmentInformDto
* @param sortParam
* @param sortRule
* @return
*/
Page<EquipmentInformDto> queryDtoListSub(Page<EquipmentInformDto> page, EquipmentInformDto equipmentInformDto, String sortParam, String sortRule);
Boolean batchDelete(List<Long> sequenceNbrList);
Boolean acceptInform(Long sequenceNbr);
EquipmentInformDto updateEquipmentInform(EquipmentInformDto model, ReginParams userInfo);
EquipmentInformDto queryDtoBySeq(Long sequenceNbr);
/**
* 启动 告知书流程
* @param sequenceNbr
* @param userInfo
* @return
* @throws Exception
*/
Boolean startWorkflow(Long sequenceNbr, ReginParams userInfo) throws Exception;
/**
* 接收方接收告知书
* @param sequenceNbr
* @param userInfo
* @return
* @throws Exception
*/
Boolean acceptInform(Long sequenceNbr, ReginParams userInfo) throws Exception;
/**
* 企业移交告知书
* @param sequenceNbr
* @param userInfo
* @return
* @throws Exception
*/
Boolean transferInform(Long sequenceNbr, ReginParams userInfo, Long transferUnitId) throws Exception;
/**
* 企业撤回告知书
* @param sequenceNbr
* @param userInfo
* @return
* @throws Exception
*/
Boolean withdrawInform(Long sequenceNbr, ReginParams userInfo) throws Exception;
/**
* 接收方驳回告知书
* @param sequenceNbr
* @param userInfo
* @return
* @throws Exception
*/
Boolean dismissInform(Long sequenceNbr, ReginParams userInfo) throws Exception;
/**
* 企业撤销告知书
* @param sequenceNbr
* @param userInfo
* @return
* @throws Exception
*/
Boolean cancelInform(Long sequenceNbr, ReginParams userInfo) throws Exception;
/**
* 企业再次提交
* @param sequenceNbr
* @param userInfo
* @return
* @throws Exception
*/
Boolean reSubmit(Long sequenceNbr, ReginParams userInfo) throws Exception;
/**
* 监管端撤回已经通过的告知书
* @param sequenceNbr
* @return
*/
Boolean callbackInform(Long sequenceNbr);
}
package com.yeejoin.amos.boot.module.tzs.flc.api.service;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.module.tzs.flc.api.dto.EquipmentInformDto;
/**
* 通话记录附件接口类
*
* @author system_generator
* @date 2021-12-27
*/
public interface IInformProcessInfoService {
// 保存流程过程记录
Boolean saveProcessInfo(EquipmentInformDto model, ReginParams userInfo, String processStage) throws Exception;
}
......@@ -37,5 +37,7 @@ public interface IUnitInfoService {
List<UnitInfoDto> getInspectionUnit();
List<UnitInfoDto> getUseUnit();
List<UnitInfoDto> getAllUnit();
List<UnitInfoDto> getUseUnit(String unitType, String address, String orgName, String organizationCode);
}
......@@ -11,9 +11,9 @@
tz_cylinder_info t
WHERE
t.sequence_nbr IN ( SELECT max( tt.sequence_nbr ) FROM tz_cylinder_info tt GROUP BY tt.sequence_code )
AND t.api_company_code = (
AND t.app_id = (
SELECT
u.api_company_code
u.app_id
FROM
tz_cylinder_unit u
WHERE
......
<?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.tzs.flc.api.mapper.EquipmentIndexInformMapper">
</mapper>
......@@ -2,4 +2,140 @@
<!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.tzs.flc.api.mapper.EquipmentInformMapper">
<select id="queryDtoList" resultType="java.util.Map">
SELECT
a.sequence_nbr AS sequenceNbr,
a.product_code AS productCode,
a.product_unit AS productUnit,
CONCAT(a.province,a.city,a.district) AS productArea,
CONCAT(a.stree,a.community,a.address) AS address,
a.plan_product_date AS planProductDate,
a.product_inform_date AS productInformDate,
a.accept_unit AS acceptUnit,
CASE
a.inform_status
WHEN 0 THEN
'暂存'
WHEN 1 THEN
'未接收'
WHEN 2 THEN
'已接收'
WHEN 9 THEN
'已驳回'
ELSE
''
END AS informStatus,
IFNULL(t.equipmentNum, 0) as equipmentNum
FROM
tz_equipment_inform a
LEFT JOIN (select count(e.sequence_nbr) as equipmentNum, e.inform_id from tcb_inform_equipment e GROUP BY e.inform_id ) t on t.inform_id = a.sequence_nbr
WHERE a.is_delete = 0
AND a.product_unit_id = #{companyId}
<if test="productCode != null and productCode != ''">
AND a.product_code like CONCAT('%',#{productCode},'%')
</if>
<if test="productUnitId != null ">
AND a.product_unit_id = #{productUnitId}
</if>
<if test="regionCode != null and regionCode != ''">
AND a.region_code like CONCAT('%',#{regionCode},'%')
</if>
<if test="address != null and address != ''">
AND ( a.stree like CONCAT('%',#{address},'%')
or a.community like CONCAT('%',#{address},'%')
or a.address like CONCAT('%',#{address},'%') )
</if>
<if test="productInformDateStart != null and productInformDateStart != ''">
and #{productInformDateStart} <![CDATA[ <= ]]> a.product_inform_date
</if>
<if test="productInformDateEnd != null and productInformDateEnd != ''">
and a.product_inform_date <![CDATA[ <= ]]> #{productInformDateEnd}
</if>
<if test="planProductDateStart != null and planProductDateStart != ''">
and #{planProductDateStart} <![CDATA[ <= ]]> a.plan_product_date
</if>
<if test="planProductDateEnd != null and planProductDateEnd != ''">
and a.plan_product_date <![CDATA[ <= ]]> #{planProductDateEnd}
</if>
<if test="acceptUnitId != null ">
AND a.accept_unit_id = #{acceptUnitId}
</if>
<if test="informStatus != null and informStatus != ''">
AND a.inform_status = #{informStatus}
</if>
<if test="sortParam != null and sortParam != '' and sortRule != null and sortRule != '' ">
ORDER BY ${sortParam} ${sortRule}
</if>
</select>
<select id="queryDtoListSub" resultType="java.util.Map">
SELECT
a.sequence_nbr AS sequenceNbr,
a.product_code AS productCode,
a.product_unit AS productUnit,
CONCAT(a.province,a.city,a.district) AS productArea,
CONCAT(a.stree,a.community,a.address) AS address,
a.plan_product_date AS planProductDate,
a.product_inform_date AS productInformDate,
a.accept_unit AS acceptUnit,
CASE
a.inform_status
WHEN 0 THEN
'暂存'
WHEN 1 THEN
'未接收'
WHEN 2 THEN
'已接收'
WHEN 9 THEN
'已驳回'
ELSE
''
END AS informStatus,
IFNULL(t.equipmentNum, 0) as equipmentNum
FROM
tz_equipment_inform a
LEFT JOIN (select count(e.sequence_nbr) as equipmentNum, e.inform_id from tcb_inform_equipment e GROUP BY e.inform_id ) t on t.inform_id = a.sequence_nbr
WHERE a.is_delete = 0
AND a.accept_unit_id = #{companyId}
AND a.inform_status != 0
<if test="productCode != null and productCode != ''">
AND a.product_code like CONCAT('%',#{productCode},'%')
</if>
<if test="productUnitId != null ">
AND a.product_unit_id = #{productUnitId}
</if>
<if test="regionCode != null and regionCode != ''">
AND a.region_code like CONCAT('%',#{regionCode},'%')
</if>
<if test="address != null and address != ''">
AND ( a.stree like CONCAT('%',#{address},'%')
or a.community like CONCAT('%',#{address},'%')
or a.address like CONCAT('%',#{address},'%') )
</if>
<if test="productInformDateStart != null and productInformDateStart != ''">
and #{productInformDateStart} <![CDATA[ <= ]]> a.product_inform_date
</if>
<if test="productInformDateEnd != null and productInformDateEnd != ''">
and a.product_inform_date <![CDATA[ <= ]]> #{productInformDateEnd}
</if>
<if test="planProductDateStart != null and planProductDateStart != ''">
and #{planProductDateStart} <![CDATA[ <= ]]> a.plan_product_date
</if>
<if test="planProductDateEnd != null and planProductDateEnd != ''">
and a.plan_product_date <![CDATA[ <= ]]> #{planProductDateEnd}
</if>
<if test="acceptUnitId != null ">
AND a.accept_unit_id = #{acceptUnitId}
</if>
<if test="informStatus != null and informStatus != ''">
AND a.inform_status = #{informStatus}
</if>
<if test="sortParam != null and sortParam != '' and sortRule != null and sortRule != '' ">
ORDER BY ${sortParam} ${sortRule}
</if>
</select>
</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.tzs.flc.api.mapper.InformProcessInfoMapper">
</mapper>
......@@ -12,5 +12,43 @@
AND a.unit_type_code LIKE CONCAT('%', #{typeCode}, '%')
</select>
<select id="getAllUnit" resultType="com.yeejoin.amos.boot.module.tzs.flc.api.dto.UnitInfoDto">
select
a.*
from tz_flc_unit_info a
where a.is_delete = 0
AND
(a.unit_status = '1' or a.is_change = 1)
</select>
<select id="getUnitByTypeParams" resultType="com.yeejoin.amos.boot.module.tzs.flc.api.dto.UnitInfoDto">
select
a.*,
CONCAT(a.province, a.city, a.district ,a.stree,a.community,a.address ) as fullAddress
from tz_flc_unit_info a
where a.is_delete = 0 AND
(a.unit_status = '1' or a.is_change = 1)
AND a.unit_type_code LIKE CONCAT('%', #{typeCode}, '%')
<if test="unitType != null and unitType != ''">
AND a.unit_type LIKE CONCAT('%', #{unitType}, '%')
</if>
<if test="address != null and address != ''">
AND ( a.province LIKE CONCAT('%', #{address}, '%')
OR a.city LIKE CONCAT('%', #{address}, '%')
OR a.district LIKE CONCAT('%', #{address}, '%')
OR a.stree LIKE CONCAT('%', #{address}, '%')
OR a.community LIKE CONCAT('%', #{address}, '%')
OR a.address LIKE CONCAT('%', #{address}, '%')
)
</if>
<if test="orgName != null and orgName != ''">
AND a.org_name LIKE CONCAT('%', #{orgName}, '%')
</if>
<if test="organizationCode != null and organizationCode != ''">
AND a.organization_code LIKE CONCAT('%', #{organizationCode}, '%')
</if>
</select>
</mapper>
package com.yeejoin.amos.boot.module.common.biz.controller;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.google.common.collect.Lists;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
import com.yeejoin.amos.boot.biz.common.utils.Menu;
import com.yeejoin.amos.boot.biz.common.utils.MenuFrom;
import com.yeejoin.amos.boot.biz.common.utils.NameUtils;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.TreeParser;
import com.yeejoin.amos.boot.module.common.api.core.framework.PersonIdentify;
import com.yeejoin.amos.boot.module.common.api.dto.FireTeamCardDto;
import com.yeejoin.amos.boot.module.common.api.dto.FireTeamListDto;
......@@ -44,9 +17,23 @@ import com.yeejoin.amos.boot.module.common.api.dto.OrgMenuDto;
import com.yeejoin.amos.boot.module.common.api.entity.FireTeam;
import com.yeejoin.amos.boot.module.common.biz.service.impl.FireTeamServiceImpl;
import com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.servlet.http.HttpServletRequest;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 消防队伍
......@@ -61,7 +48,7 @@ public class FireTeamController extends BaseController {
@Autowired
FireTeamServiceImpl iFireTeamService;
@Autowired
OrgUsrServiceImpl iOrgUsrService;
......@@ -101,11 +88,11 @@ public class FireTeamController extends BaseController {
@RequestMapping(value = "/updateById", method = RequestMethod.PUT)
@ApiOperation(httpMethod = "PUT", value = "修改消防队伍", notes = "修改消防队伍")
public ResponseModel<Object> updateByIdFireTeam(HttpServletRequest request, @RequestBody FireTeam fireTeam) {
if (ValidationUtil.isEmpty(fireTeam.getSequenceNbr())){
if (ValidationUtil.isEmpty(fireTeam.getSequenceNbr())) {
throw new BadRequest("更新消防队伍必须传入主键");
}
// BUG 2842 由 BUG2217 2684 新增业务 需要统计消防队伍旗下所有消防队伍信息导致数据逻辑错误 返回错误提示 2021-09-10 by kongfm
if(fireTeam.getSequenceNbr().equals(fireTeam.getParent())) {
if (fireTeam.getSequenceNbr().equals(fireTeam.getParent())) {
throw new BadRequest("消防队伍上级不可选为自己");
}
return ResponseHelper.buildResponse(iFireTeamService.saveFireTeam(fireTeam));
......@@ -154,8 +141,8 @@ public class FireTeamController extends BaseController {
@RequestMapping(value = "/listTree", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "队伍树", notes = "队伍树")
public ResponseModel<List<Menu>> listTree() throws Exception {
Map<String, Object> columnMap = new HashMap<>();
columnMap.put("is_delete", 0);
Map<String, Object> columnMap = new HashMap<>();
columnMap.put("is_delete", 0);
List<Menu> menus = iFireTeamService.getTeamTree(columnMap);
return ResponseHelper.buildResponse(menus);
}
......@@ -266,32 +253,33 @@ public class FireTeamController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/{teamIds}/company", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "查询消防队伍所属单位", notes = "查询消防队伍所属单位")
public ResponseModel<FireTeam> listFighterCompany(@PathVariable(value = "teamIds")String teamIds) {
public ResponseModel<FireTeam> listFighterCompany(@PathVariable(value = "teamIds") String teamIds) {
FireTeam fireTeamBySequenceNbr = iFireTeamService.getFireTeamBySequenceNbr(Long.valueOf(teamIds));
return ResponseHelper.buildResponse(fireTeamBySequenceNbr);
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/firstAid", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "急救站", notes = "急救站")
public Object getFirstAidForTypeCodeAndCompanyId(String code, String typeCode,Long companyId) {
return ResponseHelper.buildResponse(iFireTeamService.getFirstAidForTypeCodeAndCompanyId(code,typeCode,companyId));
public Object getFirstAidForTypeCodeAndCompanyId(String code, String typeCode, Long companyId) {
return ResponseHelper.buildResponse(iFireTeamService.getFirstAidForTypeCodeAndCompanyId(code, typeCode, companyId));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/find/fireTeam/designated/department", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "消防队伍 中的 类型为【企(事)业单位专职消防救援队】队伍", notes = "消防队伍 中的 类型为【企(事)业单位专职消防救援队】队伍")
public ResponseModel<List<Menu>> getFirstTeamToDesignatedDepartment() throws Exception {
return ResponseHelper.buildResponse(iFireTeamService.getFirstTeamToDesignatedDepartment());
return ResponseHelper.buildResponse(iFireTeamService.getFirstTeamToDesignatedDepartment());
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/find/departmentTree", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = " 消防队伍中 消救部 下的 类型为【企(事)业单位专职消防救援队】的队伍", notes = " 消防队伍中 消救部下的 类型为【企(事)业单位专职消防救援队】的队伍")
public ResponseModel<List<Menu>> getFirstTeamToDesignatedDepartment(@RequestParam String dicCode,@RequestParam String typeCode) throws Exception {
return ResponseHelper.buildResponse(iFireTeamService.getFirstTeamToDesignatedDepartment(dicCode,typeCode));
public ResponseModel<List<Menu>> getFirstTeamToDesignatedDepartment(@RequestParam String dicCode, @RequestParam String typeCode) throws Exception {
return ResponseHelper.buildResponse(iFireTeamService.getFirstTeamToDesignatedDepartment(dicCode, typeCode));
}
@PersonIdentify
@TycloudOperation(ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/companyTreeByUserAndType", method = RequestMethod.GET)
......@@ -302,14 +290,14 @@ public class FireTeamController extends BaseController {
List<OrgMenuDto> menus = iOrgUsrService.companyTreeByUserAndType(reginParams, type);
return ResponseHelper.buildResponse(menus);
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/typeTree/XFJGLX", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "根据bizOrgCode的值获取对应的消防队伍树信息,含有队伍下统计数据", notes = "根据bizOrgCode的值获取对应的消防队伍树信息,含有队伍下统计数据")
public ResponseModel<List<Menu>> getFireTeamType(@RequestParam(required = false) String bizOrgCode) throws Exception {
List<Menu> list = iFireTeamService.getFireTeamTypeTree(bizOrgCode);
return ResponseHelper.buildResponse(list);
List<Menu> list = iFireTeamService.getFireTeamTypeTree(bizOrgCode);
return ResponseHelper.buildResponse(list);
}
}
\ No newline at end of file
......@@ -219,7 +219,6 @@ public class OrgUsrController extends BaseController {
@RequestMapping(value = "/list", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "列表分页查询", notes = "列表分页查询")
public IPage<OrgUsr> listPage(String pageNum, String pageSize, OrgUsr orgUsr) {
Page<OrgUsr> pageBean;
QueryWrapper<OrgUsr> orgUsrQueryWrapper = new QueryWrapper<>();
Class<? extends OrgUsr> aClass = orgUsr.getClass();
......@@ -247,6 +246,7 @@ public class OrgUsrController extends BaseController {
} catch (Exception e) {
}
});
orgUsrQueryWrapper.eq("is_delete", 0);
IPage<OrgUsr> page;
if (StringUtils.isBlank(pageNum) || StringUtils.isBlank(pageSize)) {
pageBean = new Page<>(0, Long.MAX_VALUE);
......@@ -502,8 +502,7 @@ public class OrgUsrController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/getAmosId/{amosId}", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "判断关联账户是否已关联", notes = "判断关联账户是否已关联")
public ResponseModel<Object> getAmosId(@PathVariable String amosId) {
public ResponseModel<Object> getAmosId(@PathVariable String amosId) {
return ResponseHelper.buildResponse(iOrgUsrService.amosIdExist(amosId));
}
......
......@@ -122,11 +122,16 @@ public class DutyFirstAidServiceImpl extends DutyCommonServiceImpl implements ID
public List< Map<String, Object>> getFirstAidExportData(List<String> ids) {
List< Map<String, Object>> resultList = new ArrayList<Map<String, Object>>();
List< Map<String, Object>> result = new ArrayList<Map<String, Object>>();
List<String> userNameList= new ArrayList<String>();
List<String> firstAidSimpleList = new ArrayList<String>();
List<String> companyNameList = new ArrayList<String>();
String typeString = "JJZ";
ids.stream().forEach(i->{
Map<String, Object> detailMap = new HashMap<String, Object>();
List<OrgUsr> personList = orgUsrServiceImpl.getPersonListByParentId(Long.parseLong(i));
List<String> userNameList= new ArrayList<String>();
personList.stream().forEach(m -> {
String userNameString =m.getBizOrgName()+ "@" +m.getSequenceNbr();
userNameList.add(userNameString);
......@@ -134,28 +139,29 @@ public class DutyFirstAidServiceImpl extends DutyCommonServiceImpl implements ID
detailMap.put("userName", userNameList);
OrgUsr companyDetail = orgUsrServiceImpl.getDetailById(Long.parseLong(i));
String companyNameString = companyDetail.getBizOrgName()+ "@" +companyDetail.getSequenceNbr();
detailMap.put("companyName", companyNameString);
companyNameList.add(companyNameString);
detailMap.put("companyName", companyNameList);
List<DataDictionary> dataDicList= dataDictionaryService.getByType(typeString);
List<String> dataDicSimpleList = new ArrayList<String>();
dataDicList.stream().forEach(l->{
String dataDic = l.getName() + "@" +l.getCode();
dataDicSimpleList.add(dataDic);
});
dataDicList.stream().forEach(l->{
String dataDic = l.getName() + "@" +l.getCode();
dataDicSimpleList.add(dataDic);
});
detailMap.put("postTypeName",dataDicSimpleList);
List<Map<String, Object>> list = dutyPersonShiftMapper.getFirstAidForTypeCodeAndCompanyId(
Long.parseLong(i));
List<String> firstAidSimpleList = new ArrayList<String>();
list.stream().forEach(m -> {
String firstAidNameString = m.get("name").toString() + "@" + m.get("sequence_nbr").toString();
firstAidSimpleList.add(firstAidNameString);
});
if( firstAidSimpleList != null && firstAidSimpleList.size() > 1 ) {
if( firstAidSimpleList != null && firstAidSimpleList.size() >= 1 ) {
detailMap.put("firstAidName", firstAidSimpleList);
resultList.add(detailMap);
}
});
return resultList;
result.add(resultList.get(0));
return result;
}
}
......@@ -282,9 +282,12 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
failureDetailsDto.setFailureCode(buildOrderNo());
String parentId = iOrgUsrService.getParentId(userInfo.getUserModel().getUserId());
if (parentId != null){
failureDetailsDto.setBizCode(Long.valueOf(parentId));
}
OrgUsr orgUsr = iOrgUsrService.getById(parentId);
failureDetailsDto.setBizCode(Long.valueOf(parentId));
model = this.createWithModel(failureDetailsDto);
if (ObjectUtils.isNotEmpty(failureDetailsDto.getAttachment())) {
......
......@@ -43,6 +43,7 @@ import javax.servlet.http.HttpServletResponse;
import java.text.SimpleDateFormat;
import java.util.*;
/**
* @author wujiang
* @date 2020-07-07
......@@ -84,9 +85,10 @@ public class EquipmentDetailController extends AbstractBaseController {
@Value("${systemctl.sync.switch}")
private Boolean syncSwitch;
@Autowired
FireFightingSystemServiceImpl fireFightingSystemServiceImpl;
/**
* 新增
*
......@@ -100,15 +102,17 @@ public class EquipmentDetailController extends AbstractBaseController {
equipmentSpecificSerivce.refreshStaData();
return detail;
}
@Async
public void refreshCount(String bizOrgCode) {
equipmentSpecificSerivce.refreshStaData();
try {
fireFightingSystemServiceImpl.refreshCarTypeAndCount(bizOrgCode);
} catch (Exception e) {
}
}
public void refreshCount(String bizOrgCode) {
equipmentSpecificSerivce.refreshStaData();
try {
fireFightingSystemServiceImpl.refreshCarTypeAndCount(bizOrgCode);
} catch (Exception e) {
}
}
/**
* 设备新增带打码入库
***/
......@@ -213,7 +217,6 @@ public class EquipmentDetailController extends AbstractBaseController {
*
* 修改
* **/
@RequestMapping(value = "equipment/updateById", method = RequestMethod.PUT)
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "PUT", value = "修改", notes = "修改")
......
......@@ -91,6 +91,7 @@ public class MaintenanceResourceDataController extends AbstractBaseController {
/**
* 获取维保设施资源数据详细信息
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/{id}")
public ResponseModel getInfo(@PathVariable("id") Long id) {
return CommonResponseUtil.success(maintenanceResourceDataService.selectMaintenanceResourceDataById(id));
......@@ -99,6 +100,7 @@ public class MaintenanceResourceDataController extends AbstractBaseController {
/**
* 新增维保设施资源数据
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping
public ResponseModel add(@RequestBody MaintenanceResourceData maintenanceResource) {
return CommonResponseUtil.success(maintenanceResourceDataService.insertMaintenanceResourceData(maintenanceResource));
......@@ -107,6 +109,7 @@ public class MaintenanceResourceDataController extends AbstractBaseController {
/**
* 修改维保设施资源数据
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PutMapping
public ResponseModel edit(@RequestBody MaintenanceResourceData maintenanceResource) {
return CommonResponseUtil.success(maintenanceResourceDataService.updateMaintenanceResourceData(maintenanceResource));
......@@ -115,6 +118,7 @@ public class MaintenanceResourceDataController extends AbstractBaseController {
/**
* 获取维保消防设施选择列表
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/getMaintenanceResourceDataList")
public ResponseModel getMaintenanceResourceDataList() {
String orgCode = getOrgCode();
......@@ -124,6 +128,7 @@ public class MaintenanceResourceDataController extends AbstractBaseController {
/**
* 删除维保设施资源数据
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@DeleteMapping("/{ids}")
public ResponseModel remove(@PathVariable Long[] ids) {
return CommonResponseUtil.success(maintenanceResourceDataService.deleteMaintenanceResourceDataByIds(ids));
......@@ -132,6 +137,7 @@ public class MaintenanceResourceDataController extends AbstractBaseController {
/**
* 业主单位批量关联消防设施,反推已有消防系统
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping("/relationMainResData")
public ResponseModel relationMainResData(@RequestBody List<MaintenanceResourceData> list) {
return CommonResponseUtil.success(maintenanceResourceDataService.relationMainResData(getAppKey(), getProduct(), getToken(), list));
......
......@@ -526,7 +526,7 @@ public class UserController extends AbstractBaseController {
result.put("userId", jsonObject.getString("userId"));
result.put("appKey", jsonObject.getString("appKey"));
result.put("product", jsonObject.getString("product"));
result.put("jpushUserKey", appMessagePushService.buildJpushUserKey(jsonObject.getString("userId")));
result.put("jpushUserKey", AppMessagePushService.buildJpushUserKey(jsonObject.getString("userId")));
return CommonResponseUtil.success(result);
}
return CommonResponseUtil.failure("登录失败");
......
......@@ -185,4 +185,5 @@ public interface EquipmentSpecificAlarmMapper extends BaseMapper<EquipmentSpecif
* @return
*/
List<EquipmentSpecificAlarm> getEquipListBySpecific(@Param("status") Boolean status, @Param("equipmentSpecificId") Long equipmentSpecificId);
}
......@@ -46,6 +46,8 @@ public interface EquipmentSpecificIndexMapper extends BaseMapper<EquipmentSpecif
*/
List<EquipmentSpecificIndex> getEquipmentSpeIndexByIotCode(String iotCode);
List<EquipmentSpecificIndex> getEquipmentSpeIndexDataByIotCode(String iotCode);
/**
* 通过设备id查询
*
......
......@@ -10,6 +10,7 @@ import com.yeejoin.equipmanage.common.utils.CommonPageInfoParam;
import com.yeejoin.equipmanage.common.vo.AlarmDataVO;
import com.yeejoin.equipmanage.common.vo.AlarmEquipMockDataVO;
import com.yeejoin.equipmanage.common.vo.AlarmListDataVO;
import com.yeejoin.equipmanage.common.vo.TopographyAlarmVo;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
......@@ -42,6 +43,9 @@ public interface IEquipmentSpecificAlarmService extends IService<EquipmentSpecif
org.springframework.data.domain.Page<AlarmListDataVO> listAlarmsPage(CommonPageInfoParam param);
org.springframework.data.domain.Page<TopographyAlarmVo> listAlarmsPageForTopography(CommonPageInfoParam param);
Map<String, Object> getSpecificInfoById(Long id);
Map<String, Object> getSpecificInfoByCode(String code);
......
......@@ -261,14 +261,14 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
} catch (Exception e) {
log.error("查询机场人员为空,检查机场人员是否绑定单位!");
}
confirmAlamVo.setFireLocation(ent.getLocation());
List<UserDto> infoList = equipmentSpecificSerivce.getEquipSpecificLocationInfo(ent.getEquipmentSpecificId(), FIELD_NAME.split(","));
if (CollectionUtils.isNotEmpty(infoList)) {
infoList.stream().forEach(dto -> {
String name = dto.getPersonName();
// String name = dto.getPersonName();
// confirmAlamVo.setFireLocation(name);
String code = dto.getFieldCode();
String value = dto.getFieldValue();
confirmAlamVo.setFireLocation(name);
switch (code) {
case "longitude":
confirmAlamVo.setFloorLongitude(getVal(value));
......
package com.yeejoin.equipmanage.service.impl;
import javax.annotation.Resource;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeejoin.equipmanage.common.entity.FormGroup;
import com.yeejoin.equipmanage.common.entity.SystemDic;
import com.yeejoin.equipmanage.common.entity.vo.AppDownloadVO;
import com.yeejoin.equipmanage.common.enums.GroupCodeEnum;
import com.yeejoin.equipmanage.common.utils.FileUploadFactory;
import com.yeejoin.equipmanage.common.utils.FileUploadTypeEnum;
import com.yeejoin.equipmanage.common.utils.ImportFile;
import com.yeejoin.equipmanage.common.vo.BuildingTreeVo;
import com.yeejoin.equipmanage.mapper.EquipmentMapper;
import com.yeejoin.equipmanage.mapper.ExtinguishantOnCarMapper;
import com.yeejoin.equipmanage.service.*;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import com.yeejoin.equipmanage.common.utils.FileUploadFactory;
import com.yeejoin.equipmanage.common.utils.FileUploadTypeEnum;
import com.yeejoin.equipmanage.common.utils.ImportFile;
import org.typroject.tyboot.core.foundation.utils.Bean;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
@Service
public class DownloadFileService implements IDownloadFileService {
@Autowired
@Lazy
@Autowired
@Lazy
private FileUploadFactory factory;
@Autowired
private IFormInstanceService iFormInstanceService;
private IFormInstanceService iFormInstanceService;
@Autowired
private IFormGroupService iFormGroupService;
private IFormGroupService iFormGroupService;
@Autowired
private ICarService carService;
private ICarService carService;
@Autowired
private EquipmentMapper equipmentMapper;
private EquipmentMapper equipmentMapper;
@Autowired
private IExtinguishantOnCarService extinguishantOnCarService;
private IExtinguishantOnCarService extinguishantOnCarService;
@Autowired
private IEquipmentIndexService equipmentIndexService;
private IEquipmentIndexService equipmentIndexService;
@Autowired
private IEquipmentSpecificIndexSerivce equipmentSpecificIndexSerivce;
private IEquipmentSpecificIndexSerivce equipmentSpecificIndexSerivce;
@Autowired
private IWarehouseStructureService warehouseStructureService;
private IWarehouseStructureService warehouseStructureService;
@Autowired
private ISystemDicService systemDicService;
private ISystemDicService systemDicService;
@Autowired
private IEquipmentOnCarService equipmentOnCarService;
@Resource(name = "fileUploadFactory")
public void setFactory(FileUploadFactory factory) {
this.factory = factory;
}
@Override
public HSSFWorkbook DownloadFile(String type) {
ImportFile up = factory.create(FileUploadTypeEnum.getEnum(type));
HSSFWorkbook workbook =(HSSFWorkbook) up.downloadImportFile();
return workbook;
}
@Override
public AppDownloadVO appDownloadDatas() {
AppDownloadVO appDownload = new AppDownloadVO();
//建筑信息
FormGroup formGroup = iFormGroupService.getByUniqueKey(GroupCodeEnum.ALL_BUILDING.getGroupCode());
List<Map<String, Object>> allList = iFormInstanceService.getSpecialChildrenList(null);
List<BuildingTreeVo> allListVo = buildBuildingData(formGroup, allList);
appDownload.setBuildTree(allListVo);
//车辆信息
appDownload.setDownloadCarDatas(carService.list());
//装备信息
appDownload.setDownloadEquipmentDatas(equipmentMapper.getDownloadEquipmentData());
private IEquipmentOnCarService equipmentOnCarService;
//性能指标模板
appDownload.setEquipmentIndex(equipmentIndexService.list());
@Resource(name = "fileUploadFactory")
public void setFactory(FileUploadFactory factory) {
this.factory = factory;
}
@Override
public HSSFWorkbook DownloadFile(String type) {
ImportFile up = factory.create(FileUploadTypeEnum.getEnum(type));
HSSFWorkbook workbook = (HSSFWorkbook) up.downloadImportFile();
return workbook;
}
@Override
public AppDownloadVO appDownloadDatas() {
AppDownloadVO appDownload = new AppDownloadVO();
//性能指标
//建筑信息
FormGroup formGroup = iFormGroupService.getByUniqueKey(GroupCodeEnum.ALL_BUILDING.getGroupCode());
List<Map<String, Object>> allList = iFormInstanceService.getSpecialChildrenList(null);
List<BuildingTreeVo> allListVo = buildBuildingData(formGroup, allList);
appDownload.setBuildTree(allListVo);
//车辆信息
appDownload.setDownloadCarDatas(carService.list());
//装备信息
appDownload.setDownloadEquipmentDatas(equipmentMapper.getDownloadEquipmentData());
//
// //性能指标模板
appDownload.setEquipmentIndex(equipmentIndexService.list());
//
// //性能指标
appDownload.setEquipmentSpecificIndexs(equipmentSpecificIndexSerivce.list());
//仓库
appDownload.setWarehouseStructure(warehouseStructureService.list());
//车载装备
appDownload.setEquipmentOnCar(equipmentOnCarService.list());
//车载灭火药剂
appDownload.setExtinguishantOnCar(extinguishantOnCarService.list());
//报废原因
appDownload.setReason(systemDicService.list(new QueryWrapper<SystemDic>().eq("type", "ScrapReason")));
return appDownload;
}
/**
* 建筑树数据处理
* @param formGroup
* @param allList
* @return
*/
private List<BuildingTreeVo> buildBuildingData(FormGroup formGroup, List<Map<String, Object>> allList) {
List<BuildingTreeVo> allListVo = Bean.listMap2ListBean(allList, BuildingTreeVo.class);
BuildingTreeVo treeNode = new BuildingTreeVo();
treeNode.setInstanceId(formGroup.getId());
treeNode.setInstanceName(formGroup.getGroupName());
treeNode.setParentId("-1");
treeNode.setGroupType(formGroup.getGroupType());
treeNode.setGroupCode(formGroup.getGroupCode());
allListVo.add(treeNode);
return allListVo;
}
//仓库
appDownload.setWarehouseStructure(warehouseStructureService.list());
//车载装备
appDownload.setEquipmentOnCar(equipmentOnCarService.list());
//车载灭火药剂
appDownload.setExtinguishantOnCar(extinguishantOnCarService.list());
//报废原因
appDownload.setReason(systemDicService.list(new QueryWrapper<SystemDic>().eq("type", "ScrapReason")));
return appDownload;
}
/**
* 建筑树数据处理
*
* @param formGroup
* @param allList
* @return
*/
private List<BuildingTreeVo> buildBuildingData(FormGroup formGroup, List<Map<String, Object>> allList) {
List<BuildingTreeVo> allListVo = Bean.listMap2ListBean(allList, BuildingTreeVo.class);
BuildingTreeVo treeNode = new BuildingTreeVo();
treeNode.setInstanceId(formGroup.getId());
treeNode.setInstanceName(formGroup.getGroupName());
treeNode.setParentId("-1");
treeNode.setGroupType(formGroup.getGroupType());
treeNode.setGroupCode(formGroup.getGroupCode());
allListVo.add(treeNode);
return allListVo;
}
}
......@@ -12,9 +12,11 @@ import java.util.Enumeration;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import javax.servlet.http.HttpServletResponse;
import com.yeejoin.equipmanage.common.vo.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.domain.PageImpl;
......@@ -43,10 +45,6 @@ import com.yeejoin.equipmanage.common.enums.EquipmentDataEnum;
import com.yeejoin.equipmanage.common.utils.CommonPageInfoParam;
import com.yeejoin.equipmanage.common.utils.DateUtils;
import com.yeejoin.equipmanage.common.utils.StringUtil;
import com.yeejoin.equipmanage.common.vo.AlarmDataVO;
import com.yeejoin.equipmanage.common.vo.AlarmEquipMockDataVO;
import com.yeejoin.equipmanage.common.vo.AlarmListDataVO;
import com.yeejoin.equipmanage.common.vo.EquipmentAlarmDownloadVO;
import com.yeejoin.equipmanage.mapper.ConfirmAlarmMapper;
import com.yeejoin.equipmanage.mapper.EquipmentSpecificAlarmLogMapper;
import com.yeejoin.equipmanage.mapper.EquipmentSpecificAlarmMapper;
......@@ -223,6 +221,39 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec
}
@Override
public org.springframework.data.domain.Page<TopographyAlarmVo> listAlarmsPageForTopography(CommonPageInfoParam param) {
Page page = new Page(param.getPageNumber(), param.getPageSize());
Page<Map<String, Object>> mybatisResult = this.baseMapper.pageAlarmsInfo(page, param);
List<TopographyAlarmVo> res = new ArrayList<>();
if (mybatisResult.getSize() > 0) {
mybatisResult.getRecords().forEach(x -> {
TopographyAlarmVo dataVO = new TopographyAlarmVo();
try {
dataVO.setCreateDate(DateUtils.dateParse(String.valueOf(x.get("createDate")),DateUtils.DATE_TIME_T_PATTERN));
} catch (ParseException e) {
e.printStackTrace();
}
dataVO.setFireEquipmentSpecificIndexName(String.valueOf(x.get("fireEquipmentSpecificIndexName")));
dataVO.setFireEquipmentName(String.valueOf(x.get("fireEquipmentName")));
dataVO.setWarehouseStructureName(String.valueOf(x.get("warehouseStructureName")));
dataVO.setEquipmentName(null == x.get("equipmentName") ? null : String.valueOf(x.get("equipmentName")));
dataVO.setHandleStatus(String.valueOf(x.get("handleStatus")));
dataVO.setStatus(String.valueOf(x.get("status")));
Object type = x.get("type");
if (AlarmTypeEnum.HZGJ.getCode().equals(type) || AlarmTypeEnum.GZGJ.getCode().equals(type)
|| AlarmTypeEnum.PB.getCode().equals(type)) {
dataVO.setAlarmType(AlarmTypeEnum.getTypeByCode(String.valueOf(type)));
}
dataVO.setAlarmContent(x.get("fireEquipmentName") + dataVO.getAlarmType());
dataVO.setHandleType(null == x.get("handleType") ? null : String.valueOf(x.get("handleType")));
res.add(dataVO);
});
}
param.setPageNumber(param.getPageNumber() - 1);
return new PageImpl<>(res, param, mybatisResult.getTotal());
}
@Override
public Map<String, Object> getSpecificInfoById(Long id) {
Map<String, Object> map = new HashMap<>();
EquipmentSpecificAlarmLog alarm = equipmentSpecificAlarmLogMapper.selectById(id);
......
......@@ -995,6 +995,7 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
AlamVideoVO video = videoMapper.getVideoById(id);
if (!ObjectUtils.isEmpty(video)) {
video.setUrl(videoService.getVideoUrl(video.getName().toString(), video.getPresetPosition(), video.getUrl(), video.getCode()));
video.setId(id);
}
return video;
} else {
......@@ -1590,7 +1591,7 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
@Override
public void refreshStaData() {
List<Map<String, Object>> result = this.baseMapper.queryCompanyStaData();
result.forEach(m -> redisUtils.set((buildKey(m)), m.get("total"),86400));
result.forEach(m -> redisUtils.set((buildKey(m)), m.get("total"), 86400));
}
private String buildKey(Map<String, Object> row) {
......
......@@ -440,6 +440,9 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
equipmentSpecificAlarmService.saveOrUpdate(action);
if (AlarmStatusEnum.BJ.getCode() == action.getStatus()) {
equipmentAlarmLogs.add(addEquipAlarmLogRecord(action));
if (ValidationUtil.isEmpty(action.getAlamContent())){
action.setAlamContent(action.getEquipmentSpecificName() + action.getEquipmentSpecificIndexName());
}
mqttSendGateway.sendToMqtt(TopicEnum.EQDQR.getTopic(), JSONArray.toJSON(action).toString());
}
specificAlarmIds.add(action.getId());
......@@ -872,6 +875,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
equipmentSpecificAlarmLog.setAlarmReason(equipmentSpecificAlarm.getAlamReason());
equipmentSpecificAlarmLog.setEquipmentSpecificCode(equipmentSpecificAlarm.getCode());
equipmentSpecificAlarmLog.setBuildId(equipmentSpecificAlarm.getBuildId());
equipmentSpecificAlarmLog.setStatus(equipmentSpecificAlarm.getStatus());
equipmentSpecificAlarmLogService.save(equipmentSpecificAlarmLog);
// 同步告警消息给平台
if (amosSwitch) {
......
......@@ -362,6 +362,7 @@ public class SyncDataUtil {
fireVehicleInfo.setUpdateDate(new Date());
fireVehicleInfo.setValue(i.getValue());
fireVehicleInfo.setAliasname(i.getName());
fireVehicleInfo.setMrid(i.getMRid());
return fireVehicleInfo;
}
).collect(Collectors.toList());
......
......@@ -216,7 +216,7 @@ public class AlertCalledController extends BaseController {
String callTimeEnd,
String callTimeStart,
String systemSourceCode,
String isFatherAlert) {
@RequestParam(value ="isFatherAlert",required = false) String isFatherAlert) {
/* Page<AlertCalled> pageBean;
IPage<AlertCalled> page;
QueryWrapper<AlertCalled> alertCalledQueryWrapper = new QueryWrapper<>();
......
package com.yeejoin.amos.boot.module.jcs.biz.controller;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import com.alibaba.fastjson.JSONArray;
import org.apache.commons.lang3.StringUtils;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.PathVariable;
......@@ -109,7 +113,7 @@ public class AlertFormController extends BaseController {
/**
* 根据表态类型code查询表单数据项
* @param id
* @param
* @return
*/
......@@ -120,7 +124,18 @@ public class AlertFormController extends BaseController {
List<AlertFormInitDto> list=new ArrayList<AlertFormInitDto>();
if(redisUtils.hasKey(RedisKey.FORM_CODE+code)){
Object obj= redisUtils.get(RedisKey.FORM_CODE+code);
return ResponseHelper.buildResponse(obj);
JSONArray arr = (JSONArray) obj;
List<AlertFormInitDto> list1 = arr.toJavaList(AlertFormInitDto.class);
for (AlertFormInitDto alertFormInitDto: list1) {
if(alertFormInitDto.getKey().equals("fireTime")) {
Date date = new Date();
alertFormInitDto.setDefaultValue(date);
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String dateString = formatter.format(date);
alertFormInitDto.getFormItemDescr().setFieldValue(dateString);
}
}
return ResponseHelper.buildResponse(JSON.toJSON(list1));
}else{
list= iAlertFormService.getFormlist(code);
redisUtils.set(RedisKey.FORM_CODE+code,JSON.toJSON(list),time);
......
......@@ -51,6 +51,7 @@ import java.io.UnsupportedEncodingException;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
......@@ -267,17 +268,23 @@ public class AlertSubmittedController extends BaseController {
Map<String, String> definitions = new HashMap<>();
definitions.put("$type",alertCalled.getAlertType());
definitions.put("$callTime", DateUtils.dateTimeToDateString(alertCalled.getCallTime()));
definitions.put("$callTime", DateUtils.convertDateToString(alertCalled.getCallTime(),DateUtils.DATE_TIME_PATTERN));
definitions.put("$replaceContent",replaceContent);
definitions.put("$address",alertCalled.getAddress());
definitions.put("$recDate",DateUtils.convertDateToString(alertCalled.getRecDate(),DateUtils.DATE_TIME_PATTERN));
definitions.put("$address",ValidationUtil.isEmpty(alertCalled.getAddress()) ? "" : alertCalled.getAddress());
// definitions.put("$recDate",DateUtils.convertDateToString(alertCalled.getUpdateTime(),DateUtils.DATE_TIME_PATTERN));
definitions.put("$contactUser",ValidationUtil.isEmpty(alertCalled.getContactUser()) ? "" : alertCalled.getContactUser());
definitions.put("$trappedNum",ValidationUtil.isEmpty(alertCalledRo.getTrappedNum()) ? "" : String.valueOf(alertCalled.getTrappedNum()));
definitions.put("$casualtiesNum",ValidationUtil.isEmpty(alertCalled.getCasualtiesNum()) ? "" : String.valueOf(alertCalled.getCasualtiesNum()));
definitions.put("$contactPhone",ValidationUtil.isEmpty(alertCalled.getContactPhone()) ? "" : alertCalled.getContactPhone());
definitions.put("$contactUser",ValidationUtil.isEmpty(alertCalled.getContactUser()) ? "" : alertCalled.getContactUser());
definitions.put("$trappedNum",ValidationUtil.isEmpty(alertCalledRo.getTrappedNum()) ? "" : String.valueOf(alertCalled.getTrappedNum()));
definitions.put("$casualtiesNum",ValidationUtil.isEmpty(alertCalled.getCasualtiesNum()) ? "" : String.valueOf(alertCalled.getCasualtiesNum()));
definitions.put("$contactPhone",ValidationUtil.isEmpty(alertCalled.getContactPhone()) ? "" : alertCalled.getContactPhone());
String companyName = JSONObject.parseObject(schedulingContent.getSubmissionContent()).getString("$companyName") ;
String companyName = JSONObject.parseObject(schedulingContent.getSubmissionContent()).getString("companyName") ;
JSONObject jsonObject = null;
if(!ValidationUtil.isEmpty(alertCalled.getUpdateTime())) {
jsonObject = JSONObject.parseObject(schedulingContent.getSubmissionContent());
jsonObject.put("recDate",DateUtils.convertDateToString(alertCalled.getUpdateTime(), DateUtils.DATE_TIME_PATTERN));
}
definitions.put("$companyName", null == companyName ? "" : companyName);
......@@ -289,6 +296,10 @@ public class AlertSubmittedController extends BaseController {
content = getTaskInformation( schedulingContent.getSubmissionTemplate(),definitions);
}
if(jsonObject != null) {
schedulingContent.setSubmissionContent(jsonObject.toJSONString());
}
schedulingContent.setSubmissionTemplate(content);
if(!ValidationUtil.isEmpty(schedulingContent.getSubmissionContent())) {
try {
......
package com.yeejoin.amos.boot.module.jcs.biz.service.impl;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
......@@ -9,6 +12,7 @@ import java.util.Set;
import java.util.function.Function;
import java.util.stream.Collectors;
import org.apache.commons.beanutils.BeanUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager;
......@@ -267,13 +271,13 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
for (AlertFormValue alertFormValue : list) {
if("flightNumber".equals(alertFormValue.getFieldCode())) {
FormValue value = new FormValue(alertFormValue.getFieldCode(), alertFormValue.getFieldName(),
"text", alertFormValue.getFieldValueCode(), alertFormValue.getBlock());
"text", ValidationUtil.isEmpty(alertFormValue.getFieldValueCode()) ? alertFormValue.getFieldValue() : alertFormValue.getFieldValueCode() , alertFormValue.getBlock());
formValue.add(value);
continue;
}
if("aircraftModel".equals(alertFormValue.getFieldCode())) {
FormValue value = new FormValue(alertFormValue.getFieldCode(), alertFormValue.getFieldName(),
"text", alertFormValue.getFieldValueCode(), alertFormValue.getBlock());
"text", ValidationUtil.isEmpty(alertFormValue.getFieldValueCode()) ? alertFormValue.getFieldValue() : alertFormValue.getFieldValueCode() , alertFormValue.getBlock());
formValue.add(value);
continue;
}
......@@ -422,7 +426,23 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
par.setAlertId(alertCalled.getSequenceNbr());
List<AlertCalledZhDto> list = this.alertCalledListByAlertStatus(null, null, par);
String json=list!=null&&list.size()>0?JSONObject.toJSONString(list.get(0), SerializerFeature.PrettyFormat, SerializerFeature.WriteMapNullValue):"";
String json="";
if(list!=null&&list.size()>0){
AlertCalledZhDto ll=list.get(0);
Map<String, String> map = BeanUtils.describe((Object) list.get(0));
String strDateFormat = "yyyy-MM-dd HH:mm:ss";
SimpleDateFormat sdf = new SimpleDateFormat(strDateFormat);
map.put("sequenceNbr",ll.getSequenceNbr()+"");
map.put("callTime",ll.getCallTime()!=null?sdf.format(ll.getCallTime()):"");
map.put("updateTime",ll.getUpdateTime()!=null?sdf.format(ll.getUpdateTime()):"");
json=list!=null&&list.size()>0?JSONObject.toJSONString(map, SerializerFeature.PrettyFormat,
SerializerFeature.WriteMapNullValue):"";
}
emqKeeper.getMqttClient().publish(topicData, json.getBytes(), RuleConfig.DEFAULT_QOS, false);
/**
......@@ -448,6 +468,11 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
throw new RuntimeException("报送失败,系统异常!");
}
}
/**
* 根据id 修改警情 type:警情相关 操作类型 0警情续报 1非警情确认 2 警情结案
*/
......@@ -615,11 +640,11 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
/*
* if(null == valueCode) { valueCode = alertFormValue.getFieldValue(); }
*/
if("flightNumber".equals(alertFormValue.getFieldCode()) || "aircraftModel".equals(alertFormValue.getFieldCode())) {
listdate.add(new KeyValueLabel(alertFormValue.getFieldName(), alertFormValue.getFieldCode(), alertFormValue.getFieldValueCode()));
} else {
// if("flightNumber".equals(alertFormValue.getFieldCode()) || "aircraftModel".equals(alertFormValue.getFieldCode())) {
// listdate.add(new KeyValueLabel(alertFormValue.getFieldName(), alertFormValue.getFieldCode(), alertFormValue.getFieldValueCode()));
// } else {
listdate.add(new KeyValueLabel(alertFormValue.getFieldName(), alertFormValue.getFieldCode(), valueCode));
}
// }
});
map.put("data", listdate);
......@@ -1134,7 +1159,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
// }
private Object getIdsList1(String type ,String condition1, String condition2, String condition3)throws Exception {
List<Object> resultList = new ArrayList<Object>();
List<Map<String, Object>> resultList = new ArrayList<Map<String, Object>>();
ResponseModel<Object> responseForcondition1Name = knowledgebaseFeignClient
.queryListByTagName(condition1.split(",")[0]);
......@@ -1231,7 +1256,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
if (ObjectUtils.isNotEmpty(SimpleDetailResponse.getResult()) && priority != 0) {
JSONArray detailJsonArray = JSONArray.parseArray(JSONArray.toJSONString(SimpleDetailResponse.getResult()));
JSONObject detailJsonObject= detailJsonArray.getJSONObject(0);
map.put("recDate",detailJsonObject.getString("REC_DATE"));
map.put("recDate",DateUtils.dateToString(detailJsonObject.getString("REC_DATE")));
map.put("sequenceNbr", detailJsonObject.getString("SEQUENCE_NBR"));
map.put("docTitle", detailJsonObject.getString("DOC_TITLE"));
map.put("priority", priority);
......@@ -1239,6 +1264,45 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
}
}
}
sort(resultList);
return resultList;
}
public void sort(List<Map<String, Object>> list) {
Collections.sort(list, new Comparator<Map<String, Object>>() {
public int compare(Map<String, Object> o1, Map<String, Object> o2) {
return (Integer) o1.get("priority") < (Integer) o2
.get("priority") ? ((Integer) o1.get("priority") == (Integer) o2
.get("priority") ? 0 : -1) : 1;
}
});
}
//
// public static void main(String[] args) {
// List<Map<String, Object>> resultList = new ArrayList<Map<String, Object>>();
// Map<String, Object> map = new HashMap<String, Object>();
// map.put("docTitle", "21313213");
// map.put("priority", 21);
// resultList.add(map);
// Map<String, Object> map1 = new HashMap<String, Object>();
// map1.put("docTitle", "21313213");
// map1.put("priority", 12);
// resultList.add(map1);
// Map<String, Object> map2 = new HashMap<String, Object>();
// map2.put("docTitle", "21313213");
// map2.put("priority", 1);
// resultList.add(map2);
// Map<String, Object> map3 = new HashMap<String, Object>();
// map3.put("docTitle", "21313213");
// map3.put("priority", 31);
// resultList.add(map3);
// Map<String, Object> map4 = new HashMap<String, Object>();
// map4.put("docTitle", "21313213");
// map4.put("priority", 18);
// resultList.add(map4);
// sort(resultList);
// for (Map<String, Object> map6 : resultList) {
// System.out.println(map6.get("priority"));
// }
// }
}
......@@ -126,10 +126,10 @@ public class RuleAlertCalledService {
}
//航空器救援
if (alertFormValue.getFieldCode().equals("flightNumber")) {
alertCalledRo.setFlightNumber(alertFormValue.getFieldValueCode());
alertCalledRo.setFlightNumber(ValidationUtil.isEmpty(alertFormValue.getFieldValueCode()) ? alertFormValue.getFieldValue() : alertFormValue.getFieldValueCode());
}
if (alertFormValue.getFieldCode().equals("aircraftModel")) {
alertCalledRo.setAircraftModel(alertFormValue.getFieldValueCode());
alertCalledRo.setAircraftModel(ValidationUtil.isEmpty(alertFormValue.getFieldValueCode()) ? alertFormValue.getFieldValue() : alertFormValue.getFieldValueCode());
}
if (alertFormValue.getFieldCode().equals("landingTime")) {
alertCalledRo.setLandingTime(alertFormValue.getFieldValue());
......@@ -160,7 +160,7 @@ public class RuleAlertCalledService {
//漏油现场安全保障
if (alertFormValue.getFieldCode().equals("flightNumber")) {
alertCalledRo.setFlightNumberLy(alertFormValue.getFieldValue());
alertCalledRo.setFlightNumberLy(ValidationUtil.isEmpty(alertFormValue.getFieldValueCode()) ? alertFormValue.getFieldValue() : alertFormValue.getFieldValueCode());
}
if (alertFormValue.getFieldCode().equals("seat")) {
alertCalledRo.setSeat(alertFormValue.getFieldValue());
......
......@@ -1312,7 +1312,8 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
return executeSubmitDto;
}
AgencyUserModel checkLeader = jcsFeignClient.getAmosIdByUserId(param.getReformLeaderId()).getResult();
JSONObject reformJson = new JSONObject();
JSONObject reformJson = ValidationUtil.isEmpty(latentDanger.getReformJson()) ? new JSONObject() :
latentDanger.getReformJson();
reformJson.put("reformLeaderId", param.getReformLeaderId());
latentDanger.setReformJson(reformJson);
Object result = workflowExecuteService.setTaskAssign(processInstanceId, checkLeader.getUserName());
......@@ -1916,10 +1917,11 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
pageParam.put("leadPeopleId", jcsUserId);
// 登录人为整改责任人
pageParam.put("reformLeaderId", jcsUserId);
// 登录人单位
pageParam.put("bizOrgCode", person.get("bizOrgCode").toString().substring(0, 6));
}
}
Page page = new Page(pageParam.getParamPageCurrent(), pageParam.getParamPageSize());
IPage<LatentDanger> iPage = this.baseMapper.selectPageByParam(page, (Map<String, Object>) pageParam);
if (iPage.getCurrent() != pageParam.getParamPageCurrent()) {
......@@ -1937,7 +1939,8 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
}
} catch (Exception e) {
}
Map<String, Object> finalBuildingAbsolutePositionMap = buildingAbsolutePositionMap;
Map<String, Object> finalBuildingAbsolutePositionMap =
ValidationUtil.isEmpty(buildingAbsolutePositionMap) ? new HashMap<>() : buildingAbsolutePositionMap;
iPage.getRecords().forEach(danger -> {
if (!ValidationUtil.isEmpty(danger.getStructureId()) && !ValidationUtil.isEmpty(finalBuildingAbsolutePositionMap.get(danger.getStructureId().toString()))) {
danger.setStructureName(finalBuildingAbsolutePositionMap.get(danger.getStructureId().toString()).toString());
......
......@@ -9,6 +9,8 @@ import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
......@@ -25,6 +27,8 @@ import java.util.List;
@Component
public class EnumFillAop {
private static final Logger logger = LoggerFactory.getLogger(EnumFillAop.class);
@Autowired
RedisUtils redisUtils;
......@@ -39,19 +43,27 @@ public class EnumFillAop {
@Before("fillEnum()")
public void doBefore(JoinPoint joinPoint) {
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
// 获取隐患等级枚举
synchronized (this) {
// 获取隐患等级枚举
if (ValidationUtil.isEmpty(LatentDangerLevelEnum.supervisionDangerLevelEnumMap)) {
List<DictionarieValueModel> dicResult =
Systemctl.dictionarieClient.dictValues(bizType + LatentDangerLevelEnum.dictCode).getResult();
dicResult.forEach(dic -> LatentDangerLevelEnum.addEnumDynamic(dic.getDictDataDesc(), dic.getDictDataValue(), dic.getDictDataKey(),
"", dic.getOrderNum()));
try {
List<DictionarieValueModel> dicResult =
Systemctl.dictionarieClient.dictValues(bizType + LatentDangerLevelEnum.dictCode).getResult();
dicResult.forEach(dic -> LatentDangerLevelEnum.addEnumDynamic(dic.getDictDataDesc(), dic.getDictDataValue(), dic.getDictDataKey(),
"", dic.getOrderNum()));
} catch (Exception e) {
logger.debug(e.getMessage());
}
}
// 获取治理方式枚举
if (ValidationUtil.isEmpty(LatentDangerReformTypeEnum.supervisionReformTypeEnumMap)) {
List<DictionarieValueModel> dicResult =
Systemctl.dictionarieClient.dictValues(bizType + LatentDangerReformTypeEnum.dictCode).getResult();
dicResult.forEach(dic -> LatentDangerReformTypeEnum.addEnumDynamic(dic.getDictDataDesc(), dic.getDictDataValue(), dic.getDictDataKey()));
try {
if (ValidationUtil.isEmpty(LatentDangerReformTypeEnum.supervisionReformTypeEnumMap)) {
List<DictionarieValueModel> dicResult =
Systemctl.dictionarieClient.dictValues(bizType + LatentDangerReformTypeEnum.dictCode).getResult();
dicResult.forEach(dic -> LatentDangerReformTypeEnum.addEnumDynamic(dic.getDictDataDesc(), dic.getDictDataValue(), dic.getDictDataKey()));
}
} catch (Exception e) {
logger.debug(e.getMessage());
}
}
// 获取治理状态枚举
......
......@@ -81,6 +81,7 @@ public class AsyncTask {
if (pointName != null) {
body += "关联检查点:" + pointName + TAB;
}
body = body.replaceAll(null, "").replaceAll("null", "");
saveAndSendMsg(orgCode, informerList, msgTypeEnum.getTitle(), body, msgTypeEnum.getMsgType(), latentDangerId, state, "");
}
......
......@@ -184,6 +184,7 @@ public class AsyncTask {
if (pointName != null) {
body += "关联检查点:" + pointName + TAB;
}
body = body.replaceAll(null, "").replaceAll("null", "");
saveAndSendMsg(orgCode, informerList, msgTypeEnum.getTitle(), body, msgTypeEnum.getMsgType(), latentDangerId, state,"");
}
......
......@@ -155,6 +155,7 @@ public class AsyncTask {
if (pointName != null) {
body += "关联检查点:" + pointName + TAB;
}
body = body.replaceAll(null, "").replaceAll("null", "");
saveAndSendMsg(orgCode, informerList, msgTypeEnum.getTitle(), body, msgTypeEnum.getMsgType(), latentDangerId, taskId, state,"");
}
......
......@@ -3,6 +3,7 @@ package com.yeejoin.amos.supervision.business.dto;
import lombok.Data;
import java.util.Date;
import java.util.List;
/**
* @author DELL
......@@ -84,4 +85,9 @@ public class HiddenDangerDto {
* 检查项名称
*/
private String inputItemName;
/**
* 隐患图片
*/
private List<String> photoUrl;
}
......@@ -45,4 +45,13 @@ public interface JCSFeignClient {
*/
@RequestMapping(value = "jcs/org-usr/amos/companyIds", method = RequestMethod.GET)
FeignClientResult<Map<String, Integer>> getDeptCountByCompanyIds(@RequestParam("companyIdList") List<String> companyIdList);
/**
* 根据机场单位id获取单位详情
*
* @param companyId 机场单位id
* @return
*/
@RequestMapping(value = "jcs/org-usr/getUnit/{id}", method = RequestMethod.GET)
FeignClientResult<Map<String, Object>> getCompanyById(@PathVariable("id") String companyId);
}
......@@ -22,6 +22,7 @@ import com.yeejoin.amos.supervision.business.dto.HiddenDangerExportDataDto;
import com.yeejoin.amos.supervision.business.dto.HiddenDangerImportDto;
import com.yeejoin.amos.supervision.business.dto.HiddenDangerTemplateDto;
import com.yeejoin.amos.supervision.business.feign.DangerFeignClient;
import com.yeejoin.amos.supervision.business.feign.JCSFeignClient;
import com.yeejoin.amos.supervision.business.service.intfc.IHiddenDangerService;
import com.yeejoin.amos.supervision.common.enums.CheckTypeSuEnum;
import com.yeejoin.amos.supervision.common.enums.DangerCheckTypeLevelEnum;
......@@ -38,6 +39,7 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.exception.instance.DataNotFound;
import javax.servlet.http.HttpServletResponse;
......@@ -87,6 +89,9 @@ public class HiddenDangerServiceImpl implements IHiddenDangerService {
@Autowired
IPointDao iPointDao;
@Autowired
JCSFeignClient jcsFeignClient;
@Override
public List<HiddenDangerExportDataDto> listAll(String planId, Long pointId, String level, String status) {
//1.查询指定计划和公司的关联隐患数据
......@@ -283,12 +288,21 @@ public class HiddenDangerServiceImpl implements IHiddenDangerService {
result.put("bizId", hiddenDangerDto.getCheckInputId());
result.put("bizName", hiddenDangerDto.getInputItemName());
result.put("routeId", plan.getRouteId());
result.put("accompanyingUserId", plan.getLeadPeopleIds());
result.put("accompanyingUserName", plan.getLeadPeopleNames());
result.put("accompanyingUserId", plan.getLeadPeopleIds()); // 检查陪同人id
result.put("accompanyingUserName", plan.getLeadPeopleNames()); // 检查陪同人名称
result.put("checkUnitId",plan.getCheckUnitId());
result.put("checkUnitName",plan.getCheckUnitName());
result.put("leadPeopleId", plan.getLeadPeopleIds());
result.put("leadPeopleName", plan.getLeadPeopleNames());
result.put("leadPeopleId", plan.getLeadPeopleIds()); // 牵头人id
result.put("leadPeopleName", plan.getLeadPeopleNames()); // 牵头人名称
result.put("makerUserId", plan.getMakerUserId()); // 计划制定人id
result.put("makerUserName", plan.getMakerUserName()); // 计划制定人名称
result.put("userId", plan.getUserId()); // 检查参与人id
result.put("userIdName", plan.getUserName()); // 检查参与人名称
// 将机场单位bizOrgCode保存起来用于按机场单位数据过滤
FeignClientResult<Map<String, Object>> companyResult = jcsFeignClient.getCompanyById(point.getOriginalId());
if (!ValidationUtil.isEmpty(companyResult)) {
result.put("bizOrgCode", companyResult.getResult().get("bizOrgCode"));
}
this.buildCheckInfo(result, hiddenDangerDto.getCheckInputId());
return result;
}
......
......@@ -1218,7 +1218,15 @@ public class PointServiceImpl implements IPointService {
}
List<DangerDto> dangerDtoList = listFeignClientResult.getResult();
if (!ObjectUtils.isEmpty(dangerDtoList)) {
collect = dangerDtoList.stream().collect(Collectors.groupingBy(DangerDto::getBizId, Collectors.toList()));
dangerDtoList.forEach(dangerDto -> {
List<String> photoUrl = Lists.newArrayList();
if (!ValidationUtil.isEmpty(dangerDto.getPhotoUrls())) {
photoUrl = Arrays.asList(dangerDto.getPhotoUrls().split(","));
}
dangerDto.setPhotoUrl(photoUrl);
});
collect = dangerDtoList.stream().collect(Collectors.groupingBy(DangerDto::getBizId,
Collectors.toList()));
}
}
......
......@@ -7,8 +7,10 @@ import com.yeejoin.amos.boot.module.tzs.api.dto.MaintenanceUnitDto;
import com.yeejoin.amos.boot.module.tzs.api.entity.Elevator;
import com.yeejoin.amos.boot.module.tzs.api.entity.MaintenanceUnit;
import com.yeejoin.amos.boot.module.tzs.flc.api.dto.EquipmentDto;
import com.yeejoin.amos.boot.module.tzs.flc.api.dto.EquipmentInformDto;
import com.yeejoin.amos.boot.module.tzs.flc.api.dto.UnitInfoDto;
import com.yeejoin.amos.boot.module.tzs.flc.api.entity.Equipment;
import com.yeejoin.amos.boot.module.tzs.flc.api.entity.EquipmentInform;
import com.yeejoin.amos.boot.module.tzs.flc.api.entity.UnitInfo;
import com.yeejoin.amos.boot.module.tzs.flc.api.enums.EquipmentStatusEnum;
import com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel;
......@@ -302,4 +304,7 @@ public class BeanDtoVoUtils {
}
});
}
}
\ No newline at end of file
package com.yeejoin.amos.boot.module.tzs.flc.biz.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RestController;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import java.util.List;
import com.yeejoin.amos.boot.module.tzs.flc.biz.service.impl.EquipmentIndexInformServiceImpl;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import org.springframework.beans.factory.annotation.Autowired;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.tzs.flc.api.dto.EquipmentIndexInformDto;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
/**
* 设备指标
*
* @author system_generator
* @date 2021-12-29
*/
@RestController
@Api(tags = "设备指标Api")
@RequestMapping(value = "/equipment-index-inform")
public class EquipmentIndexInformController extends BaseController {
@Autowired
EquipmentIndexInformServiceImpl equipmentIndexInformServiceImpl;
/**
* 新增设备指标
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/save")
@ApiOperation(httpMethod = "POST", value = "新增设备指标", notes = "新增设备指标")
public ResponseModel<EquipmentIndexInformDto> save(@RequestBody EquipmentIndexInformDto model) {
model = equipmentIndexInformServiceImpl.createWithModel(model);
return ResponseHelper.buildResponse(model);
}
/**
* 根据sequenceNbr更新
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PutMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新设备指标", notes = "根据sequenceNbr更新设备指标")
public ResponseModel<EquipmentIndexInformDto> updateBySequenceNbrEquipmentIndexInform(@RequestBody EquipmentIndexInformDto model,@PathVariable(value = "sequenceNbr") Long sequenceNbr) {
model.setSequenceNbr(sequenceNbr);
return ResponseHelper.buildResponse(equipmentIndexInformServiceImpl.updateWithModel(model));
}
/**
* 根据sequenceNbr删除
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@DeleteMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "DELETE", value = "根据sequenceNbr删除设备指标", notes = "根据sequenceNbr删除设备指标")
public ResponseModel<Boolean> deleteBySequenceNbr(HttpServletRequest request, @PathVariable(value = "sequenceNbr") Long sequenceNbr){
return ResponseHelper.buildResponse(equipmentIndexInformServiceImpl.removeById(sequenceNbr));
}
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "GET",value = "根据sequenceNbr查询单个设备指标", notes = "根据sequenceNbr查询单个设备指标")
public ResponseModel<EquipmentIndexInformDto> selectOne(@PathVariable Long sequenceNbr) {
return ResponseHelper.buildResponse(equipmentIndexInformServiceImpl.queryBySeq(sequenceNbr));
}
/**
* 列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/page")
@ApiOperation(httpMethod = "GET",value = "设备指标分页查询", notes = "设备指标分页查询")
public ResponseModel<Page<EquipmentIndexInformDto>> queryForPage(@RequestParam(value = "current") int current,@RequestParam
(value = "size") int size) {
Page<EquipmentIndexInformDto> page = new Page<EquipmentIndexInformDto>();
page.setCurrent(current);
page.setSize(size);
return ResponseHelper.buildResponse(equipmentIndexInformServiceImpl.queryForEquipmentIndexInformPage(page));
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "设备指标列表全部数据查询", notes = "设备指标列表全部数据查询")
@GetMapping(value = "/list")
public ResponseModel<List<EquipmentIndexInformDto>> selectForList() {
return ResponseHelper.buildResponse(equipmentIndexInformServiceImpl.queryForEquipmentIndexInformList());
}
}
package com.yeejoin.amos.boot.module.tzs.flc.biz.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RestController;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import java.util.List;
import com.yeejoin.amos.boot.module.tzs.flc.biz.service.impl.InformProcessInfoServiceImpl;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import org.springframework.beans.factory.annotation.Autowired;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.tzs.flc.api.dto.InformProcessInfoDto;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
/**
* 通话记录附件
*
* @author system_generator
* @date 2021-12-27
*/
@RestController
@Api(tags = "通话记录附件Api")
@RequestMapping(value = "/inform-process-info")
public class InformProcessInfoController extends BaseController {
@Autowired
InformProcessInfoServiceImpl informProcessInfoServiceImpl;
/**
* 新增通话记录附件
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/save")
@ApiOperation(httpMethod = "POST", value = "新增通话记录附件", notes = "新增通话记录附件")
public ResponseModel<InformProcessInfoDto> save(@RequestBody InformProcessInfoDto model) {
model = informProcessInfoServiceImpl.createWithModel(model);
return ResponseHelper.buildResponse(model);
}
/**
* 根据sequenceNbr更新
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PutMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新通话记录附件", notes = "根据sequenceNbr更新通话记录附件")
public ResponseModel<InformProcessInfoDto> updateBySequenceNbrInformProcessInfo(@RequestBody InformProcessInfoDto model,@PathVariable(value = "sequenceNbr") Long sequenceNbr) {
model.setSequenceNbr(sequenceNbr);
return ResponseHelper.buildResponse(informProcessInfoServiceImpl.updateWithModel(model));
}
/**
* 根据sequenceNbr删除
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@DeleteMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "DELETE", value = "根据sequenceNbr删除通话记录附件", notes = "根据sequenceNbr删除通话记录附件")
public ResponseModel<Boolean> deleteBySequenceNbr(HttpServletRequest request, @PathVariable(value = "sequenceNbr") Long sequenceNbr){
return ResponseHelper.buildResponse(informProcessInfoServiceImpl.removeById(sequenceNbr));
}
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "GET",value = "根据sequenceNbr查询单个通话记录附件", notes = "根据sequenceNbr查询单个通话记录附件")
public ResponseModel<InformProcessInfoDto> selectOne(@PathVariable Long sequenceNbr) {
return ResponseHelper.buildResponse(informProcessInfoServiceImpl.queryBySeq(sequenceNbr));
}
/**
* 列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/page")
@ApiOperation(httpMethod = "GET",value = "通话记录附件分页查询", notes = "通话记录附件分页查询")
public ResponseModel<Page<InformProcessInfoDto>> queryForPage(@RequestParam(value = "current") int current,@RequestParam
(value = "size") int size) {
Page<InformProcessInfoDto> page = new Page<InformProcessInfoDto>();
page.setCurrent(current);
page.setSize(size);
return ResponseHelper.buildResponse(informProcessInfoServiceImpl.queryForInformProcessInfoPage(page));
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "通话记录附件列表全部数据查询", notes = "通话记录附件列表全部数据查询")
@GetMapping(value = "/list")
public ResponseModel<List<InformProcessInfoDto>> selectForList() {
return ResponseHelper.buildResponse(informProcessInfoServiceImpl.queryForInformProcessInfoList());
}
}
......@@ -10,6 +10,7 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr;
import com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl;
import com.yeejoin.amos.boot.module.tzs.api.enums.TzsCommonParam;
import com.yeejoin.amos.boot.module.tzs.biz.service.impl.TzsAuthServiceImpl;
import com.yeejoin.amos.boot.module.tzs.biz.utils.BeanDtoVoUtils;
import com.yeejoin.amos.boot.module.tzs.flc.api.dto.UnitInfoApproveDto;
......@@ -463,10 +464,22 @@ public class UnitInfoController extends BaseController {
* 获取使用单位列表
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/getUseUnit")
@ApiOperation(httpMethod = "GET", value = "获取使用单位列表", notes = "获取使用单位列表")
public ResponseModel<List<UnitInfoDto>> getUseUnit() {
List<UnitInfoDto> result = unitInfoServiceImpl.getUseUnit();
@PostMapping(value = "/getUseUnit")
@ApiOperation(httpMethod = "POST", value = "获取使用单位列表", notes = "获取使用单位列表")
public ResponseModel<List<UnitInfoDto>> getUseUnit(@RequestBody UnitInfoDto model) {
List<UnitInfoDto> result = unitInfoServiceImpl.getUseUnit(model.getUnitType(),model.getAddress(),model.getOrgName(),model.getOrganizationCode());
return ResponseHelper.buildResponse(result);
}
/**
* 获取所有单位列表
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/getAllUnit")
@ApiOperation(httpMethod = "GET", value = "获取所有单位列表", notes = "获取所有单位列表")
public ResponseModel<List<UnitInfoDto>> getAllUnit() {
List<UnitInfoDto> result = unitInfoServiceImpl.getAllUnit();
return ResponseHelper.buildResponse(result);
}
......
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