Commit e9e9be96 authored by tangwei's avatar tangwei

修改bug

parents 7a44fe74 b7a33fef
...@@ -7,7 +7,12 @@ import java.util.Map; ...@@ -7,7 +7,12 @@ import java.util.Map;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeejoin.amos.boot.biz.common.controller.DataDictionaryController;
import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
import com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.velocity.runtime.directive.Break;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.DeleteMapping;
...@@ -79,6 +84,9 @@ public class KeySiteController extends BaseController { ...@@ -79,6 +84,9 @@ public class KeySiteController extends BaseController {
@Value("${auth-key-key-site:key_site_info}") @Value("${auth-key-key-site:key_site_info}")
private String authKey; private String authKey;
@Autowired
DataDictionaryServiceImpl iDataDictionaryService;
/** /**
* 新增重点部位 * 新增重点部位
* *
...@@ -105,6 +113,12 @@ public class KeySiteController extends BaseController { ...@@ -105,6 +113,12 @@ public class KeySiteController extends BaseController {
model.setLatitude(Double.valueOf(address.getString(BizConstant.LATITUDE))); model.setLatitude(Double.valueOf(address.getString(BizConstant.LATITUDE)));
} }
} }
if(model.getFireEnduranceRateName()!=null){
setData(model,"NHDJ");
}
if(model.getUseNature()!=null){
setData(model,"JZWSYXZ");
}
List<String> ids = new ArrayList<String>(); List<String> ids = new ArrayList<String>();
ids.add(model.getBuildingId().toString()); ids.add(model.getBuildingId().toString());
Map<String, String> map3 = keySiteService.getNodeAllParentIds(ids); Map<String, String> map3 = keySiteService.getNodeAllParentIds(ids);
...@@ -113,6 +127,22 @@ public class KeySiteController extends BaseController { ...@@ -113,6 +127,22 @@ public class KeySiteController extends BaseController {
return ResponseHelper.buildResponse(entity); return ResponseHelper.buildResponse(entity);
} }
private void setData(KeySiteDto model,String type){
QueryWrapper<DataDictionary> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("type", type);
List<DataDictionary> list = iDataDictionaryService.list(queryWrapper);
for (DataDictionary dataDictionary : list) {
if (type.equals("NHDJ") && dataDictionary.getName().equals(model.getFireEnduranceRateName())){
model.setFireEnduranceRate(dataDictionary.getCode());
}
if (type.equals("JZWSYXZ") && dataDictionary.getName().equals(model.getUseNatureName())){
model.setUseNature(dataDictionary.getCode());
}
break;
}
}
public static JSONObject getLongLatFromAddress(String address) { public static JSONObject getLongLatFromAddress(String address) {
JSONObject result = new JSONObject(); JSONObject result = new JSONObject();
result.put(BizConstant.ADDRESS, ""); result.put(BizConstant.ADDRESS, "");
...@@ -179,6 +209,12 @@ public class KeySiteController extends BaseController { ...@@ -179,6 +209,12 @@ public class KeySiteController extends BaseController {
model.setLatitude(Double.valueOf(address.getString(BizConstant.LATITUDE))); model.setLatitude(Double.valueOf(address.getString(BizConstant.LATITUDE)));
} }
} }
if(model.getFireEnduranceRateName()!=null){
setData(model,"NHDJ");
}
if(model.getUseNature()!=null){
setData(model,"JZWSYXZ");
}
return ResponseHelper.buildResponse(keySiteService.update(model, getUserInfo())); return ResponseHelper.buildResponse(keySiteService.update(model, getUserInfo()));
} }
...@@ -226,7 +262,12 @@ public class KeySiteController extends BaseController { ...@@ -226,7 +262,12 @@ public class KeySiteController extends BaseController {
} }
} }
dto.setAttachmentsList(list); dto.setAttachmentsList(list);
if (dto.getFireEnduranceRateName() != null){
dto.setFireEnduranceRate(dto.getFireEnduranceRateName());
}
if (dto.getUseNatureName() != null){
dto.setUseNature(dto.getUseNatureName());
}
if(null != dto.getLongitude() && null != dto.getLatitude()) { if(null != dto.getLongitude() && null != dto.getLatitude()) {
dto.setAddressDesc(dto.getAddressDesc().concat("@address@").concat("{\"longitude\":"). dto.setAddressDesc(dto.getAddressDesc().concat("@address@").concat("{\"longitude\":").
concat(dto.getLongitude().toString().concat(",\"latitude\":").concat(dto.getLatitude().toString().concat("}")))); concat(dto.getLongitude().toString().concat(",\"latitude\":").concat(dto.getLatitude().toString().concat("}"))));
......
...@@ -1127,14 +1127,19 @@ public class OrgUsrController extends BaseController { ...@@ -1127,14 +1127,19 @@ public class OrgUsrController extends BaseController {
@RequestParam("nodeKey") String nodeKey) throws Exception { @RequestParam("nodeKey") String nodeKey) throws Exception {
JSONObject jsonObject = workflowFeignService.candidateGroupsUser(processDefinitionKey, processDefinitionId, nodeKey); JSONObject jsonObject = workflowFeignService.candidateGroupsUser(processDefinitionKey, processDefinitionId, nodeKey);
String result = JSONObject.toJSONString(jsonObject.get("result")); String result = JSONObject.toJSONString(jsonObject.get("result"));
ReginParams reginParams = getSelectedOrgInfo();
String bizOrgCode = reginParams.getPersonIdentity().getBizOrgCode();
List<Map> objects = JSONObject.parseArray(result,Map.class); List<Map> objects = JSONObject.parseArray(result,Map.class);
//9891 按照测试要求转成人员管理信息且按换流站过滤
List<Map> map = new ArrayList<>();
objects.stream().forEach(e->{ objects.stream().forEach(e->{
OrgUsr orgUsr = orgUsrMapper.queryByUserId(Long.valueOf(e.get("userId").toString())); OrgUsr orgUsr = orgUsrMapper.queryByUserId(Long.valueOf(e.get("userId").toString()));
if (!ObjectUtils.isEmpty(orgUsr)){ if (!ObjectUtils.isEmpty(orgUsr) && orgUsr.getBizOrgCode().startsWith(bizOrgCode)){
e.put("realName",orgUsr.getBizOrgName()); e.put("realName",orgUsr.getBizOrgName());
map.add(e);
} }
}); });
return ResponseHelper.buildResponse(objects) ; return ResponseHelper.buildResponse(map) ;
} }
......
...@@ -115,7 +115,8 @@ equipment.pressurepump.stop=FHS_PressurePump_Stop ...@@ -115,7 +115,8 @@ equipment.pressurepump.stop=FHS_PressurePump_Stop
# 站端标识 # 站端标识
state.code=GW190301 state.code=GW190301
state.name=锦屏换流站
state.name=\u9526\u5c4f\u6362\u6d41\u7ad9
# 是否开启遥测数据上报 # 是否开启遥测数据上报
is.open.telemetering=false is.open.telemetering=false
\ No newline at end of file
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