From 67d2d41921b4094e3b8a89eff57471845507df13 Mon Sep 17 00:00:00 2001 From: chenrui <1950717904@qq.com> Date: Thu, 21 Mar 2024 11:35:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BC=81=E4=B8=9A=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E6=9F=A5=E8=AF=A2,=E7=BB=9F=E4=B8=80=E4=BF=A1?= =?UTF-8?q?=E7=94=A8=E4=BB=A3=E7=A0=81=E7=9B=90=E5=8A=A0=E5=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...nforcementInspectionProgramController.java | 122 +++++++++ .../EnterpriseInformationController.java | 31 ++- .../EnterpriseLawEnforcementController.java | 8 - .../domain/EnforcementInspectionProgram.java | 212 ++++++++++++++++ .../code/domain/EnforcementRegistration.java | 13 + .../code/domain/EnterpriseInformation.java | 13 + .../code/domain/EnterpriseLawEnforcement.java | 240 ++++++++++++------ .../code/domain/QrCodeGenerateHistory.java | 12 + .../EnforcementInspectionProgramMapper.java | 61 +++++ .../mapper/EnterpriseInformationMapper.java | 7 + .../IEnforcementInspectionProgramService.java | 61 +++++ .../IEnterpriseInformationService.java | 7 + ...forcementInspectionProgramServiceImpl.java | 146 +++++++++++ .../EnterpriseInformationServiceImpl.java | 17 +- .../com/zdxt/code/utils/PasswordTools.java | 57 +++++ .../EnforcementInspectionProgramMapper.xml | 115 +++++++++ .../mapper/EnforcementRegistrationMapper.xml | 3 + .../mapper/EnterpriseInformationMapper.xml | 10 +- .../mapper/EnterpriseLawEnforcementMapper.xml | 22 +- 19 files changed, 1049 insertions(+), 108 deletions(-) create mode 100644 lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnforcementInspectionProgramController.java create mode 100644 lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/EnforcementInspectionProgram.java create mode 100644 lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/EnforcementInspectionProgramMapper.java create mode 100644 lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/IEnforcementInspectionProgramService.java create mode 100644 lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnforcementInspectionProgramServiceImpl.java create mode 100644 lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/utils/PasswordTools.java create mode 100644 lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementInspectionProgramMapper.xml diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnforcementInspectionProgramController.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnforcementInspectionProgramController.java new file mode 100644 index 00000000..f1502ff6 --- /dev/null +++ b/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 list = enforcementInspectionProgramService.selectEnforcementInspectionProgramList(enforcementInspectionProgram); + return getDataTable(list); + } + + + /** + * 查询执法检查计划列表 + */ + @RequiresPermissions("code:enforcementInspectionProgram:queryList") + @GetMapping("/queryList") + @ResponseBody + public ZDResponse queryList(EnforcementInspectionProgram enforcementInspectionProgram) + { + startPage(); + List 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("删除失败"); + } +} diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnterpriseInformationController.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnterpriseInformationController.java index 1b94a778..0b447590 100644 --- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnterpriseInformationController.java +++ b/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 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("查询失败"); + } } } diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnterpriseLawEnforcementController.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnterpriseLawEnforcementController.java index 0a2d1215..4649f47c 100644 --- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/controller/EnterpriseLawEnforcementController.java +++ b/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 list = enterpriseLawEnforcementService.selectEnterpriseLawEnforcementList(enterpriseLawEnforcement); - return ZDResponse.success("查询成功",list); - } /** diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/EnforcementInspectionProgram.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/EnforcementInspectionProgram.java new file mode 100644 index 00000000..269fc3d3 --- /dev/null +++ b/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 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 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 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(); + } +} diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/EnforcementRegistration.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/EnforcementRegistration.java index b063df3e..7e685266 100644 --- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/EnforcementRegistration.java +++ b/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; + } } diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/EnterpriseInformation.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/EnterpriseInformation.java index cc77545f..dbfd3547 100644 --- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/EnterpriseInformation.java +++ b/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) diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/EnterpriseLawEnforcement.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/EnterpriseLawEnforcement.java index d14e626c..a8491cc3 100644 --- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/EnterpriseLawEnforcement.java +++ b/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(); + } } diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/QrCodeGenerateHistory.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/QrCodeGenerateHistory.java index 545c0e59..50e7d188 100644 --- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/domain/QrCodeGenerateHistory.java +++ b/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) diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/EnforcementInspectionProgramMapper.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/EnforcementInspectionProgramMapper.java new file mode 100644 index 00000000..cd4e3b4d --- /dev/null +++ b/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 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); +} diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/EnterpriseInformationMapper.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/EnterpriseInformationMapper.java index e922cfb7..f5368016 100644 --- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/mapper/EnterpriseInformationMapper.java +++ b/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); + /** * 查询企业信息登记列表 * diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/IEnforcementInspectionProgramService.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/IEnforcementInspectionProgramService.java new file mode 100644 index 00000000..1871ad05 --- /dev/null +++ b/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 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); +} diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/IEnterpriseInformationService.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/IEnterpriseInformationService.java index ef80ad88..16d2827f 100644 --- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/IEnterpriseInformationService.java +++ b/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); + /** * 查询企业信息登记列表 * diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnforcementInspectionProgramServiceImpl.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnforcementInspectionProgramServiceImpl.java new file mode 100644 index 00000000..bfda8a34 --- /dev/null +++ b/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 selectEnforcementInspectionProgramList(EnforcementInspectionProgram enforcementInspectionProgram) + { + List enforcementInspectionPrograms = + enforcementInspectionProgramMapper.selectEnforcementInspectionProgramList(enforcementInspectionProgram); + enforcementInspectionPrograms.forEach(res ->{ + List 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); + } +} diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnterpriseInformationServiceImpl.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnterpriseInformationServiceImpl.java index b6a5af0a..289fc973 100644 --- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnterpriseInformationServiceImpl.java +++ b/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()); diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/utils/PasswordTools.java b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/utils/PasswordTools.java new file mode 100644 index 00000000..9b2fef76 --- /dev/null +++ b/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 + } +} + diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementInspectionProgramMapper.xml b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementInspectionProgramMapper.xml new file mode 100644 index 00000000..aa7bafb1 --- /dev/null +++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementInspectionProgramMapper.xml @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + + + + + 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 + + + + + + + + insert into enforcement_inspection_program + + id, + plan_year, + plan_name, + enforcement_department, + enforcement_department_id, + enforcement_time, + enforcement_area, + create_time, + create_by, + user_id, + dept_id, + is_delete, + + + #{id}, + #{planYear}, + #{planName}, + #{enforcementDepartment}, + #{enforcementDepartmentId}, + #{enforcementTime}, + #{enforcementArea}, + #{createTime}, + #{createBy}, + #{userId}, + #{deptId}, + #{isDelete}, + + + + + update enforcement_inspection_program + + plan_year = #{planYear}, + plan_name = #{planName}, + enforcement_department = #{enforcementDepartment}, + enforcement_department_id = #{enforcementDepartmentId}, + enforcement_time = #{enforcementTime}, + enforcement_area = #{enforcementArea}, + create_time = #{createTime}, + create_by = #{createBy}, + user_id = #{userId}, + dept_id = #{deptId}, + is_delete = #{isDelete}, + + where id = #{id} + + + + delete from enforcement_inspection_program where id = #{id} + + + + delete from enforcement_inspection_program where id in + + #{id} + + + + \ No newline at end of file diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementRegistrationMapper.xml b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementRegistrationMapper.xml index 8bd26454..1c4d85e7 100644 --- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementRegistrationMapper.xml +++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementRegistrationMapper.xml @@ -94,6 +94,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and DATE_FORMAT(create_time, '%Y') = DATE_FORMAT(CURDATE(), '%Y') + + and DATE_FORMAT(create_time, '%Y-%m') = #{dateSearch} + order by create_time desc diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnterpriseInformationMapper.xml b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnterpriseInformationMapper.xml index 865a857b..47d6fc06 100644 --- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnterpriseInformationMapper.xml +++ b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnterpriseInformationMapper.xml @@ -21,11 +21,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + 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 + + insert into enterprise_information @@ -75,6 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" user_id, dept_id, is_unsubscribe, + salt, #{id}, @@ -92,6 +99,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{userId}, #{deptId}, #{isUnsubscribe}, + #{salt}, diff --git a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnterpriseLawEnforcementMapper.xml b/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnterpriseLawEnforcementMapper.xml index 998b41b0..9fc0e4a3 100644 --- a/lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnterpriseLawEnforcementMapper.xml +++ b/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"> - + - - + - + - + - - - - @@ -40,6 +35,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and enterprise_name like concat('%', #{enterpriseName}, '%') and check_time = #{checkTime} and law_enforcer = #{lawEnforcer} + and law_enforcer_id = #{lawEnforcerId} + and law_enforcer_tel = #{lawEnforcerTel} + and status = #{lawEnforcerTel} + and law_enforcement_item like concat('%', #{lawEnforcementItem}, '%') + and law_enforcement_code = #{lawEnforcementCode} and law_enforcer_id = #{lawEnforcerId} and user_id = #{userId} and dept_id = #{deptId} @@ -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}),'%') ) @@ -74,6 +75,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and DATE_FORMAT(create_time, '%Y') = DATE_FORMAT(CURDATE(), '%Y') + + and DATE_FORMAT(create_time, '%Y-%m') = #{searchDate} + order by create_time desc