Commit 377045ac authored by chenzhao's avatar chenzhao

修改代码

parent 86eee001
...@@ -1449,19 +1449,28 @@ public class CommandController extends BaseController { ...@@ -1449,19 +1449,28 @@ public class CommandController extends BaseController {
List<AlertFormValue> list = buildId == null ? null : iAlertFormValueService.getzqlist(id); List<AlertFormValue> list = buildId == null ? null : iAlertFormValueService.getzqlist(id);
if (list != null && list.size() > 0) { if (list != null && list.size() > 0) {
for (AlertFormValue alertFormValue : list) { for (AlertFormValue alertFormValue : list) {
if ("keySiteExcle".equals(alertFormValue.getFieldCode()) && alertFormValue.getFieldValue() != null) { if ("keySiteExcle".equals(alertFormValue.getFieldCode()) && alertFormValue.getFieldValue() != null && !alertFormValue.getFieldValue().equals("")) {
List<OrgMenuDto> list1 = new ArrayList<OrgMenuDto>(); List<OrgMenuDto> list1 = new ArrayList<OrgMenuDto>();
List<OrgMenuDto> children = new ArrayList<OrgMenuDto>(); List<OrgMenuDto> children = new ArrayList<OrgMenuDto>();
OrgMenuDto date = new OrgMenuDto(Long.valueOf(alertFormValue.getFieldValueCode()), Long.valueOf(alertFormValue.getFieldValueCode()), alertFormValue.getFieldValue(), alertFormValue.getFieldValue(), null); OrgMenuDto date = new OrgMenuDto(Long.valueOf(alertFormValue.getFieldValueCode()), Long.valueOf(alertFormValue.getFieldValueCode()), alertFormValue.getFieldValue(), alertFormValue.getFieldValue(), null);
children.add(date); /* children.add(date);
OrgMenuDto orgMenuDto = new OrgMenuDto(); OrgMenuDto orgMenuDto = new OrgMenuDto();
orgMenuDto.setKey(buildId); orgMenuDto.setKey(buildId);
orgMenuDto.setValue(buildId); orgMenuDto.setValue(buildId);
orgMenuDto.setChildren(children); orgMenuDto.setChildren(children);
orgMenuDto.setName(buildIdName); orgMenuDto.setName(buildIdName);
orgMenuDto.setTitle(buildIdName); orgMenuDto.setTitle(buildIdName);*/
list1.add(orgMenuDto); list1.add(date);
return ResponseHelper.buildResponse(list1); return ResponseHelper.buildResponse(list1);
}else {
List<KeySiteDto> keySiteDtos = keySiteService.queryForKeySiteList(null, null, null, null, null, bizOrgCode);
List<OrgMenuDto> result = new ArrayList<>();
keySiteDtos.stream().forEach(e->{
OrgMenuDto date = new OrgMenuDto(e.getSequenceNbr(), e.getSequenceNbr(), e.getName(), e.getName(), null);
result.add(date);
});
return ResponseHelper.buildResponse(result);
} }
} }
} }
......
...@@ -85,7 +85,7 @@ public class FireStationServiceImpl extends BaseService<FireStationDto, FireStat ...@@ -85,7 +85,7 @@ public class FireStationServiceImpl extends BaseService<FireStationDto, FireStat
public List<FireStationDto> queryList(Boolean isDelete, String bizOrgCode,Long bizCompanyId,String name){ public List<FireStationDto> queryList(Boolean isDelete, String bizOrgCode,Long bizCompanyId,String name){
LambdaQueryWrapper<FireStation> wrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<FireStation> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(BaseEntity::getIsDelete,isDelete); wrapper.eq(BaseEntity::getIsDelete,isDelete);
wrapper.eq(FireStation::getBizOrgCode,bizOrgCode); wrapper.like(FireStation::getBizOrgCode,bizOrgCode);
if (bizCompanyId != null){ if (bizCompanyId != null){
wrapper.eq(FireStation::getBizCompanyId,bizCompanyId); wrapper.eq(FireStation::getBizCompanyId,bizCompanyId);
} }
......
...@@ -283,7 +283,7 @@ public interface IBuilldService extends IService<Building> { ...@@ -283,7 +283,7 @@ public interface IBuilldService extends IService<Building> {
List<BuildingTreeAndEquipVO> gettreeAndEquip(); List<BuildingTreeAndEquipVO> gettreeAndEquip();
Map<String ,Object> getBuildDetaliByFloorId( String instanceId,String appKey, String product, String token); Map<String ,Object> getBuildDetaliByFloorId( String instanceId, String token,String appKey, String product);
/** /**
* 获取id与绝对位置对应的的map * 获取id与绝对位置对应的的map
......
...@@ -43,6 +43,7 @@ import org.springframework.stereotype.Service; ...@@ -43,6 +43,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.exception.BaseException; import org.typroject.tyboot.core.foundation.exception.BaseException;
import org.typroject.tyboot.core.foundation.utils.Bean; import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil; import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
...@@ -1145,7 +1146,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i ...@@ -1145,7 +1146,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
} }
@Override @Override
public Map<String, Object> getBuildDetaliByFloorId(String instanceId,String appKey, String product, String token) { public Map<String, Object> getBuildDetaliByFloorId(String instanceId, String token,String appKey, String product) {
List<DictionarieValueModel> build_type = Systemctl.dictionarieClient.dictValues(buildType).getResult(); List<DictionarieValueModel> build_type = Systemctl.dictionarieClient.dictValues(buildType).getResult();
Map<String, String> buildType = build_type.stream().collect(Collectors.toMap(DictionarieValueModel::getDictDataKey, DictionarieValueModel::getDictDataValue)); Map<String, String> buildType = build_type.stream().collect(Collectors.toMap(DictionarieValueModel::getDictDataKey, DictionarieValueModel::getDictDataValue));
...@@ -1159,14 +1160,17 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i ...@@ -1159,14 +1160,17 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
Map<Long, String> systems = system.stream().collect(Collectors.toMap(FireFightingSystemEntity::getId, FireFightingSystemEntity::getName)); Map<Long, String> systems = system.stream().collect(Collectors.toMap(FireFightingSystemEntity::getId, FireFightingSystemEntity::getName));
Map<String, String> idAndType = formInstanceMapper.getIdAndType(instanceId); Map<String, String> idAndType = formInstanceMapper.getIdAndType(instanceId);
String id = idAndType.get("id"); String id = instanceId;
String type = idAndType.get("type"); String type = idAndType.get("type");
String addr = idAndType.get("address"); String addr = idAndType.get("address");
Map<String, Object> map = iFormInstanceService.queryForMap(Long.valueOf(id)); Map<String, Object> map = iFormInstanceService.queryForMap(Long.valueOf(id));
String userId = String.valueOf(map.get("dutyUser")); String userId = String.valueOf(map.get("dutyUser"));
String dutyUser = ""; String dutyUser = "";
if (userId != null && !"".equals(userId)) { if (!"null".equals(userId)&&userId != null && !"".equals(userId)) {
RequestContext.setAppKey(appKey);
RequestContext.setToken(token);
RequestContext.setProduct(product);
ResponseModel<JSONObject> obj = jcsFeign.getUnitById(appKey,product,token,userId); ResponseModel<JSONObject> obj = jcsFeign.getUnitById(appKey,product,token,userId);
JSONObject result = obj.getResult(); JSONObject result = obj.getResult();
if (result.containsKey("bizOrgName")) { if (result.containsKey("bizOrgName")) {
...@@ -1181,7 +1185,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i ...@@ -1181,7 +1185,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
if ("building".equals(type)) { if ("building".equals(type)) {
list.add(new AlarmDataVO("建构筑名称", String.valueOf(map.get("name")), true)); list.add(new AlarmDataVO("建构筑名称", String.valueOf(map.get("name")), true));
list.add(new AlarmDataVO("责任人", dutyUser, false)); list.add(new AlarmDataVO("责任人", dutyUser, false));
list.add(new AlarmDataVO("责任人电话", String.valueOf(map.get("dutyUserPhone")), false)); list.add(new AlarmDataVO("责任人电话", map.get("dutyUserPhone") == null? null:String.valueOf(map.get("dutyUserPhone")), false));
list.add(new AlarmDataVO("建(构)筑类别", buildType.get(map.get("buildType")), false)); list.add(new AlarmDataVO("建(构)筑类别", buildType.get(map.get("buildType")), false));
list.add(new AlarmDataVO("使用性质", buildUseType.get(map.get("buildUseType")), false)); list.add(new AlarmDataVO("使用性质", buildUseType.get(map.get("buildUseType")), false));
list.add(new AlarmDataVO("结构类型", buildingStructureType.get(map.get("structureType")), false)); list.add(new AlarmDataVO("结构类型", buildingStructureType.get(map.get("structureType")), false));
......
...@@ -631,7 +631,11 @@ public class PowerTransferServiceImpl extends BaseService<PowerTransferDto, Powe ...@@ -631,7 +631,11 @@ public class PowerTransferServiceImpl extends BaseService<PowerTransferDto, Powe
transferContent.add(transferDetails); transferContent.add(transferDetails);
} }
} }
}else {
String transferDetails = templateContent
.replace("departmentName-type-resourcesNum", transferDetail.toString())
.replace("rescueGrid", rescueGrid == null ? "" : rescueGrid).replace("任务状态:taskStatus", "");
transferContent.add(transferDetails);
} }
}); });
transferInfo.put("transferContent", transferContent); transferInfo.put("transferContent", transferContent);
......
...@@ -519,14 +519,19 @@ ...@@ -519,14 +519,19 @@
</select> </select>
<select id="getIdAndType" resultType="hashmap"> <select id="getIdAndType" resultType="hashmap">
select select
ins.field_value as id, ins.instance_id as id,
inst.group_code as type, ( CASE
str.full_name as address ins.group_code
from WHEN 'building'THEN 'building'
wl_form_instance as ins WHEN 'floor'THEN 'building'
left join wl_form_instance as inst on ins.field_value = inst.instance_id else
left join wl_warehouse_structure as str on ins.instance_id = str.source_id ins.group_code
END) as type,
str.full_name as address
from
wl_form_instance as ins
left join wl_warehouse_structure as str on ins.instance_id = str.source_id
where ins.instance_id =#{id} where ins.instance_id =#{id}
and ins.field_name ='parentId' and ins.field_name ='parentId'
group by ins.field_value group by ins.field_value
......
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