Commit 10e3eebf authored by chenhao's avatar chenhao

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

parents ec860e9c c02647f3
...@@ -104,6 +104,63 @@ public class TreeParser { ...@@ -104,6 +104,63 @@ public class TreeParser {
return resultList; return resultList;
} }
public static List<Menu> getTreeTeam(Long topId, @SuppressWarnings("rawtypes") Collection entityList, String packageURL, String IDMethodName, int IDHierarchy, String NAMEMethodName, String PARENTIDMethodName, List<FirefightersTreeDto> list,String treeCode) throws Exception {
List<Menu> resultList = new ArrayList<>();
@SuppressWarnings("rawtypes")
Class clazz = Class.forName(packageURL);
Method IDMethodNameme = null;
switch (IDHierarchy) {
case 1:
IDMethodNameme = clazz.getDeclaredMethod(IDMethodName);
break;
case 2:
IDMethodNameme = clazz.getSuperclass().getDeclaredMethod(IDMethodName);
break;
case 3:
IDMethodNameme = clazz.getSuperclass().getSuperclass().getDeclaredMethod(IDMethodName);
break;
default:
IDMethodNameme = clazz.getDeclaredMethod(IDMethodName);
break;
}
Method NAMEMethodNameme = clazz.getDeclaredMethod(NAMEMethodName);
Method PARENTIDMethodNameme = clazz.getDeclaredMethod(PARENTIDMethodName);
//获取顶层元素集合
Long parentId;
for (Object ob : entityList) {
Object entity = clazz.cast(ob);
parentId = PARENTIDMethodNameme.invoke(entity) != null ? Long.valueOf(String.valueOf(PARENTIDMethodNameme.invoke(entity))) : null;
if (parentId == null ) {//陈浩2021-12-01修改 topId == parentId 的判断
String codeString = String.valueOf(IDMethodNameme.invoke(entity));
Integer num = 0;
if (list != null && list.size() > 0) {
for (FirefightersTreeDto map : list) {
if (null != map.getJobTitleCode() && map.getJobTitleCode().equals(codeString)) {
num = Integer.valueOf((String) map.getNum());
break;
}
}
;
}
Menu menu = new Menu(Long.valueOf(codeString), String.valueOf(NAMEMethodNameme.invoke(entity)), parentId, num);
resultList.add(menu);
}
}
//获取每个顶层元素的子数据集合
for (Menu entity : resultList) {
entity.setChildren(getSub(entity.getId(), entityList, packageURL, IDMethodName, IDHierarchy, NAMEMethodName, PARENTIDMethodName, list,treeCode));
}
return resultList;
}
/** /**
* 获取子数据集合 * 获取子数据集合
*/ */
......
...@@ -86,4 +86,5 @@ public class FireTeam extends BaseEntity { ...@@ -86,4 +86,5 @@ public class FireTeam extends BaseEntity {
@ApiModelProperty(value = "树结构层级code") @ApiModelProperty(value = "树结构层级code")
private String treeCode; private String treeCode;
} }
...@@ -377,10 +377,10 @@ FROM ...@@ -377,10 +377,10 @@ FROM
SELECT SELECT
Max( Max(
CASE CASE
WHEN cbd.field_code = 'administrativePositionCode' THEN WHEN cbd.field_code = 'positionType' THEN
cbd.field_value cbd.field_value
END END
) AS administrativePositionCode, ) AS positionType,
Max( Max(
CASE CASE
WHEN cbd.field_code = 'telephone' THEN WHEN cbd.field_code = 'telephone' THEN
...@@ -412,16 +412,16 @@ FROM ...@@ -412,16 +412,16 @@ FROM
biz_org_name = #{departmentName} and is_delete = 0 biz_org_name = #{departmentName} and is_delete = 0
) )
AND cou.biz_org_type = 'PERSON' AND cou.biz_org_type = 'PERSON' and is_delete = 0
) group by cbd.instance_id ) group by cbd.instance_id
) dd ) dd
LEFT JOIN cb_org_usr cour ON dd.instance_id = cour.sequence_nbr LEFT JOIN cb_org_usr cour ON dd.instance_id = cour.sequence_nbr
WHERE WHERE
<if test="positionType == null "> <if test="positionType == null ">
dd.administrativePositionCode IS NOT NULL dd.positionType IS NOT NULL
</if> </if>
<if test="positionType != null"> <if test="positionType != null">
dd.administrativePositionCode in dd.positionType in
<foreach collection="positionType" item="item" separator="," open="(" close=")" index=""> <foreach collection="positionType" item="item" separator="," open="(" close=")" index="">
#{item, jdbcType=NUMERIC} #{item, jdbcType=NUMERIC}
</foreach> </foreach>
......
...@@ -101,4 +101,12 @@ public class EquipmentSpecificIndex extends BaseEntity { ...@@ -101,4 +101,12 @@ public class EquipmentSpecificIndex extends BaseEntity {
@TableField(exist = false) @TableField(exist = false)
private String valueEnum; private String valueEnum;
@ApiModelProperty(value = "设备CODE")
@TableField(exist = false)
private String equipmentSpecificCode;
@ApiModelProperty(value = "设备所属系统ids")
@TableField(exist = false)
private String systemId;
} }
...@@ -111,6 +111,16 @@ public class CommonPageInfoParam extends CommonPageable { ...@@ -111,6 +111,16 @@ public class CommonPageInfoParam extends CommonPageable {
private String status; private String status;
private String isRemoveShield;
public void setIsRemoveShield(String isRemoveShield) {
this.isRemoveShield = isRemoveShield;
}
public String getIsRemoveShield() {
return isRemoveShield;
}
public void setCleanStatus(String cleanStatus) { public void setCleanStatus(String cleanStatus) {
this.cleanStatus = cleanStatus; this.cleanStatus = cleanStatus;
} }
......
...@@ -59,6 +59,8 @@ public class CommonPageParamUtil { ...@@ -59,6 +59,8 @@ public class CommonPageParamUtil {
param.setStatus(toString(queryRequests.get(i).getValue())); param.setStatus(toString(queryRequests.get(i).getValue()));
} else if("cleanStatus".equals(name)){ } else if("cleanStatus".equals(name)){
param.setCleanStatus(toString(queryRequests.get(i).getValue())); param.setCleanStatus(toString(queryRequests.get(i).getValue()));
} else if("isRemoveShield".equals(name)){
param.setIsRemoveShield(toString(queryRequests.get(i).getValue()));
} }
} }
if(commonPageable !=null){ if(commonPageable !=null){
......
...@@ -9,11 +9,14 @@ import lombok.Data; ...@@ -9,11 +9,14 @@ import lombok.Data;
@Data @Data
@ApiModel(description = "性能指标类") @ApiModel(description = "性能指标类")
public class SpeIndexVo { public class SpeIndexVo {
private String key;
private String name;
private String value;
private String typeCode; private String key = "";
private String name = "";
private String value = "";
private String typeCode = "";
private Long equipmentSpecificId; private Long equipmentSpecificId;
} }
...@@ -29,6 +29,7 @@ import com.yeejoin.amos.boot.module.common.api.service.IFireTeamService; ...@@ -29,6 +29,7 @@ import com.yeejoin.amos.boot.module.common.api.service.IFireTeamService;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.foundation.context.RequestContext; import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.exception.BaseException; import org.typroject.tyboot.core.foundation.exception.BaseException;
...@@ -65,6 +66,9 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire ...@@ -65,6 +66,9 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
@Autowired @Autowired
private RedisUtils redisUtils; private RedisUtils redisUtils;
@Value("${fire-rescue}")
private String fireRescueId;
/** /**
* 获取监控大队列表 * 获取监控大队列表
...@@ -494,16 +498,20 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire ...@@ -494,16 +498,20 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
LambdaQueryWrapper<FireTeam> queryWrapper = new LambdaQueryWrapper<FireTeam>(); LambdaQueryWrapper<FireTeam> queryWrapper = new LambdaQueryWrapper<FireTeam>();
queryWrapper.eq(FireTeam::getTypeCode, code); queryWrapper.eq(FireTeam::getTypeCode, code);
queryWrapper.eq(FireTeam::getIsDelete, false); queryWrapper.eq(FireTeam::getIsDelete, false);
queryWrapper.eq(FireTeam::getCompanyName, "消防救援保障部"); // queryWrapper.eq(FireTeam::getCompanyName, "消防急救保障部");
// 消防救援保障部为保证灵活性以及防止名字变更 通过id查询 ID在配置文件中配置
queryWrapper.eq(FireTeam::getCompany,fireRescueId);
LambdaQueryWrapper<FireTeam> queryWrapper1 = new LambdaQueryWrapper<FireTeam>(); LambdaQueryWrapper<FireTeam> queryWrapper1 = new LambdaQueryWrapper<FireTeam>();
queryWrapper1.eq(FireTeam::getIsDelete, false); queryWrapper1.eq(FireTeam::getIsDelete, false);
queryWrapper1.eq(FireTeam::getCompanyName, "消防救援保障部"); // queryWrapper1.eq(FireTeam::getCompanyName, "消防急救保障部");
queryWrapper1.eq(FireTeam::getCompany,fireRescueId);
queryWrapper1.isNull(FireTeam::getParent); queryWrapper1.isNull(FireTeam::getParent);
queryWrapper1.eq(FireTeam::getTypeCode,code);
FireTeam parentFireTeam = this.baseMapper.selectOne(queryWrapper1); FireTeam parentFireTeam = this.baseMapper.selectOne(queryWrapper1);
if (parentFireTeam == null) { if (parentFireTeam == null) {
return null; return null;
} }
return TreeParser.getTree(parentFireTeam.getSequenceNbr(), this.baseMapper.selectList(queryWrapper), FireTeam.class.getName(), "getSequenceNbr", 2, "getName", "getParent", return TreeParser.getTreeTeam(parentFireTeam.getSequenceNbr(), this.baseMapper.selectList(queryWrapper), FireTeam.class.getName(), "getSequenceNbr", 2, "getName", "getParent",
null,null); null,null);
// TODO Auto-generated method stub // TODO Auto-generated method stub
} }
......
...@@ -96,6 +96,7 @@ public class EquipmentAlarmController extends AbstractBaseController { ...@@ -96,6 +96,7 @@ public class EquipmentAlarmController extends AbstractBaseController {
@RequestParam(value = "buildIds", required = false) List<String> buildIds, @RequestParam(value = "buildIds", required = false) List<String> buildIds,
@RequestParam(value = "id", required = false) String id, @RequestParam(value = "id", required = false) String id,
@RequestParam(value = "cleanStatus", required = false) String cleanStatus, @RequestParam(value = "cleanStatus", required = false) String cleanStatus,
@RequestParam(value = "isRemoveShield", required = false) String isRemoveShield,
CommonPageable commonPageable) { CommonPageable commonPageable) {
if (commonPageable.getPageNumber() == 0) { if (commonPageable.getPageNumber() == 0) {
commonPageable.setPageNumber(1); commonPageable.setPageNumber(1);
...@@ -148,7 +149,11 @@ public class EquipmentAlarmController extends AbstractBaseController { ...@@ -148,7 +149,11 @@ public class EquipmentAlarmController extends AbstractBaseController {
CommonRequest request11 = new CommonRequest(); CommonRequest request11 = new CommonRequest();
request11.setName("cleanStatus"); request11.setName("cleanStatus");
request11.setValue(StringUtil.isNotEmpty(cleanStatus) ? StringUtils.trimToNull(cleanStatus) : null); request11.setValue(StringUtil.isNotEmpty(cleanStatus) ? StringUtils.trimToNull(cleanStatus) : null);
queryRequests.add(request11); queryRequests.add(request1);
CommonRequest request12 = new CommonRequest();
request12.setName("isRemoveShield");
request12.setValue(StringUtil.isNotEmpty(isRemoveShield) ? StringUtils.trimToNull(isRemoveShield) : null);
queryRequests.add(request12);
CommonPageInfoParam param = CommonPageParamUtil.fillCommonPageInfoParam(queryRequests, commonPageable); CommonPageInfoParam param = CommonPageParamUtil.fillCommonPageInfoParam(queryRequests, commonPageable);
Page<Map<String, Object>> list = iEquipmentSpecificAlarmService.listPage(param); Page<Map<String, Object>> list = iEquipmentSpecificAlarmService.listPage(param);
return CommonResponseUtil.success(list); return CommonResponseUtil.success(list);
...@@ -209,7 +214,7 @@ public class EquipmentAlarmController extends AbstractBaseController { ...@@ -209,7 +214,7 @@ public class EquipmentAlarmController extends AbstractBaseController {
@RequestParam(value = "alarmType", required = false) String alarmType, @RequestParam(value = "alarmType", required = false) String alarmType,
@RequestParam(value = "systemCode", required = false) String systemCode, @RequestParam(value = "systemCode", required = false) String systemCode,
@RequestParam(value = "buildId", required = false) String buildId, @RequestParam(value = "buildId", required = false) String buildId,
// @RequestParam(value = "equipmentCode", required = false) String equipmentCode, @RequestParam(value = "isRemoveShield", required = false) String isRemoveShield,
@RequestParam(value = "id", required = false) String id, @RequestParam(value = "id", required = false) String id,
@RequestParam(value = "cleanStatus", required = false) String cleanStatus, @RequestParam(value = "cleanStatus", required = false) String cleanStatus,
CommonPageable commonPageable) { CommonPageable commonPageable) {
...@@ -255,6 +260,10 @@ public class EquipmentAlarmController extends AbstractBaseController { ...@@ -255,6 +260,10 @@ public class EquipmentAlarmController extends AbstractBaseController {
request11.setName("cleanStatus"); request11.setName("cleanStatus");
request11.setValue(StringUtil.isNotEmpty(cleanStatus) ? StringUtils.trimToNull(cleanStatus) : null); request11.setValue(StringUtil.isNotEmpty(cleanStatus) ? StringUtils.trimToNull(cleanStatus) : null);
queryRequests.add(request11); queryRequests.add(request11);
CommonRequest request12 = new CommonRequest();
request12.setName("isRemoveShield");
request12.setValue(StringUtil.isNotEmpty(isRemoveShield) ? StringUtils.trimToNull(isRemoveShield) : null);
queryRequests.add(request12);
CommonPageInfoParam param = CommonPageParamUtil.fillCommonPageInfoParam(queryRequests, commonPageable); CommonPageInfoParam param = CommonPageParamUtil.fillCommonPageInfoParam(queryRequests, commonPageable);
org.springframework.data.domain.Page<AlarmListDataVO> list = iEquipmentSpecificAlarmService.listAlarmsPage(param); org.springframework.data.domain.Page<AlarmListDataVO> list = iEquipmentSpecificAlarmService.listAlarmsPage(param);
return CommonResponseUtil.success(list); return CommonResponseUtil.success(list);
......
...@@ -547,7 +547,19 @@ public class FireFightingSystemController extends AbstractBaseController { ...@@ -547,7 +547,19 @@ public class FireFightingSystemController extends AbstractBaseController {
/** /**
* 设备报警信息 * 获取点位图,区域树数据
*/
//重复接口及地址 影响项目启动 若后续有问题需要使用 更改接口地址
/*@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "获取点位图,区域树数据", notes = "消防系统点位图使用")
@GetMapping(value = "/point/tree")
public List<PointTreeVo> getPointTree(@RequestParam(required = false) String systemId) {
return fireFightingSystemService.getPointTree(systemId, getOrgCode());
}
*/
/**
* 设备指标数据查询
* *
* @param id * @param id
* @return * @return
......
...@@ -341,7 +341,7 @@ public class EquipmentServiceImpl extends ServiceImpl<EquipmentMapper, Equipment ...@@ -341,7 +341,7 @@ public class EquipmentServiceImpl extends ServiceImpl<EquipmentMapper, Equipment
equipmentApp.setEquipmentBase(equipmentBaseApp); equipmentApp.setEquipmentBase(equipmentBaseApp);
//技术文档 //技术文档
QueryWrapper<UploadFile> excelQueryWrapper = new QueryWrapper<>(); QueryWrapper<UploadFile> excelQueryWrapper = new QueryWrapper<>();
excelQueryWrapper.eq("object_id", equipmentBaseApp.getEquipId()); excelQueryWrapper.eq("object_id", equipmentBaseApp.getEquipDetailId());
excelQueryWrapper.eq("file_type", "instruction"); excelQueryWrapper.eq("file_type", "instruction");
List<UploadFile> uploadFiles1 = uploadFileMapper.selectList(excelQueryWrapper); List<UploadFile> uploadFiles1 = uploadFileMapper.selectList(excelQueryWrapper);
for (UploadFile s : uploadFiles1) { for (UploadFile s : uploadFiles1) {
......
...@@ -541,7 +541,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al ...@@ -541,7 +541,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
smsParams.put("callTimeStr", calledRo.getCallTimeStr()); smsParams.put("callTimeStr", calledRo.getCallTimeStr());
smsParams.put("address", calledRo.getAddress()); smsParams.put("address", calledRo.getAddress());
smsParams.put("fireLocation", calledRo.getFireLocation()); smsParams.put("fireLocation", calledRo.getFireLocation());
smsParams.put("endTimeStr", DateUtils.convertDateToString(alertCalled.getUpdateTime(),DateUtils.DATE_TIME_PATTERN)); smsParams.put("endTimeStr", alertCalled.getUpdateTime() != null ? DateUtils.convertDateToString(alertCalled.getUpdateTime(),DateUtils.DATE_TIME_PATTERN) : "");
smsParams.put("burningMaterial", calledRo.getBurningMaterial()); smsParams.put("burningMaterial", calledRo.getBurningMaterial());
smsParams.put("fireSituation", calledRo.getFireSituation()); smsParams.put("fireSituation", calledRo.getFireSituation());
smsParams.put("trappedNum", calledRo.getTrappedNum()); smsParams.put("trappedNum", calledRo.getTrappedNum());
...@@ -1442,8 +1442,10 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al ...@@ -1442,8 +1442,10 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
String [] groupCode = jsonObject1.getString("fireBrigade").split(","); String [] groupCode = jsonObject1.getString("fireBrigade").split(",");
List<String> positionType= Arrays.asList(groupCode); List<String> positionType= Arrays.asList(groupCode);
if (jsonObject1.containsKey("fireBrigade")) { { if (jsonObject1.containsKey("fireBrigade")) { {
LambdaQueryWrapper<OrgUsr> queryWrapper = new LambdaQueryWrapper<OrgUsr>();
List<Map<String, Object>> mapList = dynamicFormInstanceMapper.getFireRescueDepartmentStaff(fireTeam.getCompanyName(),positionType); queryWrapper.eq(OrgUsr::getBizOrgCode, fireTeam.getBizOrgCode());
OrgUsr one = orgUsrService.getOne(queryWrapper);
List<Map<String, Object>> mapList = dynamicFormInstanceMapper.getFireRescueDepartmentStaff(one.getBizOrgName(),positionType);
sendUserIds.addAll(mapList); sendUserIds.addAll(mapList);
} }
if(jsonObject1.containsKey("onDuty")) { if(jsonObject1.containsKey("onDuty")) {
......
...@@ -10,6 +10,7 @@ import com.yeejoin.amos.boot.module.common.api.dto.OrgMenuDto; ...@@ -10,6 +10,7 @@ import com.yeejoin.amos.boot.module.common.api.dto.OrgMenuDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgPersonDto; import com.yeejoin.amos.boot.module.common.api.dto.OrgPersonDto;
import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr; 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.common.biz.service.impl.OrgUsrServiceImpl;
import com.yeejoin.amos.boot.module.common.biz.utils.CommonResponseUtil;
import com.yeejoin.amos.boot.module.tzs.flc.api.dto.UnitInfoDto; import com.yeejoin.amos.boot.module.tzs.flc.api.dto.UnitInfoDto;
import com.yeejoin.amos.boot.module.tzs.flc.api.dto.UnitPersonInfoDto; import com.yeejoin.amos.boot.module.tzs.flc.api.dto.UnitPersonInfoDto;
import com.yeejoin.amos.boot.module.tzs.flc.api.entity.UnitInfo; import com.yeejoin.amos.boot.module.tzs.flc.api.entity.UnitInfo;
...@@ -90,11 +91,15 @@ public class UnitPersonController extends BaseController { ...@@ -90,11 +91,15 @@ public class UnitPersonController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/save", method = RequestMethod.POST) @RequestMapping(value = "/save", method = RequestMethod.POST)
@ApiOperation(httpMethod = "POST", value = "新增人员信息", notes = "新增人员信息") @ApiOperation(httpMethod = "POST", value = "新增人员信息", notes = "新增人员信息")
public ResponseModel<?> saveOrgUsr(@RequestBody UnitPersonInfoDto unitPersonInfoDto) { public ResponseModel saveOrgUsr(@RequestBody UnitPersonInfoDto unitPersonInfoDto) {
if (ValidationUtil.isEmpty(unitPersonInfoDto.getParentId())) { if (ValidationUtil.isEmpty(unitPersonInfoDto.getParentId())) {
throw new BadRequest("参数校验失败."); throw new BadRequest("参数校验失败.");
} }
return ResponseHelper.buildResponse( iUnitPersonService.saveUser(unitPersonInfoDto)); try {
return CommonResponseUtil.success( iUnitPersonService.saveUser(unitPersonInfoDto));
} catch (Exception e) {
return CommonResponseUtil.failure(e.getMessage());
}
} }
/** /**
......
package com.yeejoin.amos.boot.module.tzs.flc.biz.service.impl; package com.yeejoin.amos.boot.module.tzs.flc.biz.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.constants.CommonConstant; import com.yeejoin.amos.boot.biz.common.constants.CommonConstant;
...@@ -18,13 +16,10 @@ import com.yeejoin.amos.boot.module.common.api.dto.OrgPersonDto; ...@@ -18,13 +16,10 @@ import com.yeejoin.amos.boot.module.common.api.dto.OrgPersonDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgPersonFormDto; import com.yeejoin.amos.boot.module.common.api.dto.OrgPersonFormDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgUsrDto; import com.yeejoin.amos.boot.module.common.api.dto.OrgUsrDto;
import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr; import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr;
import com.yeejoin.amos.boot.module.common.api.enums.OrgPersonEnum;
import com.yeejoin.amos.boot.module.common.api.mapper.OrgUsrMapper;
import com.yeejoin.amos.boot.module.common.api.service.ISourceFileService; import com.yeejoin.amos.boot.module.common.api.service.ISourceFileService;
import com.yeejoin.amos.boot.module.common.biz.service.impl.DynamicFormColumnServiceImpl; import com.yeejoin.amos.boot.module.common.biz.service.impl.DynamicFormColumnServiceImpl;
import com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl; import com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl;
import com.yeejoin.amos.boot.module.common.biz.service.impl.SourceFileServiceImpl; import com.yeejoin.amos.boot.module.common.biz.service.impl.SourceFileServiceImpl;
import com.yeejoin.amos.boot.module.tzs.api.entity.Elevator;
import com.yeejoin.amos.boot.module.tzs.api.enums.TzsCommonParam; import com.yeejoin.amos.boot.module.tzs.api.enums.TzsCommonParam;
import com.yeejoin.amos.boot.module.tzs.flc.api.dto.PersonEducationDto; import com.yeejoin.amos.boot.module.tzs.flc.api.dto.PersonEducationDto;
import com.yeejoin.amos.boot.module.tzs.flc.api.dto.PersonQualityDto; import com.yeejoin.amos.boot.module.tzs.flc.api.dto.PersonQualityDto;
...@@ -41,7 +36,6 @@ import com.yeejoin.amos.feign.privilege.model.CompanyModel; ...@@ -41,7 +36,6 @@ import com.yeejoin.amos.feign.privilege.model.CompanyModel;
import com.yeejoin.amos.feign.privilege.model.RoleModel; import com.yeejoin.amos.feign.privilege.model.RoleModel;
import com.yeejoin.amos.feign.privilege.util.DesUtil; import com.yeejoin.amos.feign.privilege.util.DesUtil;
import com.yeejoin.amos.feign.systemctl.Systemctl; import com.yeejoin.amos.feign.systemctl.Systemctl;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
...@@ -213,7 +207,7 @@ public class UnitPersonServiceImpl implements IUnitPersonService { ...@@ -213,7 +207,7 @@ public class UnitPersonServiceImpl implements IUnitPersonService {
BeanUtils.copyProperties(result,unitPersonInfoDto); BeanUtils.copyProperties(result,unitPersonInfoDto);
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); throw new BadRequest(e.getMessage());
} }
return unitPersonInfoDto; return unitPersonInfoDto;
} }
......
...@@ -1181,7 +1181,7 @@ FROM ...@@ -1181,7 +1181,7 @@ FROM
LEFT JOIN wl_equipment_specific wes ON wes.id = wesi.equipment_specific_id LEFT JOIN wl_equipment_specific wes ON wes.id = wesi.equipment_specific_id
WHERE wesi.equipment_index_key = 'CAFS_FoamAirCompressor_Fault' WHERE wesi.equipment_index_key = 'CAFS_FoamAirCompressor_Fault'
AND wesi.`value` = 'true' AND wesi.`value` = 'true'
AND wes.equipment_code = '92030500MG644' AND wes.equipment_code = '92030700SFT44'
) AS kqysjgz, ) AS kqysjgz,
( (
SELECT SELECT
...@@ -4218,63 +4218,36 @@ ORDER BY ...@@ -4218,63 +4218,36 @@ ORDER BY
DROP VIEW IF EXISTS `v_fire_equip_realtime_status`; DROP VIEW IF EXISTS `v_fire_equip_realtime_status`;
CREATE ALGORITHM = UNDEFINED DEFINER = `root`@`%` SQL SECURITY DEFINER VIEW `v_fire_equip_realtime_status` AS CREATE ALGORITHM = UNDEFINED DEFINER = `root`@`%` SQL SECURITY DEFINER VIEW `v_fire_equip_realtime_status` AS
SELECT SELECT
temp.*, `wes`.`name` AS `equipName`,(
fs.`name` as 'fsname', CASE
fs.`code` as 'fscode', `wes`.`realtime_iot_index_value`
(SELECT
IFNULL(SUM(frequency), 0)
FROM
wl_equipment_alarm_report_day
WHERE
equipment_specific_id = temp.equipment_specific_id
AND report_date = CURRENT_DATE) as 'total'
FROM
(
SELECT
a.equipment_specific_name AS 'equipName',
(
CASE a.`value`
WHEN 'true' THEN WHEN 'true' THEN
concat( concat( `wes`.`realtime_iot_index_name`, '(是)' )
a.equipment_index_name,
'(是)'
)
WHEN 'false' THEN WHEN 'false' THEN
concat( concat( `wes`.`realtime_iot_index_name`, '(否)' ) ELSE concat( `wes`.`realtime_iot_index_name`, '(', `wes`.`realtime_iot_index_value`, ')' )
a.equipment_index_name,
'(否)'
)
END END
) AS `nowStatus`, ) AS `nowStatus`,
a.equipment_specific_id, `wes`.`realtime_iot_index_update_date` AS `update_date`,(
a.update_date SELECT
group_concat( `fs`.`code` SEPARATOR ',' )
FROM FROM
wl_equipment_specific_index a, `f_fire_fighting_system` `fs`
WHERE
( (
0 <> find_in_set( `fs`.`id`, `wes`.`system_id` ))) AS `fscode`,(
SELECT SELECT
equipment_specific_id, group_concat( `fs`.`name` SEPARATOR ',' )
MAX(update_date) AS update_date
FROM FROM
wl_equipment_specific_index `f_fire_fighting_system` `fs`
GROUP BY
equipment_specific_id
) b
WHERE WHERE
a.`value` IS NOT NULL (
AND a.equipment_specific_id = b.equipment_specific_id 0 <> find_in_set( `fs`.`id`, `wes`.`system_id` ))) AS `fsname`
AND a.update_date = b.update_date FROM
GROUP BY `wl_equipment_specific` `wes`
a.equipment_specific_id WHERE
ORDER BY ( `wes`.`realtime_iot_es_index_id` IS NOT NULL )
a.update_date DESC ORDER BY
) temp, `wes`.`realtime_iot_index_update_date` DESC
wl_equipment_specific es
LEFT JOIN `f_fire_fighting_system` `fs` ON (
find_in_set(`fs`.`id`, es.system_id)
)
WHERE
temp.equipment_specific_id = es.id
ORDER BY temp.update_date DESC;
-- 系统信息视图 -- 系统信息视图
......
...@@ -109,11 +109,12 @@ ...@@ -109,11 +109,12 @@
<select id="getEquipmentAppMessage" resultMap="EquipmentAppMessage"> <select id="getEquipmentAppMessage" resultMap="EquipmentAppMessage">
SELECT DISTINCT SELECT DISTINCT
/*bug 4678 设备详情装备编码错误显示为装备定义的编码 修改原有代码 wled.code as equip_code 为wleq.code as equip_code*/
wle.id as equip_id, wle.id as equip_id,
wleq.id as equipmentSpecificId, wleq.id as equipmentSpecificId,
wleq.equipment_detail_id, wleq.equipment_detail_id,
wled.name as equip_name, wled.name as equip_name,
wled.code as equip_code, wleq.code as equip_code,
wled.expiry_date, wled.expiry_date,
wled.standard, wled.standard,
wlsd.name AS country, wlsd.name AS country,
......
...@@ -248,6 +248,9 @@ ...@@ -248,6 +248,9 @@
<if test="param.cleanStatus != null and param.cleanStatus != '' and param.cleanStatus == 2">AND <if test="param.cleanStatus != null and param.cleanStatus != '' and param.cleanStatus == 2">AND
d.cleanStatus = '未消除' d.cleanStatus = '未消除'
</if> </if>
<if test="param.isRemoveShield != null and param.isRemoveShield != ''">AND
d.type != 'SHIELD'
</if>
</where> </where>
ORDER BY d.createDate DESC ORDER BY d.createDate DESC
</select> </select>
...@@ -389,8 +392,10 @@ ...@@ -389,8 +392,10 @@
<if test="param.cleanStatus != null and param.cleanStatus != '' and param.cleanStatus == 2">AND <if test="param.cleanStatus != null and param.cleanStatus != '' and param.cleanStatus == 2">AND
d.cleanStatus = '未消除' d.cleanStatus = '未消除'
</if> </if>
<if test="param.isRemoveShield != null and param.isRemoveShield != ''">AND
d.type != 'SHIELD'
</if>
</where> </where>
ORDER BY d.createDate DESC ORDER BY d.createDate DESC
</select> </select>
<select id="getAlarmList" resultType="java.util.HashMap"> <select id="getAlarmList" resultType="java.util.HashMap">
......
...@@ -55,7 +55,9 @@ ...@@ -55,7 +55,9 @@
wesi.update_date AS updateDate, wesi.update_date AS updateDate,
ed.code AS equipmentCode, ed.code AS equipmentCode,
ed.equipment_id AS equipmentId, ed.equipment_id AS equipmentId,
ed.id AS equipmentDetailId ed.id AS equipmentDetailId,
wes.code as equipmentSpecificCode,
wes.system_id as systemId
FROM FROM
wl_equipment_specific_index AS wesi wl_equipment_specific_index AS wesi
LEFT JOIN wl_equipment_specific AS wes ON wes.id = wesi.equipment_specific_id LEFT JOIN wl_equipment_specific AS wes ON wes.id = wesi.equipment_specific_id
......
...@@ -334,21 +334,53 @@ ...@@ -334,21 +334,53 @@
p_point p p_point p
</select> </select>
<select id="getSpeIndex" resultType="com.yeejoin.equipmanage.common.vo.SpeIndexVo"> <select id="getSpeIndex" resultType="com.yeejoin.equipmanage.common.vo.SpeIndexVo">
select * from ( SELECT
select *
eqin.name_key as `key`, FROM
eqin.name as name, (
SELECT
eqin.name_key AS `key`,
eqin.`name` AS `name`,
eqin.type_code, eqin.type_code,
spein.update_date as updateDate, spein.update_date AS updateDate,
if (eqin.unit is null, spein.value,concat(spein.value,eqin.unit)) as value spein.equipment_specific_id as equipmentSpecificId,
from IF (
wl_equipment_specific_index as spein eqin.unit IS NULL,
left join wl_equipment_index as eqin on spein.equipment_index_id = eqin.id IF (
where (
ISNULL(spein.value_label)
OR spein.value_label = ''
),
spein.`value`,
spein.value_label
),
concat(
IF (
(
ISNULL(spein.value_label)
OR spein.value_label = ''
),
spein.`value`,
spein.value_label
),
' ',
eqin.unit
)
) AS `value`
FROM
wl_equipment_specific_index AS spein
LEFT JOIN wl_equipment_index AS eqin ON spein.equipment_index_id = eqin.id
WHERE
spein.equipment_specific_id = #{id} spein.equipment_specific_id = #{id}
order by eqin.sort_num) as dat ORDER BY
where `key` is not null and `key` != '' eqin.sort_num
ORDER BY dat.updateDate DESC ) AS dat
WHERE
`key` IS NOT NULL
AND `key` != ''
ORDER BY
dat.updateDate DESC
</select> </select>
<select id="getSpeIndexIn" resultType="com.yeejoin.equipmanage.common.vo.SpeIndexVo"> <select id="getSpeIndexIn" resultType="com.yeejoin.equipmanage.common.vo.SpeIndexVo">
select * from ( select * from (
......
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