Commit da0d7eeb authored by chenhao's avatar chenhao

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

parents 7a551c95 9d1782db
...@@ -96,4 +96,5 @@ public interface OrgUsrMapper extends BaseMapper<OrgUsr> { ...@@ -96,4 +96,5 @@ public interface OrgUsrMapper extends BaseMapper<OrgUsr> {
List<Map<String,Object>> queryCompanyIdNew(String bizOrgName); List<Map<String,Object>> queryCompanyIdNew(String bizOrgName);
OrgUsr queryByUserId(@Param("userId")Long userId);
} }
package com.yeejoin.amos.boot.module.common.api.service; package com.yeejoin.amos.boot.module.common.api.service;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yeejoin.amos.boot.module.common.api.dto.*; import com.yeejoin.amos.boot.module.common.api.dto.*;
import com.yeejoin.amos.boot.module.common.api.entity.DynamicFormInstance; import com.yeejoin.amos.boot.module.common.api.entity.DynamicFormInstance;
...@@ -280,4 +281,6 @@ public interface IOrgUsrService { ...@@ -280,4 +281,6 @@ public interface IOrgUsrService {
OrgUsrDto saveOrgPersonFlc(OrgPersonDto OrgPersonDto) throws Exception; OrgUsrDto saveOrgPersonFlc(OrgPersonDto OrgPersonDto) throws Exception;
void updateByIdOrgPersonFlc(OrgPersonDto OrgPersonVo, Long id) throws Exception; void updateByIdOrgPersonFlc(OrgPersonDto OrgPersonVo, Long id) throws Exception;
JSONObject selectPersonByUserId(Long userId) throws Exception;
} }
...@@ -722,4 +722,13 @@ LEFT JOIN ( ...@@ -722,4 +722,13 @@ LEFT JOIN (
</select> </select>
<select id="queryByUserId" resultType="com.yeejoin.amos.boot.module.common.api.entity.OrgUsr">
SELECT *
FROM cb_org_usr
WHERE is_delete = 0
<if test="userId != null">
AND amos_org_id = #{userId}
</if>
</select>
</mapper> </mapper>
...@@ -9,6 +9,7 @@ import java.util.Map; ...@@ -9,6 +9,7 @@ import java.util.Map;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.alibaba.fastjson.JSONObject;
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.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
...@@ -281,4 +282,19 @@ public class OrgPersonController { ...@@ -281,4 +282,19 @@ public class OrgPersonController {
// @PathVariable Long id) throws Exception { // @PathVariable Long id) throws Exception {
// return ResponseHelper.buildResponse(iOrgUsrService.queryCompanyId(id)); // return ResponseHelper.buildResponse(iOrgUsrService.queryCompanyId(id));
// } // }
/**
* 根据userId查询人员
*
* @param request
* @param userId
* @return
* @throws Exception
*/
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/getPersonByUserId/{userId}", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "根据平台用户ID查询人员详情", notes = "根据平台用户ID查询人员详情")
public ResponseModel<JSONObject> selectByUserId(HttpServletRequest request, @PathVariable Long userId) throws Exception {
return ResponseHelper.buildResponse(iOrgUsrService.selectPersonByUserId(userId));
}
} }
...@@ -71,7 +71,9 @@ public class DutyFireFightingServiceImpl extends DutyCommonServiceImpl implement ...@@ -71,7 +71,9 @@ public class DutyFireFightingServiceImpl extends DutyCommonServiceImpl implement
titleMap_1.put("微型消防站", map.get("fireFighting").toString()); titleMap_1.put("微型消防站", map.get("fireFighting").toString());
resultList.add(titleMap_1); resultList.add(titleMap_1);
LinkedHashMap<String, Object> titleMap_2 =new LinkedHashMap<String, Object>(); LinkedHashMap<String, Object> titleMap_2 =new LinkedHashMap<String, Object>();
titleMap_2.put("单位/部门", map.get("teamName").toString()); if(map.get("teamName") != null){
titleMap_2.put("单位/部门", map.get("teamName").toString());
}
resultList.add(titleMap_2); resultList.add(titleMap_2);
String carId =map.get("fireFightingId").toString(); String carId =map.get("fireFightingId").toString();
Map<String, Object> instanceMap = dutyPersonShiftMapper.getInstanceIdForSpecifyDateAndEquipment(dutyDay, Map<String, Object> instanceMap = dutyPersonShiftMapper.getInstanceIdForSpecifyDateAndEquipment(dutyDay,
......
...@@ -15,6 +15,7 @@ import java.util.stream.Collectors; ...@@ -15,6 +15,7 @@ import java.util.stream.Collectors;
import javax.annotation.Resource; import javax.annotation.Resource;
import com.alibaba.fastjson.JSONObject;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
...@@ -2037,4 +2038,21 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -2037,4 +2038,21 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
updateDynamicFormInstance(orgUsr.getSequenceNbr(), OrgPersonVo.getDynamicFormValue()); updateDynamicFormInstance(orgUsr.getSequenceNbr(), OrgPersonVo.getDynamicFormValue());
} }
@Override
public JSONObject selectPersonByUserId(Long userId) throws Exception {
OrgUsr orgUsr = orgUsrMapper.queryByUserId(userId);
// 动态表单数据
List<FormValue> formValue = getFormValue(orgUsr.getSequenceNbr());
OrgPersonFormDto orgPersonFormVo = new OrgPersonFormDto(formValue);
BeanUtils.copyProperties(orgUsr, orgPersonFormVo);
OrgUsr parent = getById(orgUsr.getParentId());
if (!ObjectUtils.isEmpty(parent)) {
orgPersonFormVo.setParentName(parent.getBizOrgName());
}
List<FormValue> dynamicFormAlert = orgPersonFormVo.getDynamicFormAlert();
Map<String, String> collect = dynamicFormAlert.stream().collect(HashMap::new, (map, item) -> map.put(item.getKey(), item.getValue()), HashMap::putAll);
JSONObject jsonObject = JSONObject.parseObject(JSONObject.toJSONString(orgPersonFormVo));
jsonObject.put("map", collect);
return jsonObject;
}
} }
...@@ -192,15 +192,15 @@ public class AircraftController extends BaseController { ...@@ -192,15 +192,15 @@ public class AircraftController extends BaseController {
if (dataModel != null) { if (dataModel != null) {
Map<String, Object> map = dataModel.getResult(); Map<String, Object> map = dataModel.getResult();
if (map != null) { if (map != null) {
map1.put("aircraftModel", map.get("aircraftType")); map1.put("aircraftModel", map.containsKey("aircraftType")?map.get("aircraftType"):null);
map1.put("dynamicFlightId", map.get("dynamicFlightId")); map1.put("dynamicFlightId", map.containsKey("dynamicFlightId")?map.get("dynamicFlightId"):null);
map1.put("landingTime", map.get("sta")); map1.put("landingTime", map.containsKey("sta")?map.get("sta"):null);
/* 任务 3488 根据航班号查询航班信息回填 增加跑道,机位字段 start*/ /* 任务 3488 根据航班号查询航班信息回填 增加跑道,机位字段 start*/
map1.put("runway", map.get("runway")); map1.put("runway", map.containsKey("runway")?map.get("runway"):null);
map1.put("stand", map.get("stand")); map1.put("stand", map.containsKey("stand")?map.get("stand"):null);
/* 任务 3488 根据航班号查询航班信息回填 end*/ /* 任务 3488 根据航班号查询航班信息回填 end*/
// map1.put("fuelQuantity", map.get("")); // map1.put("fuelQuantity", map.get(""));
map1.put("passengerCapacity", map.get("psgNumTotal")); map1.put("passengerCapacity", map.containsKey("passengerCapacity")?map.get("passengerCapacity"):null );
} }
} }
return ResponseHelper.buildResponse(map1); return ResponseHelper.buildResponse(map1);
......
...@@ -535,7 +535,7 @@ public class PowerTransferServiceImpl extends BaseService<PowerTransferDto, Powe ...@@ -535,7 +535,7 @@ public class PowerTransferServiceImpl extends BaseService<PowerTransferDto, Powe
} else { } else {
String transferDetails = templateContent String transferDetails = templateContent
.replace("departmentName-type-resourcesNum", transferDetail.toString()) .replace("departmentName-type-resourcesNum", transferDetail.toString())
.replace("rescueGrid", rescueGrid == null ? "" : rescueGrid).replace("taskStatus", ""); .replace("rescueGrid", rescueGrid == null ? "" : rescueGrid).replace("任务状态:taskStatus", "");
transferContent.add(transferDetails); transferContent.add(transferDetails);
} }
}); });
......
...@@ -358,18 +358,18 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD ...@@ -358,18 +358,18 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
Bean.copyExistPropertis(dangerDto, latentDanger); Bean.copyExistPropertis(dangerDto, latentDanger);
if (ValidationUtil.isEmpty(dangerDto.getId())) { if (ValidationUtil.isEmpty(dangerDto.getId())) {
// 新增 // 新增
latentDanger.setBusinessKey(businessKey); latentDanger.setBusinessKey(businessKey == null?"":businessKey);
latentDanger.setDiscovererDepartmentId(departmentId); latentDanger.setDiscovererDepartmentId(departmentId == null?"":departmentId);
latentDanger.setDiscovererUserId(userId); latentDanger.setDiscovererUserId(userId == null?"": userId);
latentDanger.setOrgCode(orgCode); latentDanger.setOrgCode(orgCode == null?"":orgCode);
latentDanger.setDangerType(dangerTypeEnum.getCode()); latentDanger.setDangerType(dangerTypeEnum.getCode() == null?"":dangerTypeEnum.getCode());
latentDanger.setDangerTypeName(dangerTypeEnum.getName()); latentDanger.setDangerTypeName(dangerTypeEnum.getName() == null?"":dangerTypeEnum.getName());
if (LatentDangerBizTypeEnum.防火监督.getCode().equals(bizType)) { if (LatentDangerBizTypeEnum.防火监督.getCode().equals(bizType)) {
latentDanger.setDangerState(LatentDangerState.SupervisionDangerStateEnum.提交隐患.getCode()); latentDanger.setDangerState(LatentDangerState.SupervisionDangerStateEnum.提交隐患.getCode() == null?"":LatentDangerState.SupervisionDangerStateEnum.提交隐患.getCode() );
latentDanger.setDangerStateName(LatentDangerState.SupervisionDangerStateEnum.提交隐患.getName()); latentDanger.setDangerStateName(LatentDangerState.SupervisionDangerStateEnum.提交隐患.getName() == null?"":LatentDangerState.SupervisionDangerStateEnum.提交隐患.getName());
} else if (LatentDangerBizTypeEnum.巡检.getCode().equals(bizType)) { } else if (LatentDangerBizTypeEnum.巡检.getCode().equals(bizType)) {
latentDanger.setDangerState(LatentDangerState.PatrolDangerStateEnum.待评审.getCode()); latentDanger.setDangerState(LatentDangerState.PatrolDangerStateEnum.待评审.getCode() == null?"":LatentDangerState.PatrolDangerStateEnum.待评审.getCode());
latentDanger.setDangerStateName(LatentDangerState.PatrolDangerStateEnum.待评审.getName()); latentDanger.setDangerStateName(LatentDangerState.PatrolDangerStateEnum.待评审.getName() == null?"":LatentDangerState.PatrolDangerStateEnum.待评审.getName() );
} }
if (ValidationUtil.isEmpty(dangerDto.getDangerName())) { if (ValidationUtil.isEmpty(dangerDto.getDangerName())) {
latentDanger.setDangerName(dangerDto.getInputItemName()); latentDanger.setDangerName(dangerDto.getInputItemName());
......
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
UPDATE `jc_alert_form` SET alert_type_code='230', field_value_code=NULL, field_name='航空器故障部位', field_code='damageLocation', field_type='selectDelay', rec_user_name=NULL, rec_user_id=NULL, rec_date=NULL, is_delete=0, block=0, sort_num=7, url='data-dictionary/gwmcDataDictionary/FJSSWZ' WHERE sequence_nbr=106; UPDATE `jc_alert_form` SET alert_type_code='230', field_value_code=NULL, field_name='航空器故障部位', field_code='damageLocation', field_type='selectDelay', rec_user_name=NULL, rec_user_id=NULL, rec_date=NULL, is_delete=0, block=0, sort_num=7, url='data-dictionary/gwmcDataDictionary/FJSSWZ' WHERE sequence_nbr=106;
UPDATE `jc_alert_form` SET alert_type_code='230', field_value_code=NULL, field_name='燃油量(吨)', field_code='fuelQuantity', field_type='inputNumber', rec_user_name=NULL, rec_user_id=NULL, rec_date=NULL, is_delete=0, block=0, sort_num=10, url=NULL WHERE sequence_nbr=107; UPDATE `jc_alert_form` SET alert_type_code='230', field_value_code=NULL, field_name='燃油量(吨)', field_code='fuelQuantity', field_type='inputNumber', rec_user_name=NULL, rec_user_id=NULL, rec_date=NULL, is_delete=0, block=0, sort_num=10, url=NULL WHERE sequence_nbr=107;
UPDATE `jc_alert_form` SET alert_type_code='230', field_value_code=NULL, field_name='载客量', field_code='passengerCapacity', field_type='inputNumber', rec_user_name=NULL, rec_user_id=NULL, rec_date=NULL, is_delete=0, block=0, sort_num=9, url=NULL WHERE sequence_nbr=108; UPDATE `jc_alert_form` SET alert_type_code='230', field_value_code=NULL, field_name='载客量', field_code='passengerCapacity', field_type='inputNumber', rec_user_name=NULL, rec_user_id=NULL, rec_date=NULL, is_delete=0, block=0, sort_num=9, url=NULL WHERE sequence_nbr=108;
UPDATE `jc_alert_form` SET alert_type_code='230', field_value_code='PJPD', field_name='迫降跑道', field_code='forcedLandingTrack ', field_type='select', rec_user_name=NULL, rec_user_id=NULL, rec_date=NULL, is_delete=0, block=0, sort_num=6, url='' WHERE sequence_nbr=109; UPDATE `jc_alert_form` SET alert_type_code='230', field_value_code='PJPD', field_name='迫降跑道', field_code='forcedLandingTrack', field_type='select', rec_user_name=NULL, rec_user_id=NULL, rec_date=NULL, is_delete=0, block=0, sort_num=6, url='' WHERE sequence_nbr=109;
UPDATE `jc_alert_form` SET alert_type_code='230', field_value_code=NULL, field_name='灾害事故情况', field_code='accidentSituation', field_type='textarea', rec_user_name=NULL, rec_user_id=NULL, rec_date=NULL, is_delete=0, block=1, sort_num=11, url=NULL WHERE sequence_nbr=110; UPDATE `jc_alert_form` SET alert_type_code='230', field_value_code=NULL, field_name='灾害事故情况', field_code='accidentSituation', field_type='textarea', rec_user_name=NULL, rec_user_id=NULL, rec_date=NULL, is_delete=0, block=1, sort_num=11, url=NULL WHERE sequence_nbr=110;
UPDATE `jc_alert_form` SET alert_type_code='230', field_value_code=NULL, field_name='发展态势', field_code='developmentTrend', field_type='textarea', rec_user_name=NULL, rec_user_id=NULL, rec_date=NULL, is_delete=0, block=1, sort_num=12, url=NULL WHERE sequence_nbr=111; UPDATE `jc_alert_form` SET alert_type_code='230', field_value_code=NULL, field_name='发展态势', field_code='developmentTrend', field_type='textarea', rec_user_name=NULL, rec_user_id=NULL, rec_date=NULL, is_delete=0, block=1, sort_num=12, url=NULL WHERE sequence_nbr=111;
UPDATE `jc_alert_form` SET alert_type_code='230', field_value_code=NULL, field_name='备注', field_code='remarks', field_type='textarea', rec_user_name=NULL, rec_user_id=NULL, rec_date=NULL, is_delete=0, block=1, sort_num=13, url=NULL WHERE sequence_nbr=112; UPDATE `jc_alert_form` SET alert_type_code='230', field_value_code=NULL, field_name='备注', field_code='remarks', field_type='textarea', rec_user_name=NULL, rec_user_id=NULL, rec_date=NULL, is_delete=0, block=1, sort_num=13, url=NULL WHERE sequence_nbr=112;
......
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