Merge branch 'master' of http://111.30.93.211:10101/r/supipe
| | |
| | | |
| | | @JsonIgnore |
| | | private String companyId; |
| | | |
| | | //预警次数 |
| | | private Integer warningValue; |
| | | //预警天数 |
| | | private Integer warningDay; |
| | | |
| | | } |
| | |
| | | private String groutingHolesName; |
| | | |
| | | private String mouldMn; |
| | | |
| | | private Integer warningValue; |
| | | private Integer warningDay; |
| | | |
| | | } |
| | |
| | | t.come_factory_time as comeFactoryTime, |
| | | t.current_cycle_time as currentCycleTime, |
| | | t.status as status, |
| | | t.grouting_holes as groutingHoles |
| | | t.grouting_holes as groutingHoles, |
| | | t.warning_value as warningValue, |
| | | t.warning_day as warningDay |
| | | </sql> |
| | | |
| | | <sql id="condition_query"> |
| | |
| | | <if test="groutingHoles != null and groutingHoles!=''"> |
| | | grouting_holes, |
| | | </if> |
| | | <if test="warningValue != null"> |
| | | warning_value, |
| | | </if> |
| | | <if test="warningDay != null"> |
| | | warning_day, |
| | | </if> |
| | | </trim> |
| | | |
| | | <trim prefix="values (" suffix=")" suffixOverrides="," > |
| | |
| | | <if test="groutingHoles != null and groutingHoles!=''"> |
| | | #{groutingHoles}, |
| | | </if> |
| | | <if test="warningValue != null"> |
| | | #{warningValue}, |
| | | </if> |
| | | <if test="warningDay != null"> |
| | | #{warningDay}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="updateTime != null"> |
| | | update_time = #{updateTime}, |
| | | </if> |
| | | <if test="warningValue != null"> |
| | | warning_value=#{warningValue}, |
| | | </if> |
| | | <if test="warningDay != null"> |
| | | warning_day=#{warningDay}, |
| | | </if> |
| | | </set> |
| | | where mould_id=#{mouldId} |
| | | </update> |
| | |
| | | /** |
| | | * 设备编号 |
| | | */ |
| | | private Integer deviceId; |
| | | private String deviceId; |
| | | |
| | | /** |
| | | * 设备名称 |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | /** |
| | | * 小程序 |
| | | * web端导出 |
| | | * @param map |
| | | * @return |
| | | */ |
| | | @PostMapping(value = "selectNoPageList") |
| | | BasicResult selectNoPageList(@RequestBody Map<String,Object> map){ |
| | | return hiddenDangerService.selectNoPageList(map); |
| | | @PostMapping(value = "export") |
| | | void export(@RequestBody Map<String,Object> map, HttpServletResponse response){ |
| | | hiddenDangerService.export(map, response); |
| | | } |
| | | |
| | | /** |
| | |
| | | package com.thhy.secure.modules.biz.hiddenDanger.entity; |
| | | |
| | | import com.thhy.general.annotations.Excel; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | |
| | | /** |
| | | * 隐患地点 |
| | | */ |
| | | @Excel(sort = 2,title = "隐患地点") |
| | | private String dangerLocation; |
| | | |
| | | /** |
| | | * 隐患标题 |
| | | */ |
| | | @Excel(sort = 3,title = "隐患标题") |
| | | private String title; |
| | | |
| | | /** |
| | | * 隐患时间 |
| | | */ |
| | | @Excel(sort = 1,title = "举报时间",patter = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 隐患审核状态 审核状态 0未审核 1审核通过 2审核失败 |
| | | */ |
| | | private Integer auditStatus; |
| | | @Excel(sort = 6,title = "审核状态") |
| | | private String auditStatusName; |
| | | |
| | | public String getAuditStatusName() { |
| | | String name = ""; |
| | | switch (auditStatus){ |
| | | case 0: |
| | | name = "未审核"; |
| | | break; |
| | | case 1: |
| | | name = "已审核"; |
| | | break; |
| | | case 2: |
| | | name = "审核失败"; |
| | | break; |
| | | if (auditStatus != null){ |
| | | switch (auditStatus){ |
| | | case 0: |
| | | name = "未审核"; |
| | | break; |
| | | case 1: |
| | | name = "已审核"; |
| | | break; |
| | | case 2: |
| | | name = "审核失败"; |
| | | break; |
| | | } |
| | | } |
| | | return name; |
| | | } |
| | |
| | | /** |
| | | * 积分 |
| | | */ |
| | | @Excel(sort = 7,title = "积分") |
| | | private Double integral; |
| | | |
| | | /** |
| | |
| | | */ |
| | | private List<HiddenDangerImgEntity> imgEntities; |
| | | |
| | | /** |
| | | * 举报人 |
| | | */ |
| | | @Excel(sort = 4,title = "提交人") |
| | | private String reporter; |
| | | |
| | | /** |
| | | * 隐患等级 |
| | | */ |
| | | private Integer level; |
| | | @Excel(sort = 5,title = "隐患等级") |
| | | private String levelName; |
| | | |
| | | public String getLevelName() { |
| | | String name = ""; |
| | | if (level != null){ |
| | | switch (level){ |
| | | case 1: |
| | | name = "一般隐患"; |
| | | break; |
| | | case 2: |
| | | name = "重大隐患"; |
| | | break; |
| | | case 3: |
| | | name = "不存在"; |
| | | break; |
| | | } |
| | | } |
| | | return name; |
| | | } |
| | | } |
| | |
| | | import com.thhy.general.common.BasicResult; |
| | | import com.thhy.secure.modules.biz.hiddenDanger.entity.HiddenDangerEntity; |
| | | |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | |
| | | BasicResult selectPageList(Map<String,Object> map); |
| | | |
| | | BasicResult selectNoPageList(Map<String,Object> map); |
| | | void export(Map<String,Object> map, HttpServletResponse response); |
| | | |
| | | BasicResult selectInfo(String id); |
| | | |
| | |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.thhy.general.common.BasicResult; |
| | | import com.thhy.general.config.SysUserInfo; |
| | | import com.thhy.general.utils.ExcelUtils; |
| | | import com.thhy.general.utils.UUIDUtils; |
| | | import com.thhy.general.utils.UserInfoUtils; |
| | | import com.thhy.secure.modules.biz.hiddenDanger.entity.HiddenDangerEntity; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public BasicResult selectNoPageList(Map<String, Object> map) { |
| | | public void export(Map<String, Object> map, HttpServletResponse response) { |
| | | SysUserInfo sysUserInfo = UserInfoUtils.getInstance().getUserInfo(); |
| | | map.put("companyId",sysUserInfo.getCompanyId()); |
| | | List<HiddenDangerEntity> hiddenDangerEntities = hiddenDangerMapper.selectPageList(map); |
| | | hiddenDangerEntities.forEach(obj ->{ |
| | | String id = obj.getId(); |
| | | obj.setImgEntities(hiddenDangerMapper.selectImgList(id)); |
| | | Integer auditStatus = obj.getAuditStatus(); |
| | | Integer level = obj.getLevel(); |
| | | switch (auditStatus){ |
| | | case 0: |
| | | obj.setAuditStatusName("未审核"); |
| | | break; |
| | | case 1: |
| | | obj.setAuditStatusName("审核通过"); |
| | | break; |
| | | case 2: |
| | | obj.setAuditStatusName("审核失败"); |
| | | break; |
| | | } |
| | | if (level != null){ |
| | | switch (level){ |
| | | case 1: |
| | | obj.setLevelName("一般隐患"); |
| | | break; |
| | | case 2: |
| | | obj.setLevelName("重大隐患"); |
| | | break; |
| | | case 3: |
| | | obj.setLevelName("不存在"); |
| | | break; |
| | | } |
| | | } |
| | | }); |
| | | return BasicResult.success(hiddenDangerEntities); |
| | | ExcelUtils.downExcel(hiddenDangerEntities,HiddenDangerEntity.class,response,"隐患举报"); |
| | | } |
| | | |
| | | @Override |
| | | public BasicResult selectInfo(String id) { |
| | | return BasicResult.success(hiddenDangerMapper.selectInfo(id)); |
| | | HiddenDangerEntity hiddenDangerEntity = hiddenDangerMapper.selectInfo(id); |
| | | hiddenDangerEntity.setImgEntities(hiddenDangerMapper.selectImgList(id)); |
| | | return BasicResult.success(hiddenDangerEntity); |
| | | } |
| | | |
| | | @Override |
| | | public BasicResult examine(HiddenDangerEntity hiddenDangerEntity) { |
| | | hiddenDangerEntity.setAuditStatus(1);//1审核通过 |
| | | hiddenDangerMapper.update(hiddenDangerEntity); |
| | | return BasicResult.success(); |
| | | } |
对比新文件 |
| | |
| | | package com.thhy.secure.modules.biz.regionInspection.controller; |
| | | |
| | | import com.thhy.general.common.BasicResult; |
| | | import com.thhy.secure.modules.biz.regionInspection.entity.RegionInspectionEntity; |
| | | import com.thhy.secure.modules.biz.regionInspection.service.RegionInspectionService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Author QiuYuHao |
| | | * @CreateDate 2023-11-10 11:27:20 |
| | | * 区域巡检控制层 |
| | | */ |
| | | @RestController |
| | | @RequestMapping(value = "regioninspection") |
| | | public class RegionInspectionController { |
| | | |
| | | @Autowired |
| | | private RegionInspectionService regionInspectionService; |
| | | |
| | | @PostMapping("insertAndUpdate") |
| | | BasicResult insert(@RequestBody RegionInspectionEntity regionInspectionEntity){ |
| | | return regionInspectionService.insert(regionInspectionEntity); |
| | | } |
| | | |
| | | @GetMapping("delete") |
| | | BasicResult delete(@RequestParam String id){ |
| | | return regionInspectionService.delete(id); |
| | | } |
| | | |
| | | @PostMapping("selectPageList") |
| | | BasicResult selectPageList(@RequestBody Map map){ |
| | | return regionInspectionService.selectPageList(map); |
| | | } |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.thhy.secure.modules.biz.regionInspection.entity; |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Author QiuYuHao |
| | | * @CreateDate 2023-11-10 11:02:35 |
| | | * 区域巡检实体 |
| | | */ |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | @Builder |
| | | public class RegionInspectionEntity implements Serializable { |
| | | |
| | | private String id; |
| | | |
| | | private String task;//巡检任务 |
| | | |
| | | private String standard;//巡检标准 |
| | | |
| | | private String userIds; |
| | | private String realNames;//包含多个人 |
| | | |
| | | /** |
| | | * 区域id |
| | | */ |
| | | private String regions; |
| | | private String regionIds; |
| | | |
| | | private String createUser; |
| | | |
| | | private Date createTime; |
| | | |
| | | private String updateUser; |
| | | |
| | | private Date updateTime; |
| | | |
| | | private String companyId; |
| | | |
| | | /** |
| | | * 巡检路线 |
| | | */ |
| | | private String inspectionRoute; |
| | | |
| | | |
| | | private List<RegionInspectionHazardInformEntity> regionList; |
| | | |
| | | private List<RegionInspectionUserEntity> regionUsersList; |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.thhy.secure.modules.biz.regionInspection.entity; |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * @Author QiuYuHao |
| | | * @CreateDate 2023-11-10 11:05:46 |
| | | * 区域巡检和危险告知源中间表 |
| | | */ |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | @Builder |
| | | public class RegionInspectionHazardInformEntity implements Serializable { |
| | | |
| | | private String id; |
| | | |
| | | /** |
| | | * 区域巡检id |
| | | */ |
| | | private String regionInspectionId; |
| | | |
| | | /** |
| | | * 危险告知源id |
| | | */ |
| | | private String regionHazardInformId; |
| | | |
| | | /** |
| | | * 排序值 |
| | | */ |
| | | private Integer sort; |
| | | |
| | | private String region; |
| | | } |
对比新文件 |
| | |
| | | package com.thhy.secure.modules.biz.regionInspection.entity; |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * @Author QiuYuHao |
| | | * @CreateDate 2023-11-10 11:17:21 |
| | | * 区域巡检人员中间表 |
| | | */ |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | @Builder |
| | | public class RegionInspectionUserEntity implements Serializable { |
| | | |
| | | private String id; |
| | | private String regionInspectionId;//区域巡检id |
| | | private String userId;//管服人员id |
| | | private String realName; |
| | | } |
对比新文件 |
| | |
| | | package com.thhy.secure.modules.biz.regionInspection.mapper; |
| | | |
| | | import com.thhy.secure.modules.biz.regionInspection.entity.RegionInspectionEntity; |
| | | import com.thhy.secure.modules.biz.regionInspection.entity.RegionInspectionHazardInformEntity; |
| | | import com.thhy.secure.modules.biz.regionInspection.entity.RegionInspectionUserEntity; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Author QiuYuHao |
| | | * @CreateDate 2023-11-10 11:09:04 |
| | | * 区域巡检mapper |
| | | */ |
| | | @Mapper |
| | | public interface RegionInspectionMapper { |
| | | |
| | | void insert(RegionInspectionEntity regionInspectionEntity); |
| | | |
| | | void delete(String id); |
| | | |
| | | List<RegionInspectionEntity> selectPageList(Map map); |
| | | |
| | | /** |
| | | * 添加人员巡检中间表 |
| | | * @param regionInspectionUserEntity |
| | | */ |
| | | void insertUser(RegionInspectionUserEntity regionInspectionUserEntity); |
| | | |
| | | /** |
| | | * 删除人员中间表 |
| | | * @param regionInspectionId |
| | | */ |
| | | void deleteUser(String regionInspectionId); |
| | | |
| | | /** |
| | | * 新增区域巡检危险告知源中间表 |
| | | * @param regionInspectionHazardInformEntity |
| | | */ |
| | | void insertInspectionHazardInform(RegionInspectionHazardInformEntity regionInspectionHazardInformEntity); |
| | | |
| | | /** |
| | | * 删除区域巡检危险告知源中间表 |
| | | * @param regionInspectionId |
| | | */ |
| | | void deleteInspectionHazardInform(String regionInspectionId); |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.thhy.secure.modules.biz.regionInspection.service; |
| | | |
| | | import com.thhy.general.common.BasicResult; |
| | | import com.thhy.secure.modules.biz.regionInspection.entity.RegionInspectionEntity; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Author QiuYuHao |
| | | * @CreateDate 2023-11-10 11:25:30 |
| | | * 区域巡检接口 |
| | | */ |
| | | public interface RegionInspectionService { |
| | | |
| | | BasicResult insert(RegionInspectionEntity regionInspectionEntity); |
| | | |
| | | BasicResult delete(String id); |
| | | |
| | | BasicResult selectPageList(Map map); |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.thhy.secure.modules.biz.regionInspection.service.impl; |
| | | |
| | | import com.github.pagehelper.Page; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.thhy.general.common.BasicResult; |
| | | import com.thhy.general.config.SysUserInfo; |
| | | import com.thhy.general.utils.UUIDUtils; |
| | | import com.thhy.general.utils.UserInfoUtils; |
| | | import com.thhy.secure.modules.biz.regionInspection.entity.RegionInspectionEntity; |
| | | import com.thhy.secure.modules.biz.regionInspection.entity.RegionInspectionHazardInformEntity; |
| | | import com.thhy.secure.modules.biz.regionInspection.entity.RegionInspectionUserEntity; |
| | | import com.thhy.secure.modules.biz.regionInspection.mapper.RegionInspectionMapper; |
| | | import com.thhy.secure.modules.biz.regionInspection.service.RegionInspectionService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Author QiuYuHao |
| | | * @CreateDate 2023-11-10 11:26:29 |
| | | * 区域巡检接口实现 |
| | | */ |
| | | @Service |
| | | public class RegionInspectionServiceImpl implements RegionInspectionService |
| | | { |
| | | |
| | | @Autowired |
| | | private RegionInspectionMapper regionInspectionMapper; |
| | | |
| | | private static final Object lock = new Object(); |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public BasicResult insert(RegionInspectionEntity regionInspectionEntity) { |
| | | SysUserInfo s = UserInfoUtils.getInstance().getUserInfo(); |
| | | String companyId = s.getCompanyId(); |
| | | String userId = s.getUserId(); |
| | | regionInspectionEntity.setCompanyId(companyId); |
| | | //默认给uuid |
| | | String regionInspectId = UUIDUtils.create(); |
| | | //修改区域巡检判断 |
| | | if (!"".equals(regionInspectionEntity.getId())){ |
| | | regionInspectId = regionInspectionEntity.getId(); |
| | | //根据区域巡检id删除中间表 |
| | | regionInspectionEntity.setUpdateTime(new Date()); |
| | | regionInspectionEntity.setUpdateUser(userId); |
| | | regionInspectionMapper.deleteUser(regionInspectId); |
| | | regionInspectionMapper.deleteInspectionHazardInform(regionInspectId); |
| | | } |
| | | //添加/修改区域巡检 |
| | | synchronized (lock) { |
| | | regionInspectionEntity.setId(regionInspectId); |
| | | regionInspectionEntity.setCreateUser(userId); |
| | | regionInspectionMapper.insert(regionInspectionEntity); |
| | | //添加巡检人 |
| | | for (RegionInspectionUserEntity userEntity : regionInspectionEntity.getRegionUsersList()) { |
| | | userEntity.setId(UUIDUtils.create()); |
| | | userEntity.setRegionInspectionId(regionInspectId); |
| | | regionInspectionMapper.insertUser(userEntity); |
| | | } |
| | | //添加巡检的区域 |
| | | for (RegionInspectionHazardInformEntity region : regionInspectionEntity.getRegionList()) { |
| | | region.setId(UUIDUtils.create()); |
| | | region.setRegionInspectionId(regionInspectId); |
| | | regionInspectionMapper.insertInspectionHazardInform(region); |
| | | } |
| | | } |
| | | return BasicResult.success(); |
| | | } |
| | | |
| | | @Override |
| | | public BasicResult delete(String id) { |
| | | regionInspectionMapper.delete(id); |
| | | regionInspectionMapper.deleteUser(id); |
| | | regionInspectionMapper.deleteInspectionHazardInform(id); |
| | | return BasicResult.success(); |
| | | } |
| | | |
| | | @Override |
| | | public BasicResult selectPageList(Map map) { |
| | | SysUserInfo s = UserInfoUtils.getInstance().getUserInfo(); |
| | | String companyId = s.getCompanyId(); |
| | | map.put("companyId",companyId); |
| | | int pageNum = (int) map.get("pageNum"); |
| | | int pageSize = (int) map.get("pageSize"); |
| | | PageHelper.startPage(pageNum,pageSize); |
| | | List<RegionInspectionEntity> regionInspectionEntities = regionInspectionMapper.selectPageList(map); |
| | | //处理区域巡检对象数组 |
| | | regionInspectionEntities.forEach(obj->{ |
| | | List<RegionInspectionHazardInformEntity> regionList = new ArrayList<>(); |
| | | List<RegionInspectionUserEntity> userList = new ArrayList<>(); |
| | | if(obj.getRealNames() !=null){ |
| | | String[] realNames = obj.getRealNames().intern().split("、"); |
| | | String[] userIds = obj.getUserIds().intern().split("、"); |
| | | //人员对象数组 |
| | | for (int i = 0; i < realNames.length; i++) { |
| | | RegionInspectionUserEntity userEntity = RegionInspectionUserEntity |
| | | .builder() |
| | | .regionInspectionId(obj.getId()) |
| | | .userId(userIds[i]) |
| | | .realName(realNames[i]).build(); |
| | | userList.add(userEntity); |
| | | } |
| | | } |
| | | if (obj.getRegionIds()!=null){ |
| | | String[] regionIds = obj.getRegionIds().intern().split(","); |
| | | String[] regions = obj.getRegions().intern().split(","); |
| | | //区域对象数组 |
| | | for (int i = 0; i < regionIds.length; i++) { |
| | | RegionInspectionHazardInformEntity regionEntity = RegionInspectionHazardInformEntity |
| | | .builder() |
| | | .regionInspectionId(obj.getId()) |
| | | .regionHazardInformId(regionIds[i]) |
| | | .region(regions[i]).build(); |
| | | regionList.add(regionEntity); |
| | | } |
| | | } |
| | | obj.setRegionList(regionList); |
| | | obj.setRegionUsersList(userList); |
| | | }); |
| | | return BasicResult.success(new PageInfo<>(regionInspectionEntities)); |
| | | } |
| | | |
| | | } |
| | |
| | | <if test="integral != null"> |
| | | integral, |
| | | </if> |
| | | <if test="level != null"> |
| | | `level`, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides="," > |
| | | |
| | |
| | | </if> |
| | | <if test="integral != null"> |
| | | #{integral,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="level != null"> |
| | | #{level,jdbcType=INTEGER}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | |
| | | <if test="integral != null"> |
| | | integral = #{integral,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="level != null"> |
| | | `level` = #{level,jdbcType=INTEGER}, |
| | | </if> |
| | | |
| | | </set> |
| | | where id=#{id,jdbcType=VARCHAR} |
| | | </update> |
| | |
| | | t.createUser, |
| | | t.updateUser, |
| | | t.updateTime, |
| | | t.companyId |
| | | t.companyId, |
| | | t.level, |
| | | t.integral, |
| | | su.real_name reporter |
| | | from t_hidden_danger t |
| | | LEFT JOIN sys_users su ON su.user_id = t.createUser |
| | | LEFT JOIN sys_users su1 ON su1.user_id = t.updateUser |
| | | where t.id=#{id} |
| | | </select> |
| | | |
| | |
| | | t.createUser, |
| | | t.updateUser, |
| | | t.updateTime, |
| | | t.companyId |
| | | t.companyId, |
| | | t.level, |
| | | t.integral, |
| | | su.real_name reporter |
| | | from t_hidden_danger t |
| | | LEFT JOIN sys_users su ON su.user_id = t.createUser |
| | | LEFT JOIN sys_users su1 ON su1.user_id = t.updateUser |
| | |
| | | <if test="startTime!= null and endTime!=null and startTime != '' and endTime !=''"> |
| | | and t.createTime BETWEEN #{startTime} and #{endTime} |
| | | </if> |
| | | order by t.createUser desc |
| | | order by t.createTime desc |
| | | </select> |
| | | |
| | | <!--根据ID删除--> |
对比新文件 |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.thhy.secure.modules.biz.regionInspection.mapper.RegionInspectionMapper"> |
| | | |
| | | <insert id="insert"> |
| | | insert into t_region_inspection |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | id, |
| | | </if> |
| | | <if test="task != null"> |
| | | task, |
| | | </if> |
| | | <if test="standard != null"> |
| | | standard, |
| | | </if> |
| | | <if test="createUser != null"> |
| | | createUser, |
| | | </if> |
| | | <if test="createTime != null"> |
| | | createTime, |
| | | </if> |
| | | <if test="updateUser != null"> |
| | | updateUser, |
| | | </if> |
| | | <if test="updateTime != null"> |
| | | updateTime, |
| | | </if> |
| | | <if test="companyId != null"> |
| | | companyId, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | #{id,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="task != null"> |
| | | #{task,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="standard != null"> |
| | | #{standard,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="createUser != null"> |
| | | #{createUser,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="createTime != null"> |
| | | #{createTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="updateUser != null"> |
| | | #{updateUser,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="updateTime != null"> |
| | | #{updateTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="companyId != null"> |
| | | #{companyId,jdbcType=VARCHAR}, |
| | | </if> |
| | | </trim> |
| | | on duplicate key update |
| | | <if test="task != null"> |
| | | task = #{task,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="standard != null"> |
| | | standard = #{standard,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="createUser != null"> |
| | | createUser = #{createUser,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="createTime != null"> |
| | | createTime = #{createTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="updateUser != null"> |
| | | updateUser = #{updateUser,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="updateTime != null"> |
| | | updateTime = #{updateTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="companyId != null"> |
| | | companyId = #{companyId,jdbcType=VARCHAR}, |
| | | </if> |
| | | |
| | | </insert> |
| | | |
| | | <delete id="delete"> |
| | | update t_region_inspection set isUse = 0 where id = #{id,jdbcType=VARCHAR} |
| | | </delete> |
| | | |
| | | <select id="selectPageList" resultType="com.thhy.secure.modules.biz.regionInspection.entity.RegionInspectionEntity"> |
| | | SELECT * FROM ( |
| | | SELECT |
| | | t.id, |
| | | t.task, |
| | | t.standard, |
| | | t.createUser, |
| | | t.createTime, |
| | | t.updateUser, |
| | | t.updateTime, |
| | | t.isUse, |
| | | t.companyId, |
| | | GROUP_CONCAT(DISTINCT b.real_name ORDER BY b.job_num SEPARATOR '、') realNames, |
| | | GROUP_CONCAT(DISTINCT b.user_id ORDER BY b.job_num SEPARATOR '、') userIds, |
| | | GROUP_CONCAT(DISTINCT d.region ORDER BY c.sort SEPARATOR ',') regions, |
| | | GROUP_CONCAT(DISTINCT d.id ORDER BY c.sort SEPARATOR ',') regionIds |
| | | FROM t_region_inspection t |
| | | LEFT JOIN t_region_inspection_user a ON a.regionInspectionId = t.id |
| | | LEFT JOIN sys_plat_user b ON b.user_id = a.userId |
| | | LEFT JOIN t_region_inspection_hazard_inform c ON c.regionInspectionId = t.id |
| | | LEFT JOIN t_region_hazard_inform d ON d.id = c.regionHazardInformId |
| | | GROUP BY t.id |
| | | order by t.createTime desc |
| | | ) a |
| | | WHERE a.isUse = 1 and a.companyId = #{companyId} |
| | | <if test="realName != null and realName !=''"> |
| | | AND a.realNames LIKE CONCAT('%',#{realName},'%') |
| | | </if> |
| | | <if test="task != null and task !=''"> |
| | | AND a.task LIKE CONCAT('%',#{task},'%') |
| | | </if> |
| | | </select> |
| | | |
| | | <insert id="insertUser"> |
| | | insert into t_region_inspection_user |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | id, |
| | | </if> |
| | | <if test="regionInspectionId != null"> |
| | | regionInspectionId, |
| | | </if> |
| | | <if test="userId != null"> |
| | | userId, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | #{id,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="regionInspectionId != null"> |
| | | #{regionInspectionId,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="userId != null"> |
| | | #{userId,jdbcType=VARCHAR}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <delete id="deleteUser"> |
| | | delete from t_region_inspection_user where regionInspectionId = #{regionInspectionId,jdbcType=VARCHAR} |
| | | </delete> |
| | | |
| | | <select id="selectUserList" resultType="com.thhy.secure.modules.biz.regionInspection.entity.RegionInspectionUserEntity"> |
| | | select * from t_region_inspection_user where regionInspectionId = #{regionInspectionId,jdbcType=VARCHAR} |
| | | </select> |
| | | |
| | | <insert id="insertInspectionHazardInform"> |
| | | insert into t_region_inspection_hazard_inform |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | id, |
| | | </if> |
| | | <if test="regionInspectionId != null"> |
| | | regionInspectionId, |
| | | </if> |
| | | <if test="regionHazardInformId != null"> |
| | | regionHazardInformId, |
| | | </if> |
| | | <if test="sort != null"> |
| | | sort, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | #{id,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="regionInspectionId != null"> |
| | | #{regionInspectionId,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="regionHazardInformId != null"> |
| | | #{regionHazardInformId,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="sort != null"> |
| | | #{sort,jdbcType=INTEGER}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <delete id="deleteInspectionHazardInform"> |
| | | delete from t_region_inspection_hazard_inform where regionInspectionId = #{regionInspectionId,jdbcType=VARCHAR} |
| | | </delete> |
| | | </mapper> |
| | |
| | | <el-table-column prop="supplierName" label="供应商" align="center"></el-table-column> |
| | | <el-table-column prop="maxCycleTime" label="最大循环次数" align="center"></el-table-column> |
| | | <el-table-column prop="currentCycleTime" label="累计循环次数" align="center"></el-table-column> |
| | | <el-table-column prop="" label="次数" align="center"></el-table-column> |
| | | <el-table-column prop="" label="天数" align="center"></el-table-column> |
| | | <el-table-column prop="warningValue" label="次数" align="center"></el-table-column> |
| | | <el-table-column prop="warningDay" label="天数" align="center"></el-table-column> |
| | | <el-table-column label="使用状态" align="center"> |
| | | <template #default="{ row }"> |
| | | <div> |
| | |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="模具检查预警值:" prop="supplierId"> |
| | | <el-input placeholder="请输入次数" v-model="formMould.alarmTimes" style="margin-right:15px"> |
| | | <template slot="append">次数</template> |
| | | </el-input> |
| | | <el-input placeholder="请输入天数" v-model="formMould.alarmDays"> |
| | | <template slot="append">天数</template> |
| | | </el-input> |
| | | <el-form-item label="模具检查预警值:" required> |
| | | <el-row :gutter="10" type="flex"> |
| | | <el-col :span="12"> |
| | | <el-form-item prop="warningValue"> |
| | | <el-input placeholder="请输入次数" v-model="formMould.warningValue" clearable> |
| | | <template slot="append">次数</template> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item prop="warningDay"> |
| | | <el-input placeholder="请输入天数" v-model="formMould.warningDay" clearable> |
| | | <template slot="append">天数</template> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form-item> |
| | | <el-form-item label="使用状态:" prop="status"> |
| | | <el-select v-model="formMould.status" :size="size" clearable placeholder="请选择使用状态"> |
| | |
| | | message: '请选择进厂日期', |
| | | trigger: ['blur', 'change'] |
| | | }], |
| | | warningValue: [{ |
| | | required: true, |
| | | message: '请输入预警次数', |
| | | trigger: 'blur' |
| | | }], |
| | | warningDay: [{ |
| | | required: true, |
| | | message: '请输入预警天数', |
| | | trigger: 'blur' |
| | | }] |
| | | }, // 表单校验规则 |
| | | mouldTypeDatas: [], // 块号 |
| | | mouldSizeData: [], // 尺寸 |
| | |
| | | },{ |
| | | value: 4, |
| | | label: '报废' |
| | | }] |
| | | }], |
| | | } |
| | | }, |
| | | mounted() { |
| | |
| | | this.$set(this.formMould, 'maxCycleTime', row.maxCycleTime); |
| | | this.$set(this.formMould, 'productDate', row.productDate); |
| | | this.$set(this.formMould, 'comeFactoryTime', row.comeFactoryTime); |
| | | this.$set(this.formMould, 'warningValue', row.warningValue); |
| | | this.$set(this.formMould, 'warningDay', row.warningDay); |
| | | }, |
| | | // 打印模具信息 |
| | | propScanCode(item) { |
| | |
| | | yAxis: [ |
| | | { |
| | | type: "value", |
| | | max: 100, |
| | | splitNumber: 10, |
| | | axisLabel: { |
| | | formatter: "{value}", |
| | |
| | | yAxis: [ |
| | | { |
| | | type: "value", |
| | | max: 100, |
| | | splitNumber: 10, |
| | | axisLabel: { |
| | | formatter: "{value}", |
| | |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="uploadTime" label="采集时间" align="center" ></el-table-column> |
| | | <el-table-column prop="deviceName" label="设备" align="center"></el-table-column> |
| | | <el-table-column prop="uploadTime" label="采集时间" width="200" align="center" ></el-table-column> |
| | | <el-table-column prop="deviceName" label="设备" width="200" align="center"></el-table-column> |
| | | <el-table-column prop="pm25" label="PM2.5(微克/立方米)" width="200" align="center" ></el-table-column> |
| | | <el-table-column prop="pm10" label="PM10(微克/立方米)" width="200" align="center" ></el-table-column> |
| | | <el-table-column prop="tsp" label="TSP(微克/立方米)" width="200" align="center" ></el-table-column> |
| | | <el-table-column prop="temperature" label="温度(摄氏度)" align="center" ></el-table-column> |
| | | <el-table-column prop="temperature" label="温度(摄氏度)" width="200" align="center" ></el-table-column> |
| | | <el-table-column prop="humidity" label="湿度(%)" align="center" ></el-table-column> |
| | | <el-table-column prop="bigDeviceModel" label="大气压(千帕)" align="center" ></el-table-column> |
| | | <el-table-column prop="windSpeed" label="风速(米/秒)" align="center" ></el-table-column> |
| | | <el-table-column prop="data6" label="数据6" align="center" ></el-table-column> |
| | | <el-table-column prop="pa" label="大气压(千帕)" width="200" align="center" ></el-table-column> |
| | | <el-table-column prop="windSpeed" label="风速(米/秒)" width="200" align="center" ></el-table-column> |
| | | <el-table-column prop="windDirection" label="风向" align="center" ></el-table-column> |
| | | <el-table-column prop="noise" label="噪声(分贝)" align="center" ></el-table-column> |
| | | <el-table-column prop="tvoc" label="tvoc" align="center" ></el-table-column> |
| | | <el-table-column prop="no2" label="no2" align="center" ></el-table-column> |
| | | <el-table-column prop="co" label="co" align="center" ></el-table-column> |
| | | <el-table-column prop="so2" label="so2" align="center" ></el-table-column> |
| | | <el-table-column prop="o3" label="o3" align="center" ></el-table-column> |
| | | <el-table-column prop="noise" label="噪声(分贝)" width="200" align="center" ></el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <div class="main_footer"> |
| | | |
| | | <el-pagination |
| | | background |
| | | @current-change="changePageNum" |
| | | @size-change="changePageSize" |
| | | :current-page="pageNum" |
| | | :page-sizes="[10, 20, 50, 100]" |
| | | :page-size="pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="total"> |
| | | </el-pagination> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | this.loading = false; |
| | | }) |
| | | }, |
| | | // 切换页数 |
| | | changePageNum(page) { |
| | | this.pageNum = page; |
| | | this.searchEnvironMonitorList(); |
| | | }, |
| | | // 切换每页条数 |
| | | changePageSize(size) { |
| | | this.pageSize = size; |
| | | this.searchEnvironMonitorList(); |
| | | }, |
| | | // 判断按钮权限信息 |
| | | showButton(str) { |
| | | const pinia = buttonPinia(); |
| | |
| | | <el-table-column prop="signTime" label="预警时间" align="center" width="200"></el-table-column> |
| | | <el-table-column prop="boxName" label="盒子的名称" align="center" width="200"></el-table-column> |
| | | <el-table-column prop="deviceName" label="摄像头的名称" align="center" width="200"></el-table-column> |
| | | <el-table-column prop="type" label="预警消息类型" align="center" width="200"></el-table-column> |
| | | <el-table-column prop="typeName" label="预警消息类型" align="center" width="200"></el-table-column> |
| | | <el-table-column prop="typeName" label="预警消息名称" align="center"></el-table-column> |
| | | <el-table-column prop="useYearMonth" label="抓拍大图" align="center"></el-table-column> |
| | | <el-table-column prop="signTime" label="抓拍时间" align="center"></el-table-column> |