Commit 58ce840f authored by litengwei's avatar litengwei

安装告知列表权限

parent 944c6bec
......@@ -24,7 +24,7 @@ public interface JgInstallationNoticeMapper extends CustomBaseMapper<JgInstallat
* @param type 类型:enterprise-企业端、supervision-监管端
* @return 安装告知列表
*/
Page<JgInstallationNotice> queryForPage(Page<JgInstallationNotice> page, @Param("param") JgInstallationNoticeDto model, @Param("type") String type);
Page<JgInstallationNotice> queryForPage(Page<JgInstallationNotice> page, @Param("param") JgInstallationNoticeDto model, @Param("type") String type, @Param("orgCode") String orgCode);
/**
* 根据安装告知编号查询设备、设计、制造等信息
......
......@@ -41,7 +41,7 @@ public interface IJgInstallationNoticeService extends IService<JgInstallationNot
* @param type 类型:enterprise-企业端、supervision-监管端
* @return 安装告知列表
*/
Page<JgInstallationNoticeDto> queryForJgInstallationNoticePage(Page<JgInstallationNotice> page, JgInstallationNoticeDto model, String type);
Page<JgInstallationNoticeDto> queryForJgInstallationNoticePage(Page<JgInstallationNotice> page, JgInstallationNoticeDto model, String type, ReginParams reginParams);
/**
* 批量删除
......
......@@ -43,6 +43,9 @@
<if test="type == 'supervision'">
AND (isn.notice_status in ('6612', '6613', '6614') or isn.status in('6614') )
</if>
<if test="orgCode != null and orgCode != ''">
AND isn.install_unit_credit_code = #{orgCode}
</if>
</where>
ORDER BY
isn.notice_date DESC
......
......@@ -126,7 +126,8 @@ public class JgInstallationNoticeController extends BaseController {
@RequestBody(required = false) JgInstallationNoticeDto model
) {
Page<JgInstallationNotice> page = new Page<>(current, size);
return ResponseHelper.buildResponse(iJgInstallationNoticeService.queryForJgInstallationNoticePage(page, model, type));
ReginParams reginParams = getSelectedOrgInfo();
return ResponseHelper.buildResponse(iJgInstallationNoticeService.queryForJgInstallationNoticePage(page, model, type, reginParams));
}
/**
......
......@@ -220,8 +220,16 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
* @return 安装告知列表
*/
@Override
public Page<JgInstallationNoticeDto> queryForJgInstallationNoticePage(Page<JgInstallationNotice> page, JgInstallationNoticeDto model, String type) {
Page<JgInstallationNotice> noticePage = jgInstallationNoticeMapper.queryForPage(page, model, type);
public Page<JgInstallationNoticeDto> queryForJgInstallationNoticePage(Page<JgInstallationNotice> page, JgInstallationNoticeDto model, String type , ReginParams reginParams) {
String orgCode;
if(type.equals("enterprise")) {
orgCode = reginParams.getCompany().getCompanyCode();
} else {
orgCode = reginParams.getCompany().getOrgCode();
}
Page<JgInstallationNotice> noticePage = jgInstallationNoticeMapper.queryForPage(page, model, type, orgCode);
// 将Page<JgInstallationNotice>转化为Page<JgInstallationNoticeDto>
Page<JgInstallationNoticeDto> noticeDtoPage = new Page<>();
......
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