Browse Source

修改企业信息查询,统一信用代码盐加密

v2
chenrui 3 years ago
parent
commit
67d2d41921
  1. 122
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnforcementInspectionProgramController.java
  2. 31
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnterpriseInformationController.java
  3. 8
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnterpriseLawEnforcementController.java
  4. 212
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/EnforcementInspectionProgram.java
  5. 13
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/EnforcementRegistration.java
  6. 13
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/EnterpriseInformation.java
  7. 240
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/EnterpriseLawEnforcement.java
  8. 12
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/QrCodeGenerateHistory.java
  9. 61
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/EnforcementInspectionProgramMapper.java
  10. 7
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/EnterpriseInformationMapper.java
  11. 61
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/IEnforcementInspectionProgramService.java
  12. 7
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/IEnterpriseInformationService.java
  13. 146
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnforcementInspectionProgramServiceImpl.java
  14. 17
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnterpriseInformationServiceImpl.java
  15. 57
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/utils/PasswordTools.java
  16. 115
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementInspectionProgramMapper.xml
  17. 3
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementRegistrationMapper.xml
  18. 10
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnterpriseInformationMapper.xml
  19. 22
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnterpriseLawEnforcementMapper.xml

122
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnforcementInspectionProgramController.java

@ -0,0 +1,122 @@
package com.zdxt.code.controller;
import java.util.List;
import com.zdxt.common.ZDResponse;
import com.zdxt.common.controller.BaseController;
import com.zdxt.common.util.TableDataInfo;
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 com.zdxt.code.domain.EnforcementInspectionProgram;
import com.zdxt.code.service.IEnforcementInspectionProgramService;
/**
* 执法检查计划Controller
*
* @author chenrui
* @date 2024-03-12
*/
@Controller
@RequestMapping("/code/enforcementInspectionProgram")
public class EnforcementInspectionProgramController extends BaseController
{
private String prefix = "code/enforcementInspectionProgram";
@Autowired
private IEnforcementInspectionProgramService enforcementInspectionProgramService;
@RequiresPermissions("code:enforcementInspectionProgram:view")
@GetMapping()
public String enforcementInspectionProgram()
{
return prefix + "/enforcementInspectionProgram";
}
/**
* 查询执法检查计划列表
*/
@RequiresPermissions("code:enforcementInspectionProgram:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(EnforcementInspectionProgram enforcementInspectionProgram)
{
startPage();
List<EnforcementInspectionProgram> list = enforcementInspectionProgramService.selectEnforcementInspectionProgramList(enforcementInspectionProgram);
return getDataTable(list);
}
/**
* 查询执法检查计划列表
*/
@RequiresPermissions("code:enforcementInspectionProgram:queryList")
@GetMapping("/queryList")
@ResponseBody
public ZDResponse queryList(EnforcementInspectionProgram enforcementInspectionProgram)
{
startPage();
List<EnforcementInspectionProgram> list = enforcementInspectionProgramService.selectEnforcementInspectionProgramList(enforcementInspectionProgram);
return ZDResponse.success("查询成功",list);
}
/**
* 新增执法检查计划
*/
@GetMapping("/add")
public String add()
{
return prefix + "/add";
}
/**
* 新增保存执法检查计划
*/
@RequiresPermissions("code:enforcementInspectionProgram:add")
@PostMapping("/add")
@ResponseBody
public ZDResponse addSave(@RequestBody EnforcementInspectionProgram enforcementInspectionProgram)
{
return enforcementInspectionProgramService.insertEnforcementInspectionProgram(enforcementInspectionProgram) > 0 ?
ZDResponse.success("保存成功"):ZDResponse.error("保存失败");
}
/**
* 修改执法检查计划
*/
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") String id, ModelMap mmap)
{
EnforcementInspectionProgram enforcementInspectionProgram = enforcementInspectionProgramService.selectEnforcementInspectionProgramById(id);
mmap.put("enforcementInspectionProgram", enforcementInspectionProgram);
return prefix + "/edit";
}
/**
* 修改保存执法检查计划
*/
@RequiresPermissions("code:enforcementInspectionProgram:edit")
@PostMapping("/edit")
@ResponseBody
public ZDResponse editSave(EnforcementInspectionProgram enforcementInspectionProgram)
{
return enforcementInspectionProgramService.
updateEnforcementInspectionProgram(enforcementInspectionProgram) > 0 ?
ZDResponse.success("修改成功") : ZDResponse.error("修改失败");
}
/**
* 删除执法检查计划
*/
@RequiresPermissions("code:enforcementInspectionProgram:remove")
@PostMapping( "/remove")
@ResponseBody
public ZDResponse remove(String ids)
{
return enforcementInspectionProgramService.deleteEnforcementInspectionProgramByIds(ids) > 0 ?
ZDResponse.success("删除成功") : ZDResponse.error("删除失败");
}
}

31
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnterpriseInformationController.java

@ -2,7 +2,9 @@ package com.zdxt.code.controller;
import java.util.List;
import com.zdxt.code.domain.QrCodeGenerateHistory;
import com.zdxt.code.service.IQrCodeGenerateHistoryService;
import com.zdxt.code.utils.PasswordTools;
import com.zdxt.common.ZDResponse;
import com.zdxt.common.controller.BaseController;
import com.zdxt.common.util.TableDataInfo;
@ -151,7 +153,32 @@ public class EnterpriseInformationController extends BaseController
@ResponseBody
public ZDResponse getQrCode(String enterpriseNumber)
{
return ZDResponse.success("查询成功",
iQrCodeGenerateHistoryService.selectQrCodeGenerateHistoryByNewest(enterpriseNumber));
//查询企业二维码信息
QrCodeGenerateHistory qrCodeGenerateHistory = iQrCodeGenerateHistoryService.selectQrCodeGenerateHistoryByNewest(enterpriseNumber);
//查询企业信息
EnterpriseInformation enterpriseInformation = new EnterpriseInformation();
enterpriseInformation.setEnterpriseNumber(enterpriseNumber);
List<EnterpriseInformation> enterpriseInformations = enterpriseInformationService.selectEnterpriseInformationList(enterpriseInformation);
if(enterpriseInformations.size() > 0){
qrCodeGenerateHistory.setEnterpriseName(enterpriseInformations.get(0).getEnterpriseName());
}
return ZDResponse.success("查询成功",qrCodeGenerateHistory);
}
/**
* 获取企业信息
* @param enterpriseNumber 盐加密之后的企业信用代码
* @return
*/
@ResponseBody
@GetMapping("/getEnterpriseInformation")
public ZDResponse getEnterpriseInformation(String enterpriseNumber){
//查询企业信息
EnterpriseInformation enterpriseInformation = enterpriseInformationService.selectEnterpriseInformationBySalt(enterpriseNumber);
if(PasswordTools.decrypt(enterpriseInformation.getEnterpriseNumber(),enterpriseNumber)){
return ZDResponse.success("查询成功",enterpriseInformation);
}else{
return ZDResponse.error("查询失败");
}
}
}

