Browse Source

新增手机号加密、非行政检查部分功能

v6
Chendy 1 year ago
parent
commit
7e5b8f6fa9
  1. 19
      lib/EmergencyBaseLib/EmergencyCommon/src/main/java/com/zdxt/common/util/CommonUtil.java
  2. 59
      lib/EmergencyService/zdxtEmergencyAppService/src/main/java/com/zdxt/app/controller/AppEnforcementRegistrationController.java
  3. 16
      lib/EmergencyService/zdxtEmergencyAppService/src/main/java/com/zdxt/app/controller/AppEnterpriseLawEnforcementController.java
  4. 13
      lib/EmergencyService/zdxtEmergencyAppService/src/main/java/com/zdxt/app/controller/AppNonEnforcementRegistrationController.java
  5. 51
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/NonEnforcementRegistration.java
  6. 2
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/NonEnforcementRegistrationMapper.java
  7. 2
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/INonEnforcementRegistrationService.java
  8. 73
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/NonEnforcementRegistrationServiceImpl.java
  9. 95
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/NonEnforcementRegistrationMapper.xml

19
lib/EmergencyBaseLib/EmergencyCommon/src/main/java/com/zdxt/common/util/CommonUtil.java

@ -0,0 +1,19 @@
package com.zdxt.common.util;
import com.zdxt.common.util.StringUtils;
public class CommonUtil {
/**
* 手机号加密
* @return
*/
public static String encryptPhone(String num){
if(StringUtils.isEmpty(num))return num;
String regex = "^1\\d{10}$";
if(num.matches(regex)){
return num.replaceAll("(\\d{3})\\d{4}(\\d{4})", "$1****$2");
}
return num;
}
}

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

