Commit fab15caa authored by chenhao's avatar chenhao

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

parents d1bf4184 a1d59d6d
......@@ -86,6 +86,8 @@ public interface OrgUsrMapper extends BaseMapper<OrgUsr> {
int amosIdExist(String amosId);
int amosIdExistTeam(String amosId);
void updatelistByParentId(String codex, String code);
......@@ -102,6 +104,8 @@ public interface OrgUsrMapper extends BaseMapper<OrgUsr> {
@DataAuth(interfacePath = "")
List<OrgUsr> companyTreeByUserAndType(Map<String, Object> param);
List<OrgUsr> equipCompanyExport(String bizOrgCode);
OrgUsr queryBySequenceNbr(@Param("parentId") String parentId);
@DataAuth(interfacePath="")
......
......@@ -655,6 +655,12 @@ GROUP BY
) AS total;
</select>
<select id="amosIdExistTeam" resultType="int">
SELECT count(*) AS num FROM cb_firefighters WHERE amos_user_id = #{amosId} and is_delete = 0;
</select>
<update id="updatelistByParentId">
......@@ -774,6 +780,14 @@ LEFT JOIN (
order by usr.rec_date
</where>
</select>
<select id="equipCompanyExport" resultType="com.yeejoin.amos.boot.module.common.api.entity.OrgUsr">
SELECT
*
FROM
cb_org_usr
WHERE is_delete = false AND biz_org_code LIKE CONCAT(#{bizOrgCode} '%') AND( biz_org_type = 'COMPANY' || biz_org_type = 'DEPARTMENT')
</select>
<select id="companyDeptListWithPersonCount"
resultType="com.yeejoin.amos.boot.module.common.api.entity.OrgUsr">
SELECT
......
......@@ -109,6 +109,8 @@ public class CommandController extends BaseController {
@Autowired
RemoteSecurityService remoteSecurityService;
@Autowired
private IAircraftService ircraftService;
@Autowired
IAlertFormValueService alertFormValueService;
// 文件读取参数
@Value("${file.url}")
......@@ -959,47 +961,53 @@ public class CommandController extends BaseController {
@TycloudOperation(needAuth = true, ApiLevel = UserType.AGENCY)
@GetMapping(value = "/getOrgUsrzhDto/{id}")
@ApiOperation(httpMethod = "GET", value = "根据灾情id处置对象单位详情", notes = "根据灾情id处置对象单位详情")
public ResponseModel<OrgusrDataxDto> getOrgUsrzhDto(@PathVariable Long id) {
public ResponseModel<Object> getOrgUsrzhDto(@PathVariable Long id) {
AlertCalled AlertCalled = iAlertCalledService.getAlertCalledById(id);
String buildId = null;
OrgusrDataxDto orgusrDataxDto = new OrgusrDataxDto();
if (AlertCalled.getUnitInvolved() != null && !"".equals(AlertCalled.getUnitInvolved())) {
List<OrgUsrzhDto> orgUsrzhDto = iOrgUsrService.getOrgUsrzhDto(AlertCalled.getUnitInvolved());
orgusrDataxDto.setOrgUsrzhDto(orgUsrzhDto != null && orgUsrzhDto.size() > 0 ? orgUsrzhDto.get(0) : null);
if (orgUsrzhDto != null && orgUsrzhDto.size() > 0 && orgUsrzhDto.get(0) != null) {
buildId = orgUsrzhDto.get(0).getBuildId();
}
}
if (buildId != null) {
List<Map<String, Object>> list = equipFeignClient.findImgByFileCategory(buildId, "fourImg").getResult();
List<String> url = new ArrayList<>();
if (list != null && list.size() > 0) {
list.stream().forEach(map -> {
url.add(map.get("filePath").toString());
});
}
//通道
List<Map<String, Object>> list1 = equipFeignClient.findImgByFileCategory(buildId, "secondImg").getResult();
List<String> url1 = new ArrayList<>();
if (list1 != null && list1.size() > 0) {
list1.stream().forEach(map -> {
url1.add(map.get("filePath").toString());
});
}
//立面
List<Map<String, Object>> list2 = equipFeignClient.findImgByFileCategory(buildId, "threeImg").getResult();
List<String> url2 = new ArrayList<>();
if (list2 != null && list2.size() > 0) {
list2.stream().forEach(map -> {
url2.add(map.get("filePath").toString());
});
}
orgusrDataxDto.setPlanePicture(url);
orgusrDataxDto.setScenePicture(url1);
orgusrDataxDto.setFacadePicture(url2);
}
return ResponseHelper.buildResponse(orgusrDataxDto);
if("230".equals(AlertCalled.getAlertTypeCode())){
AircraftDto aircraftDto=aircraftService.queryByAircraftSeq(RequestContext.getAgencyCode(),id);
return ResponseHelper.buildResponse(aircraftDto);
}else{
String buildId = null;
OrgusrDataxDto orgusrDataxDto = new OrgusrDataxDto();
if (AlertCalled.getUnitInvolved() != null && !"".equals(AlertCalled.getUnitInvolved())) {
List<OrgUsrzhDto> orgUsrzhDto = iOrgUsrService.getOrgUsrzhDto(AlertCalled.getUnitInvolved());
orgusrDataxDto.setOrgUsrzhDto(orgUsrzhDto != null && orgUsrzhDto.size() > 0 ? orgUsrzhDto.get(0) : null);
if (orgUsrzhDto != null && orgUsrzhDto.size() > 0 && orgUsrzhDto.get(0) != null) {
buildId = orgUsrzhDto.get(0).getBuildId();
}
}
if (buildId != null) {
List<Map<String, Object>> list = equipFeignClient.findImgByFileCategory(buildId, "fourImg").getResult();
List<String> url = new ArrayList<>();
if (list != null && list.size() > 0) {
list.stream().forEach(map -> {
url.add(map.get("filePath").toString());
});
}
//通道
List<Map<String, Object>> list1 = equipFeignClient.findImgByFileCategory(buildId, "secondImg").getResult();
List<String> url1 = new ArrayList<>();
if (list1 != null && list1.size() > 0) {
list1.stream().forEach(map -> {
url1.add(map.get("filePath").toString());
});
}
//立面
List<Map<String, Object>> list2 = equipFeignClient.findImgByFileCategory(buildId, "threeImg").getResult();
List<String> url2 = new ArrayList<>();
if (list2 != null && list2.size() > 0) {
list2.stream().forEach(map -> {
url2.add(map.get("filePath").toString());
});
}
orgusrDataxDto.setPlanePicture(url);
orgusrDataxDto.setScenePicture(url1);
orgusrDataxDto.setFacadePicture(url2);
}
return ResponseHelper.buildResponse(orgusrDataxDto);
}
}
......@@ -1447,9 +1455,11 @@ public class CommandController extends BaseController {
//获取正在进行的灾情null
if (userCar != null) {
AlertCalled alertCalled = powerTransferCompanyResourcesService.getByPowerTransferCompanyResourId(userCar.getCarId());
alertCalled.setLatitude(alertCalled.getCoordinateX()!=null?alertCalled.getCoordinateX().toString():null);
alertCalled.setLongitude(alertCalled.getCoordinateY()!=null?alertCalled.getCoordinateY().toString():null);
return ResponseHelper.buildResponse(alertCalled);
if(alertCalled!=null) {
alertCalled.setLatitude(alertCalled.getCoordinateX() != null ? alertCalled.getCoordinateX().toString() : null);
alertCalled.setLongitude(alertCalled.getCoordinateY() != null ? alertCalled.getCoordinateY().toString() : null);
return ResponseHelper.buildResponse(alertCalled);
}
}
return ResponseHelper.buildResponse(null);
}
......
......@@ -579,6 +579,19 @@ public class OrgUsrController extends BaseController {
}
/**
* 判断关联账户是否已关联-队伍
*
* @param
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/getAmosIdTeam/{amosId}", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "判断关联账户是否已关联", notes = "判断关联账户是否已关联")
public ResponseModel<Object> getAmosIdTeam(@PathVariable String amosId) {
return ResponseHelper.buildResponse(iOrgUsrService.amosIdExistTeam(amosId));
}
/**
* 根据机场人员id获取amos平台人员id
*
* @param
......
......@@ -94,6 +94,7 @@ public class FirefightersServiceImpl extends BaseService<FirefightersDto, Firefi
public Firefighters selectByAmosOrgId(Long id) {
QueryWrapper<Firefighters> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("amos_user_id", id);
queryWrapper.eq("is_delete", 0);
Firefighters firefighters = firefightersMapper.selectOne(queryWrapper);
return firefighters;
}
......
......@@ -1432,11 +1432,13 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
}
public List<OrgUsr> equipCompanyExport(ReginParams reginParams, String type) {
LambdaQueryWrapper<OrgUsr> wrapper = new LambdaQueryWrapper<>();
List<OrgUsr> list = orgUsrMapper.equipCompanyExport(reginParams.getPersonIdentity().getBizOrgCode());
/*LambdaQueryWrapper<OrgUsr> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(BaseEntity::getIsDelete,0);
wrapper.likeRight(OrgUsr::getBizOrgCode,reginParams.getPersonIdentity().getBizOrgCode());
wrapper.eq(OrgUsr::getBizOrgType,"DEPARTMENT").or().eq(OrgUsr::getBizOrgType,"COMPANY");
wrapper.eq(BaseEntity::getIsDelete,false);
List<OrgUsr> list = baseMapper.selectList(wrapper);
List<OrgUsr> list = baseMapper.selectList(wrapper);*/
return list;
}
......@@ -1764,6 +1766,14 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
return true;
}
public Object amosIdExistTeam(String amosId) {
int num = orgUsrMapper.amosIdExistTeam(amosId);
if (num > 0) {
return false;
}
return true;
}
/**
* 获取对应公司组下面的人员信息
*
......
......@@ -610,11 +610,16 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec
List<String> confirmUser = new ArrayList<>();
equipSpecificAlarmDTOList.forEach(e->confirmUser.add(e.getConfirmUser()));
List<OrgUsrDto> result = jcsFeign.getByAmosId(confirmUser).getResult();
equipSpecificAlarmDTOList.stream().forEach(e->result.forEach(a->{
if (a.getAmosOrgId().equals(e.getConfirmUser())){
e.setJcsConfirmUserName(a.getBizOrgName());
equipSpecificAlarmDTOList.stream().forEach(e->{
result.forEach(a->{
if (a.getAmosOrgId().equals(e.getConfirmUser())){
e.setJcsConfirmUserName(a.getBizOrgName());
}
});
if (e.getJcsConfirmUserName() == null || e.getJcsConfirmUserName() == ""){
e.setJcsConfirmUserName(e.getConfirmUserName());
}
}));
});
return equipSpecificAlarmDTOList;
}
......
......@@ -321,7 +321,9 @@
FROM
wl_equipment_specific_alarm_log wlesal
LEFT JOIN wl_equipment we ON wlesal.equipment_code = we.code
LEFT JOIN wl_equipment_specific_alarm wlesa ON wlesa.id = wlesal.equipment_specific_alarm_id) d
LEFT JOIN wl_equipment_specific_alarm wlesa ON wlesa.id = wlesal.equipment_specific_alarm_id
WHERE
wlesal.clean_time is NULL ) d
<where>
<if test="param.warehouseStructureName != null and param.warehouseStructureName != ''">
d.warehouseStructureName like
......@@ -937,13 +939,13 @@
AND ( d.type = 'FIREALARM' OR d.type = 'BREAKDOWN' OR d.type = 'SHIELD' OR d.type = 'NOTICE' )
</otherwise>
</choose>
<if test='dto.fireEquipmentName != null '>
<if test="dto.fireEquipmentName != null and dto.fireEquipmentName != '' ">
AND d.fireEquipmentName LIKE CONCAT('%', #{dto.fireEquipmentName}, '%' )
</if>
<if test='dto.systemIds != null '>
AND d.systemIds in (#{dto.systemIds})
</if>
<if test='dto.confirmUserName != null '>
<if test="dto.confirmUserName != null and dto.confirmUserName != '' ">
AND d.confirmUserName LIKE CONCAT('%', #{dto.confirmUserName}, '%' )
</if>
<if test="dto.code != null">
......@@ -1001,13 +1003,9 @@
</select>
<select id="getConfirmUser" resultType="com.yeejoin.equipmanage.common.entity.EquipmentSpecificAlarmLog">
SELECT
distinct confirm_user,
confirm_user_name
FROM
wl_equipment_specific_alarm_log
WHERE
confirm_user IS NOT NULL;
select *, count(distinct confirm_user) from wl_equipment_specific_alarm_log WHERE
confirm_user IS NOT NULL group by confirm_user
</select>
<select id="getbyqrCode" resultType="com.yeejoin.equipmanage.common.entity.dto.EquipSpecificAlarmDTO">
......
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