Commit 903536b0 authored by LiuLin's avatar LiuLin

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

parents 377067f5 f919430c
...@@ -156,4 +156,14 @@ public class JyjcInspectionResultModel extends BaseModel { ...@@ -156,4 +156,14 @@ public class JyjcInspectionResultModel extends BaseModel {
* 校验检验系统唯一流水号,排查问题,跟踪问题使用 * 校验检验系统唯一流水号,排查问题,跟踪问题使用
*/ */
private String traceId; private String traceId;
/**
* 当前人的公司code
*/
private String companyCode;
/**
* 身份标识(前端行内权限按钮控制用)
*/
private String identity;
} }
...@@ -85,6 +85,9 @@ ...@@ -85,6 +85,9 @@
<if test="jyjcInspectionResultModel.applicationUnitCode != '' and jyjcInspectionResultModel.applicationUnitCode != null"> <if test="jyjcInspectionResultModel.applicationUnitCode != '' and jyjcInspectionResultModel.applicationUnitCode != null">
and res.application_unit_code = #{jyjcInspectionResultModel.applicationUnitCode} and res.application_unit_code = #{jyjcInspectionResultModel.applicationUnitCode}
</if> </if>
<if test="jyjcInspectionResultModel.useOrgCode != '' and jyjcInspectionResultModel.useOrgCode != null">
and use_org_code like concat('%',#{jyjcInspectionResultModel.useOrgCode},'%')
</if>
<if test="jyjcInspectionResultModel.useInnerCode != '' and jyjcInspectionResultModel.useInnerCode != null"> <if test="jyjcInspectionResultModel.useInnerCode != '' and jyjcInspectionResultModel.useInnerCode != null">
and use_inner_code like concat('%',#{jyjcInspectionResultModel.useInnerCode},'%') and use_inner_code like concat('%',#{jyjcInspectionResultModel.useInnerCode},'%')
</if> </if>
...@@ -108,13 +111,13 @@ ...@@ -108,13 +111,13 @@
</if> </if>
<choose> <choose>
<when test="identity == 'apply'"> <when test="identity == 'apply'">
and use_org_code like concat('%',#{jyjcInspectionResultModel.useOrgCode},'%') and res.application_unit_code = #{jyjcInspectionResultModel.companyCode}
</when> </when>
<when test="identity == 'receive'"> <when test="identity == 'receive'">
and res.inspection_unit_code = #{jyjcInspectionResultModel.inspectionUnitCode} and res.inspection_unit_code = #{jyjcInspectionResultModel.companyCode}
</when> </when>
<when test="identity == 'all'"> <when test="identity == 'all'">
and (use_org_code like concat('%',#{jyjcInspectionResultModel.useOrgCode},'%') or es.inspection_unit_code = #{jyjcInspectionResultModel.inspectionUnitCode}) and (res.application_unit_code = #{jyjcInspectionResultModel.companyCode} or es.inspection_unit_code = #{jyjcInspectionResultModel.companyCode})
</when> </when>
<otherwise> <otherwise>
1 = 2 1 = 2
......
...@@ -128,6 +128,7 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR ...@@ -128,6 +128,7 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
} }
// 判断当前登录人身份(报检机构、接收机构、即时报检又是接收机构、都不是(不存在此情况)) // 判断当前登录人身份(报检机构、接收机构、即时报检又是接收机构、都不是(不存在此情况))
String identity= this.getCompanyIdentityByType(reginParams.getCompany().getCompanyType()); String identity= this.getCompanyIdentityByType(reginParams.getCompany().getCompanyType());
model.setCompanyCode(reginParams.getCompany().getCompanyCode());
Page<JyjcInspectionResultModel> resultPage = resultMapper.selectForPage(page, model, identity); Page<JyjcInspectionResultModel> resultPage = resultMapper.selectForPage(page, model, identity);
resultPage.getRecords().forEach(v -> { resultPage.getRecords().forEach(v -> {
if (ResultStatusEnum.NO_RESULT.getCode().equals(v.getResultStatus())) { if (ResultStatusEnum.NO_RESULT.getCode().equals(v.getResultStatus())) {
...@@ -136,6 +137,7 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR ...@@ -136,6 +137,7 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
if (ResultStatusEnum.YES_RESULT.getCode().equals(v.getResultStatus())) { if (ResultStatusEnum.YES_RESULT.getCode().equals(v.getResultStatus())) {
v.setResultStatusName(ResultStatusEnum.YES_RESULT.getName()); v.setResultStatusName(ResultStatusEnum.YES_RESULT.getName());
} }
v.setIdentity(identity);
}); });
return resultPage; return resultPage;
} }
......
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