8
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnterpriseLawEnforcementController.java

@ -60,14 +60,6 @@ public class EnterpriseLawEnforcementController extends BaseController
return ZDResponse.success("查询成功",list);
}
@RequiresPermissions("code:enforcement:list")
@GetMapping("/queryList")
@ResponseBody
public ZDResponse queryList(EnterpriseLawEnforcement enterpriseLawEnforcement)
{
List<EnterpriseLawEnforcement> list = enterpriseLawEnforcementService.selectEnterpriseLawEnforcementList(enterpriseLawEnforcement);
return ZDResponse.success("查询成功",list);
}
/**

212
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/EnforcementInspectionProgram.java

@ -0,0 +1,212 @@
package com.zdxt.code.domain;
import com.zdxt.common.BaseDomain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.util.Date;
import java.util.List;
/**
* 执法检查计划对象 enforcement_inspection_program
*
* @author chenrui
* @date 2024-03-12
*/
public class EnforcementInspectionProgram extends BaseDomain
{
private static final long serialVersionUID = 1L;
/** 主键ID */
private String id;
/** 计划年度 */
private String planYear;
/** 计划名称 */
private String planName;
/** 执法部门 */
private String enforcementDepartment;
/** 执法部门ID */
private String enforcementDepartmentId;
/** 执法时间 */
private Date enforcementTime;
/** 执法区域 */
private String enforcementArea;
/** 是否删除 0 否 1是 */
private Integer isDelete;
/**
* 上传文件列表
*/
private List<FileObject> fileList;
/**
* 执法计划
*/
private FileObject fileObject;
/**
* 关键字搜索
*/
private String searchText;
/**
* 日期搜索
*/
private String dateSearch;
/**
* 文件对象
*/
public static class FileObject{
private String fileName;
private String fileUrl;
public String getFileName() {
return fileName;
}
public void setFileName(String fileName) {
this.fileName = fileName;
}
public String getFileUrl() {
return fileUrl;
}
public void setFileUrl(String fileUrl) {
this.fileUrl = fileUrl;
}
}
public void setFileList(List<FileObject> fileList) {
this.fileList = fileList;
}
public FileObject getFileObject() {
return fileObject;
}
public void setFileObject(FileObject fileObject) {
this.fileObject = fileObject;
}
public void setId(String id)
{
this.id = id;
}
public String getId()
{
return id;
}
public void setPlanYear(String planYear)
{
this.planYear = planYear;
}
public String getPlanYear()
{
return planYear;
}
public void setPlanName(String planName)
{
this.planName = planName;
}
public String getPlanName()
{
return planName;
}
public void setEnforcementDepartment(String enforcementDepartment)
{
this.enforcementDepartment = enforcementDepartment;
}
public String getEnforcementDepartment()
{
return enforcementDepartment;
}
public void setEnforcementDepartmentId(String enforcementDepartmentId)
{
this.enforcementDepartmentId = enforcementDepartmentId;
}
public String getEnforcementDepartmentId()
{
return enforcementDepartmentId;
}
public void setEnforcementTime(Date enforcementTime)
{
this.enforcementTime = enforcementTime;
}
public Date getEnforcementTime()
{
return enforcementTime;
}
public void setEnforcementArea(String enforcementArea)
{
this.enforcementArea = enforcementArea;
}
public String getEnforcementArea()
{
return enforcementArea;
}
public Integer getIsDelete() {
return isDelete;
}
public void setIsDelete(Integer isDelete) {
this.isDelete = isDelete;
}
public static long getSerialVersionUID() {
return serialVersionUID;
}
public List<FileObject> getFileList() {
return fileList;
}
public String getSearchText() {
return searchText;
}
public void setSearchText(String searchText) {
this.searchText = searchText;
}
public String getDateSearch() {
return dateSearch;
}
public void setDateSearch(String dateSearch) {
this.dateSearch = dateSearch;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("planYear", getPlanYear())
.append("planName", getPlanName())
.append("enforcementDepartment", getEnforcementDepartment())
.append("enforcementDepartmentId", getEnforcementDepartmentId())
.append("enforcementTime", getEnforcementTime())
.append("enforcementArea", getEnforcementArea())
.append("createTime", getCreateTime())
.append("createBy", getCreateBy())
.append("userId", getUserId())
.append("deptId", getDeptId())
.append("isDelete", getIsDelete())
.toString();
}
}

