bug修改
This commit is contained in:
parent
782bd13681
commit
738ce5867c
@ -162,7 +162,9 @@ public class SystemUserController {
|
||||
@ApiImplicitParam(name = "enterpriseTypeId", required = false, value = "企业类型id", paramType = "body"),
|
||||
@ApiImplicitParam(name = "xzProjectOrgId", required = false, value = "项目组织机构id", paramType = "body"),
|
||||
@ApiImplicitParam(name = "qualityRegionId", required = false, value = "区域id", paramType = "body"),
|
||||
@ApiImplicitParam(name = "qualityRegionBindType", required = false, value = "1区域绑定单位2区域绑定的人", paramType = "body"),
|
||||
@ApiImplicitParam(name = "userId", required = false, value = "用户id", paramType = "body"),
|
||||
@ApiImplicitParam(name = "isSupervisingRoleName", required = false, value = "1监理角色名称的人", paramType = "body"),
|
||||
})
|
||||
@PostMapping(value = "/getProjectChilderSystemUserList")
|
||||
public Result<List<SystemUser>> getProjectChilderSystemUserList(@RequestBody Map<String, Object> map) {
|
||||
|
||||
@ -6,6 +6,9 @@
|
||||
and t.account_type = 6
|
||||
</sql>
|
||||
<sql id="where">
|
||||
<if test="param.isSupervisingRoleName != null and param.isSupervisingRoleName == '1'.toString()">
|
||||
and c.role_name = '监理'
|
||||
</if>
|
||||
<if test="param.userId != null and param.userId != ''">
|
||||
and t.user_id = #{param.userId}
|
||||
</if>
|
||||
@ -54,10 +57,14 @@
|
||||
LEFT JOIN project_enterprise pe on pe.enterprise_id=ei.id and pe.project_sn=t.sn
|
||||
left join xz_project_org xpo on xpo.id=t.xz_project_org_id
|
||||
left join xz_registry xr on xr.account = t.account and xr.approval_process = 2
|
||||
<if test="param.qualityRegionId != null and param.qualityRegionId != ''">
|
||||
<if test="param.qualityRegionId != null and param.qualityRegionId != '' and param.qualityRegionBindType == '2'.toString()">
|
||||
JOIN quality_region_to_user qrtu on ei.id = qrtu.enterprise_id and t.user_id=qrtu.user_id and
|
||||
qrtu.quality_region_id = #{param.qualityRegionId}
|
||||
</if>
|
||||
<if test="param.qualityRegionId != null and param.qualityRegionId != '' and param.qualityRegionBindType == '1'.toString()">
|
||||
JOIN quality_region_to_enterprise qrte on ei.id = qrte.enterprise_id and
|
||||
qrtu.quality_region_id = #{param.qualityRegionId}
|
||||
</if>
|
||||
</sql>
|
||||
<select id="getSystemUsersBySn" resultType="com.zhgd.xmgl.modules.basicdata.entity.SystemUser" parameterType="map">
|
||||
SELECT a.*, jb.job_name
|
||||
|
||||
@ -7,6 +7,7 @@ import com.zhgd.xmgl.modules.quality.service.IQualityRegionService;
|
||||
import com.zhgd.xmgl.util.MessageUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
@ -37,7 +38,10 @@ public class QualityRegionController {
|
||||
|
||||
|
||||
@ApiOperation(value = "tree列表查询质量—检查部位信息", notes = "tree列表查询质量—检查部位信息", httpMethod = "POST")
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目唯一标识", paramType = "body", required = true, dataType = "String")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目唯一标识", paramType = "body", required = true, dataType = "String"),
|
||||
@ApiImplicitParam(name = "notSupervisingUnit", value = "1不是监理单位", paramType = "body", required = false, dataType = "Integer"),
|
||||
})
|
||||
@PostMapping(value = "/list")
|
||||
public Result<List<QualityRegion>> selectQualityRegionList(@RequestBody Map<String, Object> map) {
|
||||
return Result.success(qualityRegionService.selectQualityRegionList(map));
|
||||
|
||||
@ -37,7 +37,12 @@
|
||||
LEFT JOIN system_user su ON su.user_id = qrtu.user_id
|
||||
left join quality_region_to_ai_analyse_hard qrtaah on qr.id = qrtaah.quality_region_id
|
||||
left join ai_analyse_hard_ware_record aahwr on aahwr.id=qrtaah.ai_analyse_hard_ware_record_id
|
||||
left join project_enterprise pe on pe.enterprise_id = ei.id and pe.project_sn = qr.project_sn
|
||||
left join enterprise_type et on et.id = pe.enterprise_type_id
|
||||
WHERE qr.project_sn = #{projectSn}
|
||||
<if test="notSupervisingUnit == '1'.toString()">
|
||||
and et.id != 7
|
||||
</if>
|
||||
order by qr.region_code
|
||||
</select>
|
||||
<select id="selectChildQualityRegionList" resultType="com.zhgd.xmgl.modules.quality.entity.QualityRegion">
|
||||
|
||||
@ -195,6 +195,20 @@ public class XzEmergencyRecordServiceImpl extends ServiceImpl<XzEmergencyRecordM
|
||||
if (wi == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
//大屏弹窗
|
||||
List<SystemUser> projectUsers = systemUserService.getSystemUsersBySn(new MapBuilder<String, Object>().put(Cts.SN, entity.getProjectSn()).put(Cts.QUERY_TYPE, Cts.PROJECT_LEVEL).build());
|
||||
for (SystemUser user : projectUsers) {
|
||||
Notice notice = new Notice();
|
||||
notice.setType("0");
|
||||
notice.setMsg("大屏报警弹窗");
|
||||
notice.setAccountId(user.getUserId());
|
||||
notice.setTitle("大屏报警弹窗");
|
||||
notice.setSendTime(DateUtil.now());
|
||||
notice.setPayload(JSON.toJSONString(entity));
|
||||
noticeService.sendMqttMessage(notice, "/bigScreen/emergency/alert");
|
||||
}
|
||||
|
||||
XzEmergencyPush push = xzEmergencyPushMapper.selectOne(new LambdaQueryWrapper<XzEmergencyPush>()
|
||||
.eq(XzEmergencyPush::getEnterpriseId, wi.getEnterpriseId())
|
||||
.eq(XzEmergencyPush::getProjectSn, wi.getProjectSn())
|
||||
@ -216,20 +230,6 @@ public class XzEmergencyRecordServiceImpl extends ServiceImpl<XzEmergencyRecordM
|
||||
"有应急消息待处理", "33");
|
||||
}
|
||||
}
|
||||
|
||||
//大屏弹窗
|
||||
List<SystemUser> projectUsers = systemUserService.getSystemUsersBySn(new MapBuilder<String, Object>().put(Cts.SN, entity.getProjectSn()).put(Cts.QUERY_TYPE, Cts.PROJECT_LEVEL).build());
|
||||
for (SystemUser user : projectUsers) {
|
||||
Notice notice = new Notice();
|
||||
notice.setType("0");
|
||||
notice.setMsg("大屏报警弹窗");
|
||||
notice.setAccountId(user.getUserId());
|
||||
notice.setTitle("大屏报警弹窗");
|
||||
notice.setSendTime(DateUtil.now());
|
||||
notice.setPayload(JSON.toJSONString(entity));
|
||||
noticeService.sendMqttMessage(notice, "/bigScreen/emergency/alert");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user