Commit 22604ad0 authored by suhuiguang's avatar suhuiguang

refeat(jyjc): 报检规则4.0开发

1.报检规则联调自测,大型游乐设施AB级过滤
parent 8a89354f
...@@ -7,7 +7,7 @@ import com.yeejoin.amos.boot.module.jyjc.api.dto.PublicityInspectOrgInfoDto; ...@@ -7,7 +7,7 @@ import com.yeejoin.amos.boot.module.jyjc.api.dto.PublicityInspectOrgInfoDto;
import com.yeejoin.amos.boot.module.jyjc.api.model.JyjcOpeningApplicationModel; import com.yeejoin.amos.boot.module.jyjc.api.model.JyjcOpeningApplicationModel;
import com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcOpeningApplication; import com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcOpeningApplication;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jyjc.api.model.JyjcOpeningApplicationRequstDto; import com.yeejoin.amos.boot.module.jyjc.api.model.JyjcOpeningApplicationRequestDto;
import com.yeejoin.amos.boot.module.jyjc.api.vo.JyjcOpeningApplicationVo; import com.yeejoin.amos.boot.module.jyjc.api.vo.JyjcOpeningApplicationVo;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -22,7 +22,7 @@ import java.util.List; ...@@ -22,7 +22,7 @@ import java.util.List;
public interface JyjcOpeningApplicationMapper extends BaseMapper<JyjcOpeningApplication> { public interface JyjcOpeningApplicationMapper extends BaseMapper<JyjcOpeningApplication> {
Page<JyjcOpeningApplicationModel> selectJyjcOpeningApplicationList(@Param("page")Page<JyjcOpeningApplication> page, Page<JyjcOpeningApplicationModel> selectJyjcOpeningApplicationList(@Param("page")Page<JyjcOpeningApplication> page,
@Param("jyjcOpeningApplicationRequstDto") JyjcOpeningApplicationRequstDto jyjcOpeningApplicationRequstDto, @Param("jyjcOpeningApplicationRequestDto") JyjcOpeningApplicationRequestDto jyjcOpeningApplicationRequestDto,
@Param("applyStartTime") String applyStartTime, @Param("applyStartTime") String applyStartTime,
@Param("currentUserId") String currentUserId, @Param("currentUserId") String currentUserId,
@Param("applyendTime") String applyendTime, @Param("applyendTime") String applyendTime,
......
package com.yeejoin.amos.boot.module.jyjc.api.model; package com.yeejoin.amos.boot.module.jyjc.api.model;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto;
import com.yeejoin.amos.boot.module.ymt.api.dto.TzBaseUnitLicenceDto;
import com.yeejoin.amos.boot.module.ymt.api.dto.TzsUserInfoDto;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.util.Date; import java.io.Serializable;
import java.util.List;
@Data @Data
public class JyjcOpeningApplicationRequstDto { public class JyjcOpeningApplicationRequestDto implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "单位编码") @ApiModelProperty(value = "单位编码")
private String unitCode; private String unitCode;
@ApiModelProperty (value = "单位编码Name") @ApiModelProperty(value = "单位编码Name")
private String unitCodeName; private String unitCodeName;
@ApiModelProperty (value = "检测区域名称(冗余)") @ApiModelProperty(value = "检测区域名称(冗余)")
private String detectionRegionName; private String detectionRegionName;
@ApiModelProperty (value = "申请单号") @ApiModelProperty(value = "申请单号")
private String applicationSeq; private String applicationSeq;
@ApiModelProperty (value = "检验结果方式") @ApiModelProperty(value = "检验结果方式")
private String resultType; private String resultType;
@ApiModelProperty (value = "有效期至") @ApiModelProperty(value = "有效期至")
private String expiryDate; private String expiryDate;
@ApiModelProperty (value = "受理日期(接收日期)") @ApiModelProperty(value = "受理日期(接收日期)")
private String acceptDate; private String acceptDate;
@ApiModelProperty (value = "状态") @ApiModelProperty(value = "状态")
private String status; private String status;
@ApiModelProperty (value = "状态Name") @ApiModelProperty(value = "状态Name")
private String statusName; private String statusName;
@ApiModelProperty (value = "申请时间") @ApiModelProperty(value = "申请时间")
private String applyTime; private String applyTime;
@ApiModelProperty (value = "supervision: 监管; enterprise: 企业") @ApiModelProperty(value = "supervision: 监管; enterprise: 企业")
private String type; private String type;
@ApiModelProperty("开通业务类型") @ApiModelProperty("开通业务类型")
private String openBizType; private String openBizType;
@ApiModelProperty("身份信息对应的开通业务类型")
private String openBizTypeIdentify;
} }
...@@ -11,14 +11,14 @@ ...@@ -11,14 +11,14 @@
tz_jyjc_opening_application a tz_jyjc_opening_application a
LEFT JOIN tz_base_enterprise_info tbei ON a.unit_code = tbei.use_code LEFT JOIN tz_base_enterprise_info tbei ON a.unit_code = tbei.use_code
<where> <where>
<if test="jyjcOpeningApplicationRequstDto.applicationSeq != '' and jyjcOpeningApplicationRequstDto.applicationSeq != null"> <if test="jyjcOpeningApplicationRequestDto.applicationSeq != '' and jyjcOpeningApplicationRequestDto.applicationSeq != null">
and a.application_seq like concat('%',#{jyjcOpeningApplicationRequstDto.applicationSeq},'%') and a.application_seq like concat('%',#{jyjcOpeningApplicationRequestDto.applicationSeq},'%')
</if> </if>
<if test="jyjcOpeningApplicationRequstDto.acceptDate != '' and jyjcOpeningApplicationRequstDto.acceptDate != null"> <if test="jyjcOpeningApplicationRequestDto.acceptDate != '' and jyjcOpeningApplicationRequestDto.acceptDate != null">
and a.accept_date = #{jyjcOpeningApplicationRequstDto.acceptDate} and a.accept_date = #{jyjcOpeningApplicationRequestDto.acceptDate}
</if> </if>
<if test="jyjcOpeningApplicationRequstDto.status != '' and jyjcOpeningApplicationRequstDto.status != null"> <if test="jyjcOpeningApplicationRequestDto.status != '' and jyjcOpeningApplicationRequestDto.status != null">
and a.status = #{jyjcOpeningApplicationRequstDto.status} and a.status = #{jyjcOpeningApplicationRequestDto.status}
</if> </if>
<if test="applyendTime != '' and applyendTime != null"> <if test="applyendTime != '' and applyendTime != null">
and a.apply_time &lt;= #{applyendTime} and a.apply_time &lt;= #{applyendTime}
...@@ -26,17 +26,18 @@ ...@@ -26,17 +26,18 @@
<if test="applyStartTime != '' and applyStartTime != null"> <if test="applyStartTime != '' and applyStartTime != null">
and a.apply_time &gt;=#{applyStartTime} and a.apply_time &gt;=#{applyStartTime}
</if> </if>
<if test="jyjcOpeningApplicationRequstDto.type == 'supervision'"> <if test="jyjcOpeningApplicationRequestDto.type == 'supervision'">
and (a.workflow_prostance_id <![CDATA[<>]]> '' OR a.transfer_to_user_ids LIKE concat ('%', #{currentUserId}, '%' )) and (a.workflow_prostance_id <![CDATA[<>]]> '' OR a.transfer_to_user_ids LIKE concat ('%', #{currentUserId}, '%' ))
</if> </if>
<if test="jyjcOpeningApplicationRequstDto.unitCode != '' and jyjcOpeningApplicationRequstDto.unitCode != null"> <if test="jyjcOpeningApplicationRequestDto.unitCode != '' and jyjcOpeningApplicationRequestDto.unitCode != null">
and (a.unit_code = #{jyjcOpeningApplicationRequstDto.unitCode} OR a.transfer_to_user_ids LIKE concat ( '%', #{currentUserId}, '%' ) ) and (a.unit_code = #{jyjcOpeningApplicationRequestDto.unitCode} OR a.transfer_to_user_ids LIKE concat ( '%', #{currentUserId}, '%' ) )
and a.open_biz_type = #{jyjcOpeningApplicationRequestDto.openBizTypeIdentify}
</if> </if>
<if test="jyjcOpeningApplicationRequstDto.openBizType != '' and jyjcOpeningApplicationRequstDto.openBizType != null"> <if test="jyjcOpeningApplicationRequestDto.openBizType != '' and jyjcOpeningApplicationRequestDto.openBizType != null">
and a.open_biz_type = #{jyjcOpeningApplicationRequstDto.openBizType} and a.open_biz_type = #{jyjcOpeningApplicationRequestDto.openBizType}
</if> </if>
<if test="jyjcOpeningApplicationRequstDto.unitCodeName != '' and jyjcOpeningApplicationRequstDto.unitCodeName != null"> <if test="jyjcOpeningApplicationRequestDto.unitCodeName != '' and jyjcOpeningApplicationRequestDto.unitCodeName != null">
and a.unit_code_name like concat('%',#{jyjcOpeningApplicationRequstDto.unitCodeName},'%') and a.unit_code_name like concat('%',#{jyjcOpeningApplicationRequestDto.unitCodeName},'%')
</if> </if>
<if test="orgCode != '' and orgCode != null"> <if test="orgCode != '' and orgCode != null">
and tbei.supervise_org_code like concat(#{orgCode},'%') and tbei.supervise_org_code like concat(#{orgCode},'%')
......
...@@ -10,7 +10,7 @@ import com.yeejoin.amos.boot.module.common.api.dto.BaseEnterpriseCertDto; ...@@ -10,7 +10,7 @@ import com.yeejoin.amos.boot.module.common.api.dto.BaseEnterpriseCertDto;
import com.yeejoin.amos.boot.module.jyjc.api.dto.InspectionCompanyPublicityDto; import com.yeejoin.amos.boot.module.jyjc.api.dto.InspectionCompanyPublicityDto;
import com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcOpeningApplication; import com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcOpeningApplication;
import com.yeejoin.amos.boot.module.jyjc.api.model.JyjcOpeningApplicationModel; import com.yeejoin.amos.boot.module.jyjc.api.model.JyjcOpeningApplicationModel;
import com.yeejoin.amos.boot.module.jyjc.api.model.JyjcOpeningApplicationRequstDto; import com.yeejoin.amos.boot.module.jyjc.api.model.JyjcOpeningApplicationRequestDto;
import com.yeejoin.amos.boot.module.jyjc.biz.config.BaseException; import com.yeejoin.amos.boot.module.jyjc.biz.config.BaseException;
import com.yeejoin.amos.boot.module.jyjc.biz.service.impl.JyjcOpeningApplicationServiceImpl; import com.yeejoin.amos.boot.module.jyjc.biz.service.impl.JyjcOpeningApplicationServiceImpl;
import com.yeejoin.amos.boot.module.ymt.api.dto.TzBaseEnterpriseInfoDto; import com.yeejoin.amos.boot.module.ymt.api.dto.TzBaseEnterpriseInfoDto;
...@@ -153,13 +153,13 @@ public class JyjcOpeningApplicationController extends BaseController { ...@@ -153,13 +153,13 @@ public class JyjcOpeningApplicationController extends BaseController {
@ApiOperation(httpMethod = "POST", value = "分页查询", notes = "分页查询") @ApiOperation(httpMethod = "POST", value = "分页查询", notes = "分页查询")
public ResponseModel<Page<JyjcOpeningApplicationModel>> queryForPage(@RequestParam(value = "current") int current, public ResponseModel<Page<JyjcOpeningApplicationModel>> queryForPage(@RequestParam(value = "current") int current,
@RequestParam(value = "size") int size, @RequestParam(value = "size") int size,
@RequestBody JyjcOpeningApplicationRequstDto jyjcOpeningApplicationRequstDto, @RequestBody JyjcOpeningApplicationRequestDto jyjcOpeningApplicationRequestDto,
@ApiParam(value = "客户端类型: jgAudit-监管审核;jgLook-监管查看") @RequestParam(value = "client", required = false, defaultValue = "jgAudit") String client @ApiParam(value = "客户端类型: jgAudit-监管审核;jgLook-监管查看") @RequestParam(value = "client", required = false, defaultValue = "jgAudit") String client
) { ) {
Page<JyjcOpeningApplication> page = new Page<JyjcOpeningApplication>(); Page<JyjcOpeningApplication> page = new Page<JyjcOpeningApplication>();
page.setCurrent(current); page.setCurrent(current);
page.setSize(size); page.setSize(size);
return ResponseHelper.buildResponse(jyjcOpeningApplicationServiceImpl.queryForJyjcOpeningApplicationPage(page, jyjcOpeningApplicationRequstDto, client)); return ResponseHelper.buildResponse(jyjcOpeningApplicationServiceImpl.queryForJyjcOpeningApplicationPage(page, jyjcOpeningApplicationRequestDto, client));
} }
/** /**
......
...@@ -450,13 +450,15 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp ...@@ -450,13 +450,15 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
return this.queryForList("", false); return this.queryForList("", false);
} }
public Page<JyjcOpeningApplicationModel> queryForJyjcOpeningApplicationPage(Page<JyjcOpeningApplication> page, JyjcOpeningApplicationRequstDto dto,String client) { public Page<JyjcOpeningApplicationModel> queryForJyjcOpeningApplicationPage(Page<JyjcOpeningApplication> page, JyjcOpeningApplicationRequestDto dto, String client) {
ReginParams reginParams = commonService.getReginParamsOfCurrentUser(); ReginParams reginParams = commonService.getReginParamsOfCurrentUser();
String companyLevel = CommonServiceImpl.getCompanyLevel(reginParams.getCompany()); String companyLevel = CommonServiceImpl.getCompanyLevel(reginParams.getCompany());
String currentUserId = RequestContext.getExeUserId(); String currentUserId = RequestContext.getExeUserId();
String level = reginParams.getCompany().getLevel(); String level = reginParams.getCompany().getLevel();
if (BaseController.COMPANY_TYPE_COMPANY.equals(level)) { if (BaseController.COMPANY_TYPE_COMPANY.equals(level)) {
dto.setType("enterprise"); dto.setType("enterprise");
// 按照登录人身份过滤开通单据,如检验机构身份登录只能看到检验开通的单据
dto.setOpenBizTypeIdentify(OpenBizTypeEnumV2.getOneByUnitType(reginParams.getCompany().getCompanyType()).getCode());
dto.setUnitCode(CommonServiceImpl.getUnitCode(reginParams.getCompany())); dto.setUnitCode(CommonServiceImpl.getUnitCode(reginParams.getCompany()));
} else { } else {
dto.setType("supervision"); dto.setType("supervision");
......
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