13
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/EnforcementRegistration.java

@ -98,6 +98,11 @@ public class EnforcementRegistration extends BaseDomain
/** 查询时间类型 */
private Integer dateType;
/**
* 日期搜索
*/
private String dateSearch;
public String getId() {
return id;
}
@ -299,4 +304,12 @@ public class EnforcementRegistration extends BaseDomain
public void setDateType(Integer dateType) {
this.dateType = dateType;
}
public String getDateSearch() {
return dateSearch;
}
public void setDateSearch(String dateSearch) {
this.dateSearch = dateSearch;
}
}

13
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/EnterpriseInformation.java

@ -52,6 +52,11 @@ public class EnterpriseInformation extends BaseDomain
*/
private Integer isUnsubscribe;
/**
* 盐加密字符串
*/
private String salt;
/**
* 二维码信息
*/
@ -193,6 +198,14 @@ public class EnterpriseInformation extends BaseDomain
this.isDelete = isDelete;
}
public String getSalt() {
return salt;
}
public void setSalt(String salt) {
this.salt = salt;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

240
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/EnterpriseLawEnforcement.java

@ -4,7 +4,6 @@ import com.zdxt.common.BaseDomain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.util.Date;
import java.util.List;
/**
* 企业端-执法部门预约记录对象 enterprise_law_enforcement
@ -42,16 +41,26 @@ public class EnterpriseLawEnforcement extends BaseDomain
/** 执法事项 */
private String lawEnforcementItem;
/** 登记编号 */
private String lawEnforcementCode;
/** 执法人员 */
/** 被执法企业税号 */
private String enterpriseNumber;
/** 执法时间 */
private Date enforcementTime;
/** 执法人员姓名 */
private String lawEnforcer;
/** 执法人员ID */
private String lawEnforcerId;
/** 备注 */
private String remark;
/** 状态 0 正常 1 取消 */
/** 执法人员联系方式 */
private String lawEnforcerTel;
/**
* 状态 0 正常 1 取消
*/
private Integer status;
/**
@ -59,34 +68,138 @@ public class EnterpriseLawEnforcement extends BaseDomain
*/
private Integer isDelete;
/** 是否删除 0 否 1 是 */
private Integer isDelete;
/**
* 搜索关键字
*/
private String searchText;
/**
* 日期查询
*/
private String searchDate;
/** 查询时间类型 */
/**
* 日期快捷查询 1 本月 2 本季度 3 本年
*/
private Integer dateType;
public String getId() {
return id;
}
public void setId(String id) {
public void setId(String id)
{
this.id = id;
}
public String getLawEnforcementCode() {
return lawEnforcementCode;
public String getId()
{
return id;
}
public void setLawEnforcement(String lawEnforcement)
{
this.lawEnforcement = lawEnforcement;
}
public void setLawEnforcementCode(String lawEnforcementCode) {
this.lawEnforcementCode = lawEnforcementCode;
public String getLawEnforcement()
{
return lawEnforcement;
}
public void setLawEnforcementId(String lawEnforcementId)
{
this.lawEnforcementId = lawEnforcementId;
}
public String getEnterpriseName() {
public String getLawEnforcementId()
{
return lawEnforcementId;
}
public void setEnterpriseName(String enterpriseName)
{
this.enterpriseName = enterpriseName;
}
public String getEnterpriseName()
{
return enterpriseName;
}
public void setEnterpriseNumber(String enterpriseNumber)
{
this.enterpriseNumber = enterpriseNumber;
}
public void setEnterpriseName(String enterpriseName) {
this.enterpriseName = enterpriseName;
public String getEnterpriseNumber()
{
return enterpriseNumber;
}
public void setEnforcementTime(Date enforcementTime)
{
this.enforcementTime = enforcementTime;
}
public Date getEnforcementTime()
{
return enforcementTime;
}
public void setLawEnforcer(String lawEnforcer)
{
this.lawEnforcer = lawEnforcer;
}
public String getLawEnforcer()
{
return lawEnforcer;
}
public void setLawEnforcerId(String lawEnforcerId)
{
this.lawEnforcerId = lawEnforcerId;
}
public String getLawEnforcerId()
{
return lawEnforcerId;
}
public void setLawEnforcerTel(String lawEnforcerTel)
{
this.lawEnforcerTel = lawEnforcerTel;
}
public String getLawEnforcerTel()
{
return lawEnforcerTel;
}
public static long getSerialVersionUID() {
return serialVersionUID;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public String getLawEnforcementItem() {
return lawEnforcementItem;
}
public void setLawEnforcementItem(String lawEnforcementItem) {
this.lawEnforcementItem = lawEnforcementItem;
}
public Integer getIsDelete() {
return isDelete;
}
public void setIsDelete(Integer isDelete) {
this.isDelete = isDelete;
}
public String getLawEnforcementCode() {
return lawEnforcementCode;
}
public void setLawEnforcementCode(String lawEnforcementCode) {
this.lawEnforcementCode = lawEnforcementCode;
}
public String getEnterpriseId() {
@ -137,38 +250,6 @@ public class EnterpriseLawEnforcement extends BaseDomain
this.checkRequire = checkRequire;
}
public String getLawEnforcement() {
return lawEnforcement;
}
public void setLawEnforcement(String lawEnforcement) {
this.lawEnforcement = lawEnforcement;
}
public String getLawEnforcementId() {
return lawEnforcementId;
}
public void setLawEnforcementId(String lawEnforcementId) {
this.lawEnforcementId = lawEnforcementId;
}
public String getLawEnforcer() {
return lawEnforcer;
}
public void setLawEnforcer(String lawEnforcer) {
this.lawEnforcer = lawEnforcer;
}
public String getLawEnforcerId() {
return lawEnforcerId;
}
public void setLawEnforcerId(String lawEnforcerId) {
this.lawEnforcerId = lawEnforcerId;
}
@Override
public String getRemark() {
return remark;
@ -179,44 +260,20 @@ public class EnterpriseLawEnforcement extends BaseDomain
this.remark = remark;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public String getLawEnforcementItem() {
return lawEnforcementItem;
}
public void setLawEnforcementItem(String lawEnforcementItem) {
this.lawEnforcementItem = lawEnforcementItem;
}
public Integer getIsDelete() {
return isDelete;
}
public void setIsDelete(Integer isDelete) {
this.isDelete = isDelete;
}
public String getLawEnforcementCode() {
return lawEnforcementCode;
public String getSearchText() {
return searchText;
}
public void setLawEnforcementCode(String lawEnforcementCode) {
this.lawEnforcementCode = lawEnforcementCode;
public void setSearchText(String searchText) {
this.searchText = searchText;
}
public Integer getIsDelete() {
return isDelete;
public String getSearchDate() {
return searchDate;
}
public void setIsDelete(Integer isDelete) {
this.isDelete = isDelete;
public void setSearchDate(String searchDate) {
this.searchDate = searchDate;
}
public Integer getDateType() {
@ -226,4 +283,21 @@ public class EnterpriseLawEnforcement extends BaseDomain
public void setDateType(Integer dateType) {
this.dateType = dateType;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("lawEnforcement", getLawEnforcement())
.append("lawEnforcementId", getLawEnforcementId())
.append("enterpriseName", getEnterpriseName())
.append("enterpriseNumber", getEnterpriseNumber())
.append("enforcementTime", getEnforcementTime())
.append("createTime", getCreateTime())
.append("createBy", getCreateBy())
.append("lawEnforcer", getLawEnforcer())
.append("lawEnforcerId", getLawEnforcerId())
.append("lawEnforcerTel", getLawEnforcerTel())
.toString();
}
}

12
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/QrCodeGenerateHistory.java

@ -28,6 +28,10 @@ public class QrCodeGenerateHistory extends BaseDomain
* 企业纳税识别号
*/
private String enterpriseNumber;
/**
* 企业名称
*/
private String enterpriseName;
/**
* 二维码是否有效 0 有效 1 失效
@ -82,6 +86,14 @@ public class QrCodeGenerateHistory extends BaseDomain
this.status = status;
}
public String getEnterpriseName() {
return enterpriseName;
}
public void setEnterpriseName(String enterpriseName) {
this.enterpriseName = enterpriseName;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

61
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/EnforcementInspectionProgramMapper.java

@ -0,0 +1,61 @@
package com.zdxt.code.mapper;
import com.zdxt.code.domain.EnforcementInspectionProgram;
import java.util.List;
/**
* 执法检查计划Mapper接口
*
* @author chenrui
* @date 2024-03-12
*/
public interface EnforcementInspectionProgramMapper
{
/**
* 查询执法检查计划
*
* @param id 执法检查计划ID
* @return 执法检查计划
*/
public EnforcementInspectionProgram selectEnforcementInspectionProgramById(String id);
/**
* 查询执法检查计划列表
*
* @param enforcementInspectionProgram 执法检查计划
* @return 执法检查计划集合
*/
public List<EnforcementInspectionProgram> selectEnforcementInspectionProgramList(EnforcementInspectionProgram enforcementInspectionProgram);
/**
* 新增执法检查计划
*
* @param enforcementInspectionProgram 执法检查计划
* @return 结果
*/
public int insertEnforcementInspectionProgram(EnforcementInspectionProgram enforcementInspectionProgram);
/**
* 修改执法检查计划
*
* @param enforcementInspectionProgram 执法检查计划
* @return 结果
*/
public int updateEnforcementInspectionProgram(EnforcementInspectionProgram enforcementInspectionProgram);
/**
* 删除执法检查计划
*
* @param id 执法检查计划ID
* @return 结果
*/
public int deleteEnforcementInspectionProgramById(String id);
/**
* 批量删除执法检查计划
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteEnforcementInspectionProgramByIds(String[] ids);
}

7
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/EnterpriseInformationMapper.java

@ -19,6 +19,13 @@ public interface EnterpriseInformationMapper
*/
public EnterpriseInformation selectEnterpriseInformationById(String id);
/**
* 查询企业信息
* @param salt 盐加密之后的统一信用代码
* @return
*/
public EnterpriseInformation selectEnterpriseInformationBySalt(String salt);
/**
* 查询企业信息登记列表
*

61
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/IEnforcementInspectionProgramService.java

@ -0,0 +1,61 @@
package com.zdxt.code.service;
import com.zdxt.code.domain.EnforcementInspectionProgram;
import java.util.List;
/**
* 执法检查计划Service接口
*
* @author chenrui
* @date 2024-03-12
*/
public interface IEnforcementInspectionProgramService
{
/**
* 查询执法检查计划
*
* @param id 执法检查计划ID
* @return 执法检查计划
*/
public EnforcementInspectionProgram selectEnforcementInspectionProgramById(String id);
/**
* 查询执法检查计划列表
*
* @param enforcementInspectionProgram 执法检查计划
* @return 执法检查计划集合
*/
public List<EnforcementInspectionProgram> selectEnforcementInspectionProgramList(EnforcementInspectionProgram enforcementInspectionProgram);
/**
* 新增执法检查计划
*
* @param enforcementInspectionProgram 执法检查计划
* @return 结果
*/
public int insertEnforcementInspectionProgram(EnforcementInspectionProgram enforcementInspectionProgram);
/**
* 修改执法检查计划
*
* @param enforcementInspectionProgram 执法检查计划
* @return 结果
*/
public int updateEnforcementInspectionProgram(EnforcementInspectionProgram enforcementInspectionProgram);
/**
* 批量删除执法检查计划
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteEnforcementInspectionProgramByIds(String ids);
/**
* 删除执法检查计划信息
*
* @param id 执法检查计划ID
* @return 结果
*/
public int deleteEnforcementInspectionProgramById(String id);
}

7
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/IEnterpriseInformationService.java

@ -19,6 +19,13 @@ public interface IEnterpriseInformationService
*/
public EnterpriseInformation selectEnterpriseInformationById(String id);
/**
* 查询企业信息
* @param salt 通过盐加密之后的企业统一信用代码
* @return
*/
public EnterpriseInformation selectEnterpriseInformationBySalt(String salt);
/**
* 查询企业信息登记列表
*

146
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnforcementInspectionProgramServiceImpl.java

@ -0,0 +1,146 @@
package com.zdxt.code.service.impl;
import java.util.List;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.IdUtil;
import com.zdxt.auth.dto.UserBean;
import com.zdxt.auth.feign.UserApi;
import com.zdxt.auth.feign.ZdxtFileCommonApi;
import com.zdxt.common.util.DateUtils;
import com.zdxt.common.zdxtFile.ZdxtFileCommon;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zdxt.code.mapper.EnforcementInspectionProgramMapper;
import com.zdxt.code.domain.EnforcementInspectionProgram;
import com.zdxt.code.service.IEnforcementInspectionProgramService;
/**
* 执法检查计划Service业务层处理
*
* @author chenrui
* @date 2024-03-12
*/
@Service
public class EnforcementInspectionProgramServiceImpl implements IEnforcementInspectionProgramService
{
@Autowired
private EnforcementInspectionProgramMapper enforcementInspectionProgramMapper;
@Autowired
private ZdxtFileCommonApi zdxtFileCommonApi;
@Autowired
private UserApi userApi;
/**
* 查询执法检查计划
*
* @param id 执法检查计划ID
* @return 执法检查计划
*/
@Override
public EnforcementInspectionProgram selectEnforcementInspectionProgramById(String id)
{
return enforcementInspectionProgramMapper.selectEnforcementInspectionProgramById(id);
}
/**
* 查询执法检查计划列表
*
* @param enforcementInspectionProgram 执法检查计划
* @return 执法检查计划
*/
@Override
public List<EnforcementInspectionProgram> selectEnforcementInspectionProgramList(EnforcementInspectionProgram enforcementInspectionProgram)
{
List<EnforcementInspectionProgram> enforcementInspectionPrograms =
enforcementInspectionProgramMapper.selectEnforcementInspectionProgramList(enforcementInspectionProgram);
enforcementInspectionPrograms.forEach(res ->{
List<ZdxtFileCommon> zdxtFileCommons = zdxtFileCommonApi.selectZdxtFileById(res.getId());
if(zdxtFileCommons != null && zdxtFileCommons.size() > 0){
EnforcementInspectionProgram.FileObject fileObject = new EnforcementInspectionProgram.FileObject();
fileObject.setFileName(zdxtFileCommons.get(0).getFileName());
fileObject.setFileUrl(zdxtFileCommons.get(0).getUploadPath());
res.setFileObject(fileObject);
}
});
return enforcementInspectionPrograms;
}
/**
* 新增执法检查计划
*
* @param enforcementInspectionProgram 执法检查计划
* @return 结果
*/
@Override
public int insertEnforcementInspectionProgram(EnforcementInspectionProgram enforcementInspectionProgram)
{
enforcementInspectionProgram.setCreateTime(DateUtils.getNowDate());
UserBean user = userApi.getCurrentUser();
enforcementInspectionProgram.setCreateTime(DateUtils.getNowDate());
enforcementInspectionProgram.setId(IdUtil.simpleUUID());
enforcementInspectionProgram.setUserId(user.getUserId());
enforcementInspectionProgram.setDeptId(user.getDeptId());
enforcementInspectionProgram.setCreateBy(user.getUserName());
int i = enforcementInspectionProgramMapper.insertEnforcementInspectionProgram(enforcementInspectionProgram);
if(i > 0 && enforcementInspectionProgram.getFileList().size() > 0){
enforcementInspectionProgram.getFileList().forEach(res ->{
ZdxtFileCommon zdxtFileCommon = new ZdxtFileCommon();
zdxtFileCommon.setBusinessId(enforcementInspectionProgram.getId());
zdxtFileCommon.setGuid(IdUtil.simpleUUID());
int dotIndex = res.getFileName().lastIndexOf(".");
String extension = res.getFileName().substring(dotIndex -1);
//文件后缀
zdxtFileCommon.setFileSuffix(extension);
zdxtFileCommon.setUploadPath(res.getFileUrl());
zdxtFileCommon.setFileName(res.getFileName());
zdxtFileCommon.setUploadPersonId(user.getUserId().toString());
zdxtFileCommon.setUploadPersonName(user.getUserName());
zdxtFileCommonApi.addZdxtFileCommon(zdxtFileCommon);
});
}
return i;
}
/**
* 修改执法检查计划
*
* @param enforcementInspectionProgram 执法检查计划
* @return 结果
*/
@Override
public int updateEnforcementInspectionProgram(EnforcementInspectionProgram enforcementInspectionProgram)
{
enforcementInspectionProgram.setUpdateTime(DateUtils.getNowDate());
return enforcementInspectionProgramMapper.updateEnforcementInspectionProgram(enforcementInspectionProgram);
}
/**
* 删除执法检查计划对象
*
* @param ids 需要删除的数据ID
* @return 结果
*/
@Override
public int deleteEnforcementInspectionProgramByIds(String ids)
{
return enforcementInspectionProgramMapper.deleteEnforcementInspectionProgramByIds(Convert.toStrArray(ids));
}
/**
* 删除执法检查计划信息
*
* @param id 执法检查计划ID
* @return 结果
*/
@Override
public int deleteEnforcementInspectionProgramById(String id)
{
return enforcementInspectionProgramMapper.deleteEnforcementInspectionProgramById(id);
}
}

17
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnterpriseInformationServiceImpl.java

@ -23,6 +23,7 @@ import com.zdxt.code.domain.EnterpriseMerchantAuthorization;
import com.zdxt.code.domain.QrCodeGenerateHistory;
import com.zdxt.code.service.IEnterpriseMerchantAuthorizationService;
import com.zdxt.code.service.IQrCodeGenerateHistoryService;
import com.zdxt.code.utils.PasswordTools;
import com.zdxt.code.utils.QRCodeUtil;
import com.zdxt.common.util.DateUtils;
import lombok.extern.slf4j.Slf4j;
@ -78,6 +79,11 @@ public class EnterpriseInformationServiceImpl implements IEnterpriseInformationS
return enterpriseInformation;
}
@Override
public EnterpriseInformation selectEnterpriseInformationBySalt(String salt) {
return enterpriseInformationMapper.selectEnterpriseInformationBySalt(salt);
}
/**
* 查询企业信息登记列表
*
@ -105,13 +111,14 @@ public class EnterpriseInformationServiceImpl implements IEnterpriseInformationS
enterpriseInformation.setCreateBy(user.getUserName());
enterpriseInformation.setUserId(user.getUserId());
enterpriseInformation.setDeptId(user.getDeptId());
//生成企业统一信用代码盐
String salt = PasswordTools.encrypt(enterpriseInformation.getEnterpriseNumber());
enterpriseInformation.setSalt(salt);
int i = enterpriseInformationMapper.insertEnterpriseInformation(enterpriseInformation);
if(i > 0){
// TODO 企业添加成功,生成企业二维码
String text = "https://www.baidu.com/s?ie=UTF-8&wd=%E7%99%BE%E5%BA%A6";
String text = salt;
//这里设置自定义网站url
String logoPath =null;
String logoPath = null;
try {
File encode = QRCodeUtil.encodeFile(text, logoPath, filePath, true);
MultipartFile multipartFile = QRCodeUtil.getMultipartFile(encode);
@ -131,7 +138,7 @@ public class EnterpriseInformationServiceImpl implements IEnterpriseInformationS
e.printStackTrace();
}
//绑定用户和企业信息‘
//绑定用户和企业信息
EnterpriseMerchantAuthorization enterpriseMerchantAuthorization =
new EnterpriseMerchantAuthorization();
enterpriseMerchantAuthorization.setEnterpriseName(enterpriseInformation.getEnterpriseName());

57
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/utils/PasswordTools.java

@ -0,0 +1,57 @@
package com.zdxt.code.utils;
import org.springframework.util.DigestUtils;
import org.springframework.util.StringUtils;
import java.nio.charset.StandardCharsets;
import java.util.UUID;
/**
* 密码工具类
* 加盐加密 / 加盐解密
*/
public class PasswordTools {
/**
*加盐加密
* @param password
* @return 加密后的密码
*/
public static String encrypt(String password){
//生成盐值,使用随机字符串UUID,UUID为32位的
String salt = UUID.randomUUID().toString().replace("-","");
//(盐值+密码)进行MD5加密,DigestUtils.md5DigestAsHex参数为字节数组,生成一个十六进制32位的字符串
String finalPassword = DigestUtils.md5DigestAsHex((salt+password).getBytes(StandardCharsets.UTF_8));
//将盐值和加密的密码组合返回,最终存储到数据库中的密码
String dbPassword = salt + "$" + finalPassword;
return dbPassword;
}
/**
* 校验密码
* @param password
* @param dbPassword
* @return
*/
public static boolean decrypt(String password,String dbPassword){
if(StringUtils.hasLength(password) && StringUtils.hasLength(dbPassword)
&& dbPassword.length()==65 && dbPassword.contains("$")){
String[] arr = dbPassword.split("\\$");
String salt = arr[0];
//根据获取的盐值生成校验的密码
String checkPassword = salt + "$" + DigestUtils.md5DigestAsHex((salt+password).getBytes(StandardCharsets.UTF_8));
//用校验密码与数据库保存的密码进行校验
if(checkPassword.equals(dbPassword)){
return true;
}
}
return false;
}
public static void main(String[] args) {
String dbPassword = encrypt("88879ayqwt");
System.out.println(decrypt("88879ayqwt",dbPassword)); //true
System.out.println(decrypt("45678",dbPassword)); //false
}
}

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

@ -0,0 +1,115 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zdxt.code.mapper.EnforcementInspectionProgramMapper">
<resultMap type="EnforcementInspectionProgram" id="EnforcementInspectionProgramResult">
<result property="id" column="id" />
<result property="planYear" column="plan_year" />
<result property="planName" column="plan_name" />
<result property="enforcementDepartment" column="enforcement_department" />
<result property="enforcementDepartmentId" column="enforcement_department_id" />
<result property="enforcementTime" column="enforcement_time" />
<result property="enforcementArea" column="enforcement_area" />
<result property="createTime" column="create_time" />
<result property="createBy" column="create_by" />
<result property="userId" column="user_id" />
<result property="deptId" column="dept_id" />
<result property="isDelete" column="is_delete" />
</resultMap>
<sql id="selectEnforcementInspectionProgramVo">
select id, plan_year, plan_name, enforcement_department, enforcement_department_id, enforcement_time, enforcement_area, create_time, create_by, user_id, dept_id, is_delete from enforcement_inspection_program
</sql>
<select id="selectEnforcementInspectionProgramList" parameterType="EnforcementInspectionProgram" resultMap="EnforcementInspectionProgramResult">
<include refid="selectEnforcementInspectionProgramVo"/>
<where>
<if test="planYear != null and planYear != ''"> and plan_year = #{planYear}</if>
<if test="planName != null and planName != ''"> and plan_name like concat('%', #{planName}, '%')</if>
<if test="enforcementDepartment != null and enforcementDepartment != ''"> and enforcement_department = #{enforcementDepartment}</if>
<if test="enforcementDepartmentId != null and enforcementDepartmentId != ''"> and enforcement_department_id = #{enforcementDepartmentId}</if>
<if test="enforcementTime != null "> and enforcement_time = #{enforcementTime}</if>
<if test="enforcementArea != null and enforcementArea != ''"> and enforcement_area = #{enforcementArea}</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="isDelete != null "> and is_delete = #{isDelete}</if>
<if test="searchText != null and searchText != ''">
and (plan_name like concat('%', #{searchText}, '%')
or enforcement_department like concat('%', #{searchText}, '%')
or enforcement_area like concat('%', #{searchText}, '%'))
</if>
<if test="dateSearch != null and dateSearch != ''">
and DATE_FORMAT(create_time, '%Y-%m') = #{dateSearch}
</if>
</where>
</select>
<select id="selectEnforcementInspectionProgramById" parameterType="String" resultMap="EnforcementInspectionProgramResult">
<include refid="selectEnforcementInspectionProgramVo"/>
where id = #{id}
</select>
<insert id="insertEnforcementInspectionProgram" parameterType="EnforcementInspectionProgram">
insert into enforcement_inspection_program
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null and id != ''">id,</if>
<if test="planYear != null and planYear != ''">plan_year,</if>
<if test="planName != null and planName != ''">plan_name,</if>
<if test="enforcementDepartment != null and enforcementDepartment != ''">enforcement_department,</if>
<if test="enforcementDepartmentId != null and enforcementDepartmentId != ''">enforcement_department_id,</if>
<if test="enforcementTime != null ">enforcement_time,</if>
<if test="enforcementArea != null and enforcementArea != ''">enforcement_area,</if>
<if test="createTime != null ">create_time,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="userId != null and userId != ''">user_id,</if>
<if test="deptId != null and deptId != ''">dept_id,</if>
<if test="isDelete != null ">is_delete,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null and id != ''">#{id},</if>
<if test="planYear != null and planYear != ''">#{planYear},</if>
<if test="planName != null and planName != ''">#{planName},</if>
<if test="enforcementDepartment != null and enforcementDepartment != ''">#{enforcementDepartment},</if>
<if test="enforcementDepartmentId != null and enforcementDepartmentId != ''">#{enforcementDepartmentId},</if>
<if test="enforcementTime != null ">#{enforcementTime},</if>
<if test="enforcementArea != null and enforcementArea != ''">#{enforcementArea},</if>
<if test="createTime != null ">#{createTime},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="userId != null and userId != ''">#{userId},</if>
<if test="deptId != null and deptId != ''">#{deptId},</if>
<if test="isDelete != null ">#{isDelete},</if>
</trim>
</insert>
<update id="updateEnforcementInspectionProgram" parameterType="EnforcementInspectionProgram">
update enforcement_inspection_program
<trim prefix="SET" suffixOverrides=",">
<if test="planYear != null and planYear != ''">plan_year = #{planYear},</if>
<if test="planName != null and planName != ''">plan_name = #{planName},</if>
<if test="enforcementDepartment != null and enforcementDepartment != ''">enforcement_department = #{enforcementDepartment},</if>
<if test="enforcementDepartmentId != null and enforcementDepartmentId != ''">enforcement_department_id = #{enforcementDepartmentId},</if>
<if test="enforcementTime != null ">enforcement_time = #{enforcementTime},</if>
<if test="enforcementArea != null and enforcementArea != ''">enforcement_area = #{enforcementArea},</if>
<if test="createTime != null ">create_time = #{createTime},</if>
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
<if test="userId != null and userId != ''">user_id = #{userId},</if>
<if test="deptId != null and deptId != ''">dept_id = #{deptId},</if>
<if test="isDelete != null ">is_delete = #{isDelete},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteEnforcementInspectionProgramById" parameterType="String">
delete from enforcement_inspection_program where id = #{id}
</delete>
<delete id="deleteEnforcementInspectionProgramByIds" parameterType="String">
delete from enforcement_inspection_program where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

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

@ -94,6 +94,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="dateType != null and dateType == 3">
and DATE_FORMAT(create_time, '%Y') = DATE_FORMAT(CURDATE(), '%Y')
</if>
<if test="dateSearch != null and dateSearch != ''">
and DATE_FORMAT(create_time, '%Y-%m') = #{dateSearch}
</if>
</where>
order by create_time desc
</select>

10
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnterpriseInformationMapper.xml

@ -21,11 +21,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="deptId" column="dept_id" />
<result property="isUnsubscribe" column="is_unsubscribe" />
<result property="isDelete" column="is_delete" />
<result property="salt" column="salt" />
</resultMap>
<sql id="selectEnterpriseInformationVo">
select id, enterprise_name, enterprise_number, enterprise_type, enterprise_address, legal_person, registered_capital, establishment_time,
operating_term, business_scope, create_time, create_by, user_id, dept_id,is_unsubscribe ,is_delete from enterprise_information
operating_term, business_scope, create_time, create_by, user_id, dept_id,is_unsubscribe ,is_delete,salt from enterprise_information
</sql>
<select id="selectEnterpriseInformationList" parameterType="EnterpriseInformation" resultMap="EnterpriseInformationResult">
@ -56,6 +57,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectEnterpriseInformationVo"/>
where id = #{id}
</select>
<select id="selectEnterpriseInformationBySalt" parameterType="String" resultMap="EnterpriseInformationResult">
<include refid="selectEnterpriseInformationVo"/>
where salt = #{salt}
</select>
<insert id="insertEnterpriseInformation" parameterType="EnterpriseInformation">
insert into enterprise_information
@ -75,6 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="userId != null">user_id,</if>
<if test="deptId != null">dept_id,</if>
<if test="isUnsubscribe != null">is_unsubscribe,</if>
<if test="salt != null and salt != ''">salt,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null and id != ''">#{id},</if>
@ -92,6 +99,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="userId != null and userId != ''">#{userId},</if>
<if test="deptId != null and deptId != ''">#{deptId},</if>
<if test="isUnsubscribe != null">#{isUnsubscribe},</if>
<if test="salt != null and salt != ''">#{salt},</if>
</trim>
</insert>

22
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnterpriseLawEnforcementMapper.xml

@ -4,27 +4,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zdxt.code.mapper.EnterpriseLawEnforcementMapper">
<resultMap type="com.zdxt.code.domain.EnterpriseLawEnforcement" id="EnterpriseLawEnforcementResult">
<resultMap type="EnterpriseLawEnforcement" id="EnterpriseLawEnforcementResult">
<result property="id" column="id" />
<result property="lawEnforcement" column="law_enforcement" />
<result property="lawEnforcementId" column="law_enforcement_id" />
<result property="enterpriseId" column="enterprise_id" />
<result property="enterpriseName" column="enterprise_name" />
<result property="checkTime" column="check_time" />
<result property="enterpriseNumber" column="enterprise_number" />
<result property="createTime" column="create_time" />
<result property="createBy" column="create_by" />
<result property="lawEnforcer" column="law_enforcer" />
<result property="lawEnforcerId" column="law_enforcer_id" />
<result property="remark" column="remark" />
<result property="lawEnforcerTel" column="law_enforcer_tel" />
<result property="userId" column="user_id" />
<result property="deptId" column="dept_id" />
<result property="isDelete" column="is_delete" />
<result property="status" column="status" />
<result property="lawEnforcementItem" column="law_enforcement_item" />
<result property="lawEnforcementCode" column="law_enforcement_code" />
<result property="linkMan" column="link_man" />
<result property="linkTel" column="link_tel" />
<result property="checkItem" column="check_item" />
<result property="checkRequire" column="check_require" />
</resultMap>
<sql id="selectEnterpriseLawEnforcementVo">
@ -40,6 +35,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="enterpriseName != null and enterpriseName != ''"> and enterprise_name like concat('%', #{enterpriseName}, '%')</if>
<if test="checkTime != null "> and check_time = #{checkTime}</if>
<if test="lawEnforcer != null and lawEnforcer != ''"> and law_enforcer = #{lawEnforcer}</if>
<if test="lawEnforcerId != null "> and law_enforcer_id = #{lawEnforcerId}</if>
<if test="lawEnforcerTel != null and lawEnforcerTel != ''"> and law_enforcer_tel = #{lawEnforcerTel}</if>
<if test="status != null"> and status = #{lawEnforcerTel}</if>
<if test="lawEnforcementItem != null and lawEnforcementItem != ''"> and law_enforcement_item like concat('%', #{lawEnforcementItem}, '%')</if>
<if test="lawEnforcementCode != null and lawEnforcementCode != ''"> and law_enforcement_code = #{lawEnforcementCode}</if>
<if test="lawEnforcerId != null and lawEnforcerId != ''"> and law_enforcer_id = #{lawEnforcerId}</if>
<if test="userId != null "> and user_id = #{userId}</if>
<if test="deptId != null "> and dept_id = #{deptId}</if>
@ -54,6 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and ( enterprise_name like concat(concat('%',#{searchValue}),'%')
or law_enforcement_code like concat(concat('%',#{searchValue}),'%')
or link_tel like concat(concat('%',#{searchValue}),'%')
or check_item like concat(concat('%',#{searchValue}),'%')
)
</if>
<if test="dateType != null and dateType == 1">
@ -74,6 +75,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="dateType != null and dateType == 3">
and DATE_FORMAT(create_time, '%Y') = DATE_FORMAT(CURDATE(), '%Y')
</if>
<if test="searchDate != null and searchDate != ''">
and DATE_FORMAT(create_time, '%Y-%m') = #{searchDate}
</if>
</where>
order by create_time desc
</select>

Loading…
Cancel
Save