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