Browse Source

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

v6
yanyan 1 year ago
parent
commit
96d7cb710e
  1. 18
      lib/EmergencyService/zdxtEmergencyAppService/src/main/java/com/zdxt/app/controller/AppEnforcementRegistrationController.java
  2. 7
      lib/EmergencyService/zdxtEmergencyAuthService/src/main/resources/mapper/system/UserMapper.xml
  3. 10
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/NonEnforcementRegistration.java
  4. 10
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/ThirdLoginServiceImpl.java
  5. 34
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementInspectionProgramMapper.xml
  6. 26
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementRegistrationMapper.xml
  7. 2
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/NonEnforcementRegistrationMapper.xml

18
lib/EmergencyService/zdxtEmergencyAppService/src/main/java/com/zdxt/app/controller/AppEnforcementRegistrationController.java

@ -5,6 +5,7 @@ import cn.hutool.core.util.IdUtil;
import com.zdxt.auth.dto.DeptBean;
import com.zdxt.auth.dto.DictDataBean;
import com.zdxt.auth.dto.UserBean;
import com.zdxt.auth.feign.DeptApi;
import com.zdxt.auth.feign.DictDataApi;
import com.zdxt.auth.feign.UserApi;
import com.zdxt.auth.project.system.user.service.IUserService;
@ -50,6 +51,7 @@ public class AppEnforcementRegistrationController extends BaseController
@Autowired private IEnterpriseEvaluateService enterpriseEvaluateService;
@Autowired private IZqyjjdm137344Service iZqyjjdm137344Service;
@Autowired private UserApi userApi;
@Autowired private DeptApi deptApi;
@Autowired private DictDataApi dictDataApi;
@Autowired
private IUserService userService;
@ -204,9 +206,12 @@ public class AppEnforcementRegistrationController extends BaseController
@ResponseBody
public TableDataInfo queryListNew(EnforcementRegistration enforcementRegistration)
{
if (Objects.nonNull(enforcementRegistration.getUserId())) {
UserBean userByUserId = userApi.getUserByUserId(enforcementRegistration.getUserId());
enforcementRegistration.setDeptId(userByUserId == null ? null : userByUserId.getDeptId());
if (Objects.nonNull(enforcementRegistration.getUserId()) && enforcementRegistration.getDateType()==0) {
UserBean userByUser = userApi.getUserByUserId(enforcementRegistration.getUserId());
enforcementRegistration.setDeptId(userByUser == null ? null : userByUser.getDeptId());
DeptBean bureauDept = deptApi.iterationDeptParentToBureau(userByUser.getDeptId());
enforcementRegistration.setBureauDeptId(bureauDept.getDeptId());
}
//查询检查总次数
List<EnforcementRegistration> registrations = enforcementRegistrationService.selectEnforcementRegistrationListNew(enforcementRegistration);
@ -226,6 +231,13 @@ public class AppEnforcementRegistrationController extends BaseController
@ResponseBody
public ZDResponse queryByEpId(EnforcementRegistration enforcementRegistration)
{
if (Objects.nonNull(enforcementRegistration.getUserId()) && enforcementRegistration.getDateType()==0) {
UserBean userByUser = userApi.getUserByUserId(enforcementRegistration.getUserId());
enforcementRegistration.setDeptId(userByUser == null ? null : userByUser.getDeptId());
DeptBean bureauDept = deptApi.iterationDeptParentToBureau(userByUser.getDeptId());
enforcementRegistration.setBureauDeptId(bureauDept.getDeptId());
}
List<EnforcementRegistration> list = enforcementRegistrationService.selectEnforcementRegistrationByEpId(enforcementRegistration);
return ZDResponse.success("获取当前企业本月登记信息",list);
}

7
lib/EmergencyService/zdxtEmergencyAuthService/src/main/resources/mapper/system/UserMapper.xml

@ -205,8 +205,11 @@
</foreach>
</if>
<if test="params.showCardId != null and params.showCardId == 0">
AND u.law_certificate_num is not null
AND u.law_certificate_num !=""
AND (
(u.law_certificate_num is not null AND u.law_certificate_num !="")
or (d.`zone` = 5 or d.`zone` = 15)
or (d.`zone` = 6 or d.`zone` = 16)
)
</if>
and u.dept_id != 405
<if test="params.dataScope != null and params.dataScope != ''">

10
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/NonEnforcementRegistration.java

@ -22,6 +22,8 @@ public class NonEnforcementRegistration extends BaseDomain
private String enterpriseName;
/** 被执法企业统一社会信用代码 */
private String enterpriseNumber;
/** 企业注册地址 */
private String enterpriseAddress;
/** 执法时间 */
private Date enforcementTime;
@ -95,6 +97,14 @@ public class NonEnforcementRegistration extends BaseDomain
return enterpriseNumber;
}
public String getEnterpriseAddress() {
return enterpriseAddress;
}
public void setEnterpriseAddress(String enterpriseAddress) {
this.enterpriseAddress = enterpriseAddress;
}
public void setEnterpriseNumber(String enterpriseNumber) {
this.enterpriseNumber = enterpriseNumber;
}

10
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/ThirdLoginServiceImpl.java

@ -202,6 +202,16 @@ public class ThirdLoginServiceImpl implements ThirdLoginService {
user.setLawOfficer(false);
}
}
// 如果没有执法证件号, 则再次判断是否为消防
if (!user.getLawOfficer()) {
// 根据执法部门判断如果是公安, 则为执法人员权限 true
DeptBean bureauDept = deptApi.iterationDeptParentToBureauGA(user_source.getDeptId());
if (null != bureauDept && (6 == bureauDept.getZone() || 16 == bureauDept.getZone())) {
user.setLawOfficer(true);
} else {
user.setLawOfficer(false);
}
}
Map<String,Object> payload = new HashMap<>();
payload.put("id", user.getUserId());
payload.put("name", user.getLoginName());

