Commit 377045ac authored by chenzhao's avatar chenzhao

修改代码

parent 86eee001
......@@ -1449,19 +1449,28 @@ public class CommandController extends BaseController {
List<AlertFormValue> list = buildId == null ? null : iAlertFormValueService.getzqlist(id);
if (list != null && list.size() > 0) {
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> children = new ArrayList<OrgMenuDto>();
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.setKey(buildId);
orgMenuDto.setValue(buildId);
orgMenuDto.setChildren(children);
orgMenuDto.setName(buildIdName);
orgMenuDto.setTitle(buildIdName);
list1.add(orgMenuDto);
orgMenuDto.setTitle(buildIdName);*/
list1.add(date);
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
public List<FireStationDto> queryList(Boolean isDelete, String bizOrgCode,Long bizCompanyId,String name){
LambdaQueryWrapper<FireStation> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(BaseEntity::getIsDelete,isDelete);
wrapper.eq(FireStation::getBizOrgCode,bizOrgCode);
wrapper.like(FireStation::getBizOrgCode,bizOrgCode);
if (bizCompanyId != null){
wrapper.eq(FireStation::getBizCompanyId,bizCompanyId);
}
......
......@@ -283,7 +283,7 @@ public interface IBuilldService extends IService<Building> {
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
......
......@@ -43,6 +43,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
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.utils.Bean;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
......@@ -1145,7 +1146,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
}
@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();
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
Map<Long, String> systems = system.stream().collect(Collectors.toMap(FireFightingSystemEntity::getId, FireFightingSystemEntity::getName));
Map<String, String> idAndType = formInstanceMapper.getIdAndType(instanceId);
String id = idAndType.get("id");
String id = instanceId;
String type = idAndType.get("type");
String addr = idAndType.get("address");
Map<String, Object> map = iFormInstanceService.queryForMap(Long.valueOf(id));
String userId = String.valueOf(map.get("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);
JSONObject result = obj.getResult();
if (result.containsKey("bizOrgName")) {
......@@ -1181,7 +1185,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
if ("building".equals(type)) {
list.add(new AlarmDataVO("建构筑名称", String.valueOf(map.get("name")), true));
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("使用性质", buildUseType.get(map.get("buildUseType")), false));
list.add(new AlarmDataVO("结构类型", buildingStructureType.get(map.get("structureType")), false));
......
......@@ -631,7 +631,11 @@ public class PowerTransferServiceImpl extends BaseService<PowerTransferDto, Powe
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);
......
......@@ -519,14 +519,19 @@
</select>
<select id="getIdAndType" resultType="hashmap">
select
ins.field_value as id,
inst.group_code as type,
str.full_name as address
from
wl_form_instance as ins
left join wl_form_instance as inst on ins.field_value = inst.instance_id
left join wl_warehouse_structure as str on ins.instance_id = str.source_id
select
ins.instance_id as id,
( CASE
ins.group_code
WHEN 'building'THEN 'building'
WHEN 'floor'THEN 'building'
else
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}
and ins.field_name ='parentId'
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