diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsHiddenDangerController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsHiddenDangerController.java new file mode 100644 index 0000000..bf569ec --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsHiddenDangerController.java @@ -0,0 +1,142 @@ +package com.ruoyi.web.controller.ehs; + +import java.util.List; +import java.util.Arrays; +import javax.servlet.http.HttpServletResponse; + +import com.ruoyi.common.utils.StringUtils; +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.ehsHiddenDanger.domain.EhsHiddenDanger; +import com.ruoyi.ehsHiddenDanger.service.IEhsHiddenDangerService; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * 隐患信息Controller + * + * @author ruoyi + * @date 2023-12-11 + */ +@Api(tags="隐患信息管理") +@RestController +@RequestMapping("/ehsHiddenDanger/ehsHiddenDanger") +public class EhsHiddenDangerController extends BaseController +{ + @Autowired + private IEhsHiddenDangerService ehsHiddenDangerService; + +/** + * 查询隐患信息列表 + */ +@PreAuthorize("@ss.hasPermi('ehsHiddenDanger:ehsHiddenDanger:list')") +@GetMapping("/list") + public TableDataInfo list(EhsHiddenDanger ehsHiddenDanger) + { + startPage(); + List list = ehsHiddenDangerService.selectEhsHiddenDangerList(ehsHiddenDanger); + return getDataTable(list); + } + + /** + * 导出隐患信息列表 + */ + @PreAuthorize("@ss.hasPermi('ehsHiddenDanger:ehsHiddenDanger:export')") + @Log(title = "隐患信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, EhsHiddenDanger ehsHiddenDanger) + { + List list = ehsHiddenDangerService.selectEhsHiddenDangerList(ehsHiddenDanger); + ExcelUtil util = new ExcelUtil(EhsHiddenDanger.class); + util.exportExcel(response, list, "隐患信息数据"); + } + + /** + * 获取隐患信息详细信息 + */ + @PreAuthorize("@ss.hasPermi('ehsHiddenDanger:ehsHiddenDanger:query')") + @GetMapping(value = "/{hiddenDangerId}") + public AjaxResult getInfo(@PathVariable("hiddenDangerId") Long hiddenDangerId) + { + EhsHiddenDanger ehsHiddenDanger = ehsHiddenDangerService.selectEhsHiddenDangerByHiddenDangerId(hiddenDangerId); + if(StringUtils.isNotEmpty(ehsHiddenDanger.getHiddenDangerLabel()) ){ + String[] s = ehsHiddenDanger.getHiddenDangerLabel().split(","); + ehsHiddenDanger.setHiddenDangerLabelArray(s); + } + return success(ehsHiddenDanger); + } + + /** + * 新增隐患信息 + */ + @ApiOperation("新增隐患信息") + @PreAuthorize("@ss.hasPermi('ehsHiddenDanger:ehsHiddenDanger:add')") + @Log(title = "隐患信息", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody EhsHiddenDanger ehsHiddenDanger) + { + return toAjax(ehsHiddenDangerService.save(ehsHiddenDanger)); + } + + /** + * 修改隐患信息 + */ + @ApiOperation("修改隐患信息") + @PreAuthorize("@ss.hasPermi('ehsHiddenDanger:ehsHiddenDanger:edit')") + @Log(title = "隐患信息", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody EhsHiddenDanger ehsHiddenDanger) + { + return toAjax(ehsHiddenDangerService.updateById(ehsHiddenDanger)); + } + + /** + * 删除隐患信息 + */ + @ApiOperation("删除隐患信息") + @PreAuthorize("@ss.hasPermi('ehsHiddenDanger:ehsHiddenDanger:remove')") + @Log(title = "隐患信息", businessType = BusinessType.DELETE) + @DeleteMapping("/{hiddenDangerIds}") + public AjaxResult remove(@PathVariable Long[] hiddenDangerIds) + { + return toAjax(ehsHiddenDangerService.removeByIds(Arrays.asList(hiddenDangerIds))); + } + + /** + * 督办 + */ + @ApiOperation("督办隐患信息") + //@PreAuthorize("@ss.hasPermi('ehsHiddenDanger:ehsHiddenDanger:supervise')") + @Log(title = "督办信息", businessType = BusinessType.UPDATE) + @GetMapping("/supervise/{hiddenDangerIds}") + public AjaxResult supervise(@PathVariable Long[] hiddenDangerIds) + { + return toAjax(ehsHiddenDangerService.superviseEhsHiddenDanger(hiddenDangerIds)); + } + + /** + * 协办 + */ + @ApiOperation("协办隐患信息") + @PreAuthorize("@ss.hasPermi('ehsHiddenDanger:ehsHiddenDanger:assist')") + @Log(title = "协办信息", businessType = BusinessType.UPDATE) + @GetMapping("/assist") + public AjaxResult assist( EhsHiddenDanger ehsHiddenDanger ) + { + return toAjax(ehsHiddenDangerService.assistEhsHiddenDanger(ehsHiddenDanger)); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsMaterialDetailController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsMaterialDetailController.java index ad53724..4ca6f50 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsMaterialDetailController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsMaterialDetailController.java @@ -1,5 +1,6 @@ package com.ruoyi.web.controller.ehs; +import java.math.BigDecimal; import java.util.Date; import java.util.List; import java.util.Arrays; @@ -88,9 +89,26 @@ public class EhsMaterialDetailController extends BaseController @PostMapping public AjaxResult add(@RequestBody EhsMaterialDetail ehsMaterialDetail) { - ehsMaterialDetail.setSendTime(new Date()); - ehsMaterialDetail.setSendUserId(SecurityUtils.getUserId()); - return toAjax(ehsMaterialDetailService.save(ehsMaterialDetail)); + if(ehsMaterialDetail.getOperateType()==0) {//出库指令新增 + ehsMaterialDetail.setSendUserId(SecurityUtils.getUserId()); + ehsMaterialDetail.setSendTime(new Date()); + }else{//入库新增 + //跟新明细表 + ehsMaterialDetail.setOutboundTime(new Date()); + ehsMaterialDetail.setOutboundUserId(SecurityUtils.getUserId()); + } + //更新物资表数量 + EhsMaterial ehsMaterial = ehsMaterialService.selectEhsMaterialByMaterialId(ehsMaterialDetail.getMaterialId()); + BigDecimal string1 = new BigDecimal(ehsMaterial.getMaterialQuantity());//主表的数量 + BigDecimal string2 = new BigDecimal( + ehsMaterialDetail.getOperateType()==1?ehsMaterialDetail.getOutboundQuantity():ehsMaterialDetail.getSendQuantity());//入库指令的数量 + BigDecimal result2 = string1.add(string2);//库存 + ehsMaterial = new EhsMaterial(); + ehsMaterial.setMaterialQuantity(ehsMaterialDetail.getOperateType()==1?result2.toString():null); + ehsMaterial.setMaterialId(ehsMaterialDetail.getMaterialId()); + ehsMaterialDetail.setInventory(result2); + ehsMaterialDetailService.save(ehsMaterialDetail);// + return toAjax(ehsMaterialService.updateById(ehsMaterial)); } /** @@ -102,14 +120,33 @@ public class EhsMaterialDetailController extends BaseController @PutMapping public AjaxResult edit(@RequestBody EhsMaterialDetail ehsMaterialDetail) { - ehsMaterialDetail.setOutboundTime(new Date()); - ehsMaterialDetail.setOutboundUserId(SecurityUtils.getUserId()); - EhsMaterialDetail md = ehsMaterialDetailService.selectEhsMaterialDetailByMaterialDetailId(ehsMaterialDetail.getMaterialDetailId()); - ehsMaterialDetail.setOutboundQuantity(md.getOutboundQuantity()) ; - //更新物资表数量 - EhsMaterial ehsMaterial = ehsMaterialService.selectEhsMaterialByMaterialId(ehsMaterialDetail.getMaterialDetailId()); - ehsMaterial.setMaterialQuantity(String.valueOf(Long.parseLong(ehsMaterial.getMaterialQuantity())- Long.parseLong(md.getSendQuantity()) )); - return toAjax(ehsMaterialDetailService.updateById(ehsMaterialDetail)); + + EhsMaterialDetail md = new EhsMaterialDetail(); + md.setMaterialId(ehsMaterialDetail.getMaterialId()); + md.setGetOut("1");//查询操作人为空的 + md.setOperateType(0);//查询出库操作 + List list = ehsMaterialDetailService.selectEhsMaterialDetailList(md); + if(list.size()>0){ + ehsMaterialDetail.setOutboundQuantity(list.get(0).getOutboundQuantity()) ; + //更新物资表数量 + EhsMaterial ehsMaterial = ehsMaterialService.selectEhsMaterialByMaterialId(ehsMaterialDetail.getMaterialId()); + BigDecimal string1 = new BigDecimal(ehsMaterial.getMaterialQuantity());//主表的数量 + BigDecimal string2 = new BigDecimal(list.get(0).getSendQuantity());//出库指令的数量 + BigDecimal result2 = string1.subtract(string2);//库存 + ehsMaterial = new EhsMaterial(); + ehsMaterial.setMaterialQuantity(result2.toString()); + ehsMaterial.setMaterialId(ehsMaterialDetail.getMaterialId()); + ehsMaterialService.updateById(ehsMaterial); + ////更新明细表 + md = new EhsMaterialDetail(); + md.setMaterialDetailId(list.get(0).getMaterialDetailId()); + md.setOutboundTime(new Date()); + md.setOutboundUserId(SecurityUtils.getUserId()); + md.setOutboundQuantity(list.get(0).getSendQuantity()); + md.setInventory(result2); + return toAjax(ehsMaterialDetailService.updateById(md)); + } + return error("未查询到出库指令"); } /** diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsNoticeMessageController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsNoticeMessageController.java index bc1ae66..0c67714 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsNoticeMessageController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsNoticeMessageController.java @@ -191,4 +191,11 @@ public class EhsNoticeMessageController extends BaseController } return success(ehsNoticeMessage); } + + @GetMapping(value = "/displayDetail/{noticeMessageId}") + public AjaxResult displayDetail(@PathVariable("noticeMessageId") Long noticeMessageId) + { + EhsNoticeMessage ehsNoticeMessage = ehsNoticeMessageService.selectEhsNoticeMessageByNoticeMessageId(noticeMessageId); + return success(ehsNoticeMessage); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsNoticeMessageFileController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsNoticeMessageFileController.java index 68fa235..3c3d552 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsNoticeMessageFileController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsNoticeMessageFileController.java @@ -1,9 +1,13 @@ package com.ruoyi.web.controller.ehs; +import java.io.*; +import java.net.URLEncoder; import java.util.HashMap; import java.util.List; import java.util.Arrays; import java.util.Map; +import java.util.zip.ZipEntry; +import java.util.zip.ZipOutputStream; import javax.servlet.http.HttpServletResponse; import com.ruoyi.common.core.domain.entity.SysDept; @@ -155,4 +159,43 @@ public class EhsNoticeMessageFileController extends BaseController } return getDataTable(fileList); } + @GetMapping("/downloadlist/{id}") + public void downLoadList( @PathVariable("id") Long id, HttpServletResponse response ) throws UnsupportedEncodingException { + EhsNoticeMessage ehsNoticeMessage = ehsNoticeMessageService.selectEhsNoticeMessageByNoticeMessageId(id); + response.reset(); + response.setHeader("Content-Disposition","attachment; filename=" + URLEncoder.encode(ehsNoticeMessage.getTitle()+"附件.zip", "UTF-8")); + response.setCharacterEncoding("utf-8"); + + response.setContentType("application/octet-stream"); + + try(ZipOutputStream zipOutputStream=new ZipOutputStream(new BufferedOutputStream(response.getOutputStream()))) + { + EhsNoticeMessageFile ehsNoticeMessageFile = new EhsNoticeMessageFile(); + ehsNoticeMessageFile.setNoticeMessageId(id); + List fileList = ehsNoticeMessageFileService.selectEhsNoticeMessageFileList(ehsNoticeMessageFile); + for(EhsNoticeMessageFile efile:fileList) + { + File file =new File(efile.getFileName()); + String fileName=file.getName(); + ZipEntry ze = new ZipEntry(fileName); + zipOutputStream.putNextEntry(ze); + try(BufferedInputStream bis=new BufferedInputStream(new FileInputStream(file))){ + byte[] bytes = new byte[1024]; + int i=0; + while((i=bis.read(bytes))!=-1) + { + zipOutputStream.write(bytes,0,i); + } + zipOutputStream.closeEntry(); + }catch (Exception e) + { + e.printStackTrace(); + } + } + + }catch (Exception e) + { + e.printStackTrace(); + } + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsRiskController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsRiskController.java index 70750ab..c380c34 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsRiskController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsRiskController.java @@ -3,10 +3,6 @@ package com.ruoyi.web.controller.ehs; import java.util.List; import java.util.Arrays; import javax.servlet.http.HttpServletResponse; - -import com.ruoyi.common.utils.SecurityUtils; -import com.ruoyi.ehsRisk.domain.EhsRisk; -import com.ruoyi.ehsRisk.service.IEhsRiskService; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; @@ -23,6 +19,8 @@ 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.ehsRisk.domain.EhsRisk; +import com.ruoyi.ehsRisk.service.IEhsRiskService; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.core.page.TableDataInfo; @@ -30,58 +28,56 @@ import com.ruoyi.common.core.page.TableDataInfo; * 风险信息Controller * * @author ruoyi - * @date 2023-12-04 + * @date 2023-12-13 */ @Api(tags="风险信息管理") @RestController -@RequestMapping("/system/risk") +@RequestMapping("/ehsRisk/ehsRisk") public class EhsRiskController extends BaseController { @Autowired private IEhsRiskService ehsRiskService; +/** + * 查询风险信息列表 + */ +@PreAuthorize("@ss.hasPermi('ehsRisk:ehsRisk:list')") +@GetMapping("/list") + public TableDataInfo list(EhsRisk ehsRisk) + { + startPage(); + List list = ehsRiskService.selectEhsRiskList(ehsRisk); + return getDataTable(list); + } - /** - * 查询风险信息列表 - */ - @PreAuthorize("@ss.hasPermi('system:risk:list')") - @GetMapping("/list") - public TableDataInfo list(EhsRisk ehsRisk) - { - startPage(); - List list = ehsRiskService.selectEhsRiskList(ehsRisk); - return getDataTable(list); - } - - /** - * 导出风险信息列表 - */ - @PreAuthorize("@ss.hasPermi('system:risk:export')") - @Log(title = "风险信息", businessType = BusinessType.EXPORT) - @PostMapping("/export") - public void export(HttpServletResponse response, EhsRisk ehsRisk) - { - - List list = ehsRiskService.selectEhsRiskList(ehsRisk); - ExcelUtil util = new ExcelUtil(EhsRisk.class); - util.exportExcel(response, list, "风险信息数据"); - } + /** + * 导出风险信息列表 + */ + @PreAuthorize("@ss.hasPermi('ehsRisk:ehsRisk:export')") + @Log(title = "风险信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, EhsRisk ehsRisk) + { + List list = ehsRiskService.selectEhsRiskList(ehsRisk); + ExcelUtil util = new ExcelUtil(EhsRisk.class); + util.exportExcel(response, list, "风险信息数据"); + } - /** - * 获取风险信息详细信息 - */ - @PreAuthorize("@ss.hasPermi('system:risk:query')") - @GetMapping(value = "/{riskId}") - public AjaxResult getInfo(@PathVariable("riskId") Long riskId) - { - return success(ehsRiskService.selectEhsRiskByRiskId(riskId)); - } + /** + * 获取风险信息详细信息 + */ + @PreAuthorize("@ss.hasPermi('ehsRisk:ehsRisk:query')") + @GetMapping(value = "/{riskId}") + public AjaxResult getInfo(@PathVariable("riskId") Long riskId) + { + return success(ehsRiskService.selectEhsRiskByRiskId(riskId)); + } /** * 新增风险信息 */ @ApiOperation("新增风险信息") - @PreAuthorize("@ss.hasPermi('system:risk:add')") + @PreAuthorize("@ss.hasPermi('ehsRisk:ehsRisk:add')") @Log(title = "风险信息", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody EhsRisk ehsRisk) @@ -93,7 +89,7 @@ public class EhsRiskController extends BaseController * 修改风险信息 */ @ApiOperation("修改风险信息") - @PreAuthorize("@ss.hasPermi('system:risk:edit')") + @PreAuthorize("@ss.hasPermi('ehsRisk:ehsRisk:edit')") @Log(title = "风险信息", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody EhsRisk ehsRisk) @@ -105,11 +101,11 @@ public class EhsRiskController extends BaseController * 删除风险信息 */ @ApiOperation("删除风险信息") - @PreAuthorize("@ss.hasPermi('system:risk:remove')") + @PreAuthorize("@ss.hasPermi('ehsRisk:ehsRisk:remove')") @Log(title = "风险信息", businessType = BusinessType.DELETE) - @DeleteMapping("/{riskIds}") + @DeleteMapping("/{riskIds}") public AjaxResult remove(@PathVariable Long[] riskIds) { return toAjax(ehsRiskService.removeByIds(Arrays.asList(riskIds))); } -} \ No newline at end of file +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/ehsEnterprise/domain/EhsEnterprise.java b/ruoyi-system/src/main/java/com/ruoyi/ehsEnterprise/domain/EhsEnterprise.java index f2f29f2..7cb3eea 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/ehsEnterprise/domain/EhsEnterprise.java +++ b/ruoyi-system/src/main/java/com/ruoyi/ehsEnterprise/domain/EhsEnterprise.java @@ -39,7 +39,7 @@ public class EhsEnterprise extends BaseEntity private String enterpriseName; /** 行业 */ - @Excel(name = "行业") + @Excel(name = "行业", dictType = "enterprise_type") private String enterpriseType; /** 生产经营地址 */ @@ -78,4 +78,10 @@ public class EhsEnterprise extends BaseEntity @Excel(name = "分管安全副职电话") private String safetyManagerTel; + @Excel(name = "行政区域") + private String areaId; + @Excel(name = "经济类型") + private String economicType; + @Excel(name = "企业规模") + private String enterpriseScale; } diff --git a/ruoyi-system/src/main/java/com/ruoyi/ehsEnterprise/service/impl/EhsEnterpriseServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/ehsEnterprise/service/impl/EhsEnterpriseServiceImpl.java index b999156..9560304 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/ehsEnterprise/service/impl/EhsEnterpriseServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/ehsEnterprise/service/impl/EhsEnterpriseServiceImpl.java @@ -3,6 +3,7 @@ package com.ruoyi.ehsEnterprise.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.common.utils.SecurityUtils; import org.springframework.stereotype.Service; import org.springframework.beans.factory.annotation.Autowired; import com.ruoyi.common.utils.StringUtils; @@ -45,6 +46,10 @@ public class EhsEnterpriseServiceImpl extends ServiceImpl selectEhsEnterpriseList(EhsEnterprise ehsEnterprise) { + if(SecurityUtils.getLoginUser().getUser().getDept().getParentId()!=null && + SecurityUtils.getLoginUser().getUser().getDept().getParentId().longValue()!=0){ + ehsEnterprise.setDeptId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId().longValue()); + } return ehsEnterpriseMapper.selectEhsEnterpriseList(ehsEnterprise); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/ehsHiddenDanger/domain/EhsHiddenDanger.java b/ruoyi-system/src/main/java/com/ruoyi/ehsHiddenDanger/domain/EhsHiddenDanger.java new file mode 100644 index 0000000..ef1d1ae --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/ehsHiddenDanger/domain/EhsHiddenDanger.java @@ -0,0 +1,136 @@ +package com.ruoyi.ehsHiddenDanger.domain; + +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; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 隐患信息对象 ehs_hidden_danger + * + * @author ruoyi + * @date 2023-12-11 + */ +@Data +@ToString +@NoArgsConstructor +@Accessors(chain = true) +@TableName("ehs_hidden_danger") +public class EhsHiddenDanger extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + @TableId(type= IdType.AUTO) + private Long hiddenDangerId; + + /** 隐患所在单位 */ + @Excel(name = "隐患所在单位") + private String enterpriseName; + + /** 企业现状(0停业、1正常经营) */ + @Excel(name = "企业现状", readConverterExp = "0=停业、1正常经营") + private String enterpriseStatus; + + /** 行业 字典 */ + @Excel(name = "行业" , dictType = "enterprise_type") + private String enterpriseType; + + /** 隐患情况 */ + @Excel(name = "隐患情况") + private String hiddenDangerDesc; + + /** 排查时间 */ + @Excel(name = "排查时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date checkTime; + + /** 排查方式 */ + @Excel(name = "排查方式") + private String checkType; + + /** 隐患照片 */ + @Excel(name = "隐患照片") + private String hiddenDangerImg; + + /** 整改措施 */ + @Excel(name = "整改措施") + private String rectifyMeasure; + + /** 整改进度 */ + @Excel(name = "整改进度") + private String status; + + /** 整改时间 */ + @Excel(name = "整改时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date rectifyTime; + + /** 整改责任人 */ + @Excel(name = "整改责任人") + private Long principalName; + + /** 整改照片 */ + @Excel(name = "整改照片") + private String rectifyImg; + + /** 监管部门 */ + @Excel(name = "监管部门") + private String regulatoryDept; + + /** 监管部门责任人 */ + @Excel(name = "监管部门责任人") + private String regulatoryName; + + /** 隐患级别 */ + @Excel(name = "隐患级别") + private String hiddenDangerGrade; + + /** 隐患类型 */ + @Excel(name = "隐患类型") + private String hiddenDangerType; + + /** 标签 */ + @Excel(name = "标签") + private String hiddenDangerLabel; + + @Excel(name = "是否督办") + private Long isSupervise; + + @Excel(name = "协办部门列表") + private String assistDept; + + @Excel(name = "督办结果") + private String superviseResult; + + + @TableField(exist = false) + private String hiddenDangerIds; + + @TableField(exist = false) + private String assistDeptName; + + @TableField(exist = false) + private String[] hiddenDangerLabelArray; + + @Excel(name = "整改期限", width = 30, dateFormat = "yyyy-MM-dd") + private Date rectifyTermTime; + + /** 整改资金 */ + @Excel(name = "整改资金") + private BigDecimal rectifyMoney; + + @Excel(name = "行政区域") + private String areaId; + @Excel(name = "经济类型") + private String economicType; + @Excel(name = "企业规模") + private String enterpriseScale; +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/ehsHiddenDanger/mapper/EhsHiddenDangerMapper.java b/ruoyi-system/src/main/java/com/ruoyi/ehsHiddenDanger/mapper/EhsHiddenDangerMapper.java new file mode 100644 index 0000000..964e327 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/ehsHiddenDanger/mapper/EhsHiddenDangerMapper.java @@ -0,0 +1,42 @@ +package com.ruoyi.ehsHiddenDanger.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.ruoyi.ehsHiddenDanger.domain.EhsHiddenDanger; +import java.util.List; + +/** + * 隐患信息Mapper接口 + * + * @author ruoyi + * @date 2023-12-11 + */ +public interface EhsHiddenDangerMapper extends BaseMapper { + /** + * 查询隐患信息 + * + * @param hiddenDangerId 隐患信息主键 + * @return 隐患信息 + */ + public EhsHiddenDanger selectEhsHiddenDangerByHiddenDangerId(Long hiddenDangerId); + + /** + * 查询隐患信息列表 + * + * @param ehsHiddenDanger 隐患信息 + * @return 隐患信息集合 + */ + public List selectEhsHiddenDangerList(EhsHiddenDanger ehsHiddenDanger); + /** + * 督办 + * + * @param hiddenDangerIds 部门ID组 + */ + public int superviseEhsHiddenDanger(Long[] hiddenDangerIds); + + /** + * 协办 + * + * @param ehsHiddenDanger 部门ID组 + */ + public int assistEhsHiddenDanger(EhsHiddenDanger ehsHiddenDanger); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/ehsHiddenDanger/service/IEhsHiddenDangerService.java b/ruoyi-system/src/main/java/com/ruoyi/ehsHiddenDanger/service/IEhsHiddenDangerService.java new file mode 100644 index 0000000..aca5dcd --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/ehsHiddenDanger/service/IEhsHiddenDangerService.java @@ -0,0 +1,42 @@ +package com.ruoyi.ehsHiddenDanger.service; + +import java.util.List; +import com.baomidou.mybatisplus.extension.service.IService; +import com.ruoyi.ehsHiddenDanger.domain.EhsHiddenDanger; + +/** + * 隐患信息Service接口 + * + * @author ruoyi + * @date 2023-12-11 + */ +public interface IEhsHiddenDangerService extends IService { + + /** + * 查询隐患信息 + * + * @param hiddenDangerId 隐患信息主键 + * @return 隐患信息 + */ + public EhsHiddenDanger selectEhsHiddenDangerByHiddenDangerId(Long hiddenDangerId); + + /** + * 查询隐患信息列表 + * + * @param ehsHiddenDanger 隐患信息 + * @return 隐患信息集合 + */ + public List selectEhsHiddenDangerList(EhsHiddenDanger ehsHiddenDanger); + /** + * 督办 + * + * @param hiddenDangerIds 当前部门 + */ + int superviseEhsHiddenDanger(Long[] hiddenDangerIds); + /** + * 协办 + * + * @param ehsHiddenDanger 部门ID组 + */ + public int assistEhsHiddenDanger(EhsHiddenDanger ehsHiddenDanger); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/ehsHiddenDanger/service/impl/EhsHiddenDangerServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/ehsHiddenDanger/service/impl/EhsHiddenDangerServiceImpl.java new file mode 100644 index 0000000..cc8e3a9 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/ehsHiddenDanger/service/impl/EhsHiddenDangerServiceImpl.java @@ -0,0 +1,115 @@ +package com.ruoyi.ehsHiddenDanger.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.common.core.domain.entity.SysDept; +import com.ruoyi.common.core.text.Convert; +import com.ruoyi.common.utils.SecurityUtils; +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.ehsHiddenDanger.mapper.EhsHiddenDangerMapper; +import com.ruoyi.ehsHiddenDanger.domain.EhsHiddenDanger; +import com.ruoyi.ehsHiddenDanger.service.IEhsHiddenDangerService; + +/** + * 隐患信息Service业务层处理 + * + * @author ruoyi + * @date 2023-12-11 + */ +@Service +public class EhsHiddenDangerServiceImpl extends ServiceImpl implements IEhsHiddenDangerService { + + @Autowired + private EhsHiddenDangerMapper ehsHiddenDangerMapper; + + /** + * 查询隐患信息 + * + * @param hiddenDangerId 隐患信息主键 + * @return 隐患信息 + */ + @Override + public EhsHiddenDanger selectEhsHiddenDangerByHiddenDangerId(Long hiddenDangerId) + { + return ehsHiddenDangerMapper.selectEhsHiddenDangerByHiddenDangerId(hiddenDangerId); + } + + /** + * 查询隐患信息列表 + * + * @param ehsHiddenDanger 隐患信息 + * @return 隐患信息 + */ + @Override + public List selectEhsHiddenDangerList(EhsHiddenDanger ehsHiddenDanger) + { + if(SecurityUtils.getLoginUser().getUser().getDept().getParentId()!=null && + SecurityUtils.getLoginUser().getUser().getDept().getParentId().longValue()!=0) { + ehsHiddenDanger.setDeptId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId().longValue()); + } + if(StringUtils.isNotEmpty(ehsHiddenDanger.getAssistDept())){//协办就不限制只能查询本部门的数据了。 + ehsHiddenDanger.setDeptId(null); + } + return ehsHiddenDangerMapper.selectEhsHiddenDangerList(ehsHiddenDanger); + } + + + private LambdaQueryWrapper buildQueryWrapper(EhsHiddenDanger query) { + Map params = query.getParams(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + lqw.like(StringUtils.isNotBlank(query.getEnterpriseName()), EhsHiddenDanger::getEnterpriseName, query.getEnterpriseName()); + lqw.eq(StringUtils.isNotBlank(query.getEnterpriseStatus()), EhsHiddenDanger::getEnterpriseStatus, query.getEnterpriseStatus()); + lqw.eq(StringUtils.isNotBlank(query.getEnterpriseType()), EhsHiddenDanger::getEnterpriseType, query.getEnterpriseType()); + lqw.like(StringUtils.isNotBlank(query.getHiddenDangerDesc()), EhsHiddenDanger::getHiddenDangerDesc, query.getHiddenDangerDesc()); + lqw.between(params.get("beginCheckTime") != null && params.get("endCheckTime") != null, + EhsHiddenDanger::getCheckTime ,params.get("beginCheckTime"), params.get("endCheckTime")); + lqw.like(StringUtils.isNotBlank(query.getCheckType()), EhsHiddenDanger::getCheckType, query.getCheckType()); + lqw.eq(StringUtils.isNotBlank(query.getHiddenDangerImg()), EhsHiddenDanger::getHiddenDangerImg, query.getHiddenDangerImg()); + lqw.like(StringUtils.isNotBlank(query.getRectifyMeasure()), EhsHiddenDanger::getRectifyMeasure, query.getRectifyMeasure()); + lqw.like(StringUtils.isNotBlank(query.getStatus()), EhsHiddenDanger::getStatus, query.getStatus()); + lqw.between(params.get("beginRectifyTime") != null && params.get("endRectifyTime") != null, + EhsHiddenDanger::getRectifyTime ,params.get("beginRectifyTime"), params.get("endRectifyTime")); + lqw.like(query.getPrincipalName() != null, EhsHiddenDanger::getPrincipalName, query.getPrincipalName()); + lqw.eq(StringUtils.isNotBlank(query.getRectifyImg()), EhsHiddenDanger::getRectifyImg, query.getRectifyImg()); + lqw.eq(StringUtils.isNotBlank(query.getRegulatoryDept()), EhsHiddenDanger::getRegulatoryDept, query.getRegulatoryDept()); + lqw.like(StringUtils.isNotBlank(query.getRegulatoryName()), EhsHiddenDanger::getRegulatoryName, query.getRegulatoryName()); + lqw.eq(StringUtils.isNotBlank(query.getHiddenDangerGrade()), EhsHiddenDanger::getHiddenDangerGrade, query.getHiddenDangerGrade()); + lqw.eq(StringUtils.isNotBlank(query.getHiddenDangerType()), EhsHiddenDanger::getHiddenDangerType, query.getHiddenDangerType()); + lqw.eq(StringUtils.isNotBlank(query.getHiddenDangerLabel()), EhsHiddenDanger::getHiddenDangerLabel, query.getHiddenDangerLabel()); + lqw.orderByDesc(EhsHiddenDanger::getCreateTime); + lqw.eq(query.getDeptId() != null, EhsHiddenDanger::getDeptId, query.getDeptId()); + lqw.eq(query.getCreateUserId() != null, EhsHiddenDanger::getCreateUserId, query.getCreateUserId()); + lqw.eq(query.getUpdateUserId() != null, EhsHiddenDanger::getUpdateUserId, query.getUpdateUserId()); + lqw.eq(query.getIsSupervise() != null, EhsHiddenDanger::getIsSupervise, query.getIsSupervise()); + lqw.eq(StringUtils.isNotBlank(query.getAssistDept()), EhsHiddenDanger::getAssistDept, query.getAssistDept()); + lqw.eq(StringUtils.isNotBlank(query.getSuperviseResult()), EhsHiddenDanger::getSuperviseResult, query.getSuperviseResult()); + lqw.eq(query.getRectifyMoney() != null, EhsHiddenDanger::getRectifyMoney, query.getRectifyMoney()); + lqw.between(params.get("beginRectifyTermTime") != null && params.get("endRectifyTermTime") != null, + EhsHiddenDanger::getRectifyTermTime ,params.get("beginRectifyTermTime"), params.get("endRectifyTermTime")); + return lqw; + } + /** + * 督办 + * + * @param hiddenDangerIds 当前部门 + */ + @Override + public int superviseEhsHiddenDanger(Long[] hiddenDangerIds) + { + + return ehsHiddenDangerMapper.superviseEhsHiddenDanger(hiddenDangerIds); + } + /** + * 协办 + * + * @param ehsHiddenDanger 部门ID组 + */ + public int assistEhsHiddenDanger(EhsHiddenDanger ehsHiddenDanger){ + return ehsHiddenDangerMapper.assistEhsHiddenDanger(ehsHiddenDanger); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/ehsMaterial/domain/EhsMaterial.java b/ruoyi-system/src/main/java/com/ruoyi/ehsMaterial/domain/EhsMaterial.java index 1731a1c..d43b182 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/ehsMaterial/domain/EhsMaterial.java +++ b/ruoyi-system/src/main/java/com/ruoyi/ehsMaterial/domain/EhsMaterial.java @@ -67,7 +67,6 @@ public class EhsMaterial extends BaseEntity private String tel; /** 上报部门 */ @Excel(name = "待处理出库") - @TableField(exist = false) private String sendQuantity; diff --git a/ruoyi-system/src/main/java/com/ruoyi/ehsMaterial/service/impl/EhsMaterialServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/ehsMaterial/service/impl/EhsMaterialServiceImpl.java index f452cba..15b49f1 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/ehsMaterial/service/impl/EhsMaterialServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/ehsMaterial/service/impl/EhsMaterialServiceImpl.java @@ -48,7 +48,7 @@ public class EhsMaterialServiceImpl extends ServiceImpl { /** diff --git a/ruoyi-system/src/main/java/com/ruoyi/ehsRisk/service/IEhsRiskService.java b/ruoyi-system/src/main/java/com/ruoyi/ehsRisk/service/IEhsRiskService.java index 8b18d98..a1c90c8 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/ehsRisk/service/IEhsRiskService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/ehsRisk/service/IEhsRiskService.java @@ -8,23 +8,24 @@ import com.ruoyi.ehsRisk.domain.EhsRisk; * 风险信息Service接口 * * @author ruoyi - * @date 2023-11-30 + * @date 2023-12-13 */ public interface IEhsRiskService extends IService { - /** - * 查询风险信息 - * - * @param riskId 风险信息主键 - * @return 风险信息 - */ - public EhsRisk selectEhsRiskByRiskId(Long riskId); + /** + * 查询风险信息 + * + * @param riskId 风险信息主键 + * @return 风险信息 + */ + public EhsRisk selectEhsRiskByRiskId(Long riskId); + + /** + * 查询风险信息列表 + * + * @param ehsRisk 风险信息 + * @return 风险信息集合 + */ + public List selectEhsRiskList(EhsRisk ehsRisk); - /** - * 查询风险信息列表 - * - * @param ehsRisk 风险信息 - * @return 风险信息集合 - */ - public List selectEhsRiskList(EhsRisk ehsRisk); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/ehsRisk/service/impl/EhsRiskServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/ehsRisk/service/impl/EhsRiskServiceImpl.java index 50c8a0a..101083e 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/ehsRisk/service/impl/EhsRiskServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/ehsRisk/service/impl/EhsRiskServiceImpl.java @@ -3,75 +3,79 @@ package com.ruoyi.ehsRisk.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.common.utils.SecurityUtils; -import com.ruoyi.ehsRisk.domain.EhsRisk; -import com.ruoyi.ehsRisk.mapper.EhsRiskMapper; -import com.ruoyi.ehsRisk.service.IEhsRiskService; 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.ehsRisk.mapper.EhsRiskMapper; +import com.ruoyi.ehsRisk.domain.EhsRisk; +import com.ruoyi.ehsRisk.service.IEhsRiskService; /** * 风险信息Service业务层处理 * * @author ruoyi - * @date 2023-11-30 + * @date 2023-12-13 */ @Service public class EhsRiskServiceImpl extends ServiceImpl implements IEhsRiskService { - @Autowired - private EhsRiskMapper ehsRiskMapper; - /** - * 查询风险信息 - * - * @param riskId 风险信息主键 - * @return 风险信息 - */ - @Override - public EhsRisk selectEhsRiskByRiskId(Long riskId) - { - return ehsRiskMapper.selectEhsRiskByRiskId(riskId); - } + @Autowired + private EhsRiskMapper ehsRiskMapper; + + /** + * 查询风险信息 + * + * @param riskId 风险信息主键 + * @return 风险信息 + */ + @Override + public EhsRisk selectEhsRiskByRiskId(Long riskId) + { + return ehsRiskMapper.selectEhsRiskByRiskId(riskId); + } - /** - * 查询风险信息列表 - * - * @param ehsRisk 风险信息 - * @return 风险信息 - */ - @Override - public List selectEhsRiskList(EhsRisk ehsRisk) - { - if(SecurityUtils.getLoginUser().getUser().getDept().getParentId()!=null && - SecurityUtils.getLoginUser().getUser().getDept().getParentId().longValue()!=0){ - ehsRisk.setDeptId(SecurityUtils.getLoginUser().getUser().getDept().getDeptId().longValue()); - } - return ehsRiskMapper.selectEhsRiskList(ehsRisk); - } + /** + * 查询风险信息列表 + * + * @param ehsRisk 风险信息 + * @return 风险信息 + */ + @Override + public List selectEhsRiskList(EhsRisk ehsRisk) + { + return ehsRiskMapper.selectEhsRiskList(ehsRisk); + } - private LambdaQueryWrapper buildQueryWrapper(EhsRisk query) { - Map params = query.getParams(); - LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); - lqw.eq(query.getRiskGrade() != null, EhsRisk::getRiskGrade, query.getRiskGrade()); - lqw.eq(StringUtils.isNotBlank(query.getReportAddressType()), EhsRisk::getReportAddressType, query.getReportAddressType()); - lqw.like(StringUtils.isNotBlank(query.getRiskLocation()), EhsRisk::getRiskLocation, query.getRiskLocation()); - lqw.like(StringUtils.isNotBlank(query.getTel()), EhsRisk::getTel, query.getTel()); - lqw.between(params.get("beginPeopleQuantity") != null && params.get("endPeopleQuantity") != null, - EhsRisk::getPeopleQuantity ,params.get("beginPeopleQuantity"), params.get("endPeopleQuantity")); - lqw.between(params.get("beginMaterialsQuantity") != null && params.get("endMaterialsQuantity") != null, - EhsRisk::getMaterialsQuantity ,params.get("beginMaterialsQuantity"), params.get("endMaterialsQuantity")); - lqw.between(params.get("beginRepairTeam") != null && params.get("endRepairTeam") != null, - EhsRisk::getRepairTeam ,params.get("beginRepairTeam"), params.get("endRepairTeam")); - lqw.like(StringUtils.isNotBlank(query.getPersonResponsible()), EhsRisk::getPersonResponsible, query.getPersonResponsible()); - lqw.like(StringUtils.isNotBlank(query.getVillagePersonResponsible()), EhsRisk::getVillagePersonResponsible, query.getVillagePersonResponsible()); - lqw.like(StringUtils.isNotBlank(query.getVillagePersonResponsible2()), EhsRisk::getVillagePersonResponsible2, query.getVillagePersonResponsible2()); - lqw.like(StringUtils.isNotBlank(query.getTel2()), EhsRisk::getTel2, query.getTel2()); - lqw.orderByDesc(EhsRisk::getCreateTime); - return lqw; - } + private LambdaQueryWrapper buildQueryWrapper(EhsRisk query) { + Map params = query.getParams(); + LambdaQueryWrapper lqw = Wrappers.lambdaQuery(); + lqw.eq(query.getRiskGrade() != null, EhsRisk::getRiskGrade, query.getRiskGrade()); + lqw.eq(StringUtils.isNotBlank(query.getReportAddressType()), EhsRisk::getReportAddressType, query.getReportAddressType()); + lqw.like(StringUtils.isNotBlank(query.getRiskLocation()), EhsRisk::getRiskLocation, query.getRiskLocation()); + lqw.like(StringUtils.isNotBlank(query.getRiskDesc()), EhsRisk::getRiskDesc, query.getRiskDesc()); + lqw.like(StringUtils.isNotBlank(query.getPeopleQuantity()), EhsRisk::getPeopleQuantity, query.getPeopleQuantity()); + lqw.like(StringUtils.isNotBlank(query.getMaterialsAddr()), EhsRisk::getMaterialsAddr, query.getMaterialsAddr()); + lqw.between(params.get("beginMaterialsQuantity") != null && params.get("endMaterialsQuantity") != null, + EhsRisk::getMaterialsQuantity ,params.get("beginMaterialsQuantity"), params.get("endMaterialsQuantity")); + lqw.like(StringUtils.isNotBlank(query.getLifeAddr()), EhsRisk::getLifeAddr, query.getLifeAddr()); + lqw.like(StringUtils.isNotBlank(query.getResettleAddr()), EhsRisk::getResettleAddr, query.getResettleAddr()); + lqw.like(StringUtils.isNotBlank(query.getVillageName()), EhsRisk::getVillageName, query.getVillageName()); + lqw.like(StringUtils.isNotBlank(query.getVillageDuties()), EhsRisk::getVillageDuties, query.getVillageDuties()); + lqw.like(StringUtils.isNotBlank(query.getVillageTel()), EhsRisk::getVillageTel, query.getVillageTel()); + lqw.like(StringUtils.isNotBlank(query.getVillageName1()), EhsRisk::getVillageName1, query.getVillageName1()); + lqw.like(StringUtils.isNotBlank(query.getVillageDuties1()), EhsRisk::getVillageDuties1, query.getVillageDuties1()); + lqw.like(StringUtils.isNotBlank(query.getVillageTel1()), EhsRisk::getVillageTel1, query.getVillageTel1()); + lqw.orderByDesc(EhsRisk::getCreateTime); + lqw.eq(query.getDeptId() != null, EhsRisk::getDeptId, query.getDeptId()); + lqw.eq(query.getCreateUserId() != null, EhsRisk::getCreateUserId, query.getCreateUserId()); + lqw.eq(query.getUpdateUserId() != null, EhsRisk::getUpdateUserId, query.getUpdateUserId()); + lqw.like(StringUtils.isNotBlank(query.getInspectionName()), EhsRisk::getInspectionName, query.getInspectionName()); + lqw.like(StringUtils.isNotBlank(query.getInspectionDuties()), EhsRisk::getInspectionDuties, query.getInspectionDuties()); + lqw.like(StringUtils.isNotBlank(query.getInspectionTel()), EhsRisk::getInspectionTel, query.getInspectionTel()); + return lqw; + } } diff --git a/ruoyi-system/src/main/resources/mapper/ehs/EhsEnterpriseMapper.xml b/ruoyi-system/src/main/resources/mapper/ehs/EhsEnterpriseMapper.xml index f45f844..3062039 100644 --- a/ruoyi-system/src/main/resources/mapper/ehs/EhsEnterpriseMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/ehs/EhsEnterpriseMapper.xml @@ -26,30 +26,35 @@ + + + + - select enterprise_id, enterprise_code, enterprise_name, enterprise_type, enterprise_addr, Enterprise_leader, leader_tel, registered_capital, business_scope, business_projects, enterprise_status, safety_manager_name, safety_manager_tel, create_by, create_time, update_by, update_time, remark, dept_id, create_user_id, update_user_id from ehs_enterprise + select e.*, d.dept_name from ehs_enterprise e + left join sys_dept d on e.dept_id = d.dept_id diff --git a/ruoyi-system/src/main/resources/mapper/ehs/EhsHiddenDangerMapper.xml b/ruoyi-system/src/main/resources/mapper/ehs/EhsHiddenDangerMapper.xml new file mode 100644 index 0000000..390c718 --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/ehs/EhsHiddenDangerMapper.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select h.*, d.dept_name, + (SELECT GROUP_CONCAT( ft.dept_name SEPARATOR ';' ) FROM + sys_dept ft where FIND_IN_SET( ft.DEPT_ID, h.assist_dept ))assist_dept_name + from ehs_hidden_danger h + left join sys_dept d on h.dept_id = d.dept_id + + + + + + + + update ehs_hidden_danger set is_supervise = 1 where hidden_danger_id in + + #{hiddenDangerId} + + + + update ehs_hidden_danger set assist_dept = #{assistDept} where hidden_danger_id =#{hiddenDangerId} + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/ehs/EhsMaterialDetailMapper.xml b/ruoyi-system/src/main/resources/mapper/ehs/EhsMaterialDetailMapper.xml index 1372dc1..ac3b062 100644 --- a/ruoyi-system/src/main/resources/mapper/ehs/EhsMaterialDetailMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/ehs/EhsMaterialDetailMapper.xml @@ -22,6 +22,8 @@ + + @@ -33,14 +35,17 @@ diff --git a/ruoyi-system/src/main/resources/mapper/ehs/EhsMaterialMapper.xml b/ruoyi-system/src/main/resources/mapper/ehs/EhsMaterialMapper.xml index dc5562b..2ffb238 100644 --- a/ruoyi-system/src/main/resources/mapper/ehs/EhsMaterialMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/ehs/EhsMaterialMapper.xml @@ -38,7 +38,7 @@ - where material_id = #{materialId} + where m.material_id = #{materialId} diff --git a/ruoyi-system/src/main/resources/mapper/ehs/EhsNoticeMessageMapper.xml b/ruoyi-system/src/main/resources/mapper/ehs/EhsNoticeMessageMapper.xml index a04d1ed..3d8f33c 100644 --- a/ruoyi-system/src/main/resources/mapper/ehs/EhsNoticeMessageMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/ehs/EhsNoticeMessageMapper.xml @@ -10,6 +10,7 @@ + @@ -34,12 +35,12 @@ - select notice_message_id, title, display_content, file_temp_name, status, read_dept_id, mesg_type, dept_list, all_dept, create_dept_id, create_by, create_time, update_by, update_time, remark, dept_id, create_user_id, update_user_id from ehs_notice_message + select * from ehs_notice_message SELECT m.notice_message_id, m.create_user_id, m.create_time, m.dept_id, m.title, m.display_content, m.STATUS, m.dept_list, GROUP_CONCAT( ft.dept_name SEPARATOR ';' ) dept_name, - m.mesg_type, m.read_dept_id, m.all_dept, + m.mesg_type, m.read_dept_id, m.all_dept,m.file_temp_name,m.file_temp_original_name, ( SELECT count( 1 ) FROM ehs_notice_message_file f WHERE f.notice_message_id = m.notice_message_id ) file_count FROM ehs_notice_message m LEFT JOIN sys_user e ON e.user_id = m.CREATE_USER_ID diff --git a/ruoyi-system/src/main/resources/mapper/ehs/EhsRiskMapper.xml b/ruoyi-system/src/main/resources/mapper/ehs/EhsRiskMapper.xml index a1c88bf..508a20e 100644 --- a/ruoyi-system/src/main/resources/mapper/ehs/EhsRiskMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/ehs/EhsRiskMapper.xml @@ -1,62 +1,76 @@ + PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - select r.*, d.dept_name - from ehs_risk r left join sys_dept d on r.dept_id = d.dept_id - + select risk_id, risk_grade, report_address_type, risk_location, risk_desc, people_quantity, materials_addr, materials_quantity, life_addr, resettle_addr, village_name, village_duties, village_tel, village_name1, village_duties1, village_tel1, create_by, create_time, update_by, update_time, remark, dept_id, create_user_id, update_user_id, inspection_name, inspection_duties, inspection_tel from ehs_risk - + + + + + \ No newline at end of file diff --git a/ruoyi-ui/src/api/ehs/ehsHiddenDanger.js b/ruoyi-ui/src/api/ehs/ehsHiddenDanger.js new file mode 100644 index 0000000..8820b7c --- /dev/null +++ b/ruoyi-ui/src/api/ehs/ehsHiddenDanger.js @@ -0,0 +1,60 @@ +import request from '@/utils/request' + +// 查询隐患信息列表 +export function listEhsHiddenDanger(query) { + return request({ + url: '/ehsHiddenDanger/ehsHiddenDanger/list', + method: 'get', + params: query + }) +} + +// 查询隐患信息详细 +export function getEhsHiddenDanger(hiddenDangerId) { + return request({ + url: '/ehsHiddenDanger/ehsHiddenDanger/' + hiddenDangerId, + method: 'get' + }) +} + +// 新增隐患信息 +export function addEhsHiddenDanger(data) { + return request({ + url: '/ehsHiddenDanger/ehsHiddenDanger', + method: 'post', + data: data + }) +} + +// 修改隐患信息 +export function updateEhsHiddenDanger(data) { + return request({ + url: '/ehsHiddenDanger/ehsHiddenDanger', + method: 'put', + data: data + }) +} + +// 删除隐患信息 +export function delEhsHiddenDanger(hiddenDangerId) { + return request({ + url: '/ehsHiddenDanger/ehsHiddenDanger/' + hiddenDangerId, + method: 'delete' + }) +} + +// 督办 +export function superviseEhsHiddenDanger(hiddenDangerId) { + return request({ + url: '/ehsHiddenDanger/ehsHiddenDanger/supervise/' + hiddenDangerId, + method: 'get' + }) +} +// 协办 +export function assistEhsHiddenDanger(data) { + return request({ + url: '/ehsHiddenDanger/ehsHiddenDanger/assist' , + method: 'get', + params: data + }) +} diff --git a/ruoyi-ui/src/api/ehs/ehsNoticeMessage.js b/ruoyi-ui/src/api/ehs/ehsNoticeMessage.js index 6625aab..a626f7a 100644 --- a/ruoyi-ui/src/api/ehs/ehsNoticeMessage.js +++ b/ruoyi-ui/src/api/ehs/ehsNoticeMessage.js @@ -63,3 +63,11 @@ export function detailEhsNoticeMessage(noticeMessageId) { method: 'get' }) } + +// 只读显示 +export function displayDetailEhsNoticeMessage(noticeMessageId) { + return request({ + url: '/ehsNoticeMessage/ehsNoticeMessage/displayDetail/' + noticeMessageId, + method: 'get' + }) +} diff --git a/ruoyi-ui/src/api/ehs/ehsRisk.js b/ruoyi-ui/src/api/ehs/ehsRisk.js index d77694e..7c5d445 100644 --- a/ruoyi-ui/src/api/ehs/ehsRisk.js +++ b/ruoyi-ui/src/api/ehs/ehsRisk.js @@ -1,44 +1,44 @@ import request from '@/utils/request' // 查询风险信息列表 -export function listRisk(query) { +export function listEhsRisk(query) { return request({ - url: '/system/risk/list', + url: '/ehsRisk/ehsRisk/list', method: 'get', params: query }) } // 查询风险信息详细 -export function getRisk(riskId) { +export function getEhsRisk(riskId) { return request({ - url: '/system/risk/' + riskId, + url: '/ehsRisk/ehsRisk/' + riskId, method: 'get' }) } // 新增风险信息 -export function addRisk(data) { +export function addEhsRisk(data) { return request({ - url: '/system/risk', + url: '/ehsRisk/ehsRisk', method: 'post', data: data }) } // 修改风险信息 -export function updateRisk(data) { +export function updateEhsRisk(data) { return request({ - url: '/system/risk', + url: '/ehsRisk/ehsRisk', method: 'put', data: data }) } // 删除风险信息 -export function delRisk(riskId) { +export function delEhsRisk(riskId) { return request({ - url: '/system/risk/' + riskId, + url: '/ehsRisk/ehsRisk/' + riskId, method: 'delete' }) } diff --git a/ruoyi-ui/src/views/ehs/ehsEnterprise/index.vue b/ruoyi-ui/src/views/ehs/ehsEnterprise/index.vue index 4efe2a7..884811e 100644 --- a/ruoyi-ui/src/views/ehs/ehsEnterprise/index.vue +++ b/ruoyi-ui/src/views/ehs/ehsEnterprise/index.vue @@ -1,7 +1,7 @@ + + + @@ -197,9 +213,8 @@ - -