@ -1,7 +1,6 @@
package com.zdxt.app.controller;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil;
import com.zdxt.common.util.CommonUtil;
import com.zdxt.auth.dto.DeptBean;
import com.zdxt.auth.dto.DictDataBean;
import com.zdxt.auth.dto.UserBean;
@ -9,26 +8,22 @@ 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;
import com.zdxt.auth.project.system.user.service.UserServiceImpl;
import com.zdxt.code.domain.*;
import com.zdxt.code.service.*;
import com.zdxt.common.ZDResponse;
import com.zdxt.common.controller.BaseController;
import com.zdxt.common.util.*;
import com.zdxt.domain.auth.User;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import java.math.BigDecimal;
import java.time.Instant;
import java.time.LocalDate;
import java.time.ZoneId;
import java.time.temporal.ChronoUnit;
import java.util.*;
import java.util.stream.Collectors;
/**
@ -159,12 +154,15 @@ public class AppEnforcementRegistrationController extends BaseController
}
}
// 执法人员1需要展示用户名+执法码
// 执法人员1需要展示用户名+执法码 没有执法码展示加密手机号
UserBean userBean = userApi.getUserByUserId(ee.getLawEnforcerId());
String lawCN = StringUtils.isEmpty(userBean.getLawCertificateNum())?"":userBean.getLawCertificateNum();
ee.setLawEnforcer(userBean.getUserName() +" "+ lawCN);
String lawCN =userBean.getUserName() +" "+userBean.getLawCertificateNum();
if(StringUtils.isEmpty(userBean.getLawCertificateNum())){
lawCN=userBean.getUserName() +" "+ CommonUtil.encryptPhone(userBean.getPhonenumber());
}
ee.setLawEnforcer(lawCN);
// 执法人员2需要展示用户名+执法码
// 执法人员2需要展示用户名+执法码 没有执法码展示加密手机号
List<String> lawTwoList = new ArrayList<>();
List<UserBean> userBeans = new ArrayList<>();
if (StringUtils.isNotEmpty(ee.getLawEnforcerIdTwo())) {
@ -172,9 +170,11 @@ public class AppEnforcementRegistrationController extends BaseController
}
// String tmpUserShow = "";
for (UserBean ub : userBeans) {
String lawCertificateNum = StringUtils.isEmpty(ub.getLawCertificateNum())?"":ub.getLawCertificateNum();
// tmpUserShow += ub.getUserName() +" "+ lawCertificateNum + ",";
lawTwoList.add(ub.getUserName() +" "+ lawCertificateNum);
String temp=ub.getUserName() +" "+ub.getLawCertificateNum();
if(StringUtils.isEmpty(ub.getLawCertificateNum())){
temp=ub.getUserName() +" "+ CommonUtil.encryptPhone(ub.getPhonenumber());
}
lawTwoList.add(temp);
}
// if (tmpUserShow.length() > 0) {
// tmpUserShow = tmpUserShow.substring(0, tmpUserShow.length()-1);
@ -538,8 +538,11 @@ public class AppEnforcementRegistrationController extends BaseController
// 执法人员1需要展示用户名+执法码
UserBean userBean = userApi.getUserByUserId(enforcementRegistration.getLawEnforcerId());
String lawCN = StringUtils.isEmpty(userBean.getLawCertificateNum())?"":userBean.getLawCertificateNum();
enforcementRegistration.setLawEnforcer(userBean.getUserName() +" "+ lawCN);
String lawCN = userBean.getUserName() +" "+userBean.getLawCertificateNum();
if(StringUtils.isEmpty(userBean.getLawCertificateNum())){
lawCN= userBean.getUserName() +" "+CommonUtil.encryptPhone(userBean.getPhonenumber());
}
enforcementRegistration.setLawEnforcer(lawCN);
// 执法人员2需要展示用户名+执法码
List<UserBean> userBeans = new ArrayList<>();
@ -548,8 +551,12 @@ public class AppEnforcementRegistrationController extends BaseController
}
String tmpUserShow = "";
for (UserBean ub : userBeans) {
String lawCertificateNum = StringUtils.isEmpty(ub.getLawCertificateNum())?"":ub.getLawCertificateNum();
tmpUserShow += ub.getUserName() +" "+ lawCertificateNum + ",";
String temp = ub.getLawCertificateNum();
if(StringUtils.isEmpty(temp)){
temp=CommonUtil.encryptPhone(ub.getPhonenumber());
}
tmpUserShow += ub.getUserName() +" "+ temp + ",";
}
if (tmpUserShow.length() > 0) {
tmpUserShow = tmpUserShow.substring(0, tmpUserShow.length()-1);
@ -622,20 +629,26 @@ public class AppEnforcementRegistrationController extends BaseController
}
for (EnforcementRegistration reg : regResults) {
// 执法人员1需要展示用户名+执法码
// 执法人员1需要展示用户名+执法码 没有执法码展示加密手机号
UserBean userBean = userApi.getUserByUserId(reg.getLawEnforcerId());
String lawCN = StringUtils.isEmpty(userBean.getLawCertificateNum())?"":userBean.getLawCertificateNum();
reg.setLawEnforcer(userBean.getUserName() +" "+ lawCN);
String lawCN = userBean.getUserName() +" "+userBean.getLawCertificateNum();
if(StringUtils.isEmpty(userBean.getLawCertificateNum())){
lawCN=userBean.getUserName() +" "+ CommonUtil.encryptPhone(userBean.getPhonenumber());
}
reg.setLawEnforcer(lawCN);
// 执法人员2需要展示用户名+执法码
// 执法人员2需要展示用户名+执法码 没有执法码展示加密手机号
List<UserBean> userBeans = new ArrayList<>();
if (StringUtils.isNotEmpty(reg.getLawEnforcerIdTwo())) {
userBeans = userApi.getUserByUserIds(reg.getLawEnforcerIdTwo());
}
String tmpUserShow = "";
for (UserBean ub : userBeans) {
String lawCertificateNum = StringUtils.isEmpty(ub.getLawCertificateNum())?"":ub.getLawCertificateNum();
tmpUserShow += ub.getUserName() +" "+ lawCertificateNum + ",";
String temp = ub.getLawCertificateNum();
if(StringUtils.isEmpty(temp)){
temp= CommonUtil.encryptPhone(ub.getPhonenumber());
}
tmpUserShow += ub.getUserName() +" "+ temp + ",";
}
if (tmpUserShow.length() > 0) {
tmpUserShow = tmpUserShow.substring(0, tmpUserShow.length()-1);

16
lib/EmergencyService/zdxtEmergencyAppService/src/main/java/com/zdxt/app/controller/AppEnterpriseLawEnforcementController.java

@ -22,6 +22,7 @@ import com.zdxt.code.service.ILinkageDictService;
import com.zdxt.code.utils.ZwSmsClient;
import com.zdxt.common.ZDResponse;
import com.zdxt.common.controller.BaseController;
import com.zdxt.common.util.CommonUtil;
import com.zdxt.common.util.StringUtils;
import com.zdxt.common.util.TableDataInfo;
import org.apache.commons.collections.map.HashedMap;
@ -116,8 +117,11 @@ public class AppEnterpriseLawEnforcementController extends BaseController
}
String tmpUserShow = "";
for (UserBean ub : userBeans) {
String lawCertificateNum = StringUtils.isEmpty(ub.getLawCertificateNum())?"":ub.getLawCertificateNum();
tmpUserShow += ub.getUserName() +" "+ lawCertificateNum + ",";
String temp = ub.getLawCertificateNum();
if(StringUtils.isEmpty(temp)) {
temp = CommonUtil.encryptPhone(ub.getPhonenumber());
}
tmpUserShow += ub.getUserName() +" "+ temp + ",";
}
if (tmpUserShow.length() > 0) {
tmpUserShow = tmpUserShow.substring(0, tmpUserShow.length()-1);
@ -424,10 +428,12 @@ public class AppEnterpriseLawEnforcementController extends BaseController
if (StringUtils.isNotEmpty(enfrorcement.getLawEnforcerId())) {
userBean1 = userApi.getUserByUserId(Long.valueOf(enfrorcement.getLawEnforcerId()));
if(StrUtil.isNotEmpty(String.valueOf(userBean1.getUserId()))){
String lawCertificateNum = StringUtils.isEmpty(userBean1.getLawCertificateNum())?"":
userBean1.getLawCertificateNum();
String temp = userBean1.getLawCertificateNum();
if(StringUtils.isEmpty(temp)){
temp=CommonUtil.encryptPhone(userBean1.getPhonenumber());
}
//执法人员
enfrorcement.setLawEnforcerText(lawCertificateNum);
enfrorcement.setLawEnforcerText(temp);
}
}

13
lib/EmergencyService/zdxtEmergencyAppService/src/main/java/com/zdxt/app/controller/AppNonEnforcementRegistrationController.java

@ -63,13 +63,18 @@ public class AppNonEnforcementRegistrationController extends BaseController
/**
* 查询执法端-执法登记列表
*/
@GetMapping("/queryList")
@PostMapping("/queryList")
@ResponseBody
public ZDResponse queryListNew(NonEnforcementRegistration enforcementRegistration)
public TableDataInfo queryListNew(@RequestBody NonEnforcementRegistration enforcementRegistration)
{
//查询检查总次数
List<NonEnforcementRegistration> registrations = enforcementRegistrationService.selectNonEnforcementRegistrationList(enforcementRegistration);
return ZDResponse.success("操作成功", registrations);
int total=enforcementRegistrationService.getListTotal(enforcementRegistration);
List<NonEnforcementRegistration> list = enforcementRegistrationService.selectNonEnforcementRegistrationList(enforcementRegistration);
TableDataInfo rspData = getDataTable(list);
rspData.setCode(0);
rspData.setRows(list);
rspData.setTotal(total);
return rspData;
}
/**

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

@ -107,6 +107,57 @@ public class NonEnforcementRegistration extends BaseDomain
private String streetText;
/**
* 提醒类型 0:本单位 1:全市
*/
private Integer warnType;
private List<String> lawEnforcerOtherList;
/**
* 日期快捷查询 1 本月 2 本季度 3 本年
*/
private Integer dateType;
/**
* 搜索关键字
*/
private String searchValue;
@Override
public String getSearchValue() {
return searchValue;
}
@Override
public void setSearchValue(String searchValue) {
this.searchValue = searchValue;
}
public Integer getDateType() {
return dateType;
}
public void setDateType(Integer dateType) {
this.dateType = dateType;
}
public Integer getWarnType() {
return warnType;
}
public void setWarnType(Integer warnType) {
this.warnType = warnType;
}
public List<String> getLawEnforcerOtherList() {
return lawEnforcerOtherList;
}
public void setLawEnforcerOtherList(List<String> lawEnforcerOtherList) {
this.lawEnforcerOtherList = lawEnforcerOtherList;
}
public String getAreaText() {
return areaText;
}

