Merge branch 'master' of http://111.30.93.211:10101/r/supipe
| | |
| | | return materialReleaseService.materialReleaseExcel(values,response); |
| | | } |
| | | |
| | | |
| | | //搅拌站 消耗列表 |
| | | @PostMapping("/materialRew") |
| | | public BasicResult materialRew(@RequestBody HashMap<String,Object> values) { |
| | | return materialReleaseService.materialRew(values); |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.thhy.materials.modules.biz.concret.entity; |
| | | |
| | | import lombok.Data; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | import lombok.ToString; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | @Getter |
| | | @Setter |
| | | @ToString |
| | | public class TRawMaterial implements Serializable { |
| | | /** |
| | | * 搅拌id |
| | | */ |
| | | private Integer rawMaterialId; |
| | | |
| | | /** |
| | | * 盘次 |
| | | */ |
| | | private String piece; |
| | | |
| | | /** |
| | | * 原材料仓 |
| | | */ |
| | | private String storage; |
| | | |
| | | /** |
| | | * 原材料 |
| | | */ |
| | | private String material; |
| | | |
| | | /** |
| | | * 原材料规格 |
| | | */ |
| | | private String spec; |
| | | |
| | | /** |
| | | * 含水率*100、含固率*100... |
| | | */ |
| | | private String watfull; |
| | | |
| | | /** |
| | | * 配方用量 |
| | | */ |
| | | private String recamnt; |
| | | |
| | | /** |
| | | * 设定用量 |
| | | */ |
| | | private String planamnt; |
| | | |
| | | /** |
| | | * 实际用量 |
| | | */ |
| | | private String factamnt; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String flag; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String savestamp; |
| | | |
| | | /** |
| | | * 搅拌站接入主键 |
| | | */ |
| | | private Integer byId; |
| | | |
| | | /** |
| | | * This field was generated by MyBatis Generator. |
| | | * This field corresponds to the database table t_raw_material |
| | | * |
| | | * @mbg.generated Fri Nov 03 09:16:01 CST 2023 |
| | | */ |
| | | private static final long serialVersionUID = 1L; |
| | | } |
对比新文件 |
| | |
| | | package com.thhy.materials.modules.biz.concret.entity.dto; |
| | | |
| | | import com.thhy.materials.modules.biz.concret.entity.TRawMaterial; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class PieceDto implements Serializable { |
| | | |
| | | private Integer byId; |
| | | |
| | | |
| | | private List<TRawMaterial> rawMaterials; |
| | | |
| | | } |
| | |
| | | |
| | | import com.thhy.general.annotations.Idkey; |
| | | import com.thhy.materials.modules.biz.concret.entity.TMaterialRelease; |
| | | import com.thhy.materials.modules.biz.concret.entity.TRawMaterial; |
| | | import com.thhy.materials.modules.biz.concret.entity.TReleaseData; |
| | | import com.thhy.materials.modules.biz.concret.entity.dto.PieceDto; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | |
| | | void releaseDataDel(String materialReleaseId); |
| | | |
| | | void materialReleaseDel(String materialReleaseId); |
| | | |
| | | List<PieceDto> pieceList(HashMap<String, Object> values); |
| | | |
| | | List<TRawMaterial> materialRew(Integer byId); |
| | | } |
| | |
| | | BasicResult materialReleaseDel(String materialReleaseId); |
| | | |
| | | BasicResult materialReleaseExcel(HashMap<String, Object> values, HttpServletResponse response) throws FileNotFoundException; |
| | | |
| | | BasicResult materialRew(HashMap<String, Object> values); |
| | | } |
| | |
| | | import com.thhy.general.config.SysUserInfo; |
| | | import com.thhy.general.utils.UserInfoUtils; |
| | | import com.thhy.materials.modules.biz.concret.entity.TMaterialRelease; |
| | | import com.thhy.materials.modules.biz.concret.entity.TRawMaterial; |
| | | import com.thhy.materials.modules.biz.concret.entity.TReleaseData; |
| | | import com.thhy.materials.modules.biz.concret.entity.dto.DicetName; |
| | | import com.thhy.materials.modules.biz.concret.entity.dto.PieceDto; |
| | | import com.thhy.materials.modules.biz.concret.mapper.TMaterialReleaseMappper; |
| | | import com.thhy.materials.modules.biz.concret.service.TMaterialReleaseService; |
| | | import com.thhy.materials.modules.biz.weigh.mapper.WeighMapper; |
| | |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public BasicResult materialRew(HashMap<String, Object> values) { |
| | | Integer pageSize = Integer.valueOf(values.get("pageSize").toString()); |
| | | Integer pageNum = Integer.valueOf(values.get("pageNum").toString()); |
| | | PageHelper.startPage(pageNum,pageSize); |
| | | List<PieceDto> pieceDtos = materialReleaseMappper.pieceList(values); |
| | | for (PieceDto pieceDto : pieceDtos){ |
| | | List<TRawMaterial> rawMaterials = materialReleaseMappper.materialRew(pieceDto.getById()); |
| | | pieceDto.setRawMaterials(rawMaterials); |
| | | } |
| | | PageInfo<PieceDto> pieceDtoPageInfo = new PageInfo<>(pieceDtos); |
| | | return BasicResult.success(pieceDtoPageInfo); |
| | | } |
| | | } |
| | |
| | | import com.thhy.general.common.BasicResult; |
| | | import com.thhy.materials.modules.biz.helmet.service.HelmetService; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Map; |
| | |
| | | } |
| | | |
| | | |
| | | // 智能监控 |
| | | @PostMapping("/dataAIList") |
| | | public BasicResult dataAIList(@RequestBody Map<String,Object> values){ |
| | | return helmetService.dataAIList(values); |
| | | } |
| | | |
| | | //智能监控类型 |
| | | @GetMapping("dataAIType") |
| | | public BasicResult dataAIType(){ |
| | | return helmetService.dataAIType(); |
| | | } |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.thhy.materials.modules.biz.helmet.entity.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | @Data |
| | | public class TypeName implements Serializable { |
| | | |
| | | private Integer type; |
| | | |
| | | private String typeName; |
| | | |
| | | } |
| | |
| | | |
| | | import com.thhy.materials.modules.biz.helmet.entity.*; |
| | | import com.thhy.materials.modules.biz.helmet.entity.dto.ReportNumDto; |
| | | import com.thhy.materials.modules.biz.helmet.entity.dto.TypeName; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | |
| | | List<TDataValue> dataValuesList(Map<String, Object> values); |
| | | |
| | | void dataBox(TDataAi tDataAi); |
| | | |
| | | List<TDataAi> dataAIList(Map<String, Object> values); |
| | | |
| | | List<TypeName> dataAIType(); |
| | | } |
| | |
| | | BasicResult dataValuesList(Map<String, Object> values); |
| | | |
| | | BasicResult dataBox(JSONObject result); |
| | | |
| | | BasicResult dataAIList(Map<String, Object> values); |
| | | |
| | | BasicResult dataAIType(); |
| | | } |
| | |
| | | import com.thhy.general.common.BasicResult; |
| | | import com.thhy.materials.modules.biz.helmet.entity.*; |
| | | import com.thhy.materials.modules.biz.helmet.entity.dto.ReportNumDto; |
| | | import com.thhy.materials.modules.biz.helmet.entity.dto.TypeName; |
| | | import com.thhy.materials.modules.biz.helmet.mapper.HelmetMapper; |
| | | import com.thhy.materials.modules.biz.helmet.service.HelmetService; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | helmetMapper.dataBox(tDataAi); |
| | | return BasicResult.success(); |
| | | } |
| | | |
| | | @Override |
| | | public BasicResult dataAIList(Map<String, Object> values) { |
| | | Integer pageNum = Integer.valueOf(values.get("pageNum").toString()); |
| | | Integer pageSize = Integer.valueOf(values.get("pageSize").toString()); |
| | | PageHelper.startPage(pageNum,pageSize); |
| | | List<TDataAi> tDataAis = helmetMapper.dataAIList(values); |
| | | PageInfo<TDataAi> tDataAiPageInfo = new PageInfo<>(tDataAis); |
| | | return BasicResult.success(tDataAiPageInfo); |
| | | } |
| | | |
| | | @Override |
| | | public BasicResult dataAIType() { |
| | | List<TypeName> typeNames = helmetMapper.dataAIType(); |
| | | return BasicResult.success(typeNames); |
| | | } |
| | | } |
| | |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <select id="dataAIList" resultType="com.thhy.materials.modules.biz.helmet.entity.TDataAi"> |
| | | select |
| | | sign_time as signTime, |
| | | box_name as boxName, |
| | | device_name as deviceName, |
| | | type_name as typeName, |
| | | `type` as `type`, |
| | | sign_avatar as signAvatar |
| | | from t_data_ai where |
| | | 1=1 |
| | | <if test="strTime!=null and strTime!='' and endTime!='' and endTime!=null "> |
| | | and sign_time between #{strTime} and #{endTime} |
| | | </if> |
| | | <if test="type!=null and type!='' "> |
| | | and `type` =#{type} |
| | | </if> |
| | | order by sign_time desc |
| | | </select> |
| | | <select id="dataAIType" resultType="com.thhy.materials.modules.biz.helmet.entity.dto.TypeName"> |
| | | select `type`, |
| | | type_name as typeName |
| | | from t_data_ai_type |
| | | order by `type` asc |
| | | </select> |
| | | </mapper> |
| | |
| | | is_use=2 |
| | | where material_release_id=#{materialReleaseId} |
| | | </update> |
| | | |
| | | <select id="pieceList" resultType="com.thhy.materials.modules.biz.concret.entity.dto.PieceDto"> |
| | | select by_id as byId from t_piece |
| | | where 1=1 |
| | | <if test="byId!=null and byId!='' "> |
| | | and by_id=#{byId} |
| | | </if> |
| | | ORDER BY by_id desc |
| | | </select> |
| | | <select id="materialRew" resultType="com.thhy.materials.modules.biz.concret.entity.TRawMaterial"> |
| | | select Storage as storage, |
| | | Material as material, |
| | | RecAmnt as recamnt, |
| | | PlanAmnt as planamnt, |
| | | FactAmnt as factamnt |
| | | from t_raw_material |
| | | where Piece=#{byId} |
| | | </select> |
| | | </mapper> |
对比新文件 |
| | |
| | | package com.thhy.secure.modules.biz.hiddenDanger.controller; |
| | | |
| | | import com.thhy.general.common.BasicResult; |
| | | import com.thhy.secure.modules.biz.hiddenDanger.entity.HiddenDangerEntity; |
| | | import com.thhy.secure.modules.biz.hiddenDanger.service.HiddenDangerService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Author QiuYuHao |
| | | * @CreateDate 2023-11-07 14:26:39 |
| | | * 隐患举报控制层 |
| | | */ |
| | | @RestController |
| | | @RequestMapping(value = "hiddendanger") |
| | | public class HiddenDangerController { |
| | | |
| | | @Autowired |
| | | private HiddenDangerService hiddenDangerService; |
| | | |
| | | /** |
| | | * 新增 |
| | | * @param hiddenDangerEntity |
| | | * @return |
| | | */ |
| | | @PostMapping(value = "insert") |
| | | BasicResult insert(@RequestBody HiddenDangerEntity hiddenDangerEntity){ |
| | | return hiddenDangerService.insert(hiddenDangerEntity); |
| | | } |
| | | |
| | | /** |
| | | * 修改接口 |
| | | * @param hiddenDangerEntity |
| | | * @return |
| | | */ |
| | | @PostMapping(value = "update") |
| | | BasicResult update(@RequestBody HiddenDangerEntity hiddenDangerEntity){ |
| | | return hiddenDangerService.update(hiddenDangerEntity); |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping(value = "delete") |
| | | BasicResult delete(@RequestParam String id){ |
| | | return hiddenDangerService.delete(id); |
| | | } |
| | | |
| | | /** |
| | | * web端列表 |
| | | * @param map |
| | | * @return |
| | | */ |
| | | @PostMapping(value = "selectPageList") |
| | | BasicResult selectPageList(@RequestBody Map<String,Object> map){ |
| | | return hiddenDangerService.selectPageList(map); |
| | | } |
| | | |
| | | /** |
| | | * 小程序 |
| | | * @param map |
| | | * @return |
| | | */ |
| | | @PostMapping(value = "selectNoPageList") |
| | | BasicResult selectNoPageList(@RequestBody Map<String,Object> map){ |
| | | return hiddenDangerService.selectNoPageList(map); |
| | | } |
| | | |
| | | /** |
| | | * web、小程序详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping(value = "selectInfo") |
| | | BasicResult selectInfo(@RequestParam String id){ |
| | | return hiddenDangerService.selectInfo(id); |
| | | } |
| | | |
| | | /** |
| | | * web审核接口 |
| | | * @param hiddenDangerEntity |
| | | * @return |
| | | */ |
| | | @PostMapping(value = "examine") |
| | | BasicResult examine(@RequestBody HiddenDangerEntity hiddenDangerEntity){ |
| | | return hiddenDangerService.examine(hiddenDangerEntity); |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.thhy.secure.modules.biz.hiddenDanger.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-07 14:27:33 |
| | | */ |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | @Builder |
| | | public class HiddenDangerEntity implements Serializable { |
| | | |
| | | private String id; |
| | | |
| | | /** |
| | | * 隐患地点 |
| | | */ |
| | | private String dangerLocation; |
| | | |
| | | /** |
| | | * 隐患标题 |
| | | */ |
| | | private String title; |
| | | |
| | | /** |
| | | * 隐患时间 |
| | | */ |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 隐患审核状态 审核状态 0未审核 1审核通过 2审核失败 |
| | | */ |
| | | private Integer auditStatus; |
| | | private String auditStatusName; |
| | | |
| | | public String getAuditStatusName() { |
| | | String name = ""; |
| | | switch (auditStatus){ |
| | | case 0: |
| | | name = "未审核"; |
| | | break; |
| | | case 1: |
| | | name = "已审核"; |
| | | break; |
| | | case 2: |
| | | name = "审核失败"; |
| | | break; |
| | | } |
| | | return name; |
| | | } |
| | | |
| | | /** |
| | | * 1Y0N |
| | | */ |
| | | private Integer isUse; |
| | | |
| | | private String createUser; |
| | | private String updateUser; |
| | | private Date updateTime; |
| | | private String companyId; |
| | | |
| | | /** |
| | | * 积分 |
| | | */ |
| | | private Double integral; |
| | | |
| | | /** |
| | | * 图片集合 |
| | | */ |
| | | private List<HiddenDangerImgEntity> imgEntities; |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.thhy.secure.modules.biz.hiddenDanger.entity; |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * @Author QiuYuHao |
| | | * @CreateDate 2023-11-07 14:56:00 |
| | | * 隐患图片实体 |
| | | */ |
| | | @Data |
| | | @NoArgsConstructor |
| | | @AllArgsConstructor |
| | | @Builder |
| | | public class HiddenDangerImgEntity implements Serializable { |
| | | |
| | | private String id; |
| | | |
| | | /** |
| | | * 隐患id |
| | | */ |
| | | private String hiddenDangerId; |
| | | |
| | | /** |
| | | * 图片名称 |
| | | */ |
| | | private String imgName; |
| | | |
| | | /** |
| | | * 图片地址 |
| | | */ |
| | | private String imgPath; |
| | | } |
对比新文件 |
| | |
| | | package com.thhy.secure.modules.biz.hiddenDanger.mapper; |
| | | |
| | | import com.thhy.secure.modules.biz.hiddenDanger.entity.HiddenDangerEntity; |
| | | import com.thhy.secure.modules.biz.hiddenDanger.entity.HiddenDangerImgEntity; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Author QiuYuHao |
| | | * @CreateDate 2023-11-07 14:31:40 |
| | | * 隐患mapper |
| | | */ |
| | | |
| | | @Mapper |
| | | public interface HiddenDangerMapper { |
| | | |
| | | void insert(HiddenDangerEntity hiddenDangerEntity); |
| | | |
| | | void update(HiddenDangerEntity hiddenDangerEntity); |
| | | |
| | | void delete(String id); |
| | | |
| | | List<HiddenDangerEntity> selectPageList(Map<String,Object> map); |
| | | |
| | | HiddenDangerEntity selectInfo(String id); |
| | | |
| | | List<HiddenDangerImgEntity> selectImgList(String hiddenDangerId); |
| | | |
| | | void deleteImg(String hiddenDangerId); |
| | | |
| | | void insertImg(HiddenDangerImgEntity hiddenDangerImgEntity); |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.thhy.secure.modules.biz.hiddenDanger.service; |
| | | |
| | | import com.thhy.general.common.BasicResult; |
| | | import com.thhy.secure.modules.biz.hiddenDanger.entity.HiddenDangerEntity; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Author QiuYuHao |
| | | * @CreateDate 2023-11-07 14:32:02 |
| | | * 隐患接口 |
| | | */ |
| | | public interface HiddenDangerService { |
| | | |
| | | BasicResult insert(HiddenDangerEntity hiddenDangerEntity); |
| | | |
| | | BasicResult update(HiddenDangerEntity hiddenDangerEntity); |
| | | |
| | | BasicResult delete(String id); |
| | | |
| | | BasicResult selectPageList(Map<String,Object> map); |
| | | |
| | | BasicResult selectNoPageList(Map<String,Object> map); |
| | | |
| | | BasicResult selectInfo(String id); |
| | | |
| | | BasicResult examine(HiddenDangerEntity hiddenDangerEntity); |
| | | |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.thhy.secure.modules.biz.hiddenDanger.service.impl; |
| | | |
| | | 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.hiddenDanger.entity.HiddenDangerEntity; |
| | | import com.thhy.secure.modules.biz.hiddenDanger.mapper.HiddenDangerMapper; |
| | | import com.thhy.secure.modules.biz.hiddenDanger.service.HiddenDangerService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @Author QiuYuHao |
| | | * @CreateDate 2023-11-07 14:32:29 |
| | | * 隐患逻辑 |
| | | */ |
| | | @Service |
| | | public class HiddenDangerServiceImpl implements HiddenDangerService { |
| | | |
| | | @Autowired |
| | | private HiddenDangerMapper hiddenDangerMapper; |
| | | |
| | | private static final Object Lock = new Object(); |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public BasicResult insert(HiddenDangerEntity hiddenDangerEntity) { |
| | | SysUserInfo sysUserInfo = UserInfoUtils.getInstance().getUserInfo(); |
| | | String hiddenDangerId = UUIDUtils.create(); |
| | | hiddenDangerEntity.setId(hiddenDangerId); |
| | | hiddenDangerEntity.setCreateUser(sysUserInfo.getUserId()); |
| | | hiddenDangerEntity.setCompanyId(sysUserInfo.getCompanyId()); |
| | | synchronized (Lock){ |
| | | hiddenDangerMapper.insert(hiddenDangerEntity); |
| | | //图片 |
| | | hiddenDangerEntity.getImgEntities().forEach(obj->{ |
| | | obj.setId(UUIDUtils.create()); |
| | | obj.setHiddenDangerId(hiddenDangerId); |
| | | hiddenDangerMapper.insertImg(obj); |
| | | }); |
| | | } |
| | | return BasicResult.success(); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public BasicResult update(HiddenDangerEntity hiddenDangerEntity) { |
| | | SysUserInfo sysUserInfo = UserInfoUtils.getInstance().getUserInfo(); |
| | | String userId = sysUserInfo.getUserId(); |
| | | hiddenDangerEntity.setUpdateUser(userId); |
| | | hiddenDangerEntity.setUpdateTime(new Date()); |
| | | synchronized (Lock){ |
| | | hiddenDangerMapper.update(hiddenDangerEntity); |
| | | //删除图片 |
| | | hiddenDangerMapper.deleteImg(hiddenDangerEntity.getId()); |
| | | //图片 |
| | | hiddenDangerEntity.getImgEntities().forEach(obj->{ |
| | | obj.setId(UUIDUtils.create()); |
| | | obj.setHiddenDangerId(hiddenDangerEntity.getId()); |
| | | hiddenDangerMapper.insertImg(obj); |
| | | }); |
| | | } |
| | | return BasicResult.success(); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public BasicResult delete(String id) { |
| | | synchronized (Lock) { |
| | | hiddenDangerMapper.delete(id); |
| | | hiddenDangerMapper.deleteImg(id); |
| | | } |
| | | return BasicResult.success(); |
| | | } |
| | | |
| | | @Override |
| | | public BasicResult selectPageList(Map<String, Object> map) { |
| | | SysUserInfo sysUserInfo = UserInfoUtils.getInstance().getUserInfo(); |
| | | map.put("companyId",sysUserInfo.getCompanyId()); |
| | | int pageNum = (int) map.get("pageNum"); |
| | | int pageSize = (int) map.get("pageSize"); |
| | | PageHelper.startPage(pageNum,pageSize); |
| | | List<HiddenDangerEntity> hiddenDangerEntities = hiddenDangerMapper.selectPageList(map); |
| | | hiddenDangerEntities.forEach(obj ->{ |
| | | String id = obj.getId(); |
| | | obj.setImgEntities(hiddenDangerMapper.selectImgList(id)); |
| | | }); |
| | | return BasicResult.success(new PageInfo<>(hiddenDangerEntities)); |
| | | } |
| | | |
| | | @Override |
| | | public BasicResult selectNoPageList(Map<String, Object> map) { |
| | | 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)); |
| | | }); |
| | | return BasicResult.success(hiddenDangerEntities); |
| | | } |
| | | |
| | | @Override |
| | | public BasicResult selectInfo(String id) { |
| | | return BasicResult.success(hiddenDangerMapper.selectInfo(id)); |
| | | } |
| | | |
| | | @Override |
| | | public BasicResult examine(HiddenDangerEntity hiddenDangerEntity) { |
| | | hiddenDangerMapper.update(hiddenDangerEntity); |
| | | return BasicResult.success(); |
| | | } |
| | | } |
对比新文件 |
| | |
| | | <?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.hiddenDanger.mapper.HiddenDangerMapper"> |
| | | |
| | | <!--插入操作--> |
| | | <insert id="insert"> |
| | | insert into t_hidden_danger |
| | | <trim prefix="(" suffix=")" suffixOverrides="," > |
| | | <if test="id != null"> |
| | | id, |
| | | </if> |
| | | <if test="dangerLocation != null"> |
| | | dangerLocation, |
| | | </if> |
| | | <if test="title != null"> |
| | | title, |
| | | </if> |
| | | <if test="createTime != null"> |
| | | createTime, |
| | | </if> |
| | | <if test="auditStatus != null"> |
| | | auditStatus, |
| | | </if> |
| | | <if test="isUse != null"> |
| | | isUse, |
| | | </if> |
| | | <if test="createUser != null"> |
| | | createUser, |
| | | </if> |
| | | <if test="updateUser != null"> |
| | | updateUser, |
| | | </if> |
| | | <if test="updateTime != null"> |
| | | updateTime, |
| | | </if> |
| | | <if test="companyId != null"> |
| | | companyId, |
| | | </if> |
| | | <if test="integral != null"> |
| | | integral, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides="," > |
| | | |
| | | <if test="id != null"> |
| | | #{id,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="dangerLocation != null"> |
| | | #{dangerLocation,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="title != null"> |
| | | #{title,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="createTime != null"> |
| | | #{createTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="auditStatus != null"> |
| | | #{auditStatus,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="isUse != null"> |
| | | #{isUse,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="createUser != null"> |
| | | #{createUser,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="updateUser != null"> |
| | | #{updateUser,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="updateTime != null"> |
| | | #{updateTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="companyId != null"> |
| | | #{companyId,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="integral != null"> |
| | | #{integral,jdbcType=DOUBLE}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | |
| | | <!--更新操作--> |
| | | <update id="update"> |
| | | update t_hidden_danger |
| | | <set> |
| | | <if test="dangerLocation != null"> |
| | | dangerLocation = #{dangerLocation,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="title != null"> |
| | | title = #{title,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="createTime != null"> |
| | | createTime = #{createTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="auditStatus != null"> |
| | | auditStatus = #{auditStatus,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="isUse != null"> |
| | | isUse = #{isUse,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="createUser != null"> |
| | | createUser = #{createUser,jdbcType=VARCHAR}, |
| | | </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> |
| | | <if test="integral != null"> |
| | | integral = #{integral,jdbcType=DOUBLE}, |
| | | </if> |
| | | </set> |
| | | where id=#{id,jdbcType=VARCHAR} |
| | | </update> |
| | | |
| | | <!--逻辑删除--> |
| | | <update id="delete"> |
| | | update t_hidden_danger |
| | | SET isUse = 0 |
| | | where id=#{id} |
| | | </update> |
| | | |
| | | <select id="selectInfo" resultType="com.thhy.secure.modules.biz.hiddenDanger.entity.HiddenDangerEntity"> |
| | | select |
| | | t.id, |
| | | t.dangerLocation, |
| | | t.title, |
| | | t.createTime, |
| | | t.auditStatus, |
| | | t.isUse, |
| | | t.createUser, |
| | | t.updateUser, |
| | | t.updateTime, |
| | | t.companyId |
| | | from t_hidden_danger t |
| | | where t.id=#{id} |
| | | </select> |
| | | |
| | | <!--查询列表--> |
| | | <select id="selectPageList" resultType="com.thhy.secure.modules.biz.hiddenDanger.entity.HiddenDangerEntity"> |
| | | SELECT |
| | | t.id, |
| | | t.dangerLocation, |
| | | t.title, |
| | | t.createTime, |
| | | t.auditStatus, |
| | | t.isUse, |
| | | t.createUser, |
| | | t.updateUser, |
| | | t.updateTime, |
| | | t.companyId |
| | | 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.isUse = 1 |
| | | and t.companyId = #{companyId} |
| | | <if test="startTime!= null and endTime!=null and startTime != '' and endTime !=''"> |
| | | and t.createTime BETWEEN #{startTime} and #{endTime} |
| | | </if> |
| | | order by t.createUser desc |
| | | </select> |
| | | |
| | | <!--根据ID删除--> |
| | | <delete id="deleteImg"> |
| | | delete from t_hidden_danger_img |
| | | where hiddenDangerId=#{hiddenDangerId} |
| | | </delete> |
| | | |
| | | <select id="selectImgList" resultType="com.thhy.secure.modules.biz.hiddenDanger.entity.HiddenDangerImgEntity"> |
| | | SELECT |
| | | id, |
| | | hiddenDangerId, |
| | | imgName, |
| | | imgPath |
| | | FROM t_hidden_danger_img |
| | | WHERE hiddenDangerId = #{hiddenDangerId} |
| | | </select> |
| | | |
| | | <insert id="insertImg"> |
| | | insert into t_hidden_danger_img |
| | | <trim prefix="(" suffix=")" suffixOverrides="," > |
| | | <if test="id != null"> |
| | | id, |
| | | </if> |
| | | <if test="hiddenDangerId != null"> |
| | | hiddenDangerId, |
| | | </if> |
| | | <if test="imgName != null"> |
| | | imgName, |
| | | </if> |
| | | <if test="imgPath != null"> |
| | | imgPath, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides="," > |
| | | <if test="id != null"> |
| | | #{id,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="hiddenDangerId != null"> |
| | | #{hiddenDangerId,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="imgName != null"> |
| | | #{imgName,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="imgPath != null"> |
| | | #{imgPath,jdbcType=VARCHAR}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | </mapper> |
| | |
| | | delete: params =>
|
| | | axios.get('/secure/tRegionWarranty/delete', { params }),
|
| | | }
|
| | | }
|
| | | },
|
| | |
|
| | |
|
| | | /**
|
| | | * 安全管理模块 - 智慧监控
|
| | | */
|
| | | // 查询智慧监控信息列表
|
| | | searchWisdomVideoList: (params) =>
|
| | | axios.post('/materials/helmet/dataAIList', params), |
| | | // 获取全部预警消息类型
|
| | | getAllWaringData: () =>
|
| | | axios.get('/materials/helmet/dataAIType'),
|
| | | } |
对比新文件 |
| | |
| | | <template> |
| | | <div class="main"> |
| | | <div class="main_header"> |
| | | <div class="header_item"> |
| | | <span class="header_label">时间范围:</span> |
| | | <el-date-picker |
| | | v-model="timeData" |
| | | type="datetimerange" |
| | | range-separator="至" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期" |
| | | value-format="yyyy-MM-dd HH:mm:ss"> |
| | | </el-date-picker> |
| | | </div> |
| | | <div class="header_item"> |
| | | <span class="header_label">预警消息类型:</span> |
| | | <el-select v-model="messageId" clearable placeholder="请选择预警消息类型"> |
| | | <el-option |
| | | v-for="item in messageData" |
| | | :key="item.type" |
| | | :label="item.typeName" |
| | | :value="item.type"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="header_item"> |
| | | <el-button icon="el-icon-search" v-if="showButton('search')" @click="searchWisdomVideoList(true)">查询</el-button> |
| | | <el-button class="search_btn" icon="el-icon-message" v-if="showButton('insert')" @click="asyncConfig = true;">短信设置</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="main_content"> |
| | | <el-table |
| | | v-loading="loading" |
| | | :data="wisdomVideoList" |
| | | height="100%"> |
| | | <el-table-column label="序号" width="55" align="center"> |
| | | <template #default="scope"> |
| | | <span>{{(pageNum - 1) * pageSize + scope.$index + 1}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <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"></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> |
| | | </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> |
| | | <el-dialog |
| | | class="prop_dialog" |
| | | title="短信设置" |
| | | :visible.sync="asyncConfig" |
| | | width="35%"> |
| | | <el-form ref="form" :model="formConfig" :rules="rulesConfig" label-width="auto" class="rule_form"> |
| | | <el-form-item label="短信内容:" prop="content"> |
| | | <el-input |
| | | type="textarea" |
| | | v-model="formConfig.content" |
| | | clearable |
| | | placeholder="请输入短信息内容"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="备注:"> |
| | | <el-input |
| | | type="textarea" |
| | | v-model="formConfig.remark" |
| | | clearable |
| | | placeholder="请输入短信息内容"> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer"> |
| | | <el-button @click="asyncConfig = false">取 消</el-button> |
| | | <el-button class="submit_btn" @click="asyncConfig = false">提 交</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { buttonPinia } from '../../pinia'; |
| | | export default { |
| | | data() { |
| | | return { |
| | | timeData: '', |
| | | messageId: '', |
| | | messageData: [], |
| | | total: 0, |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | loading: false, |
| | | wisdomVideoList: [], |
| | | asyncConfig: false, |
| | | formConfig: {}, |
| | | rulesConfig: { |
| | | content: [{ |
| | | required: true, |
| | | message: '请输入短信信息', |
| | | trigger: 'blur' |
| | | }] |
| | | }, |
| | | personnelData: [], |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.searchWisdomVideoList(true); |
| | | this.getAllWaringData(); |
| | | }, |
| | | methods: { |
| | | // 获取预警消息类型 |
| | | async getAllWaringData() { |
| | | const { data } = await this.$api.Safety.getAllWaringData(); |
| | | this.messageData = data; |
| | | }, |
| | | // 查询智慧监控信息 |
| | | searchWisdomVideoList(bol) { |
| | | if(bol) { |
| | | this.pageNum = 1; |
| | | } |
| | | this.loading = true; |
| | | this.wisdomVideoList = []; |
| | | this.$api.Safety.searchWisdomVideoList({ |
| | | pageNum: this.pageNum, |
| | | pageSize: this.pageSize, |
| | | type: this.messageId, |
| | | strTime: this.timeData ? this.timeData[0] : '', |
| | | endTime: this.timeData ? this.timeData[1] : '' |
| | | }).then((res) => { |
| | | if(res.success) { |
| | | this.total = res.data.total; |
| | | this.wisdomVideoList = res.data.list; |
| | | } |
| | | this.loading = false; |
| | | }).catch(() => { |
| | | this.loading = false; |
| | | }) |
| | | }, |
| | | // 判断按钮权限信息 |
| | | showButton(str) { |
| | | const pinia = buttonPinia(); |
| | | return pinia.$state.buttonInfo.includes(str); |
| | | }, |
| | | // 切换页数 |
| | | changePageNum(page) { |
| | | this.pageNum = page; |
| | | this.searchWisdomVideoList(); |
| | | }, |
| | | // 切换每页条数 |
| | | changePageSize(size) { |
| | | this.pageSize = size; |
| | | this.searchWisdomVideoList(); |
| | | } |
| | | }, |
| | | watch: { |
| | | asyncConfig(bol) { |
| | | if(!bol) { |
| | | this.formConfig = {}; |
| | | this.$refs.form.resetFields(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import '~@/style/layout-main.scss'; |
| | | </style> |