34
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementInspectionProgramMapper.xml

@ -187,19 +187,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and bureau_dept_name like concat('%', #{bureauDeptName}, '%')
</if>
<if test="beginTime != null and beginTime != ''">
and DATE_FORMAT(create_time,'%Y-%m-%d') >= #{beginTime}
and DATE_FORMAT(enforcement_time,'%Y-%m-%d') >= #{beginTime}
</if>
<if test="endTime != null and endTime != ''">
and #{endTime} >= DATE_FORMAT(create_time,'%Y-%m-%d')
and #{endTime} >= DATE_FORMAT(enforcement_time,'%Y-%m-%d')
</if>
<if test="year != null and year != ''">
and YEAR(create_time) = #{year}
and YEAR(enforcement_time) = #{year}
</if>
<if test="quarter != null and quarter != '' ">
and QUARTER(create_time) = #{quarter}
and QUARTER(enforcement_time) = #{quarter}
</if>
<if test="month != null and month != '' ">
and DATE_FORMAT(create_time, '%m') = #{month}
and DATE_FORMAT(enforcement_time, '%m') = #{month}
</if>
<if test="params.dataScope != null and params.dataScope != ''">
${params.dataScope}
@ -223,19 +223,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
bureau_dept_name like concat('%', #{bureauDeptName}, '%')
</if>
<if test="beginTime != null and beginTime != ''">
and DATE_FORMAT(create_time,'%Y-%m-%d') >= #{beginTime}
and DATE_FORMAT(enforcement_time,'%Y-%m-%d') >= #{beginTime}
</if>
<if test="endTime != null and endTime != ''">
and #{endTime} >= DATE_FORMAT(create_time,'%Y-%m-%d')
and #{endTime} >= DATE_FORMAT(enforcement_time,'%Y-%m-%d')
</if>
<if test="year != null and year != ''">
and YEAR(create_time) = #{year}
and YEAR(enforcement_time) = #{year}
</if>
<if test="quarter != null and quarter != '' ">
and QUARTER(create_time) = #{quarter}
and QUARTER(enforcement_time) = #{quarter}
</if>
<if test="month != null and month != '' ">
and DATE_FORMAT(create_time, '%m') = #{month}
and DATE_FORMAT(enforcement_time, '%m') = #{month}
</if>
<if test="params.dataScope != null and params.dataScope != ''">
${params.dataScope}
@ -291,19 +291,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and bureau_dept_name like concat('%', #{bureauDeptName}, '%')
</if>
<if test="beginTime != null and beginTime != ''">
and <![CDATA[ create_time >= concat('%', #{beginTime}, '%') ]]>
and <![CDATA[ create_time >= concat('%', #{enforcement_time}, '%') ]]>
</if>
<if test="endTime != null and endTime != ''">
and <![CDATA[ create_time <= concat('%', #{endTime}, '%') ]]>
and <![CDATA[ create_time <= concat('%', #{enforcement_time}, '%') ]]>
</if>
<if test="year != null and year != ''">
and YEAR(create_time) = #{year}
and YEAR(enforcement_time) = #{year}
</if>
<if test="quarter != null and quarter != '' ">
and QUARTER(create_time) = #{quarter}
and QUARTER(enforcement_time) = #{quarter}
</if>
<if test="month != null and month != '' ">
and DATE_FORMAT(create_time, '%m') = #{month}
and DATE_FORMAT(enforcement_time, '%m') = #{month}
</if>
<if test="params.dataScope != null and params.dataScope != ''">
${params.dataScope}
@ -359,7 +359,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
FROM enforcement_inspection_program
<where>
<if test="year != null and year != ''">
AND YEAR(create_time) = #{year}
AND YEAR(enforcement_time) = #{year}
</if>
<if test="params.dataScope != null and params.dataScope != ''">
${params.dataScope}
@ -424,7 +424,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
FROM enforcement_inspection_program
<where>
<if test="year != null and year != ''">
AND YEAR(create_time) = #{year}
AND YEAR(enforcement_time) = #{year}
</if>
<if test="params.dataScope != null and params.dataScope != ''">
${params.dataScope}

26
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementRegistrationMapper.xml

@ -336,10 +336,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
and enforcement_time &lt;= #{params.endTime}
</if>
<if test="params.dataScope != null and params.dataScope != ''">
<!-- 数据范围过滤 -->
${params.dataScope}
<if test="(userId != null and userId != '') and (bureauDeptId == null or bureauDeptId == '')">
and (law_enforcer_id = #{userId} or user_id = #{userId} or law_enforcer_id = #{userId} or FIND_IN_SET(#{userId}, law_enforcer_id_two))
</if>
<if test="bureauDeptId != null and bureauDeptId != ''">
and bureau_dept_id = #{bureauDeptId}
</if>
<!-- <if test="params.dataScope != null and params.dataScope != ''">-->
<!-- &lt;!&ndash; 数据范围过滤 &ndash;&gt;-->
<!-- ${params.dataScope}-->
<!-- </if>-->
</where>
GROUP BY enterprise_number order by enforcement_time desc) t
<where>
@ -414,10 +420,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
and enforcement_time &lt;= #{params.endTime}
</if>
<if test="params.dataScope != null and params.dataScope != ''">
<!-- 数据范围过滤 -->
${params.dataScope}
<if test="(userId != null and userId != '') and (bureauDeptId == null or bureauDeptId == '')">
and (law_enforcer_id = #{userId} or user_id = #{userId} or law_enforcer_id = #{userId} or FIND_IN_SET(#{userId}, law_enforcer_id_two))
</if>
<if test="bureauDeptId != null and bureauDeptId != ''">
and bureau_dept_id = #{bureauDeptId}
</if>
<!-- <if test="params.dataScope != null and params.dataScope != ''">-->
<!-- &lt;!&ndash; 数据范围过滤 &ndash;&gt;-->
<!-- ${params.dataScope}-->
<!-- </if>-->
</where>
order by enforcement_time desc
</select>
@ -493,7 +505,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
${params.dataScope}
</if>
</where>
order by create_time desc
order by enforcement_time desc
</select>
<select id="selectEnforcementRegistrationAndAddressList" parameterType="EnforcementRegistration" resultMap="EnforcementRegistrationResult">

2
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/NonEnforcementRegistrationMapper.xml

@ -87,6 +87,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="id != null and id != ''">id,</if>
<if test="enterpriseName != null and enterpriseName != ''">enterprise_name,</if>
<if test="enterpriseNumber != null and enterpriseNumber != ''">enterprise_number,</if>
<if test="enterpriseAddress != null and enterpriseAddress != ''">enterprise_address,</if>
<if test="enforcementTime != null ">enforcement_time,</if>
<if test="lawEnforcer != null and lawEnforcer != ''">law_enforcer,</if>
<if test="lawEnforcerId != null and lawEnforcerId != ''">law_enforcer_id,</if>
@ -121,6 +122,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="id != null and id != ''">#{id},</if>
<if test="enterpriseName != null and enterpriseName != ''">#{enterpriseName},</if>
<if test="enterpriseNumber != null and enterpriseNumber != ''">#{enterpriseNumber},</if>
<if test="enterpriseAddress != null and enterpriseAddress != ''">#{enterpriseAddress},</if>
<if test="enforcementTime != null ">#{enforcementTime},</if>
<if test="lawEnforcer != null and lawEnforcer != ''">#{lawEnforcer},</if>
<if test="lawEnforcerId != null and lawEnforcerId != ''">#{lawEnforcerId},</if>

Loading…
Cancel
Save