2
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/NonEnforcementRegistrationMapper.java

@ -64,4 +64,6 @@ public interface NonEnforcementRegistrationMapper
List<NonEnforcementRegistration> getList(NonEnforcementRegistration param);
int getListTotal(NonEnforcementRegistration param);
}

2
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/INonEnforcementRegistrationService.java

@ -65,4 +65,6 @@ public interface INonEnforcementRegistrationService
List<NonEnforcementRegistration> getList(NonEnforcementRegistration param);
void downloadExcel(HttpServletResponse response, NonEnforcementRegistration param);
int getListTotal(NonEnforcementRegistration param);
}

73
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/NonEnforcementRegistrationServiceImpl.java

@ -1,10 +1,7 @@
package com.zdxt.code.service.impl;
import java.net.URLEncoder;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
import cn.hutool.core.util.IdUtil;
@ -18,6 +15,7 @@ import com.zdxt.auth.project.system.dict.service.IDictDataService;
import com.zdxt.code.domain.NonEnforcementRegistration;
import com.zdxt.code.mapper.NonEnforcementRegistrationMapper;
import com.zdxt.code.service.INonEnforcementRegistrationService;
import com.zdxt.common.util.CommonUtil;
import com.zdxt.common.util.Convert;
import com.zdxt.common.util.DateUtils;
import com.zdxt.common.util.StringUtils;
@ -25,6 +23,7 @@ import com.zdxt.common.zdxtFile.ZdxtFileCommon;
import com.zdxt.domain.auth.DictData;
import org.apache.poi.hssf.usermodel.*;
import org.apache.poi.ss.usermodel.*;
import org.jasypt.commons.CommonUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -58,6 +57,30 @@ public class NonEnforcementRegistrationServiceImpl implements INonEnforcementReg
{
NonEnforcementRegistration nonReg = nonEnforcementRegistrationMapper.selectNonEnforcementRegistrationById(id);
if (nonReg.getId() != null) {
UserBean user = userApi.getUserByUserId(Long.valueOf(nonReg.getLawEnforcerId()));
String temp=user.getLawCertificateNum();
if(StringUtils.isEmpty(temp)){
temp= CommonUtil.encryptPhone(user.getPhonenumber());
}
nonReg.setLawEnforcer(user.getUserName()+" "+temp);
if(StringUtils.isNotEmpty(nonReg.getLawEnforcerOther())){
List<UserBean> list = userApi.getUserByUserIds(nonReg.getLawEnforcerIdOther());
if(list.size()!=0){
String tmpUserShow = "";
for (UserBean ub : list) {
String t = ub.getLawCertificateNum();
if(StringUtils.isEmpty(t)){
t=CommonUtil.encryptPhone(ub.getPhonenumber());
}
tmpUserShow += ub.getUserName() +" "+ t + ",";
}
if (tmpUserShow.length() > 0) {
tmpUserShow = tmpUserShow.substring(0, tmpUserShow.length()-1);
}
nonReg.setLawEnforcerOther(tmpUserShow);
}
}
List<ZdxtFileCommon> zdxtFileCommons = zdxtFileCommonApi.selectZdxtFileById(nonReg.getId());
if (zdxtFileCommons.size() > 0) {
Map<String, Object> params = new HashMap<String, Object>();
@ -77,7 +100,32 @@ public class NonEnforcementRegistrationServiceImpl implements INonEnforcementReg
@Override
public List<NonEnforcementRegistration> selectNonEnforcementRegistrationList(NonEnforcementRegistration nonEnforcementRegistration)
{
return nonEnforcementRegistrationMapper.selectNonEnforcementRegistrationList(nonEnforcementRegistration);
List<NonEnforcementRegistration> list=nonEnforcementRegistrationMapper.selectNonEnforcementRegistrationList(nonEnforcementRegistration);
if(list.size()!=0){
// 执法人员 没有执法证件号展示加密手机号
list.forEach(li->{
UserBean userBean = userApi.getUserByUserId(Long.valueOf(li.getLawEnforcerId()));
String lawCN =userBean.getLawCertificateNum();
if(StringUtils.isEmpty(userBean.getLawCertificateNum())){
lawCN=CommonUtil.encryptPhone(userBean.getPhonenumber());
}
li.setLawEnforcer(userBean.getUserName() +" "+lawCN);
List<String> lawTwoList = new ArrayList<>();
List<UserBean> userBeans = new ArrayList<>();
if (StringUtils.isNotEmpty(li.getLawEnforcerOther())) {
userBeans = userApi.getUserByUserIds(li.getLawEnforcerIdOther());
userBeans.forEach(u->{
String temp=u.getLawCertificateNum();
if(StringUtils.isEmpty(u.getLawCertificateNum())){
temp=CommonUtil.encryptPhone(u.getPhonenumber());
}
lawTwoList.add(u.getUserName() +" "+temp);
});
li.setLawEnforcerOtherList(lawTwoList);
}
});
}
return list;
}
/**
@ -170,10 +218,12 @@ public class NonEnforcementRegistrationServiceImpl implements INonEnforcementReg
if(StringUtils.isNotEmpty(li.getLawEnforcerOther())){
li.setLawEnforcer(li.getLawEnforcer()+","+li.getLawEnforcerOther());
}
DictData area=areaList.stream().filter(a->li.getEnterpriseAddress().contains(a.getDictLabel())).findFirst().orElse(null);
li.setArea(area!=null?area.getDictLabel():"");
DictData street=streetList.stream().filter(s->li.getEnterpriseAddress().contains(s.getDictLabel())).findFirst().orElse(null);
li.setStreet(street!=null?street.getDictLabel():"");
if(StringUtils.isNotEmpty(li.getEnterpriseAddress())){
DictData area=areaList.stream().filter(a->li.getEnterpriseAddress().contains(a.getDictLabel())).findFirst().orElse(null);
li.setArea(area!=null?area.getDictLabel():"");
DictData street=streetList.stream().filter(s->li.getEnterpriseAddress().contains(s.getDictLabel())).findFirst().orElse(null);
li.setStreet(street!=null?street.getDictLabel():"");
}
});
return list;
}
@ -244,4 +294,9 @@ public class NonEnforcementRegistrationServiceImpl implements INonEnforcementReg
i[0]++;
});
}
@Override
public int getListTotal(NonEnforcementRegistration param) {
return nonEnforcementRegistrationMapper.getListTotal(param);
}
}

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

@ -78,6 +78,36 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="creditcode != null and creditcode != ''"> and creditcode = #{creditcode}</if>
<if test="userId != null and userId != ''"> and user_id = #{userId}</if>
<if test="deptId != null and deptId != ''"> and dept_id = #{deptId}</if>
<if test="searchValue != null and searchValue != ''">
and (law_enforcement_item_text like concat('%',#{searchValue},'%')
or bureau_dept_name like concat('%',#{searchValue},'%')
or law_enforcer like concat('%',#{searchValue},'%')
or law_enforcer_other like concat('%',#{searchValue},'%')
)
</if>
<if test="dateType != null and dateType == 1">
and DATE_FORMAT(enforcement_time, '%Y-%m') = DATE_FORMAT(CURDATE(), '%Y-%m')
</if>
<if test="dateType != null and dateType == 2">
AND DATE_FORMAT(enforcement_time, '%Y-%m') &gt;= CONCAT(YEAR(CURDATE()), '-',
CASE WHEN QUARTER(CURDATE()) IN (1) THEN '01'
WHEN QUARTER(CURDATE()) IN (2) THEN '04'
WHEN QUARTER(CURDATE()) IN (3) THEN '07'
ELSE '10' END)
and DATE_FORMAT(enforcement_time, '%Y-%m') &lt;= CONCAT(YEAR(CURDATE()), '-',
CASE
WHEN QUARTER(CURDATE()) IN (1) THEN '03'
WHEN QUARTER(CURDATE()) IN (2) THEN '06'
WHEN QUARTER(CURDATE()) IN (3) THEN '09'
ELSE '12'
END)
</if>
<if test="dateType != null and dateType == 3">
and DATE_FORMAT(enforcement_time, '%Y') = DATE_FORMAT(CURDATE(), '%Y')
</if>
<if test="dateSearch != null and dateSearch != ''">
and DATE_FORMAT(enforcement_time, '%Y-%m') = #{dateSearch}
</if>
</where>
order by enforcement_time desc
</select>
@ -97,7 +127,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
n.law_enforcement_type_text,
n.law_enforcement_item_text,
n.law_enforcement_basis_text,
e.enterprise_address
n.enterprise_address
FROM
non_enforcement_registration n
<choose>
@ -279,5 +309,68 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id}
</foreach>
</delete>
<select id="getListTotal" parameterType="NonEnforcementRegistration" resultType="Integer">
select count(*) from non_enforcement_registration
<where>
<if test="enterpriseName != null and enterpriseName != ''"> and enterprise_name like concat('%', #{enterpriseName}, '%')</if>
<if test="enterpriseNumber != null and enterpriseNumber != ''"> and enterprise_number = #{enterpriseNumber}</if>
<if test="enforcementTime != null "> and enforcement_time = #{enforcementTime}</if>
<if test="lawEnforcer != null and lawEnforcer != ''"> and law_enforcer = #{lawEnforcer}</if>
<if test="lawEnforcerId != null and lawEnforcerId != ''"> and law_enforcer_id = #{lawEnforcerId}</if>
<if test="lawEnforcerOther != null and lawEnforcerOther != ''"> and law_enforcer_other = #{lawEnforcerOther}</if>
<if test="lawEnforcerIdOther != null and lawEnforcerIdOther != ''"> and law_enforcer_id_other = #{lawEnforcerIdOther}</if>
<if test="lawEnforcementType != null "> and law_enforcement_type = #{lawEnforcementType}</if>
<if test="lawEnforcementTypeText != null and lawEnforcementTypeText != ''"> and law_enforcement_type_text = #{lawEnforcementTypeText}</if>
<if test="lawEnforcementItem != null "> and law_enforcement_item = #{lawEnforcementItem}</if>
<if test="lawEnforcementItemText != null and lawEnforcementItemText != ''"> and law_enforcement_item_text = #{lawEnforcementItemText}</if>
<if test="lawEnforcementBasis != null and lawEnforcementBasis != ''"> and law_enforcement_basis = #{lawEnforcementBasis}</if>
<if test="lawEnforcementBasisText != null and lawEnforcementBasisText != ''"> and law_enforcement_basis_text = #{lawEnforcementBasisText}</if>
<if test="reslut != null and reslut != ''"> and reslut = #{reslut}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="hasDelete != null and hasDelete != ''"> and has_delete = #{hasDelete}</if>
<if test="hasComplaint != null and hasComplaint != ''"> and has_complaint = #{hasComplaint}</if>
<if test="hasSubmit != null and hasSubmit != ''"> and has_submit = #{hasSubmit}</if>
<if test="hasEvaluate != null and hasEvaluate != ''"> and has_evaluate = #{hasEvaluate}</if>
<if test="lawId != null and lawId != ''"> and law_id = #{lawId}</if>
<if test="lawText != null and lawText != ''"> and law_text = #{lawText}</if>
<if test="bureauDeptId != null and bureauDeptId != ''"> and bureau_dept_id = #{bureauDeptId}</if>
<if test="bureauDeptName != null and bureauDeptName != ''"> and bureau_dept_name like concat('%', #{bureauDeptName}, '%')</if>
<if test="creditcode != null and creditcode != ''"> and creditcode = #{creditcode}</if>
<if test="userId != null and userId != ''"> and user_id = #{userId}</if>
<if test="deptId != null and deptId != ''"> and dept_id = #{deptId}</if>
<if test="searchValue != null and searchValue != ''">
and (law_enforcement_item_text like concat('%',#{searchValue},'%')
or bureau_dept_name like concat('%',#{searchValue},'%')
or law_enforcer like concat('%',#{searchValue},'%')
or law_enforcer_other like concat('%',#{searchValue},'%')
)
</if>
<if test="dateType != null and dateType == 1">
and DATE_FORMAT(enforcement_time, '%Y-%m') = DATE_FORMAT(CURDATE(), '%Y-%m')
</if>
<if test="dateType != null and dateType == 2">
AND DATE_FORMAT(enforcement_time, '%Y-%m') &gt;= CONCAT(YEAR(CURDATE()), '-',
CASE WHEN QUARTER(CURDATE()) IN (1) THEN '01'
WHEN QUARTER(CURDATE()) IN (2) THEN '04'
WHEN QUARTER(CURDATE()) IN (3) THEN '07'
ELSE '10' END)
and DATE_FORMAT(enforcement_time, '%Y-%m') &lt;= CONCAT(YEAR(CURDATE()), '-',
CASE
WHEN QUARTER(CURDATE()) IN (1) THEN '03'
WHEN QUARTER(CURDATE()) IN (2) THEN '06'
WHEN QUARTER(CURDATE()) IN (3) THEN '09'
ELSE '12'
END)
</if>
<if test="dateType != null and dateType == 3">
and DATE_FORMAT(enforcement_time, '%Y') = DATE_FORMAT(CURDATE(), '%Y')
</if>
<if test="dateSearch != null and dateSearch != ''">
and DATE_FORMAT(enforcement_time, '%Y-%m') = #{dateSearch}
</if>
</where>
order by enforcement_time desc
</select>
</mapper>
Loading…
Cancel
Save