Commit 818162fe authored by 麻笑宇's avatar 麻笑宇

Merge remote-tracking branch 'origin/develop_tzs_bugfix' into develop_tzs_bugfix

parents 1e030a53 f8b363f1
......@@ -25,12 +25,14 @@ public interface JgInstallationNoticeMapper extends CustomBaseMapper<JgInstallat
* @param page 分页对象
* @param model 查询参数
* @param type 类型:enterprise-企业端、supervision-监管端
* @param orgCode 公司的orgCode
* @return 安装告知列表
*/
Page<Map<String, Object>> queryForPage(Page<JgInstallationNotice> page,
@Param("param") JgInstallationNoticeDto model,
@Param("type") String type,
@Param("sort") SortVo sort,
@Param("companyCode") String companyCode,
@Param("orgCode") String orgCode);
/**
......
......@@ -75,17 +75,21 @@
</if>
</if>
<if test="type == 'supervision'">
AND (isn.receive_org_credit_code = #{orgCode} or isn.transfer_to_user_ids like concat('%',#{param.transferToUserIds},'%'))
AND (
isn.receive_org_credit_code = #{companyCode}
or isn.transfer_to_user_ids like concat('%',#{param.transferToUserIds},'%')
or isn.org_branch_code like concat(#{orgCode}, '%')
)
AND isn.instance_id <![CDATA[<>]]> ''
</if>
<if test="type == 'company'">
AND (isn.install_unit_credit_code = #{orgCode} or isn.transfer_to_user_ids like concat('%',#{param.transferToUserIds},'%'))
AND (isn.install_unit_credit_code = #{companyCode} or isn.transfer_to_user_ids like concat('%',#{param.transferToUserIds},'%'))
</if>
<if test="type == 'testAdmin'">
((AND isn.receive_org_credit_code = #{orgCode}
((AND isn.receive_org_credit_code = #{companyCode}
AND isn.instance_id <![CDATA[<>]]> '')
or
AND isn.install_unit_credit_code = #{orgCode})
AND isn.install_unit_credit_code = #{companyCode})
</if>
</where>
ORDER BY
......
......@@ -36,7 +36,11 @@
and tjvi.use_unit_credit_code = #{dto.useUnitCode}
</if>
<if test="dto.dataType == 'supervision' ">
and tjvi.receive_company_code = #{dto.useUnitCreditCode}
and
(
tjvi.receive_company_code = #{dto.useUnitCreditCode}
or tjvi.org_branch_code like concat(#{dto.orgBranchCode}, '%')
)
AND tjvi.status <![CDATA[<>]]> '使用单位待提交'
</if>
<if test="dto.dataType == 'company' ">
......
......@@ -118,7 +118,7 @@
else 'green' end problemStatusColor
FROM
tzs_safety_problem_tracing spt
LEFT JOIN tz_base_enterprise_info ei on ei.sequence_nbr = spt.source_id
LEFT JOIN tz_base_enterprise_info ei on ei.use_unit_code = spt.principal_unit_code
WHERE
spt.sequence_nbr = #{problemId}
UNION
......
......@@ -142,6 +142,7 @@ public class JgVehicleInformationController extends BaseController {
dto.setDataType(BaseController.COMPANY_TYPE_COMPANY);
} else {
dto.setDataType(BaseController.COMPANY_TYPE_SUPERVISION);
dto.setOrgBranchCode(info.getCompany().getOrgCode());
}
Page<Map<String, Object>> list = jgVehicleInformationServiceImpl.getPageList(dto,sort, page, dto.getRoleIds());
list.getRecords().forEach(x -> {
......
......@@ -564,10 +564,11 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
String sort,
ReginParams reginParams) {
String orgCode = reginParams.getCompany().getCompanyCode();
String companyCode = reginParams.getCompany().getCompanyCode();
SortVo sortMap = commonService.sortFieldConversion(sort);
model.setTransferToUserIds(reginParams.getUserModel().getUserId());
Page<Map<String, Object>> noticePage = jgInstallationNoticeMapper.queryForPage(page, model, type, sortMap, orgCode);
String orgCode = reginParams.getCompany().getOrgCode();
Page<Map<String, Object>> noticePage = jgInstallationNoticeMapper.queryForPage(page, model, type, sortMap, companyCode, orgCode);
List<Map<String, Object>> mappedRecords = noticePage.getRecords().stream().peek(notice -> {
Optional<Long> noticeStatusOpt = Optional.ofNullable((String) notice.get("noticeStatus")).map(Long::valueOf);
noticeStatusOpt.ifPresent(status -> {
......
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