| | |
| | | private String bz; |
| | | private String cid; |
| | | private String vaddress; |
| | | private String aaddress; |
| | | |
| | | // @TableLogic |
| | | // private Integer isDeleted; |
| | |
| | | void updatePoliceStatus(String id, String status); |
| | | void updateOne(Alarm alarm); |
| | | void updateVaddress(String vaddress ,String jid); |
| | | void updateAaddress(String aaddress ,String jid); |
| | | |
| | | List<Map<String, Object>> selectScount(String time); |
| | | |
| | |
| | | <result column="name" property="name"/> |
| | | <result column="cid" property="cid"/> |
| | | <result column="vaddress" property="vaddress"/> |
| | | <result column="aaddress" property="aaddress"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <select id="selectAlarmPage" resultMap="alarmResultMap"> |
| | | select |
| | | a.id,a.alarmType,a.alarmPeople,a.alarmTime,a.galarmPeople,a.sex,a.phoneNumber,a.place,a.content,a.waringType,a.bz, |
| | | a.deviceNumber,a.region,a.district,a.vaddress, |
| | | a.deviceNumber,a.region,a.district,a.vaddress,a.aaddress, |
| | | a.alarmId,a.LEVEL,e.jd,e.wd,a.jtype,a.rname,a.jjTime,a.province,a.city,a.cid, |
| | | e.serialNumber,e.oneContacts,e.ThreeContacts,e.twoContacts,e.onePhone,e.twoPhone,e.ThreePhone, |
| | | e.stype, |
| | |
| | | void updateJtype(String id, String jtype, String bz); |
| | | void updateVaddress(String vaddress ,String jid); |
| | | void updatePoliceStatus(String id, String status); |
| | | |
| | | void updateAaddress(String aaddress ,String jid); |
| | | |
| | | /** |
| | | * 查询警情总数 |
| | |
| | | baseMapper.updatePoliceStatus(id,status); |
| | | } |
| | | |
| | | @Override |
| | | public void updateAaddress(String aaddress, String jid) { |
| | | baseMapper.updateAaddress(aaddress, jid); |
| | | } |
| | | |
| | | /** |
| | | * 查询警情总数 |
| | | * @param status 0:本日 1:本周 2:本月 |
| | |
| | | import org.springblade.core.oss.model.BladeFile; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.jfpt.alarm.service.IAlarmService; |
| | | import org.springblade.jfpt.wj.entity.Wj; |
| | | import org.springblade.jfpt.wj.service.IWjService; |
| | | import org.springblade.jfpt.xlfeedback.entity.Xlfeedback; |
| | |
| | | private final IXlfeedbackService xlfeedbackService; |
| | | private IWjService iWjService; |
| | | private MinioTemplate minioTemplate; |
| | | private final IAlarmService alarmService; |
| | | |
| | | /** |
| | | * 详情 |
| | |
| | | |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * @param file |
| | | */ |
| | | @PostMapping("put-objects") |
| | | public R put(@RequestParam MultipartFile file) throws InvalidPortException, InvalidEndpointException, IOException, XmlPullParserException, NoSuchAlgorithmException, InvalidKeyException, InvalidArgumentException, InternalException, NoResponseException, InvalidBucketNameException, InsufficientDataException, ErrorResponseException, RegionConflictException { |
| | | MinioClient minioClient = new MinioClient("http://36.134.81.48:9000","adminminio","adminminio"); |
| | |
| | | return R.data(url); |
| | | } |
| | | |
| | | /** |
| | | * @param file |
| | | */ |
| | | @PostMapping("put-objecty") |
| | | public R puty(@RequestParam MultipartFile file,String jid) throws InvalidPortException, InvalidEndpointException, IOException, XmlPullParserException, NoSuchAlgorithmException, InvalidKeyException, InvalidArgumentException, InternalException, NoResponseException, InvalidBucketNameException, InsufficientDataException, ErrorResponseException, RegionConflictException { |
| | | MinioClient minioClient = new MinioClient("http://web.byisf.com:9000","adminminio","adminminio"); |
| | | if (!minioClient.bucketExists("jfpt")) { //是否存在名为“test”的bucket |
| | | minioClient.makeBucket("jfpt"); |
| | | } |
| | | String fileName = file.getOriginalFilename(); |
| | | String newName ="upload/avoid/"+UUID.randomUUID().toString().replaceAll("-", "") |
| | | + fileName.substring(fileName.lastIndexOf(".")); |
| | | InputStream inputStream = file.getInputStream(); //获取file的inputStream |
| | | minioClient.putObject("jfpt", newName, inputStream, "application/octet-stream");//上传 |
| | | inputStream.close(); |
| | | String url = minioClient.getObjectUrl("jfpt", newName); //文件访问路径 |
| | | String substring = url.substring(25, url.length()); |
| | | String urls="https://web.byisf.com/minio"+substring; |
| | | alarmService.updateAaddress(url,jid); |
| | | return R.data(url); |
| | | } |
| | | |
| | | |
| | | } |