From 4bc61f05c720705a245df9d1c3f46cd88e3c1848 Mon Sep 17 00:00:00 2001 From: 15036302109 Date: Thu, 14 Dec 2023 10:18:53 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=8C=E6=94=BF=E6=89=A7=E6=B3=95=E5=8F=B0?= =?UTF-8?q?=E8=B4=A6:=E5=8C=96=E5=AD=A6=E5=93=81,=E5=B7=A5=E8=B4=B8,?= =?UTF-8?q?=E7=83=9F=E8=8A=B1=E7=88=86=E7=AB=B9,=E6=89=93=E9=9D=9E?= =?UTF-8?q?=E6=B2=BB=E8=BF=9D,=E9=9D=9E=E7=85=A4=E7=9F=BF=E5=B1=B1?= =?UTF-8?q?=E5=A2=9E=E5=88=A0=E6=94=B9=E6=9F=A5=EF=BC=8C=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E5=AF=BC=E5=87=BA=E5=8A=9F=E8=83=BD=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ehs/EhsLawEnforcementController.java | 158 ++++++ .../domain/EhsLawEnforcement.java | 122 +++++ .../domain/LawEnforceImportTemplate.java | 40 ++ .../mapper/EhsLawEnforcementMapper.java | 30 ++ .../service/IEhsLawEnforcementService.java | 42 ++ .../impl/EhsLawEnforcementServiceImpl.java | 131 +++++ .../mapper/ehs/EhsLawEnforcementMapper.xml | 65 +++ ruoyi-ui/src/api/ehs/ehsLawEnforce.js | 44 ++ .../src/views/ehs/ehsLawEnforce/index.vue | 502 ++++++++++++++++++ .../src/views/ehs/ehsRescueTeam/index.vue | 1 - 10 files changed, 1134 insertions(+), 1 deletion(-) create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsLawEnforcementController.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/ehsLawEnforce/domain/EhsLawEnforcement.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/ehsLawEnforce/domain/LawEnforceImportTemplate.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/ehsLawEnforce/mapper/EhsLawEnforcementMapper.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/ehsLawEnforce/service/IEhsLawEnforcementService.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/ehsLawEnforce/service/impl/EhsLawEnforcementServiceImpl.java create mode 100644 ruoyi-system/src/main/resources/mapper/ehs/EhsLawEnforcementMapper.xml create mode 100644 ruoyi-ui/src/api/ehs/ehsLawEnforce.js create mode 100644 ruoyi-ui/src/views/ehs/ehsLawEnforce/index.vue diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsLawEnforcementController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsLawEnforcementController.java new file mode 100644 index 0000000..5cb5589 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsLawEnforcementController.java @@ -0,0 +1,158 @@ +package com.ruoyi.web.controller.ehs; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.Arrays; +import javax.servlet.http.HttpServletResponse; + +import com.ruoyi.common.core.domain.ExcelExp; +import com.ruoyi.common.core.domain.entity.SysDictData; +import com.ruoyi.common.utils.ExcelExportUtil; +import com.ruoyi.ehsLawEnforce.domain.LawEnforceImportTemplate; +import com.ruoyi.system.service.ISysDictTypeService; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.ehsLawEnforce.domain.EhsLawEnforcement; +import com.ruoyi.ehsLawEnforce.service.IEhsLawEnforcementService; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; +import org.springframework.web.multipart.MultipartFile; + +/** + * 行政执法台账Controller + * + * @author ruoyi + * @date 2023-12-13 + */ +@Api(tags = "行政执法台账管理") +@RestController +@RequestMapping("/ehs/ehsLawEnforce") +public class EhsLawEnforcementController extends BaseController { + @Autowired + private IEhsLawEnforcementService ehsLawEnforcementService; + + @Autowired + private ISysDictTypeService dictTypeService; + + /** + * 查询行政执法台账列表 + */ + @PreAuthorize("@ss.hasPermi('ehs:ehsLawEnforce:list')") + @GetMapping("/list") + public TableDataInfo list(EhsLawEnforcement ehsLawEnforcement) { + startPage(); + List list = ehsLawEnforcementService.selectEhsLawEnforcementList(ehsLawEnforcement); + return getDataTable(list); + } + + /** + * 导出行政执法台账列表 + */ + @PreAuthorize("@ss.hasPermi('ehs:ehsLawEnforce:export')") + @Log(title = "行政执法台账", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, EhsLawEnforcement ehsLawEnforcement) { + List list = ehsLawEnforcementService.selectEhsLawEnforcementList(ehsLawEnforcement); + ExcelUtil util = new ExcelUtil(EhsLawEnforcement.class); + util.exportExcel(response, list, "行政执法台账数据"); + } + + /** + * 获取行政执法台账详细信息 + */ + @PreAuthorize("@ss.hasPermi('ehs:ehsLawEnforce:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) { + return success(ehsLawEnforcementService.selectEhsLawEnforcementById(id)); + } + + /** + * 新增行政执法台账 + */ + @ApiOperation("新增行政执法台账") + @PreAuthorize("@ss.hasPermi('ehs:ehsLawEnforce:add')") + @Log(title = "行政执法台账", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody EhsLawEnforcement ehsLawEnforcement) { + return toAjax(ehsLawEnforcementService.save(ehsLawEnforcement)); + } + + /** + * 修改行政执法台账 + */ + @ApiOperation("修改行政执法台账") + @PreAuthorize("@ss.hasPermi('ehs:ehsLawEnforce:edit')") + @Log(title = "行政执法台账", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody EhsLawEnforcement ehsLawEnforcement) { + return toAjax(ehsLawEnforcementService.updateById(ehsLawEnforcement)); + } + + /** + * 删除行政执法台账 + */ + @ApiOperation("删除行政执法台账") + @PreAuthorize("@ss.hasPermi('ehs:ehsLawEnforce:remove')") + @Log(title = "行政执法台账", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(ehsLawEnforcementService.removeByIds(Arrays.asList(ids))); + } + + /** + * 下载批量导入模板 + */ + @PostMapping("/importTemplate") + public void importTemplate(HttpServletResponse response) throws IOException { + List teamWorkerList = new ArrayList<>(); + // 获取企业类别字典数据 + List enterpriseTypeData = dictTypeService.selectDictDataByType("enterprise_type"); + String[] header = + {"单位名称#", + "地址#", + "负责人#", + "联系电话#", + "存在隐患#", + "是否是重大隐患(Y是,N否)#", + "整改措施#", + "整改责任人#", + "企业类别(输入1,2,3..参考企业类别信息sheet)#", + "企业人数#", + "是否建立双预防(Y是,N否)#", + "时间(格式为2023-12-12)#", + "其他#", + "备注#"}; + ExcelExp e1 = new ExcelExp("行政公文台账信息", header, teamWorkerList, EhsLawEnforcement.class); + header = new String[]{"行业值#dictValue", "行业名称#dictLabel"}; + ExcelExp e2 = new ExcelExp("企业类别信息", header, enterpriseTypeData, SysDictData.class); + List mysheet = new ArrayList<>(); + mysheet.add(e1); + mysheet.add(e2); + ExcelExportUtil.exportManySheetExcel("行政公文台账信息批量导入模板", mysheet, response); + } + + //批量导入 params是classFirst的值 + @PostMapping("/importData") + public AjaxResult importHubManage(MultipartFile file, Boolean updateSupport, Long params) throws Exception { + ExcelUtil util = new ExcelUtil<>(LawEnforceImportTemplate.class); + List list = util.importExcel(file.getInputStream()); + String message = ehsLawEnforcementService.importData(list, updateSupport, params); + return AjaxResult.success(message); + } + +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/ehsLawEnforce/domain/EhsLawEnforcement.java b/ruoyi-system/src/main/java/com/ruoyi/ehsLawEnforce/domain/EhsLawEnforcement.java new file mode 100644 index 0000000..09c24bb --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/ehsLawEnforce/domain/EhsLawEnforcement.java @@ -0,0 +1,122 @@ +package com.ruoyi.ehsLawEnforce.domain; + +import java.util.Date; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.ToString; +import lombok.experimental.Accessors; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 行政执法台账对象 ehs_law_enforcement + * + * @author ruoyi + * @date 2023-12-13 + */ +@Data +@ToString +@NoArgsConstructor +@Accessors(chain = true) +@TableName("ehs_law_enforcement") +public class EhsLawEnforcement extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @TableId(type = IdType.AUTO) + private Long id; + + /** + * 单位名称 + */ + @Excel(name = "单位名称") + private String enterpriseName; + + /** + * 地址 + */ + @Excel(name = "地址") + private String location; + + /** + * 负责人 + */ + @Excel(name = "负责人") + private String responsiblePerson; + + /** + * 联系电话 + */ + @Excel(name = "联系电话") + private String phone; + + /** + * 存在隐患 + */ + @Excel(name = "存在隐患") + private String risk; + + /** + * 是否重大隐患 + */ + @Excel(name = "是否重大隐患") + private String isLargeRisk; + + /** + * 整改措施 + */ + @Excel(name = "整改措施") + private String rectificationMeasure; + + /** + * 整改责任人 + */ + @Excel(name = "整改责任人") + private String rectificationPeople; + + /** + * 企业类别 + */ + @Excel(name = "企业类别") + private Integer enterpriseCategory; + + /** + * 企业人数 + */ + @Excel(name = "企业人数") + private Long employeeNum; + + /** + * 是否建立双预防 + */ + @Excel(name = "是否建立双预防") + private String isEstablishPrevention; + + /** + * 时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date time; + + /** + * 其他 + */ + @Excel(name = "其他") + private String other; + + /** + * 类别 + */ + @Excel(name = "类别") + private Long classFirst; + +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/ehsLawEnforce/domain/LawEnforceImportTemplate.java b/ruoyi-system/src/main/java/com/ruoyi/ehsLawEnforce/domain/LawEnforceImportTemplate.java new file mode 100644 index 0000000..bf3b597 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/ehsLawEnforce/domain/LawEnforceImportTemplate.java @@ -0,0 +1,40 @@ +package com.ruoyi.ehsLawEnforce.domain; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.ruoyi.common.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +@Data +public class LawEnforceImportTemplate { + @Excel(name = "单位名称", type = Excel.Type.ALL) + private String enterpriseName; + @Excel(name = "地址", type = Excel.Type.ALL) + private String location; + @Excel(name = "负责人", type = Excel.Type.ALL) + private String responsiblePerson; + @Excel(name = "联系电话", type = Excel.Type.ALL) + private String phone; + @Excel(name = "存在隐患", type = Excel.Type.ALL) + private String risk; + @Excel(name = "是否是重大隐患(Y是,N否)", type = Excel.Type.ALL) + private String isLargeRisk; + @Excel(name = "整改措施", type = Excel.Type.ALL) + private String rectificationMeasure; + @Excel(name = "整改责任人", type = Excel.Type.ALL) + private String rectificationPeople; + @Excel(name = "企业类别(输入1,2,3..参考企业类别信息sheet)", type = Excel.Type.ALL) + private Integer enterpriseCategory; + @Excel(name = "企业人数", type = Excel.Type.ALL) + private Long employeeNum; + @Excel(name = "是否建立双预防(Y是,N否)", type = Excel.Type.ALL) + private String isEstablishPrevention; + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "时间(格式为2023-12-12)", width = 30, dateFormat = "yyyy-MM-dd", type = Excel.Type.ALL) + private Date time; + @Excel(name = "其他", type = Excel.Type.ALL) + private String other; + @Excel(name = "备注", type = Excel.Type.ALL) + private String remark; +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/ehsLawEnforce/mapper/EhsLawEnforcementMapper.java b/ruoyi-system/src/main/java/com/ruoyi/ehsLawEnforce/mapper/EhsLawEnforcementMapper.java new file mode 100644 index 0000000..ff6bd18 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/ehsLawEnforce/mapper/EhsLawEnforcementMapper.java @@ -0,0 +1,30 @@ +package com.ruoyi.ehsLawEnforce.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.ruoyi.ehsLawEnforce.domain.EhsLawEnforcement; + +import java.util.List; + +/** + * 行政执法台账Mapper接口 + * + * @author ruoyi + * @date 2023-12-13 + */ +public interface EhsLawEnforcementMapper extends BaseMapper { + /** + * 查询行政执法台账 + * + * @param id 行政执法台账主键 + * @return 行政执法台账 + */ + public EhsLawEnforcement selectEhsLawEnforcementById(Long id); + + /** + * 查询行政执法台账列表 + * + * @param ehsLawEnforcement 行政执法台账 + * @return 行政执法台账集合 + */ + public List selectEhsLawEnforcementList(EhsLawEnforcement ehsLawEnforcement); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/ehsLawEnforce/service/IEhsLawEnforcementService.java b/ruoyi-system/src/main/java/com/ruoyi/ehsLawEnforce/service/IEhsLawEnforcementService.java new file mode 100644 index 0000000..1cd9a24 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/ehsLawEnforce/service/IEhsLawEnforcementService.java @@ -0,0 +1,42 @@ +package com.ruoyi.ehsLawEnforce.service; + +import java.util.List; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.ruoyi.ehsLawEnforce.domain.EhsLawEnforcement; +import com.ruoyi.ehsLawEnforce.domain.LawEnforceImportTemplate; + +/** + * 行政执法台账Service接口 + * + * @author ruoyi + * @date 2023-12-13 + */ +public interface IEhsLawEnforcementService extends IService { + + /** + * 查询行政执法台账 + * + * @param id 行政执法台账主键 + * @return 行政执法台账 + */ + public EhsLawEnforcement selectEhsLawEnforcementById(Long id); + + /** + * 查询行政执法台账列表 + * + * @param ehsLawEnforcement 行政执法台账 + * @return 行政执法台账集合 + */ + public List selectEhsLawEnforcementList(EhsLawEnforcement ehsLawEnforcement); + + /** + * 批量导入模板数据 + * + * @param list 模板中用户输入的数据 + * @param updateSupport + * @param params 这里是classFirst的值 + * @return + */ + public String importData(List list, Boolean updateSupport, Long params) throws Exception; +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/ehsLawEnforce/service/impl/EhsLawEnforcementServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/ehsLawEnforce/service/impl/EhsLawEnforcementServiceImpl.java new file mode 100644 index 0000000..8687c9a --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/ehsLawEnforce/service/impl/EhsLawEnforcementServiceImpl.java @@ -0,0 +1,131 @@ +package com.ruoyi.ehsLawEnforce.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.ruoyi.ehsLawEnforce.domain.LawEnforceImportTemplate; +import org.springframework.stereotype.Service; +import org.springframework.beans.factory.annotation.Autowired; +import com.ruoyi.common.utils.StringUtils; + +import java.util.List; +import java.util.Map; + +import com.ruoyi.ehsLawEnforce.mapper.EhsLawEnforcementMapper; +import com.ruoyi.ehsLawEnforce.domain.EhsLawEnforcement; +import com.ruoyi.ehsLawEnforce.service.IEhsLawEnforcementService; + +/** + * 行政执法台账Service业务层处理 + * + * @author ruoyi + * @date 2023-12-13 + */ +@Service +public class EhsLawEnforcementServiceImpl extends ServiceImpl implements IEhsLawEnforcementService { + + @Autowired + private EhsLawEnforcementMapper ehsLawEnforcementMapper; + + /** + * 查询行政执法台账 + * + * @param id 行政执法台账主键 + * @return 行政执法台账 + */ + @Override + public EhsLawEnforcement selectEhsLawEnforcementById(Long id) { + return ehsLawEnforcementMapper.selectEhsLawEnforcementById(id); + } + + /** + * 查询行政执法台账列表 + * + * @param ehsLawEnforcement 行政执法台账 + * @return 行政执法台账 + */ + @Override + public List selectEhsLawEnforcementList(EhsLawEnforcement ehsLawEnforcement) { + return ehsLawEnforcementMapper.selectEhsLawEnforcementList(ehsLawEnforcement); + } + + /** + * 批量导入模板数据 + * + * @param list 模板中用户输入的数据 + * @param updateSupport + * @param params 这里是classFirst的值 + * @return + */ + @Override + public String importData(List list, Boolean updateSupport, Long params) throws Exception { + if (StringUtils.isNull(list) || list.size() == 0) { + throw new Exception("导入行政执法台账数据不能为空!"); + } + int successNum = 0; + int failureNum = 0; + + StringBuilder successMsg = new StringBuilder(); + StringBuilder failureMsg = new StringBuilder(); + for (LawEnforceImportTemplate lawEnforceImportTemplate : list) { + + EhsLawEnforcement temp = new EhsLawEnforcement(); + /** + * 因为是插入数据,所以id需要处理,如果id是String类型,那么生成个uuid插入到数据库 + * 如果id是整数,并且自动递增,那么无需设置id + */ + // temp.setId(IdUtils.fastSimpleUUID()); + temp.setEnterpriseName(lawEnforceImportTemplate.getEnterpriseName());// 单位名称 + temp.setLocation(lawEnforceImportTemplate.getLocation());// 地址 + temp.setResponsiblePerson(lawEnforceImportTemplate.getResponsiblePerson());// 负责人 + temp.setPhone(lawEnforceImportTemplate.getPhone());// 联系电话 + temp.setRisk(lawEnforceImportTemplate.getRisk());// 存在隐患 + temp.setIsLargeRisk(lawEnforceImportTemplate.getIsLargeRisk().toUpperCase());// 是否重大隐患 + temp.setRectificationMeasure(lawEnforceImportTemplate.getRectificationMeasure());// 整改措施 + temp.setRectificationPeople(lawEnforceImportTemplate.getRectificationPeople());// 整改责任人 + temp.setEnterpriseCategory(lawEnforceImportTemplate.getEnterpriseCategory());// 企业类别 + temp.setEmployeeNum(lawEnforceImportTemplate.getEmployeeNum());// 企业人数 + temp.setIsEstablishPrevention(lawEnforceImportTemplate.getIsEstablishPrevention().toUpperCase());// 是否建立双预防 + temp.setTime(lawEnforceImportTemplate.getTime());// 时间 + temp.setRemark(lawEnforceImportTemplate.getRemark());// 备注 + temp.setOther(lawEnforceImportTemplate.getOther());// 其他 + temp.setClassFirst(params);// 类别 + try { + //插入数据 + this.save(temp); + successNum++; + successMsg.append("
" + successNum + "、" + temp.getEnterpriseName() + "行政执法台账信息导入成功"); + } catch (Exception e) { + e.printStackTrace(); + log.error(e.getLocalizedMessage()); + failureNum++; + successMsg.append("
" + failureNum + "、" + temp.getEnterpriseName() + "行政执法台账信息导入异常,请联系管理员!"); + continue; + } + } + return successMsg.toString(); + } + + + private LambdaQueryWrapper buildQueryWrapper(EhsLawEnforcement query) { + Map params = query.getParams(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + lqw.like(StringUtils.isNotBlank(query.getEnterpriseName()), EhsLawEnforcement::getEnterpriseName, query.getEnterpriseName()); + lqw.like(StringUtils.isNotBlank(query.getLocation()), EhsLawEnforcement::getLocation, query.getLocation()); + lqw.like(StringUtils.isNotBlank(query.getResponsiblePerson()), EhsLawEnforcement::getResponsiblePerson, query.getResponsiblePerson()); + lqw.eq(StringUtils.isNotBlank(query.getPhone()), EhsLawEnforcement::getPhone, query.getPhone()); + lqw.eq(StringUtils.isNotBlank(query.getRisk()), EhsLawEnforcement::getRisk, query.getRisk()); + lqw.eq(StringUtils.isNotBlank(query.getIsLargeRisk()), EhsLawEnforcement::getIsLargeRisk, query.getIsLargeRisk()); + lqw.eq(StringUtils.isNotBlank(query.getRectificationMeasure()), EhsLawEnforcement::getRectificationMeasure, query.getRectificationMeasure()); + lqw.eq(StringUtils.isNotBlank(query.getRectificationPeople()), EhsLawEnforcement::getRectificationPeople, query.getRectificationPeople()); + lqw.eq(query.getEnterpriseCategory() != null, EhsLawEnforcement::getEnterpriseCategory, query.getEnterpriseCategory()); + lqw.eq(query.getEmployeeNum() != null, EhsLawEnforcement::getEmployeeNum, query.getEmployeeNum()); + lqw.eq(StringUtils.isNotBlank(query.getIsEstablishPrevention()), EhsLawEnforcement::getIsEstablishPrevention, query.getIsEstablishPrevention()); + lqw.eq(query.getTime() != null, EhsLawEnforcement::getTime, query.getTime()); + lqw.eq(StringUtils.isNotBlank(query.getOther()), EhsLawEnforcement::getOther, query.getOther()); + lqw.eq(query.getClassFirst() != null, EhsLawEnforcement::getClassFirst, query.getClassFirst()); + lqw.orderByDesc(EhsLawEnforcement::getCreateTime); + return lqw; + } + +} diff --git a/ruoyi-system/src/main/resources/mapper/ehs/EhsLawEnforcementMapper.xml b/ruoyi-system/src/main/resources/mapper/ehs/EhsLawEnforcementMapper.xml new file mode 100644 index 0000000..3bc9fc3 --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/ehs/EhsLawEnforcementMapper.xml @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, enterprise_name, location, responsible_person, phone, risk, is_large_risk, rectification_measure, rectification_people, enterprise_category, employee_num, is_establish_prevention, time, other, class_first, create_by, create_time, update_by, update_time, remark, dept_id, create_user_id, update_user_id from ehs_law_enforcement + + + + + + + + + + \ No newline at end of file diff --git a/ruoyi-ui/src/api/ehs/ehsLawEnforce.js b/ruoyi-ui/src/api/ehs/ehsLawEnforce.js new file mode 100644 index 0000000..659f2ea --- /dev/null +++ b/ruoyi-ui/src/api/ehs/ehsLawEnforce.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询行政执法台账列表 +export function listEhsLawEnforce(query) { + return request({ + url: '/ehs/ehsLawEnforce/list', + method: 'get', + params: query + }) +} + +// 查询行政执法台账详细 +export function getEhsLawEnforce(id) { + return request({ + url: '/ehs/ehsLawEnforce/' + id, + method: 'get' + }) +} + +// 新增行政执法台账 +export function addEhsLawEnforce(data) { + return request({ + url: '/ehs/ehsLawEnforce', + method: 'post', + data: data + }) +} + +// 修改行政执法台账 +export function updateEhsLawEnforce(data) { + return request({ + url: '/ehs/ehsLawEnforce', + method: 'put', + data: data + }) +} + +// 删除行政执法台账 +export function delEhsLawEnforce(id) { + return request({ + url: '/ehs/ehsLawEnforce/' + id, + method: 'delete' + }) +} diff --git a/ruoyi-ui/src/views/ehs/ehsLawEnforce/index.vue b/ruoyi-ui/src/views/ehs/ehsLawEnforce/index.vue new file mode 100644 index 0000000..a6c3c51 --- /dev/null +++ b/ruoyi-ui/src/views/ehs/ehsLawEnforce/index.vue @@ -0,0 +1,502 @@ + + + diff --git a/ruoyi-ui/src/views/ehs/ehsRescueTeam/index.vue b/ruoyi-ui/src/views/ehs/ehsRescueTeam/index.vue index d00943e..68b5333 100644 --- a/ruoyi-ui/src/views/ehs/ehsRescueTeam/index.vue +++ b/ruoyi-ui/src/views/ehs/ehsRescueTeam/index.vue @@ -150,7 +150,6 @@ -