Merge remote-tracking branch 'origin/master'
# Conflicts:
# ard-work/src/main/java/com/ruoyi/sy/controller/ArdSyCarController.java
# ard-work/src/main/java/com/ruoyi/sy/service/IArdSyCarService.java
# ard-work/src/main/java/com/ruoyi/sy/service/impl/ArdSyCarServiceImpl.java
已添加19个文件
已重命名5个文件
已修改22个文件
| | |
| | | </description> |
| | | |
| | | <dependencies> |
| | | <dependency> |
| | | <groupId>net.sf.ucanaccess</groupId> |
| | | <artifactId>ucanaccess</artifactId> |
| | | <version>5.0.1</version> |
| | | </dependency> |
| | | |
| | | <!-- éç¨å·¥å
·--> |
| | | <dependency> |
| | | <groupId>commons-codec</groupId> |
| | |
| | | <artifactId>fastjson2</artifactId> |
| | | <version>2.0.36</version> |
| | | </dependency> |
| | | |
| | | <!--ä¸ä¸è½¦è¾ä¾èµ--> |
| | | <dependency> |
| | | <groupId>commons-codec</groupId> |
| | | <artifactId>commons-codec</artifactId> |
| | | <version>1.14</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.apache.commons</groupId> |
| | | <artifactId>commons-collections4</artifactId> |
| | | <version>4.4</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.apache.commons</groupId> |
| | | <artifactId>commons-lang3</artifactId> |
| | | <version>3.9</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>commons-logging</groupId> |
| | | <artifactId>commons-logging</artifactId> |
| | | <version>1.2</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.alibaba</groupId> |
| | | <artifactId>fastjson</artifactId> |
| | | <version>1.2.35</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.sy</groupId> |
| | | <artifactId>gps-push-client</artifactId> |
| | | <version>1.0.0</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.apache.logging.log4j</groupId> |
| | | <artifactId>log4j-api</artifactId> |
| | | <version>2.12.1</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.apache.logging.log4j</groupId> |
| | | <artifactId>log4j-core</artifactId> |
| | | <version>2.12.1</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.apache.logging.log4j</groupId> |
| | | <artifactId>log4j-jcl</artifactId> |
| | | <version>2.11.2</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>io.netty</groupId> |
| | | <artifactId>netty-all</artifactId> |
| | | <version>4.1.63.Final</version> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | <build> |
| | |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | @PreAuthorize("@ss.hasPermi('alarmpoints:well:list')") |
| | | @GetMapping("/nonPageList") |
| | | @ApiOperation("æ¥è¯¢äºå表-ä¸å页") |
| | | public AjaxResult nonPageList(ArdAlarmpointsWell ardAlarmpointsWell) { |
| | | List<ArdAlarmpointsWell> list = ardAlarmpointsWellService.selectArdAlarmpointsWellList(ardAlarmpointsWell); |
| | | return success(list); |
| | | } |
| | | /** |
| | | * 导åºäºç®¡çå表 |
| | | */ |
ÎļþÃû´Ó ard-work/src/main/java/com/ruoyi/app/controller/ArdAppPositionController.java ÐÞ¸Ä |
| | |
| | | package com.ruoyi.app.controller; |
| | | package com.ruoyi.app.position.controller; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import com.ruoyi.app.domain.ArdAppPosition; |
| | | import com.ruoyi.app.service.IArdAppPositionService; |
| | | import com.ruoyi.common.core.domain.entity.SysRole; |
| | | import com.ruoyi.app.position.domain.ArdAppPosition; |
| | | import com.ruoyi.app.position.service.IArdAppPositionService; |
| | | import com.ruoyi.common.constant.CacheConstants; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.core.domain.model.LoginUser; |
| | | import com.ruoyi.common.core.redis.RedisCache; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.device.hiksdk.util.minio.MinioUtils; |
| | | import com.ruoyi.rongcloud.service.RongCloudService; |
| | | import com.ruoyi.system.domain.SysUserOnline; |
| | | import com.ruoyi.system.service.ISysRoleService; |
| | | import com.ruoyi.system.service.ISysUserOnlineService; |
| | | import com.ruoyi.system.service.ISysUserService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.core.context.SecurityContextHolder; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | |
| | | import static org.bytedeco.javacv.FrameGrabber.list; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * appä½ç½®Controller |
| | |
| | | @Autowired |
| | | private ISysUserService sysUserService; |
| | | @Autowired |
| | | private ISysRoleService roleService; |
| | | private RongCloudService rongCloudService; |
| | | |
| | | /** |
| | | * æ¥è¯¢appä½ç½®å表 |
| | |
| | | return AjaxResult.success(list); |
| | | } |
| | | /** |
| | | * è·åææappç¨æ· |
| | | */ |
| | | @ApiOperation("è·åææappç¨æ·") |
| | | @GetMapping("/getAppUserlist") |
| | | public AjaxResult getAppUserlist(Long deptId) |
| | | { |
| | | SysUser user=new SysUser(); |
| | | user.setDeptId(deptId); |
| | | List<SysUser> list = sysUserService.selectAppUserList(user); |
| | | return AjaxResult.success(list); |
| | | } |
| | | |
| | | /** |
| | | * è·åææappç¨æ· |
| | | */ |
| | | @ApiOperation("è·åææappç¨æ·pc") |
| | | @GetMapping("/getAppUserForPclist") |
| | | public AjaxResult getAppUserForPclist(Long deptId) |
| | | { |
| | | SysUser user=new SysUser(); |
| | | user.setDeptId(deptId); |
| | | List<SysUser> list = sysUserService.selectAppUserList(user); |
| | | List<SysUser> onLineList=new ArrayList<>(); |
| | | List<SysUser> offLineList=new ArrayList<>(); |
| | | for(SysUser sysUser:list) |
| | | { |
| | | Boolean online = rongCloudService.checkOnline(sysUser.getUserId()); |
| | | if(online) |
| | | { |
| | | onLineList.add(sysUser); |
| | | } |
| | | else |
| | | { |
| | | offLineList.add(sysUser); |
| | | } |
| | | } |
| | | Map<String,Object> onlineMap=new HashMap<>(); |
| | | onlineMap.put("children",onLineList); |
| | | onlineMap.put("name","å¨çº¿ç¨æ·("+onLineList.size()+")"); |
| | | onlineMap.put("disabled",true); |
| | | onlineMap.put("id","onLine"); |
| | | Map<String,Object> offlineMap=new HashMap<>(); |
| | | offlineMap.put("children",offLineList); |
| | | offlineMap.put("name","ç¦»çº¿ç¨æ·("+offLineList.size()+")"); |
| | | offlineMap.put("disabled",true); |
| | | offlineMap.put("id","offLine"); |
| | | List< Map<String,Object> > lists = new ArrayList<>(); |
| | | lists.add(onlineMap); |
| | | lists.add(offlineMap); |
| | | return AjaxResult.success(lists); |
| | | } |
| | | /** |
| | | * è·åç¨æ·è¯¦æ
|
| | | */ |
| | | @ApiOperation("è·åç¨æ·è¯¦æ
") |
| | |
| | | SysUser sysUser = sysUserService.selectUserById(userId); |
| | | return AjaxResult.success(sysUser); |
| | | } |
| | | @PostMapping("/uploadFile") |
| | | @ApiOperation("ä¸ä¼ æä»¶") |
| | | public AjaxResult uploadFile(MultipartFile file,String type) |
| | | { |
| | | String url = MinioUtils.putObjectAndGetUrl("app",type, file); |
| | | return AjaxResult.success(url); |
| | | } |
| | | } |
ÎļþÃû´Ó ard-work/src/main/java/com/ruoyi/app/domain/ArdAppPosition.java ÐÞ¸Ä |
| | |
| | | package com.ruoyi.app.domain; |
| | | package com.ruoyi.app.position.domain; |
| | | import lombok.Data; |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
ÎļþÃû´Ó ard-work/src/main/java/com/ruoyi/app/mapper/ArdAppPositionMapper.java ÐÞ¸Ä |
| | |
| | | package com.ruoyi.app.mapper; |
| | | package com.ruoyi.app.position.mapper; |
| | | |
| | | import java.util.List; |
| | | import com.ruoyi.app.domain.ArdAppPosition; |
| | | import com.ruoyi.app.position.domain.ArdAppPosition; |
| | | |
| | | |
| | | /** |
ÎļþÃû´Ó ard-work/src/main/java/com/ruoyi/app/service/IArdAppPositionService.java ÐÞ¸Ä |
| | |
| | | package com.ruoyi.app.service; |
| | | package com.ruoyi.app.position.service; |
| | | |
| | | import java.util.List; |
| | | import com.ruoyi.app.domain.ArdAppPosition; |
| | | import com.ruoyi.app.position.domain.ArdAppPosition; |
| | | |
| | | |
| | | /** |
ÎļþÃû´Ó ard-work/src/main/java/com/ruoyi/app/service/impl/ArdAppPositionServiceImpl.java ÐÞ¸Ä |
| | |
| | | package com.ruoyi.app.service.impl; |
| | | package com.ruoyi.app.position.service.impl; |
| | | |
| | | import com.ruoyi.app.domain.ArdAppPosition; |
| | | import com.ruoyi.app.mapper.ArdAppPositionMapper; |
| | | import com.ruoyi.app.service.IArdAppPositionService; |
| | | import com.ruoyi.app.position.domain.ArdAppPosition; |
| | | import com.ruoyi.app.position.mapper.ArdAppPositionMapper; |
| | | import com.ruoyi.app.position.service.IArdAppPositionService; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.uuid.IdUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.app.task.controller; |
| | | |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | 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 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.app.task.domain.ArdAppTask; |
| | | import com.ruoyi.app.task.service.IArdAppTaskService; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | |
| | | /** |
| | | * appä»»å¡ç®¡çController |
| | | * |
| | | * @author ard |
| | | * @date 2023-07-22 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/app/task") |
| | | public class ArdAppTaskController extends BaseController |
| | | { |
| | | @Autowired |
| | | private IArdAppTaskService ardAppTaskService; |
| | | |
| | | /** |
| | | * æ¥è¯¢appä»»å¡ç®¡çå表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('app:task:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(ArdAppTask ardAppTask) |
| | | { |
| | | startPage(); |
| | | List<ArdAppTask> list = ardAppTaskService.selectArdAppTaskList(ardAppTask); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导åºappä»»å¡ç®¡çå表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('app:task:export')") |
| | | @Log(title = "appä»»å¡ç®¡ç", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, ArdAppTask ardAppTask) |
| | | { |
| | | List<ArdAppTask> list = ardAppTaskService.selectArdAppTaskList(ardAppTask); |
| | | ExcelUtil<ArdAppTask> util = new ExcelUtil<ArdAppTask>(ArdAppTask.class); |
| | | util.exportExcel(response, list, "appä»»å¡ç®¡çæ°æ®"); |
| | | } |
| | | |
| | | /** |
| | | * è·åappä»»å¡ç®¡ç详ç»ä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('app:task:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") String id) |
| | | { |
| | | return success(ardAppTaskService.selectArdAppTaskById(id)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢appä»»å¡ç®¡ç |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('app:task:add')") |
| | | @Log(title = "appä»»å¡ç®¡ç", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody ArdAppTask ardAppTask) |
| | | { |
| | | return toAjax(ardAppTaskService.insertArdAppTask(ardAppTask)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹appä»»å¡ç®¡ç |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('app:task:edit')") |
| | | @Log(title = "appä»»å¡ç®¡ç", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody ArdAppTask ardAppTask) |
| | | { |
| | | return toAjax(ardAppTaskService.updateArdAppTask(ardAppTask)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤appä»»å¡ç®¡ç |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('app:task:remove')") |
| | | @Log(title = "appä»»å¡ç®¡ç", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable String[] ids) |
| | | { |
| | | return toAjax(ardAppTaskService.deleteArdAppTaskByIds(ids)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.app.task.domain; |
| | | |
| | | import java.util.List; |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | import com.ruoyi.common.annotation.Excel; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | |
| | | /** |
| | | * appä»»å¡ç®¡ç对象 ard_app_task |
| | | * |
| | | * @author ard |
| | | * @date 2023-07-22 |
| | | */ |
| | | public class ArdAppTask extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** ID */ |
| | | private String id; |
| | | |
| | | /** ä»»å¡åç§° */ |
| | | @Excel(name = "ä»»å¡åç§°") |
| | | private String name; |
| | | |
| | | /** ä»»å¡ææ¬ */ |
| | | @Excel(name = "任塿æ¬") |
| | | private String text; |
| | | |
| | | /** ä»»å¡è¯é³ */ |
| | | @Excel(name = "ä»»å¡è¯é³") |
| | | private String voice; |
| | | |
| | | /** é¨é¨ID */ |
| | | @Excel(name = "é¨é¨ID") |
| | | private Integer deptId; |
| | | |
| | | /** ç¨æ·ID */ |
| | | @Excel(name = "ç¨æ·ID") |
| | | private String userId; |
| | | /** appä»»å¡å¾çä¿¡æ¯ */ |
| | | private List<ArdAppTaskPic> ardAppTaskPicList; |
| | | |
| | | /** appä»»å¡å
³èå¤ç¨æ· */ |
| | | private List<String> userIds; |
| | | |
| | | /** appä»»å¡è¯¦æ
ä¿¡æ¯ */ |
| | | private List<ArdAppTaskDetail> ardAppTaskDetailList; |
| | | |
| | | public List<ArdAppTaskPic> getArdAppTaskPicList() |
| | | { |
| | | return ardAppTaskPicList; |
| | | } |
| | | |
| | | public List<String> getUserIds() { |
| | | return userIds; |
| | | } |
| | | |
| | | public void setUserIds(List<String> userIds) { |
| | | this.userIds = userIds; |
| | | } |
| | | |
| | | public void setArdAppTaskPicList(List<ArdAppTaskPic> ardAppTaskPicList) |
| | | { |
| | | this.ardAppTaskPicList = ardAppTaskPicList; |
| | | } |
| | | |
| | | public void setId(String id) |
| | | { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getId() |
| | | { |
| | | return id; |
| | | } |
| | | public void setName(String name) |
| | | { |
| | | this.name = name; |
| | | } |
| | | |
| | | public String getName() |
| | | { |
| | | return name; |
| | | } |
| | | public void setText(String text) |
| | | { |
| | | this.text = text; |
| | | } |
| | | |
| | | public String getText() |
| | | { |
| | | return text; |
| | | } |
| | | public void setVoice(String voice) |
| | | { |
| | | this.voice = voice; |
| | | } |
| | | |
| | | public String getVoice() |
| | | { |
| | | return voice; |
| | | } |
| | | public void setDeptId(Integer deptId) |
| | | { |
| | | this.deptId = deptId; |
| | | } |
| | | |
| | | public Integer getDeptId() |
| | | { |
| | | return deptId; |
| | | } |
| | | public void setUserId(String userId) |
| | | { |
| | | this.userId = userId; |
| | | } |
| | | |
| | | public String getUserId() |
| | | { |
| | | return userId; |
| | | } |
| | | |
| | | public List<ArdAppTaskDetail> getArdAppTaskDetailList() |
| | | { |
| | | return ardAppTaskDetailList; |
| | | } |
| | | |
| | | public void setArdAppTaskDetailList(List<ArdAppTaskDetail> ardAppTaskDetailList) |
| | | { |
| | | this.ardAppTaskDetailList = ardAppTaskDetailList; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
| | | .append("updateBy", getUpdateBy()) |
| | | .append("updateTime", getUpdateTime()) |
| | | .append("id", getId()) |
| | | .append("name", getName()) |
| | | .append("text", getText()) |
| | | .append("voice", getVoice()) |
| | | .append("deptId", getDeptId()) |
| | | .append("userId", getUserId()) |
| | | .append("createBy", getCreateBy()) |
| | | .append("createTime", getCreateTime()) |
| | | .append("ardAppTaskDetailList", getArdAppTaskDetailList()) |
| | | .toString(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.app.task.domain; |
| | | |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | import com.ruoyi.common.annotation.Excel; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | |
| | | /** |
| | | * appä»»å¡è¯¦æ
对象 ard_app_task_detail |
| | | * |
| | | * @author ard |
| | | * @date 2023-07-22 |
| | | */ |
| | | public class ArdAppTaskDetail extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** ID */ |
| | | private String id; |
| | | |
| | | /** å
´è¶£ç¹åç§° */ |
| | | @Excel(name = "å
´è¶£ç¹åç§°") |
| | | private String name; |
| | | |
| | | /** å
´è¶£ç¹ç»åº¦ */ |
| | | @Excel(name = "å
´è¶£ç¹ç»åº¦") |
| | | private String longitude; |
| | | |
| | | /** å
´è¶£ç¹çº¬åº¦ */ |
| | | @Excel(name = "å
´è¶£ç¹çº¬åº¦") |
| | | private String latitude; |
| | | |
| | | /** å
´è¶£ç¹é«å± */ |
| | | @Excel(name = "å
´è¶£ç¹é«å±") |
| | | private String altitude; |
| | | |
| | | /** å
³èç¨æ·ID */ |
| | | @Excel(name = "å
³èç¨æ·ID") |
| | | private String userId; |
| | | |
| | | /** æå¡ææ¬ */ |
| | | @Excel(name = "æå¡ææ¬") |
| | | private String text; |
| | | |
| | | /** æå¡è¯é³ */ |
| | | @Excel(name = "æå¡è¯é³") |
| | | private String voice; |
| | | |
| | | /** ä»»å¡ID */ |
| | | @Excel(name = "ä»»å¡ID") |
| | | private String taskId; |
| | | |
| | | public void setId(String id) |
| | | { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getId() |
| | | { |
| | | return id; |
| | | } |
| | | public void setName(String name) |
| | | { |
| | | this.name = name; |
| | | } |
| | | |
| | | public String getName() |
| | | { |
| | | return name; |
| | | } |
| | | public void setLongitude(String longitude) |
| | | { |
| | | this.longitude = longitude; |
| | | } |
| | | |
| | | public String getLongitude() |
| | | { |
| | | return longitude; |
| | | } |
| | | public void setLatitude(String latitude) |
| | | { |
| | | this.latitude = latitude; |
| | | } |
| | | |
| | | public String getLatitude() |
| | | { |
| | | return latitude; |
| | | } |
| | | public void setAltitude(String altitude) |
| | | { |
| | | this.altitude = altitude; |
| | | } |
| | | |
| | | public String getAltitude() |
| | | { |
| | | return altitude; |
| | | } |
| | | public void setUserId(String userId) |
| | | { |
| | | this.userId = userId; |
| | | } |
| | | |
| | | public String getUserId() |
| | | { |
| | | return userId; |
| | | } |
| | | public void setText(String text) |
| | | { |
| | | this.text = text; |
| | | } |
| | | |
| | | public String getText() |
| | | { |
| | | return text; |
| | | } |
| | | public void setVoice(String voice) |
| | | { |
| | | this.voice = voice; |
| | | } |
| | | |
| | | public String getVoice() |
| | | { |
| | | return voice; |
| | | } |
| | | public void setTaskId(String taskId) |
| | | { |
| | | this.taskId = taskId; |
| | | } |
| | | |
| | | public String getTaskId() |
| | | { |
| | | return taskId; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
| | | .append("id", getId()) |
| | | .append("name", getName()) |
| | | .append("longitude", getLongitude()) |
| | | .append("latitude", getLatitude()) |
| | | .append("altitude", getAltitude()) |
| | | .append("userId", getUserId()) |
| | | .append("text", getText()) |
| | | .append("voice", getVoice()) |
| | | .append("taskId", getTaskId()) |
| | | .toString(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.app.task.domain; |
| | | |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | import com.ruoyi.common.annotation.Excel; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | |
| | | /** |
| | | * appä»»å¡å¾ç对象 ard_app_task_pic |
| | | * |
| | | * @author ard |
| | | * @date 2023-07-22 |
| | | */ |
| | | public class ArdAppTaskPic extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** ID */ |
| | | private String id; |
| | | |
| | | /** appä»»å¡ID */ |
| | | @Excel(name = "appä»»å¡ID") |
| | | private String taskId; |
| | | |
| | | /** appä»»å¡å¾çurl */ |
| | | @Excel(name = "appä»»å¡å¾çurl") |
| | | private String picUrl; |
| | | |
| | | public void setId(String id) |
| | | { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getId() |
| | | { |
| | | return id; |
| | | } |
| | | public void setTaskId(String taskId) |
| | | { |
| | | this.taskId = taskId; |
| | | } |
| | | |
| | | public String getTaskId() |
| | | { |
| | | return taskId; |
| | | } |
| | | public void setPicUrl(String picUrl) |
| | | { |
| | | this.picUrl = picUrl; |
| | | } |
| | | |
| | | public String getPicUrl() |
| | | { |
| | | return picUrl; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
| | | .append("id", getId()) |
| | | .append("taskId", getTaskId()) |
| | | .append("picUrl", getPicUrl()) |
| | | .toString(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.app.task.mapper; |
| | | |
| | | import java.util.List; |
| | | import com.ruoyi.app.task.domain.ArdAppTask; |
| | | import com.ruoyi.app.task.domain.ArdAppTaskDetail; |
| | | import com.ruoyi.app.task.domain.ArdAppTaskPic; |
| | | |
| | | /** |
| | | * appä»»å¡ç®¡çMapperæ¥å£ |
| | | * |
| | | * @author ard |
| | | * @date 2023-07-22 |
| | | */ |
| | | public interface ArdAppTaskMapper |
| | | { |
| | | /** |
| | | * æ¥è¯¢appä»»å¡ç®¡ç |
| | | * |
| | | * @param id appä»»å¡ç®¡çä¸»é® |
| | | * @return appä»»å¡ç®¡ç |
| | | */ |
| | | public ArdAppTask selectArdAppTaskById(String id); |
| | | |
| | | /** |
| | | * æ¥è¯¢appä»»å¡ç®¡çå表 |
| | | * |
| | | * @param ardAppTask appä»»å¡ç®¡ç |
| | | * @return appä»»å¡ç®¡çéå |
| | | */ |
| | | public List<ArdAppTask> selectArdAppTaskList(ArdAppTask ardAppTask); |
| | | |
| | | /** |
| | | * æ°å¢appä»»å¡ç®¡ç |
| | | * |
| | | * @param ardAppTask appä»»å¡ç®¡ç |
| | | * @return ç»æ |
| | | */ |
| | | public int insertArdAppTask(ArdAppTask ardAppTask); |
| | | |
| | | /** |
| | | * ä¿®æ¹appä»»å¡ç®¡ç |
| | | * |
| | | * @param ardAppTask appä»»å¡ç®¡ç |
| | | * @return ç»æ |
| | | */ |
| | | public int updateArdAppTask(ArdAppTask ardAppTask); |
| | | |
| | | /** |
| | | * å é¤appä»»å¡ç®¡ç |
| | | * |
| | | * @param id appä»»å¡ç®¡çä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteArdAppTaskById(String id); |
| | | |
| | | /** |
| | | * æ¹éå é¤appä»»å¡ç®¡ç |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteArdAppTaskByIds(String[] ids); |
| | | |
| | | /** |
| | | * æ¹éå é¤appä»»å¡å¾ç |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteArdAppTaskPicByTaskIds(String[] ids); |
| | | |
| | | /** |
| | | * æ¹éæ°å¢appä»»å¡å¾ç |
| | | * |
| | | * @param ardAppTaskPicList appä»»å¡å¾çå表 |
| | | * @return ç»æ |
| | | */ |
| | | public int batchArdAppTaskPic(List<ArdAppTaskPic> ardAppTaskPicList); |
| | | |
| | | |
| | | /** |
| | | * éè¿appä»»å¡ç®¡ç主é®å é¤appä»»å¡å¾çä¿¡æ¯ |
| | | * |
| | | * @param id appä»»å¡ç®¡çID |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteArdAppTaskPicByTaskId(String id); |
| | | |
| | | /** |
| | | * æ¹éå é¤appä»»å¡è¯¦æ
|
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteArdAppTaskDetailByTaskIds(String[] ids); |
| | | |
| | | /** |
| | | * æ¹éæ°å¢appä»»å¡è¯¦æ
|
| | | * |
| | | * @param ardAppTaskDetailList appä»»å¡è¯¦æ
å表 |
| | | * @return ç»æ |
| | | */ |
| | | public int batchArdAppTaskDetail(List<ArdAppTaskDetail> ardAppTaskDetailList); |
| | | |
| | | |
| | | /** |
| | | * éè¿appä»»å¡ç®¡ç主é®å é¤appä»»å¡è¯¦æ
ä¿¡æ¯ |
| | | * |
| | | * @param id appä»»å¡ç®¡çID |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteArdAppTaskDetailByTaskId(String id); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.app.task.service; |
| | | |
| | | import java.util.List; |
| | | import com.ruoyi.app.task.domain.ArdAppTask; |
| | | |
| | | /** |
| | | * appä»»å¡ç®¡çServiceæ¥å£ |
| | | * |
| | | * @author ard |
| | | * @date 2023-07-22 |
| | | */ |
| | | public interface IArdAppTaskService |
| | | { |
| | | /** |
| | | * æ¥è¯¢appä»»å¡ç®¡ç |
| | | * |
| | | * @param id appä»»å¡ç®¡çä¸»é® |
| | | * @return appä»»å¡ç®¡ç |
| | | */ |
| | | public ArdAppTask selectArdAppTaskById(String id); |
| | | |
| | | /** |
| | | * æ¥è¯¢appä»»å¡ç®¡çå表 |
| | | * |
| | | * @param ardAppTask appä»»å¡ç®¡ç |
| | | * @return appä»»å¡ç®¡çéå |
| | | */ |
| | | public List<ArdAppTask> selectArdAppTaskList(ArdAppTask ardAppTask); |
| | | |
| | | /** |
| | | * æ°å¢appä»»å¡ç®¡ç |
| | | * |
| | | * @param ardAppTask appä»»å¡ç®¡ç |
| | | * @return ç»æ |
| | | */ |
| | | public int insertArdAppTask(ArdAppTask ardAppTask); |
| | | |
| | | /** |
| | | * ä¿®æ¹appä»»å¡ç®¡ç |
| | | * |
| | | * @param ardAppTask appä»»å¡ç®¡ç |
| | | * @return ç»æ |
| | | */ |
| | | public int updateArdAppTask(ArdAppTask ardAppTask); |
| | | |
| | | /** |
| | | * æ¹éå é¤appä»»å¡ç®¡ç |
| | | * |
| | | * @param ids éè¦å é¤çappä»»å¡ç®¡ç主é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteArdAppTaskByIds(String[] ids); |
| | | |
| | | /** |
| | | * å é¤appä»»å¡ç®¡çä¿¡æ¯ |
| | | * |
| | | * @param id appä»»å¡ç®¡çä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteArdAppTaskById(String id); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.app.task.service.impl; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.ruoyi.app.task.domain.ArdAppTaskDetail; |
| | | import com.ruoyi.app.tasktext.domain.ArdAppTaskText; |
| | | import com.ruoyi.app.tasktext.mapper.ArdAppTaskTextMapper; |
| | | import com.ruoyi.common.annotation.DataScope; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | |
| | | import com.ruoyi.common.utils.uuid.IdUtils; |
| | | import com.ruoyi.common.utils.uuid.UUID; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import java.util.ArrayList; |
| | | |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import com.ruoyi.app.task.domain.ArdAppTaskPic; |
| | | import com.ruoyi.app.task.mapper.ArdAppTaskMapper; |
| | | import com.ruoyi.app.task.domain.ArdAppTask; |
| | | import com.ruoyi.app.task.service.IArdAppTaskService; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * appä»»å¡ç®¡çServiceä¸å¡å±å¤ç |
| | | * |
| | | * @author ard |
| | | * @date 2023-07-22 |
| | | */ |
| | | @Service |
| | | public class ArdAppTaskServiceImpl implements IArdAppTaskService { |
| | | @Resource |
| | | private ArdAppTaskMapper ardAppTaskMapper; |
| | | @Resource |
| | | private ArdAppTaskTextMapper ardAppTaskTextMapper; |
| | | /** |
| | | * æ¥è¯¢appä»»å¡ç®¡ç |
| | | * |
| | | * @param id appä»»å¡ç®¡çä¸»é® |
| | | * @return appä»»å¡ç®¡ç |
| | | */ |
| | | @Override |
| | | public ArdAppTask selectArdAppTaskById(String id) { |
| | | return ardAppTaskMapper.selectArdAppTaskById(id); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢appä»»å¡ç®¡çå表 |
| | | * |
| | | * @param ardAppTask appä»»å¡ç®¡ç |
| | | * @return appä»»å¡ç®¡ç |
| | | */ |
| | | @Override |
| | | @DataScope(deptAlias = "d", userAlias = "u") |
| | | public List<ArdAppTask> selectArdAppTaskList(ArdAppTask ardAppTask) { |
| | | return ardAppTaskMapper.selectArdAppTaskList(ardAppTask); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢appä»»å¡ç®¡ç |
| | | * |
| | | * @param ardAppTask appä»»å¡ç®¡ç |
| | | * @return ç»æ |
| | | */ |
| | | @Transactional |
| | | @Override |
| | | public int insertArdAppTask(ArdAppTask ardAppTask) { |
| | | ardAppTask.setId(IdUtils.simpleUUID()); |
| | | ardAppTask.setUserId(SecurityUtils.getUserId()); |
| | | ardAppTask.setCreateBy(SecurityUtils.getUsername()); |
| | | ardAppTask.setCreateTime(DateUtils.getNowDate()); |
| | | int rows = ardAppTaskMapper.insertArdAppTask(ardAppTask); |
| | | insertArdAppTaskPic(ardAppTask); |
| | | insertArdAppTaskDetail(ardAppTask); |
| | | insertArdAppTaskText(ardAppTask); |
| | | return rows; |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹appä»»å¡ç®¡ç |
| | | * |
| | | * @param ardAppTask appä»»å¡ç®¡ç |
| | | * @return ç»æ |
| | | */ |
| | | @Transactional |
| | | @Override |
| | | public int updateArdAppTask(ArdAppTask ardAppTask) { |
| | | ardAppTask.setUpdateBy(SecurityUtils.getUsername()); |
| | | ardAppTask.setUpdateTime(DateUtils.getNowDate()); |
| | | ardAppTaskMapper.deleteArdAppTaskPicByTaskId(ardAppTask.getId()); |
| | | ardAppTaskMapper.deleteArdAppTaskDetailByTaskId(ardAppTask.getId()); |
| | | insertArdAppTaskPic(ardAppTask); |
| | | insertArdAppTaskDetail(ardAppTask); |
| | | return ardAppTaskMapper.updateArdAppTask(ardAppTask); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤appä»»å¡ç®¡ç |
| | | * |
| | | * @param ids éè¦å é¤çappä»»å¡ç®¡çä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Transactional |
| | | @Override |
| | | public int deleteArdAppTaskByIds(String[] ids) { |
| | | ardAppTaskMapper.deleteArdAppTaskPicByTaskIds(ids); |
| | | return ardAppTaskMapper.deleteArdAppTaskByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * å é¤appä»»å¡ç®¡çä¿¡æ¯ |
| | | * |
| | | * @param id appä»»å¡ç®¡çä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Transactional |
| | | @Override |
| | | public int deleteArdAppTaskById(String id) { |
| | | ardAppTaskMapper.deleteArdAppTaskPicByTaskId(id); |
| | | return ardAppTaskMapper.deleteArdAppTaskById(id); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢appä»»å¡å¾çä¿¡æ¯ |
| | | * |
| | | * @param ardAppTask appä»»å¡ç®¡ç对象 |
| | | */ |
| | | public void insertArdAppTaskPic(ArdAppTask ardAppTask) { |
| | | List<ArdAppTaskPic> ardAppTaskPicList = ardAppTask.getArdAppTaskPicList(); |
| | | String id = ardAppTask.getId(); |
| | | if (StringUtils.isNotNull(ardAppTaskPicList)) { |
| | | List<ArdAppTaskPic> list = new ArrayList<ArdAppTaskPic>(); |
| | | for (ArdAppTaskPic ardAppTaskPic :ardAppTaskPicList) |
| | | { |
| | | ardAppTaskPic.setId(IdUtils.simpleUUID()); |
| | | ardAppTaskPic.setTaskId(id); |
| | | list.add(ardAppTaskPic); |
| | | } |
| | | if (list.size() > 0) { |
| | | ardAppTaskMapper.batchArdAppTaskPic(list); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢appä»»å¡è¯¦æ
ä¿¡æ¯ |
| | | * |
| | | * @param ardAppTask appä»»å¡ç®¡ç对象 |
| | | */ |
| | | public void insertArdAppTaskDetail(ArdAppTask ardAppTask) { |
| | | List<String> userIds = ardAppTask.getUserIds(); |
| | | for(String userId:userIds) { |
| | | List<ArdAppTaskDetail> ardAppTaskDetailList = ardAppTask.getArdAppTaskDetailList(); |
| | | String id = ardAppTask.getId(); |
| | | if (StringUtils.isNotNull(ardAppTaskDetailList)) { |
| | | List<ArdAppTaskDetail> list = new ArrayList<ArdAppTaskDetail>(); |
| | | for (ArdAppTaskDetail ardAppTaskDetail : ardAppTaskDetailList) { |
| | | ardAppTaskDetail.setId(IdUtils.simpleUUID()); |
| | | ardAppTaskDetail.setTaskId(id); |
| | | ardAppTaskDetail.setUserId(userId); |
| | | list.add(ardAppTaskDetail); |
| | | } |
| | | if (list.size() > 0) { |
| | | ardAppTaskMapper.batchArdAppTaskDetail(list); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | /** |
| | | * æ°å¢appä»»å¡æè¿°ä¿¡æ¯ |
| | | * |
| | | * @param ardAppTask appä»»å¡ç®¡ç对象 |
| | | */ |
| | | public void insertArdAppTaskText(ArdAppTask ardAppTask) { |
| | | String userId = ardAppTask.getUserId(); |
| | | String text = ardAppTask.getText(); |
| | | ArdAppTaskText ardAppTaskText=new ArdAppTaskText(); |
| | | ardAppTaskText.setId(IdUtils.simpleUUID()); |
| | | ardAppTaskText.setUserId(userId); |
| | | ardAppTaskText.setText(text); |
| | | List<ArdAppTaskText> ardAppTaskTexts = ardAppTaskTextMapper.selectArdAppTaskTextList(ardAppTaskText); |
| | | if(ardAppTaskTexts.size()==0) |
| | | { |
| | | ardAppTaskTextMapper.insertArdAppTaskText(ardAppTaskText); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.app.tasktext.controller; |
| | | |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | 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 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.app.tasktext.domain.ArdAppTaskText; |
| | | import com.ruoyi.app.tasktext.service.IArdAppTaskTextService; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | |
| | | /** |
| | | * appä»»å¡æè¿°Controller |
| | | * |
| | | * @author ard |
| | | * @date 2023-07-22 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/task/text") |
| | | public class ArdAppTaskTextController extends BaseController |
| | | { |
| | | @Autowired |
| | | private IArdAppTaskTextService ardAppTaskTextService; |
| | | |
| | | /** |
| | | * æ¥è¯¢appä»»å¡æè¿°å表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('task:text:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(ArdAppTaskText ardAppTaskText) |
| | | { |
| | | startPage(); |
| | | List<ArdAppTaskText> list = ardAppTaskTextService.selectArdAppTaskTextList(ardAppTaskText); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导åºappä»»å¡æè¿°å表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('task:text:export')") |
| | | @Log(title = "appä»»å¡æè¿°", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, ArdAppTaskText ardAppTaskText) |
| | | { |
| | | List<ArdAppTaskText> list = ardAppTaskTextService.selectArdAppTaskTextList(ardAppTaskText); |
| | | ExcelUtil<ArdAppTaskText> util = new ExcelUtil<ArdAppTaskText>(ArdAppTaskText.class); |
| | | util.exportExcel(response, list, "appä»»å¡æè¿°æ°æ®"); |
| | | } |
| | | |
| | | /** |
| | | * è·åappä»»å¡æè¿°è¯¦ç»ä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('task:text:query')") |
| | | @GetMapping(value = "/{userId}") |
| | | public AjaxResult getInfo(@PathVariable("userId") String userId) |
| | | { |
| | | return success(ardAppTaskTextService.selectArdAppTaskTextByUserId(userId)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢appä»»å¡æè¿° |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('task:text:add')") |
| | | @Log(title = "appä»»å¡æè¿°", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody ArdAppTaskText ardAppTaskText) |
| | | { |
| | | return toAjax(ardAppTaskTextService.insertArdAppTaskText(ardAppTaskText)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹appä»»å¡æè¿° |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('task:text:edit')") |
| | | @Log(title = "appä»»å¡æè¿°", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody ArdAppTaskText ardAppTaskText) |
| | | { |
| | | return toAjax(ardAppTaskTextService.updateArdAppTaskText(ardAppTaskText)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤appä»»å¡æè¿° |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('task:text:remove')") |
| | | @Log(title = "appä»»å¡æè¿°", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{userIds}") |
| | | public AjaxResult remove(@PathVariable String[] userIds) |
| | | { |
| | | return toAjax(ardAppTaskTextService.deleteArdAppTaskTextByUserIds(userIds)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.app.tasktext.domain; |
| | | |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | import com.ruoyi.common.annotation.Excel; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | |
| | | /** |
| | | * appä»»å¡æè¿°å¯¹è±¡ ard_app_task_text |
| | | * |
| | | * @author ard |
| | | * @date 2023-07-22 |
| | | */ |
| | | public class ArdAppTaskText extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** ç¨æ·ID */ |
| | | @Excel(name = "ç¨æ·ID") |
| | | private String userId; |
| | | |
| | | /** appä»»å¡æè¿° */ |
| | | @Excel(name = "appä»»å¡æè¿°") |
| | | private String text; |
| | | |
| | | /** ID */ |
| | | private String id; |
| | | |
| | | public void setUserId(String userId) |
| | | { |
| | | this.userId = userId; |
| | | } |
| | | |
| | | public String getUserId() |
| | | { |
| | | return userId; |
| | | } |
| | | public void setText(String text) |
| | | { |
| | | this.text = text; |
| | | } |
| | | |
| | | public String getText() |
| | | { |
| | | return text; |
| | | } |
| | | public void setId(String id) |
| | | { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getId() |
| | | { |
| | | return id; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
| | | .append("userId", getUserId()) |
| | | .append("text", getText()) |
| | | .append("id", getId()) |
| | | .toString(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.app.tasktext.mapper; |
| | | |
| | | import java.util.List; |
| | | import com.ruoyi.app.tasktext.domain.ArdAppTaskText; |
| | | |
| | | /** |
| | | * appä»»å¡æè¿°Mapperæ¥å£ |
| | | * |
| | | * @author ard |
| | | * @date 2023-07-22 |
| | | */ |
| | | public interface ArdAppTaskTextMapper |
| | | { |
| | | /** |
| | | * æ¥è¯¢appä»»å¡æè¿° |
| | | * |
| | | * @param userId appä»»å¡æè¿°ä¸»é® |
| | | * @return appä»»å¡æè¿° |
| | | */ |
| | | public ArdAppTaskText selectArdAppTaskTextByUserId(String userId); |
| | | |
| | | /** |
| | | * æ¥è¯¢appä»»å¡æè¿°å表 |
| | | * |
| | | * @param ardAppTaskText appä»»å¡æè¿° |
| | | * @return appä»»å¡æè¿°éå |
| | | */ |
| | | public List<ArdAppTaskText> selectArdAppTaskTextList(ArdAppTaskText ardAppTaskText); |
| | | |
| | | /** |
| | | * æ°å¢appä»»å¡æè¿° |
| | | * |
| | | * @param ardAppTaskText appä»»å¡æè¿° |
| | | * @return ç»æ |
| | | */ |
| | | public int insertArdAppTaskText(ArdAppTaskText ardAppTaskText); |
| | | |
| | | /** |
| | | * ä¿®æ¹appä»»å¡æè¿° |
| | | * |
| | | * @param ardAppTaskText appä»»å¡æè¿° |
| | | * @return ç»æ |
| | | */ |
| | | public int updateArdAppTaskText(ArdAppTaskText ardAppTaskText); |
| | | |
| | | /** |
| | | * å é¤appä»»å¡æè¿° |
| | | * |
| | | * @param userId appä»»å¡æè¿°ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteArdAppTaskTextByUserId(String userId); |
| | | |
| | | /** |
| | | * æ¹éå é¤appä»»å¡æè¿° |
| | | * |
| | | * @param userIds éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteArdAppTaskTextByUserIds(String[] userIds); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.app.tasktext.service; |
| | | |
| | | import java.util.List; |
| | | import com.ruoyi.app.tasktext.domain.ArdAppTaskText; |
| | | |
| | | /** |
| | | * appä»»å¡æè¿°Serviceæ¥å£ |
| | | * |
| | | * @author ard |
| | | * @date 2023-07-22 |
| | | */ |
| | | public interface IArdAppTaskTextService |
| | | { |
| | | /** |
| | | * æ¥è¯¢appä»»å¡æè¿° |
| | | * |
| | | * @param userId appä»»å¡æè¿°ä¸»é® |
| | | * @return appä»»å¡æè¿° |
| | | */ |
| | | public ArdAppTaskText selectArdAppTaskTextByUserId(String userId); |
| | | |
| | | /** |
| | | * æ¥è¯¢appä»»å¡æè¿°å表 |
| | | * |
| | | * @param ardAppTaskText appä»»å¡æè¿° |
| | | * @return appä»»å¡æè¿°éå |
| | | */ |
| | | public List<ArdAppTaskText> selectArdAppTaskTextList(ArdAppTaskText ardAppTaskText); |
| | | |
| | | /** |
| | | * æ°å¢appä»»å¡æè¿° |
| | | * |
| | | * @param ardAppTaskText appä»»å¡æè¿° |
| | | * @return ç»æ |
| | | */ |
| | | public int insertArdAppTaskText(ArdAppTaskText ardAppTaskText); |
| | | |
| | | /** |
| | | * ä¿®æ¹appä»»å¡æè¿° |
| | | * |
| | | * @param ardAppTaskText appä»»å¡æè¿° |
| | | * @return ç»æ |
| | | */ |
| | | public int updateArdAppTaskText(ArdAppTaskText ardAppTaskText); |
| | | |
| | | /** |
| | | * æ¹éå é¤appä»»å¡æè¿° |
| | | * |
| | | * @param userIds éè¦å é¤çappä»»å¡æè¿°ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteArdAppTaskTextByUserIds(String[] userIds); |
| | | |
| | | /** |
| | | * å é¤appä»»å¡æè¿°ä¿¡æ¯ |
| | | * |
| | | * @param userId appä»»å¡æè¿°ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteArdAppTaskTextByUserId(String userId); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.app.tasktext.service.impl; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.ruoyi.app.tasktext.mapper.ArdAppTaskTextMapper; |
| | | import com.ruoyi.app.tasktext.domain.ArdAppTaskText; |
| | | import com.ruoyi.app.tasktext.service.IArdAppTaskTextService; |
| | | |
| | | /** |
| | | * appä»»å¡æè¿°Serviceä¸å¡å±å¤ç |
| | | * |
| | | * @author ard |
| | | * @date 2023-07-22 |
| | | */ |
| | | @Service |
| | | public class ArdAppTaskTextServiceImpl implements IArdAppTaskTextService { |
| | | @Autowired |
| | | private ArdAppTaskTextMapper ardAppTaskTextMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢appä»»å¡æè¿° |
| | | * |
| | | * @param userId appä»»å¡æè¿°ä¸»é® |
| | | * @return appä»»å¡æè¿° |
| | | */ |
| | | @Override |
| | | public ArdAppTaskText selectArdAppTaskTextByUserId(String userId) { |
| | | return ardAppTaskTextMapper.selectArdAppTaskTextByUserId(userId); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢appä»»å¡æè¿°å表 |
| | | * |
| | | * @param ardAppTaskText appä»»å¡æè¿° |
| | | * @return appä»»å¡æè¿° |
| | | */ |
| | | @Override |
| | | public List<ArdAppTaskText> selectArdAppTaskTextList(ArdAppTaskText ardAppTaskText) { |
| | | return ardAppTaskTextMapper.selectArdAppTaskTextList(ardAppTaskText); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢appä»»å¡æè¿° |
| | | * |
| | | * @param ardAppTaskText appä»»å¡æè¿° |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int insertArdAppTaskText(ArdAppTaskText ardAppTaskText) { |
| | | ardAppTaskText.setUserId(SecurityUtils.getUserId()); |
| | | return ardAppTaskTextMapper.insertArdAppTaskText(ardAppTaskText); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹appä»»å¡æè¿° |
| | | * |
| | | * @param ardAppTaskText appä»»å¡æè¿° |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updateArdAppTaskText(ArdAppTaskText ardAppTaskText) { |
| | | return ardAppTaskTextMapper.updateArdAppTaskText(ardAppTaskText); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤appä»»å¡æè¿° |
| | | * |
| | | * @param userIds éè¦å é¤çappä»»å¡æè¿°ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteArdAppTaskTextByUserIds(String[] userIds) { |
| | | return ardAppTaskTextMapper.deleteArdAppTaskTextByUserIds(userIds); |
| | | } |
| | | |
| | | /** |
| | | * å é¤appä»»å¡æè¿°ä¿¡æ¯ |
| | | * |
| | | * @param userId appä»»å¡æè¿°ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteArdAppTaskTextByUserId(String userId) { |
| | | return ardAppTaskTextMapper.deleteArdAppTaskTextByUserId(userId); |
| | | } |
| | | } |
| | |
| | | import io.minio.messages.Item; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.*; |
| | | import java.util.*; |
| | | import java.util.concurrent.TimeUnit; |
| | |
| | | boolean exsit = exitsBucket(bucketName); |
| | | if (!exsit) { |
| | | boolean bucket = createBucket(bucketName); |
| | | if(bucket) |
| | | { |
| | | if (bucket) { |
| | | log.info(bucketName + "-æ¡¶ä¸åå¨,æåå建桶"); |
| | | } |
| | | } |
| | | //æä»¶å |
| | | String originalFilename = file.getOriginalFilename(); |
| | | //æ°çæä»¶å |
| | | String fileName = IdUtils.fastSimpleUUID()+"_"+ originalFilename; |
| | | String fileName = IdUtils.fastSimpleUUID() + "_" + originalFilename; |
| | | try { |
| | | InputStream inputStream = file.getInputStream(); |
| | | /*ä¸ä¼ 对象*/ |
| | |
| | | .method(Method.GET) |
| | | .build(); |
| | | String presignedObjectUrl = MinioClientSingleton.getMinioClient().getPresignedObjectUrl(getPresignedObjectUrlArgs); |
| | | String ObjectUrl = presignedObjectUrl.substring(0, presignedObjectUrl.indexOf("?")); |
| | | String ObjectUrl = presignedObjectUrl.substring(0, presignedObjectUrl.indexOf("?")); |
| | | return ObjectUrl; |
| | | } catch (Exception ex) { |
| | | log.error("ä¸ä¼ 对象è¿åurlå¼å¸¸ï¼" + ex.getMessage()); |
| | | } |
| | | return ""; |
| | | } |
| | | |
| | | /** |
| | | * @æè¿° ä¸ä¼ MultipartFileæä»¶è¿åurl |
| | | * @åæ° [bucketName, file] |
| | | * @è¿åå¼ java.lang.String |
| | | * @å建人 åèä¹ |
| | | * @å建æ¶é´ 2023/5/18 12:16 |
| | | * @ä¿®æ¹äººåå
¶å®ä¿¡æ¯ |
| | | */ |
| | | public static String putObjectAndGetUrl(String bucketName, String folder, MultipartFile file) { |
| | | //夿æä»¶æ¯å¦ä¸ºç©º |
| | | if (null == file || 0 == file.getSize()) { |
| | | log.error("ä¸ä¼ minioæä»¶æå¡å¨é误ï¼ä¸ä¼ æä»¶ä¸ºç©º"); |
| | | } |
| | | boolean exsit = exitsBucket(bucketName); |
| | | if (!exsit) { |
| | | boolean bucket = createBucket(bucketName); |
| | | if (bucket) { |
| | | log.info(bucketName + "-æ¡¶ä¸åå¨,æåå建桶"); |
| | | } |
| | | } |
| | | //æä»¶å |
| | | String originalFilename = file.getOriginalFilename(); |
| | | //æ°çæä»¶å |
| | | String fileName = folder + "/" + IdUtils.fastSimpleUUID() + "_" + originalFilename; |
| | | try { |
| | | InputStream inputStream = file.getInputStream(); |
| | | /*ä¸ä¼ 对象*/ |
| | | PutObjectArgs putObjectArgs = PutObjectArgs |
| | | .builder() |
| | | .bucket(bucketName) |
| | | .object(fileName) |
| | | .stream(inputStream, file.getSize(), -1) |
| | | .contentType(file.getContentType()) |
| | | .build(); |
| | | MinioClientSingleton.getMinioClient().putObject(putObjectArgs); |
| | | inputStream.close(); |
| | | /*è·åurl*/ |
| | | GetPresignedObjectUrlArgs getPresignedObjectUrlArgs = GetPresignedObjectUrlArgs |
| | | .builder() |
| | | .bucket(bucketName) |
| | | .object(fileName) |
| | | .method(Method.GET) |
| | | .build(); |
| | | String presignedObjectUrl = MinioClientSingleton.getMinioClient().getPresignedObjectUrl(getPresignedObjectUrlArgs); |
| | | String ObjectUrl = presignedObjectUrl.substring(0, presignedObjectUrl.indexOf("?")); |
| | | return ObjectUrl; |
| | | } catch (Exception ex) { |
| | | log.error("ä¸ä¼ 对象è¿åurlå¼å¸¸ï¼" + ex.getMessage()); |
| | |
| | | } |
| | | |
| | | /** |
| | | *@æè¿° è·åæ¡¶ä¸ææå¯¹è±¡ |
| | | *@åæ° [bucketName] |
| | | *@è¿åå¼ java.lang.Iterable<io.minio.Result<io.minio.messages.Item>> |
| | | *@å建人 åèä¹ |
| | | *@å建æ¶é´ 2023/2/6 10:32 |
| | | *@ä¿®æ¹äººåå
¶å®ä¿¡æ¯ |
| | | * @æè¿° è·åæ¡¶ä¸ææå¯¹è±¡ |
| | | * @åæ° [bucketName] |
| | | * @è¿åå¼ java.lang.Iterable<io.minio.Result < io.minio.messages.Item>> |
| | | * @å建人 åèä¹ |
| | | * @å建æ¶é´ 2023/2/6 10:32 |
| | | * @ä¿®æ¹äººåå
¶å®ä¿¡æ¯ |
| | | */ |
| | | public static Iterable<Result<Item>> getObjectsByBucket(String bucketName) { |
| | | public static Iterable<Result<Item>> getObjectsByBucket(String bucketName) { |
| | | Iterable<Result<Item>> listObjects = MinioClientSingleton.getMinioClient().listObjects(ListObjectsArgs.builder() |
| | | .bucket(bucketName) |
| | | .recursive(true) |
| | |
| | | |
| | | @Override |
| | | public String addPath(String name, String rtspPath, String mode) { |
| | | String rtspUrl = "rtsp://" + mediamtxHost + ":8554/"; |
| | | String rtspUrl = "rtsp://" + mediamtxHost + ":7554/"; |
| | | Conf mediaInfo = new Conf(); |
| | | //-vcodec libx264 //æå®è§é¢ç¼ç å¨ä¸º libx264ï¼ä½¿ç¨ H.264 ç¼ç æ ¼å¼è¿è¡è§é¢å缩 |
| | | //-preset ultrafast //--presetç忰䏻è¦è°èç¼ç é度åè´¨éçå¹³è¡¡ï¼æultrafastï¼è½¬ç é度æå¿«ï¼è§é¢å¾å¾ä¹ææ¨¡ç³ï¼ãsuperfastãveryfastãfasterãfastãmediumãslowãslowerãveryslowãplaceboè¿10个é项ï¼ä»å¿«å°æ
¢ |
| | |
| | | String name = item.getName(); |
| | | info.setName(name); |
| | | //RTSPææ¾å°å |
| | | String rtspUrl = "rtsp://" + mediamtxHost + ":8554/" + name; |
| | | String rtspUrl = "rtsp://" + mediamtxHost + ":7554/" + name; |
| | | info.setRtspUrl(rtspUrl); |
| | | Source source = item.getSource(); |
| | | if (source == null) { |
| | |
| | | return AjaxResult.success(token); |
| | | } |
| | | |
| | | @PostMapping("/uploadPic") |
| | | @ApiOperation("ä¸ä¼ ç¨æ·å¤´å") |
| | | public AjaxResult uploadPic(MultipartFile file) |
| | | { |
| | | String url = MinioUtils.putObjectAndGetUrl("useravatar", file); |
| | | return AjaxResult.success(url); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/checkOnline") |
| | | @ApiOperation("æ¥è¯¢ç¨æ·å¨çº¿ç¶æ") |
| | |
| | | return onlineMap; |
| | | } |
| | | |
| | | @Override |
| | | public Boolean checkOnline(String userId) { |
| | | RongCloudParam param = new RongCloudParam(); |
| | | param.setUserId(userId); |
| | | Map isOnline = rongCloudClient.checkOnline(getRongCloudHead(), param); |
| | | if (isOnline.get("status").equals("1")) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * è·åèäºç¾åä¿¡æ¯ |
| | | */ |
| | |
| | | String nonce = RandomStringUtils.randomNumeric(18); |
| | | String timestamp = String.valueOf(new Date().getTime()); |
| | | String signature = DigestUtils.sha1Hex(appSecret + nonce + timestamp);//App Secret + Nonce + T |
| | | Map<String, Object> headerMap=new HashMap<>(); |
| | | headerMap.put("App-Key",appKey); |
| | | headerMap.put("Nonce",nonce); |
| | | headerMap.put("Timestamp",timestamp); |
| | | headerMap.put("Signature",signature); |
| | | Map<String, Object> headerMap = new HashMap<>(); |
| | | headerMap.put("App-Key", appKey); |
| | | headerMap.put("Nonce", nonce); |
| | | headerMap.put("Timestamp", timestamp); |
| | | headerMap.put("Signature", signature); |
| | | return headerMap; |
| | | } |
| | | } |
| | |
| | | |
| | | String getToken(String userId,String name); |
| | | Map checkOnline(List<String>userIds); |
| | | Boolean checkOnline(String userId); |
| | | } |
| | |
| | | |
| | | import java.text.Collator; |
| | | import java.util.*; |
| | | import java.util.*; |
| | | import javax.annotation.PostConstruct; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.alibaba.fastjson2.JSON; |
| | |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.uuid.IdUtils; |
| | | import com.ruoyi.sy.domain.ArdSyUser; |
| | | import com.ruoyi.sy.gps31.PushClientImplPosition; |
| | | import com.ruoyi.sy.service.IArdSyUserService; |
| | | import com.ruoyi.system.domain.SysConfig; |
| | | import com.ruoyi.system.service.ISysConfigService; |
| | | import com.ruoyi.system.service.ISysDeptService; |
| | | import com.ruoyi.system.service.ISysUserService; |
| | | import com.ruoyi.utils.httpclient.SYCarClient; |
| | | import com.ruoyi.utils.result.Results; |
| | | import io.swagger.annotations.Api; |
| | |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import static com.ruoyi.common.websocket.util.WebSocketUtils.ONLINE_USER_SESSIONS; |
| | | |
| | | /** |
| | | * ä¸ä¸è½¦è¾Controller |
| | |
| | | private IArdSyUserService iArdSyUserService; |
| | | |
| | | |
| | | private ArdSyCarController ardSyCarController; |
| | | |
| | | @PostConstruct |
| | | public void init(){ |
| | | ardSyCarController = this; |
| | | ardSyCarController.sysConfigService = this.sysConfigService; |
| | | ardSyCarController.iArdSyUserService = this.iArdSyUserService; |
| | | |
| | | SysConfig config = new SysConfig(); |
| | | config.setConfigKey("syCarPT"); |
| | | List<SysConfig> sysConfigResult = sysConfigService.selectConfigList(config); |
| | | String syURL = ""; |
| | | if(sysConfigResult.size() == 0){ |
| | | return; |
| | | }else{ |
| | | syURL = sysConfigResult.get(0).getConfigValue(); |
| | | } |
| | | String ip = syURL.split(":")[1].replace("//", ""); |
| | | List<ArdSyUser> ardSyUserList = iArdSyUserService.selectSyUser(); |
| | | //车è¾å®æ¶ä½ç½®çº¿ç¨ |
| | | PushClientImplPosition pushClientImplPosition = new PushClientImplPosition(ip,ardSyUserList.get(0).getUserId(),ardSyUserList.get(0).getPassword()); |
| | | Thread pushClientImplPositionThread = new Thread(pushClientImplPosition); |
| | | pushClientImplPositionThread.start(); |
| | | |
| | | Date date = new Date(); |
| | | Timer carPositionTimer = new Timer();//宿¶æ¨é宿¶ä½ç½® |
| | | TimerTask carPositionTask =new TimerTask(){ |
| | | public void run(){ |
| | | ardSyCarService.sendArdSyCarPosition(); |
| | | } |
| | | }; |
| | | carPositionTimer.scheduleAtFixedRate(carPositionTask,date,3*1000);//å¯ç¨ |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢ä¸ä¸è½¦è¾å表 |
| | | */ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.sy.gps31; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | public class PositionContainer { |
| | | |
| | | private static Map<String, Map<String,Map<String,Object>>> deptPositionMap = new HashMap();//ä¾é¨é¨åæ¾å®æ½è½¦è¾ä½ç½®:deptIdï¼carIdï¼è½¦è¾ä½ç½® |
| | | |
| | | public static Map<String, Map<String, Map<String,Object>>> getDeptPositionMap() { |
| | | return deptPositionMap; |
| | | } |
| | | |
| | | public static void setDeptPositionMap(Map<String, Map<String, Map<String,Object>>> deptPositionMap) { |
| | | PositionContainer.deptPositionMap = deptPositionMap; |
| | | } |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /** |
| | | * <p>Description: </p> |
| | | * <p>Copyright: Copyright (c) 2020</p> |
| | | * <p>Company: www.31gps.net</p> |
| | | * @author chencq |
| | | * @version 1.0 |
| | | */ |
| | | package com.ruoyi.sy.gps31; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | import com.alibaba.fastjson2.JSON; |
| | | import org.apache.commons.logging.Log; |
| | | import org.apache.commons.logging.LogFactory; |
| | | |
| | | import com.gps31.push.netty.PushClient; |
| | | import com.gps31.push.netty.PushMsg; |
| | | import com.gps31.push.netty.client.TcpClient; |
| | | import com.gps31.push.util.MapUtil; |
| | | /** |
| | | * <p>Description: </p> |
| | | * <p>Copyright: Copyright (c) 2020</p> |
| | | * <p>Company: www.31gps.net</p> |
| | | * @author chencq |
| | | * @version 1.0 |
| | | */ |
| | | public class PushClientImpl extends PushClient{ |
| | | private static final Log log = LogFactory.getLog(PushClientImpl.class); |
| | | |
| | | @Override |
| | | public void messageReceived(TcpClient tcpClient, PushMsg pushMsg) |
| | | throws Exception { |
| | | if("8001".equals(pushMsg.getCmd())) {//ç»å½åºç |
| | | String rspResult = MapUtil.getStrVal(pushMsg.getJsonMap(),"rspResult","1"); |
| | | if("0".equals(rspResult)) {//ç»å½æåï¼å®é
å¨ææ¶æ¯ |
| | | Map<String,Object> map = new HashMap<String,Object>(); |
| | | map.put("seq", "1"); |
| | | map.put("action", "add"); |
| | | map.put("msgIds", JSON.toJSONString(getSubCmdSet())); |
| | | PushMsg subMsg = getInstance("0003",map); |
| | | sendMsg(subMsg); |
| | | } |
| | | }else if("8002".equals(pushMsg.getCmd())){//å¿è·³åºç |
| | | |
| | | }else if("8003".equals(pushMsg.getCmd())){//订é
å¨ææ¶æ¯åºç |
| | | String rspResult = MapUtil.getStrVal(pushMsg.getJsonMap(),"rspResult","1"); |
| | | log.error(String.format(" 订é
åºç:%s", "0".equals(rspResult)?"æå":"失败")); |
| | | }else if("0200".equals(pushMsg.getCmd())) {//å®ä½ä¿¡æ¯ |
| | | Map<String,Object> gpsMap = pushMsg.getJsonMap(); |
| | | String carName = MapUtil.getStrVal(gpsMap, "carName","");//è·å车çå· |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | System.out.println(sdf.format(new Date())); |
| | | log.error(String.format(" ---->æ¶å°å®ä½æ°æ®:%s",JSON.toJSONString(gpsMap))); |
| | | /** |
| | | * |
| | | * 请å å
¥ä¸æ¹éææ¹çä¸å¡é»è¾ |
| | | * |
| | | */ |
| | | }else if("0300".equals(pushMsg.getCmd())) {//æ¥è¦æ¶æ¯ |
| | | Map<String,Object> alarmMap = pushMsg.getJsonMap(); |
| | | String carName = MapUtil.getStrVal(alarmMap, "carName","");//è·å车çå· |
| | | log.error(String.format(" ---->æ¶å°æ¥è¦æ°æ®:%s",JSON.toJSONString(alarmMap))); |
| | | /** |
| | | * |
| | | * 请å å
¥ä¸æ¹éææ¹çä¸å¡é»è¾ |
| | | * |
| | | */ |
| | | }else if("0401".equals(pushMsg.getCmd())) {//éä¼ æ¶æ¯ |
| | | Map<String,Object> dataMap = pushMsg.getJsonMap(); |
| | | String carName = MapUtil.getStrVal(dataMap, "carName","");//è·å车çå· |
| | | log.error(String.format(" ---->æ¶å°éä¼ æ°æ®:%s",JSON.toJSONString(dataMap))); |
| | | /** |
| | | * |
| | | * 请å å
¥ä¸æ¹éææ¹çä¸å¡é»è¾ |
| | | * |
| | | */ |
| | | } |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | try { |
| | | PushClientImpl client = new PushClientImpl(); |
| | | client.setLog(true);//æ¯å¦æå°ææ |
| | | //client.setLogBytes(true);//æ¯å¦æå°ç½ç»åèæµ |
| | | //client.setHost("106.14.186.44");//æå¡å¨IP |
| | | client.setHost("116.182.15.14");//æå¡å¨IP |
| | | client.setPort(10100);//æå¡å¨ç«¯å£ |
| | | //client.setUserName("ys_admin");//ç³»ç»ç¨æ·å |
| | | //client.setPwd("123456");//ç³»ç»ç¨æ·å¯ç |
| | | //client.setUserName("admin_dqard");//ç³»ç»ç¨æ·å |
| | | //client.setUserName("dqard");//ç³»ç»ç¨æ·å |
| | | //client.setPwd("123456");//ç³»ç»ç¨æ·å¯ç |
| | | client.setUserName("admin");//ç³»ç»ç¨æ·å |
| | | client.setPwd("654321");//ç³»ç»ç¨æ·å¯ç |
| | | //client.setSubMsgIds("0200|0300");//订é
çå¨ææ¶æ¯ï¼å¤ä¸ªå¨ææ¶æ¯ä½¿ç¨|è¾åï¼å½åç¤ºä¾æ¯è®¢é
å®ä½æ¶æ¯(0x0200)åæ¥è¦æ¶æ¯(0x0300) |
| | | client.setSubMsgIds("0200");//订é
çå¨ææ¶æ¯ï¼å¤ä¸ªå¨ææ¶æ¯ä½¿ç¨|è¾åï¼å½åç¤ºä¾æ¯è®¢é
å®ä½æ¶æ¯(0x0200)åæ¥è¦æ¶æ¯(0x0300) |
| | | client.setDesc("æµè¯å®¢æ·ç«¯");//客æ·ç«¯çæè¿°ï¼ |
| | | client.start(); |
| | | while(true) { |
| | | Thread.sleep(1000); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /** |
| | | * <p>Description: </p> |
| | | * <p>Copyright: Copyright (c) 2020</p> |
| | | * <p>Company: www.31gps.net</p> |
| | | * @author chencq |
| | | * @version 1.0 |
| | | */ |
| | | package com.ruoyi.sy.gps31; |
| | | |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.gps31.push.netty.PushClient; |
| | | import com.gps31.push.netty.PushMsg; |
| | | import com.gps31.push.netty.client.TcpClient; |
| | | import com.gps31.push.util.MapUtil; |
| | | import com.ruoyi.common.utils.spring.SpringUtils; |
| | | import com.ruoyi.sy.service.impl.ArdSyCarServiceImpl; |
| | | import org.apache.commons.logging.Log; |
| | | import org.apache.commons.logging.LogFactory; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p>Description: </p> |
| | | * <p>Copyright: Copyright (c) 2020</p> |
| | | * <p>Company: www.31gps.net</p> |
| | | * @author chencq |
| | | * @version 1.0 |
| | | */ |
| | | public class PushClientImplPosition extends PushClient implements Runnable { |
| | | |
| | | private static final Log log = LogFactory.getLog(PushClientImplPosition.class); |
| | | |
| | | private String ip; |
| | | |
| | | private String userId; |
| | | |
| | | private String password; |
| | | |
| | | public PushClientImplPosition(String ip, String userId, String password) { |
| | | this.ip = ip; |
| | | this.userId = userId; |
| | | this.password = password; |
| | | } |
| | | |
| | | public PushClientImplPosition() { |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void messageReceived(TcpClient tcpClient, PushMsg pushMsg) |
| | | throws Exception { |
| | | if("8001".equals(pushMsg.getCmd())) {//ç»å½åºç |
| | | String rspResult = MapUtil.getStrVal(pushMsg.getJsonMap(),"rspResult","1"); |
| | | if("0".equals(rspResult)) {//ç»å½æåï¼å®é
å¨ææ¶æ¯ |
| | | Map<String,Object> map = new HashMap<String,Object>(); |
| | | map.put("seq", "1"); |
| | | map.put("action", "add"); |
| | | map.put("msgIds", JSON.toJSONString(getSubCmdSet())); |
| | | PushMsg subMsg = getInstance("0003",map); |
| | | sendMsg(subMsg); |
| | | } |
| | | }else if("8002".equals(pushMsg.getCmd())){//å¿è·³åºç |
| | | |
| | | }else if("8003".equals(pushMsg.getCmd())){//订é
å¨ææ¶æ¯åºç |
| | | String rspResult = MapUtil.getStrVal(pushMsg.getJsonMap(),"rspResult","1"); |
| | | //log.error(String.format(" 订é
åºç:%s", "0".equals(rspResult)?"æå":"失败")); |
| | | }else if("0200".equals(pushMsg.getCmd())) {//å®ä½ä¿¡æ¯ |
| | | Map<String,Object> gpsMap = pushMsg.getJsonMap(); |
| | | /*String carName = MapUtil.getStrVal(gpsMap, "carName","");//è·å车çå· |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | System.out.println(sdf.format(new Date())); |
| | | log.error(String.format(" ---->æ¶å°å®ä½æ°æ®:%s",JSON.toJSONString(gpsMap)));*/ |
| | | String carId = (String)gpsMap.get("carId"); |
| | | Map<String,Object> result = ((ArdSyCarServiceImpl)SpringUtils.getBean("ardSyCarServiceImpl")).getArdSyCarAndDeptByCarId(carId);//æ¥è¯¢è½¦è¾åé¨é¨ |
| | | if(result != null){ |
| | | gpsMap.putAll(result); |
| | | String ancestors = (String) gpsMap.get("ancestors");//è·åç¶çº§é¨é¨ |
| | | String[] ancestorsArray = ancestors.split(","); |
| | | if(ancestorsArray.length == 1){//æé«çº§é¨é¨ |
| | | String deptId = String.valueOf(gpsMap.get("deptId")); |
| | | Map<String,Map<String,Object>> deptMap = PositionContainer.getDeptPositionMap().get(deptId); |
| | | if(deptMap == null){ |
| | | deptMap = new HashMap(); |
| | | } |
| | | deptMap.put((String)gpsMap.get("carId"),gpsMap);//馿¬¡å å
¥å®¹å¨ï¼å次å»é |
| | | PositionContainer.getDeptPositionMap().put(deptId,deptMap); |
| | | }else{ |
| | | //å å
¥æ¬é¨é¨å®¹å¨ |
| | | String deptId = String.valueOf(gpsMap.get("deptId")); |
| | | Map<String,Map<String,Object>> deptMap = PositionContainer.getDeptPositionMap().get(deptId); |
| | | if(deptMap == null){ |
| | | deptMap = new HashMap(); |
| | | } |
| | | deptMap.put((String)gpsMap.get("carId"),gpsMap);//馿¬¡å å
¥å®¹å¨ï¼å次å»é |
| | | PositionContainer.getDeptPositionMap().put(deptId,deptMap); |
| | | //å å
¥ç¶çº§é¨é¨å®¹å¨ |
| | | for(int i = 1;i <= ancestorsArray.length - 1;i++){ |
| | | String deptIdp = String.valueOf(gpsMap.get(ancestorsArray[i])); |
| | | Map<String,Map<String,Object>> deptMapp = PositionContainer.getDeptPositionMap().get(deptIdp); |
| | | if(deptMapp == null){ |
| | | deptMapp = new HashMap(); |
| | | } |
| | | deptMapp.put((String)gpsMap.get("carId"),gpsMap);//馿¬¡å å
¥å®¹å¨ï¼å次å»é |
| | | PositionContainer.getDeptPositionMap().put(deptIdp,deptMap); |
| | | } |
| | | } |
| | | } |
| | | /** |
| | | * |
| | | * 请å å
¥ä¸æ¹éææ¹çä¸å¡é»è¾ |
| | | * |
| | | */ |
| | | }else if("0300".equals(pushMsg.getCmd())) {//æ¥è¦æ¶æ¯ |
| | | Map<String,Object> alarmMap = pushMsg.getJsonMap(); |
| | | String carName = MapUtil.getStrVal(alarmMap, "carName","");//è·å车çå· |
| | | //log.error(String.format(" ---->æ¶å°æ¥è¦æ°æ®:%s",JSON.toJSONString(alarmMap))); |
| | | /** |
| | | * |
| | | * 请å å
¥ä¸æ¹éææ¹çä¸å¡é»è¾ |
| | | * |
| | | */ |
| | | }else if("0401".equals(pushMsg.getCmd())) {//éä¼ æ¶æ¯ |
| | | Map<String,Object> dataMap = pushMsg.getJsonMap(); |
| | | String carName = MapUtil.getStrVal(dataMap, "carName","");//è·å车çå· |
| | | //log.error(String.format(" ---->æ¶å°éä¼ æ°æ®:%s",JSON.toJSONString(dataMap))); |
| | | /** |
| | | * |
| | | * 请å å
¥ä¸æ¹éææ¹çä¸å¡é»è¾ |
| | | * |
| | | */ |
| | | } |
| | | } |
| | | |
| | | public void sendMassage() { |
| | | try { |
| | | PushClientImplPosition client = new PushClientImplPosition(); |
| | | client.setLog(false);//æ¯å¦æå°ææ |
| | | client.setHost(this.ip);//æå¡å¨IP |
| | | client.setPort(10100);//æå¡å¨ç«¯å£ |
| | | client.setUserName(this.userId);//ç³»ç»ç¨æ·å |
| | | client.setPwd(this.password);//ç³»ç»ç¨æ·å¯ç |
| | | client.setSubMsgIds("0200");//订é
çå¨ææ¶æ¯ï¼å¤ä¸ªå¨ææ¶æ¯ä½¿ç¨|è¾åï¼å½åç¤ºä¾æ¯è®¢é
å®ä½æ¶æ¯(0x0200)åæ¥è¦æ¶æ¯(0x0300) |
| | | client.setDesc("æµè¯å®¢æ·ç«¯");//客æ·ç«¯çæè¿°ï¼ |
| | | client.start(); |
| | | while(true) { |
| | | Thread.sleep(1000); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void run() { |
| | | sendMassage(); |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.sy.mapper; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import com.ruoyi.sy.domain.ArdSyCar; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | |
| | | * @return |
| | | */ |
| | | List<ArdSyCar> carListById(String id); |
| | | |
| | | /** |
| | | * æ ¹æ®è½¦è¾idæ¥è¯¢ä¸ä¸è½¦è¾å对åºé¨é¨ |
| | | */ |
| | | public Map<String, Object> getArdSyCarAndDeptByCarId(String carId); |
| | | } |
| | |
| | | Map<String,Object> selectArdSyUserByUsersId(Integer usersId); |
| | | |
| | | ArdSyUser userById(String id); |
| | | |
| | | public List<ArdSyUser> selectSyUser(); |
| | | } |
| | |
| | | */ |
| | | public String uploadCarPicture(String id, MultipartFile carPicture); |
| | | |
| | | List<ArdSyCar> carListById(String id); |
| | | |
| | | /** |
| | | * æ ¹æ®è½¦è¾idæ¥è¯¢ä¸ä¸è½¦è¾å对åºé¨é¨ |
| | | */ |
| | | public Map<String,Object> getArdSyCarAndDeptByCarId(String carId); |
| | | |
| | | /** |
| | | * æ ¹æ®é¨é¨åé车è¾å®æ¶ä½ç½® |
| | | */ |
| | | public void sendArdSyCarPosition(); |
| | | // List<ArdSyCar> getArdSyCarWithRightByCarIdList(List<String> carIdList); |
| | | Results carListById(String id); |
| | | |
| | |
| | | Map<String,Object> selectArdSyUserByUsersId(Integer usersId); |
| | | |
| | | ArdSyUser userById(String id); |
| | | |
| | | /** |
| | | * æ¥è¯¢æªææ¥ä¸ä¸è½¦è¾è´¦å·å¯ç |
| | | */ |
| | | public List<ArdSyUser> selectSyUser(); |
| | | } |
| | |
| | | import java.util.function.Predicate; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.utils.uuid.IdUtils; |
| | | import com.ruoyi.common.websocket.util.WebSocketUtils; |
| | | import com.ruoyi.device.hiksdk.config.MinioClientSingleton; |
| | | import com.ruoyi.device.hiksdk.util.minio.MinioUtils; |
| | | import com.ruoyi.sy.domain.ArdSyUser; |
| | | import com.ruoyi.sy.gps31.PositionContainer; |
| | | import com.ruoyi.sy.mapper.ArdSyUserMapper; |
| | | import com.ruoyi.system.domain.SysConfig; |
| | | import com.ruoyi.system.mapper.SysConfigMapper; |
| | | import com.ruoyi.system.mapper.SysUserMapper; |
| | | import com.ruoyi.utils.httpclient.SYCarClient; |
| | | import com.ruoyi.utils.result.Constants; |
| | | import com.ruoyi.utils.result.Results; |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import static com.ruoyi.common.websocket.util.WebSocketUtils.ONLINE_USER_SESSIONS; |
| | | |
| | | /** |
| | | * ä¸ä¸è½¦è¾Serviceä¸å¡å±å¤ç |
| | | * |
| | |
| | | |
| | | @Resource |
| | | private ArdSyUserMapper ardSyUserMapper; |
| | | |
| | | @Resource |
| | | private SysUserMapper userMapper; |
| | | |
| | | |
| | | /** |
| | |
| | | // return result; |
| | | // } |
| | | |
| | | |
| | | @Override |
| | | public Results carListById(String id) { |
| | | try { |
| | |
| | | return Results.error(e.toString()); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Object> getArdSyCarAndDeptByCarId(String carId) { |
| | | Map<String, Object> result = ardSyCarMapper.getArdSyCarAndDeptByCarId(carId); |
| | | return result; |
| | | } |
| | | |
| | | @Override |
| | | public void sendArdSyCarPosition() { |
| | | for(String key : ONLINE_USER_SESSIONS.keySet()){ |
| | | SysUser sysUser = userMapper.selectUserById(key); |
| | | String deptId = String.valueOf(sysUser.getDeptId()); |
| | | Map<String,Map<String,Object>> map = PositionContainer.getDeptPositionMap().get(deptId); |
| | | List<Map<String,Object>> positionList = (List<Map<String, Object>>) map.values(); |
| | | if(positionList.size() != 0){ |
| | | Map<Integer,Object> data = new HashMap(); |
| | | data.put(30000,positionList); |
| | | WebSocketUtils.sendMessage(ONLINE_USER_SESSIONS.get(key), JSON.toJSONString(positionList)); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | public ArdSyUser userById(String id) { |
| | | return ardSyUserMapper.userById(id); |
| | | } |
| | | |
| | | @Override |
| | | public List<ArdSyUser> selectSyUser() { |
| | | List<ArdSyUser> result = ardSyUserMapper.selectSyUser(); |
| | | return result; |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.test; |
| | | |
| | | /** |
| | | * @Description: |
| | | * @ClassName: ReadAccessDatabase |
| | | * @Author: åèä¹ |
| | | * @Date: 2023å¹´07æ21æ¥16:00:57 |
| | | * @Version: 1.0 |
| | | **/ |
| | | |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.sql.*; |
| | | |
| | | public class ReadAccessDatabase { |
| | | |
| | | public static void main(String[] args) { |
| | | // å¤ä¸ªæ°æ®åºæä»¶è·¯å¾ |
| | | String[] dbPaths = { |
| | | "D:\\mdb\\éè·¯ä¸å¿çº¿.mdb", |
| | | "D:\\mdb\\é²é£æ-çæ¨.mdb", |
| | | // æ·»å æ´å¤çæ°æ®åºæä»¶è·¯å¾ |
| | | }; |
| | | |
| | | // éåæ¯ä¸ªæ°æ®åºæä»¶ |
| | | for (String dbPath : dbPaths) { |
| | | readDataFromAccessDatabase(dbPath); |
| | | } |
| | | } |
| | | |
| | | public static void readDataFromAccessDatabase(String dbPath) { |
| | | try { |
| | | // å è½½JDBCé©±å¨ |
| | | Class.forName("net.ucanaccess.jdbc.UcanaccessDriver"); |
| | | |
| | | // è¿æ¥Accessæ°æ®åº |
| | | String url = "jdbc:ucanaccess://" + dbPath + ";encoding=gb2312;"; |
| | | Connection connection = DriverManager.getConnection(url); |
| | | // è·åææè¡¨çå
æ°æ® |
| | | DatabaseMetaData metaData = connection.getMetaData(); |
| | | ResultSet tables = metaData.getTables(null, null, null, new String[]{"TABLE"}); |
| | | |
| | | // éå表 |
| | | while (tables.next()) { |
| | | String tableName = tables.getString("TABLE_NAME"); |
| | | if (!tableName.equals("éè·¯ä¸å¿çº¿")) { |
| | | continue; |
| | | } |
| | | System.out.println("表å: " + tableName); |
| | | |
| | | // è·å表çåæ®µå
æ°æ® |
| | | // ResultSet column = metaData.getColumns(null, null, tableName, null); |
| | | // éååæ®µ |
| | | // while (column.next()) { |
| | | // String columnName = column.getString("COLUMN_NAME"); |
| | | // System.out.println("åæ®µå: " + columnName); |
| | | // } |
| | | // column.close(); |
| | | // æ§è¡æ¥è¯¢æä½ |
| | | String sql = "SELECT * FROM " + tableName; // æ¿æ¢ä¸ºä½ è¦æ¥è¯¢ç表å |
| | | Statement statement = connection.createStatement(); |
| | | ResultSet resultSet = statement.executeQuery(sql); |
| | | // å¤çæ¥è¯¢ç»æ |
| | | while (resultSet.next()) { |
| | | // è¯»åæ¯ä¸è¡æ°æ® |
| | | String id = resultSet.getString(1); // æ ¹æ®è¡¨ä¸çååè·åæ°æ® |
| | | String name = resultSet.getString("ç¼å·"); |
| | | |
| | | // å¯ä»¥æ ¹æ®å
·ä½çè¡¨ç»æç»§ç»è·åå
¶ä»åæ®µçæ°æ® |
| | | |
| | | // å¨è¿éå¤çè·åå°çæ°æ®ï¼ä¾å¦è¾åºå°æ§å¶å°æä¿åå°éåä¸ |
| | | System.out.println("ID: " + id + ", Name: " + name); |
| | | } |
| | | // å
³éè¿æ¥ |
| | | resultSet.close(); |
| | | statement.close(); |
| | | } |
| | | tables.close(); |
| | | connection.close(); |
| | | } catch (ClassNotFoundException | SQLException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.app.mapper.ArdAppPositionMapper"> |
| | | <mapper namespace="com.ruoyi.app.position.mapper.ArdAppPositionMapper"> |
| | | <resultMap type="ArdAppPosition" id="ArdAppPositionResult"> |
| | | <result property="id" column="id"/> |
| | | <result property="userId" column="user_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.ruoyi.app.task.mapper.ArdAppTaskMapper"> |
| | | |
| | | <resultMap type="ArdAppTask" id="ArdAppTaskResult"> |
| | | <result property="id" column="id"/> |
| | | <result property="name" column="name"/> |
| | | <result property="text" column="text"/> |
| | | <result property="voice" column="voice"/> |
| | | <result property="deptId" column="dept_id"/> |
| | | <result property="userId" column="user_id"/> |
| | | <result property="createBy" column="create_by"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="ArdAppTaskArdAppTaskPicResult" type="ArdAppTask" extends="ArdAppTaskResult"> |
| | | <collection property="ardAppTaskPicList" notNullColumn="sub_id" javaType="java.util.List" |
| | | resultMap="ArdAppTaskPicResult"/> |
| | | </resultMap> |
| | | <resultMap id="ArdAppTaskArdAppTaskDetailResult" type="ArdAppTask" extends="ArdAppTaskResult"> |
| | | <collection property="ardAppTaskDetailList" notNullColumn="sub_id" javaType="java.util.List" |
| | | resultMap="ArdAppTaskDetailResult"/> |
| | | </resultMap> |
| | | |
| | | <resultMap type="ArdAppTaskDetail" id="ArdAppTaskDetailResult"> |
| | | <result property="id" column="sub_id"/> |
| | | <result property="name" column="sub_name"/> |
| | | <result property="longitude" column="sub_longitude"/> |
| | | <result property="latitude" column="sub_latitude"/> |
| | | <result property="altitude" column="sub_altitude"/> |
| | | <result property="userId" column="sub_user_id"/> |
| | | <result property="text" column="sub_text"/> |
| | | <result property="voice" column="sub_voice"/> |
| | | <result property="taskId" column="sub_task_id"/> |
| | | </resultMap> |
| | | <resultMap type="ArdAppTaskPic" id="ArdAppTaskPicResult"> |
| | | <result property="id" column="sub_id"/> |
| | | <result property="taskId" column="sub_task_id"/> |
| | | <result property="picUrl" column="sub_pic_url"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectArdAppTaskVo"> |
| | | select c.id, |
| | | c.name, |
| | | c.text, |
| | | c.voice, |
| | | c.dept_id, |
| | | c.user_id, |
| | | c.create_by, |
| | | c.create_time, |
| | | c.update_by, |
| | | c.update_time |
| | | from ard_app_task c |
| | | left join sys_dept d on d.dept_id = c.dept_id |
| | | left join sys_user u on u.user_id = c.user_id |
| | | </sql> |
| | | |
| | | <select id="selectArdAppTaskList" parameterType="ArdAppTask" resultMap="ArdAppTaskResult"> |
| | | <include refid="selectArdAppTaskVo"/> |
| | | <where> |
| | | <if test="name != null and name != ''">and name like '%'||#{name}||'%'</if> |
| | | <if test="text != null and text != ''">and text = #{text}</if> |
| | | <if test="voice != null and voice != ''">and voice = #{voice}</if> |
| | | <if test="deptId != null ">and (c.dept_id = #{deptId} OR c.dept_id IN ( SELECT t.dept_id FROM sys_dept t |
| | | WHERE cast(#{deptId} as varchar) = any(string_to_array(ancestors,',')) )) |
| | | </if> |
| | | <if test="userId != null and userId != ''">and user_id = #{userId}</if> |
| | | <!-- æ°æ®èå´è¿æ»¤ --> |
| | | ${params.dataScope} |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectArdAppTaskById" parameterType="String" resultMap="ArdAppTaskArdAppTaskPicResult"> |
| | | select a.id, |
| | | a.name, |
| | | a.text, |
| | | a.voice, |
| | | a.dept_id, |
| | | a.user_id, |
| | | a.create_by, |
| | | a.create_time, |
| | | a.update_by, |
| | | a.update_time, |
| | | b.id as sub_id, |
| | | b.task_id as sub_task_id, |
| | | b.pic_url as sub_pic_url |
| | | from ard_app_task a |
| | | left join ard_app_task_pic b on b.task_id = a.id |
| | | left join ard_app_task_detail c on c.task_id = a.id |
| | | where a.id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertArdAppTask" parameterType="ArdAppTask"> |
| | | insert into ard_app_task |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="name != null">name,</if> |
| | | <if test="text != null">text,</if> |
| | | <if test="voice != null">voice,</if> |
| | | <if test="deptId != null">dept_id,</if> |
| | | <if test="userId != null">user_id,</if> |
| | | <if test="createBy != null">create_by,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateBy != null">update_by,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id},</if> |
| | | <if test="name != null">#{name},</if> |
| | | <if test="text != null">#{text},</if> |
| | | <if test="voice != null">#{voice},</if> |
| | | <if test="deptId != null">#{deptId},</if> |
| | | <if test="userId != null">#{userId},</if> |
| | | <if test="createBy != null">#{createBy},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="updateBy != null">#{updateBy},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateArdAppTask" parameterType="ArdAppTask"> |
| | | update ard_app_task |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="name != null">name = #{name},</if> |
| | | <if test="text != null">text = #{text},</if> |
| | | <if test="voice != null">voice = #{voice},</if> |
| | | <if test="deptId != null">dept_id = #{deptId},</if> |
| | | <if test="userId != null">user_id = #{userId},</if> |
| | | <if test="createBy != null">create_by = #{createBy},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="updateBy != null">update_by = #{updateBy},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteArdAppTaskById" parameterType="String"> |
| | | delete |
| | | from ard_app_task |
| | | where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteArdAppTaskByIds" parameterType="String"> |
| | | delete from ard_app_task where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | | <delete id="deleteArdAppTaskPicByTaskIds" parameterType="String"> |
| | | delete from ard_app_task_pic where task_id in |
| | | <foreach item="taskId" collection="array" open="(" separator="," close=")"> |
| | | #{taskId} |
| | | </foreach> |
| | | </delete> |
| | | |
| | | <delete id="deleteArdAppTaskPicByTaskId" parameterType="String"> |
| | | delete |
| | | from ard_app_task_pic |
| | | where task_id = #{taskId} |
| | | </delete> |
| | | |
| | | <insert id="batchArdAppTaskPic"> |
| | | insert into ard_app_task_pic( id, task_id, pic_url) values |
| | | <foreach item="item" index="index" collection="list" separator=","> |
| | | ( #{item.id}, #{item.taskId}, #{item.picUrl}) |
| | | </foreach> |
| | | </insert> |
| | | <delete id="deleteArdAppTaskDetailByTaskIds" parameterType="String"> |
| | | delete from ard_app_task_detail where task_id in |
| | | <foreach item="taskId" collection="array" open="(" separator="," close=")"> |
| | | #{taskId} |
| | | </foreach> |
| | | </delete> |
| | | |
| | | <delete id="deleteArdAppTaskDetailByTaskId" parameterType="String"> |
| | | delete from ard_app_task_detail where task_id = #{taskId} |
| | | </delete> |
| | | |
| | | <insert id="batchArdAppTaskDetail"> |
| | | insert into ard_app_task_detail( id, name, longitude, latitude, altitude, user_id, text, voice, task_id) values |
| | | <foreach item="item" index="index" collection="list" separator=","> |
| | | ( #{item.id}, #{item.name}, #{item.longitude}, #{item.latitude}, #{item.altitude}, #{item.userId}, #{item.text}, #{item.voice}, #{item.taskId}) |
| | | </foreach> |
| | | </insert> |
| | | </mapper> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.ruoyi.app.tasktext.mapper.ArdAppTaskTextMapper"> |
| | | |
| | | <resultMap type="ArdAppTaskText" id="ArdAppTaskTextResult"> |
| | | <result property="userId" column="user_id" /> |
| | | <result property="text" column="text" /> |
| | | <result property="id" column="id" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectArdAppTaskTextVo"> |
| | | select user_id, text, id from ard_app_task_text |
| | | </sql> |
| | | |
| | | <select id="selectArdAppTaskTextList" parameterType="ArdAppTaskText" resultMap="ArdAppTaskTextResult"> |
| | | <include refid="selectArdAppTaskTextVo"/> |
| | | <where> |
| | | <if test="userId != null and userId != ''"> and user_id = #{userId}</if> |
| | | <if test="text != null and text != ''"> and text = #{text}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectArdAppTaskTextByUserId" parameterType="String" resultMap="ArdAppTaskTextResult"> |
| | | <include refid="selectArdAppTaskTextVo"/> |
| | | where user_id = #{userId} |
| | | </select> |
| | | |
| | | <insert id="insertArdAppTaskText" parameterType="ArdAppTaskText"> |
| | | insert into ard_app_task_text |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="userId != null">user_id,</if> |
| | | <if test="text != null">text,</if> |
| | | <if test="id != null">id,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="userId != null">#{userId},</if> |
| | | <if test="text != null">#{text},</if> |
| | | <if test="id != null">#{id},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateArdAppTaskText" parameterType="ArdAppTaskText"> |
| | | update ard_app_task_text |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="text != null">text = #{text},</if> |
| | | <if test="id != null">id = #{id},</if> |
| | | </trim> |
| | | where user_id = #{userId} |
| | | </update> |
| | | |
| | | <delete id="deleteArdAppTaskTextByUserId" parameterType="String"> |
| | | delete from ard_app_task_text where user_id = #{userId} |
| | | </delete> |
| | | |
| | | <delete id="deleteArdAppTaskTextByUserIds" parameterType="String"> |
| | | delete from ard_app_task_text where user_id in |
| | | <foreach item="userId" collection="array" open="(" separator="," close=")"> |
| | | #{userId} |
| | | </foreach> |
| | | </delete> |
| | | </mapper> |
| | |
| | | <select id="carListById" parameterType="String" resultMap="ArdSyCarResult"> |
| | | select * from ard_sy_car where id = #{id} |
| | | </select> |
| | | <select id="getArdSyCarAndDeptByCarId" parameterType="String" resultType="java.util.Map"> |
| | | select asc0.id,asc0.car_id as "carId",coalesce(asc0.car_model,'') as "carModel", |
| | | coalesce(asc0.car_type,'') as "carType",coalesce(asc0.car_brand,'') as "carBrand", |
| | | asc0.dept_id as "deptId",asc0.car_picture as "carPicture",sd.ancestors, |
| | | sd.dept_name as "deptName" from ard_sy_car asc0 |
| | | inner join sys_dept sd on asc0.dept_id = sd.dept_id |
| | | where asc0.car_id = #{carId} |
| | | </select> |
| | | </mapper> |
| | |
| | | <include refid="selectArdSyUserVo"/> |
| | | where sys_user_id = #{id} |
| | | </select> |
| | | <select id="selectSyUser" resultMap="ArdSyUserResult"> |
| | | select distinct asu.user_id,asu.password from ard_sy_user asu |
| | | </select> |
| | | </mapper> |
| | |
| | | # Enable the HTTP API. |
| | | api: yes |
| | | # Address of the API listener. |
| | | apiAddress: 192.168.1.227:9997 |
| | | apiAddress: 127.0.0.1:9997 |
| | | |
| | | # Enable Prometheus-compatible metrics. |
| | | metrics: no |
| | | # Address of the metrics listener. |
| | | metricsAddress: 192.168.1.227:9998 |
| | | metricsAddress: 127.0.0.1:9998 |
| | | |
| | | # Enable pprof-compatible endpoint to monitor performances. |
| | | pprof: no |
| | | # Address of the pprof listener. |
| | | pprofAddress: 192.168.1.227:9999 |
| | | pprofAddress: 127.0.0.1:9999 |
| | | |
| | | # Command to run when a client connects to the server. |
| | | # Prepend ./ to run an executable in the current folder (example: "./ffmpeg") |
| | |
| | | # Available values are "no", "strict", "optional". |
| | | encryption: "no" |
| | | # Address of the TCP/RTSP listener. This is needed only when encryption is "no" or "optional". |
| | | rtspAddress: :8554 |
| | | rtspAddress: :7554 |
| | | # Address of the TCP/TLS/RTSPS listener. This is needed only when encryption is "strict" or "optional". |
| | | rtspsAddress: :8322 |
| | | rtspsAddress: :7322 |
| | | # Address of the UDP/RTP listener. This is needed only when "udp" is in protocols. |
| | | rtpAddress: :8000 |
| | | rtpAddress: :7000 |
| | | # Address of the UDP/RTCP listener. This is needed only when "udp" is in protocols. |
| | | rtcpAddress: :8001 |
| | | rtcpAddress: :7001 |
| | | # IP range of all UDP-multicast listeners. This is needed only when "multicast" is in protocols. |
| | | multicastIPRange: 224.1.0.0/16 |
| | | # Port of all UDP-multicast/RTP listeners. This is needed only when "multicast" is in protocols. |
| | | multicastRTPPort: 8002 |
| | | multicastRTPPort: 7002 |
| | | # Port of all UDP-multicast/RTCP listeners. This is needed only when "multicast" is in protocols. |
| | | multicastRTCPPort: 8003 |
| | | multicastRTCPPort: 7003 |
| | | # Path to the server key. This is needed only when encryption is "strict" or "optional". |
| | | # This can be generated with: |
| | | # openssl genrsa -out server.key 2048 |
| | |
| | | # RTMP parameters |
| | | |
| | | # Disable support for the RTMP protocol. |
| | | rtmpDisable: no |
| | | rtmpDisable: yes |
| | | # Address of the RTMP listener. This is needed only when encryption is "no" or "optional". |
| | | rtmpAddress: :1935 |
| | | # Encrypt connections with TLS (RTMPS). |
| | |
| | | # HLS parameters |
| | | |
| | | # Disable support for the HLS protocol. |
| | | hlsDisable: no |
| | | hlsDisable: yes |
| | | # Address of the HLS listener. |
| | | hlsAddress: :8888 |
| | | # Enable TLS/HTTPS on the HLS server. |
| | |
| | | # WebRTC parameters |
| | | |
| | | # Disable support for the WebRTC protocol. |
| | | webrtcDisable: no |
| | | webrtcDisable: yes |
| | | # Address of the WebRTC listener. |
| | | webrtcAddress: :8889 |
| | | # Enable TLS/HTTPS on the WebRTC server. |
| | |
| | | * @return ç¨æ·ä¿¡æ¯éåä¿¡æ¯ |
| | | */ |
| | | public List<SysUser> selectUserList(SysUser sysUser); |
| | | |
| | | /** |
| | | * æ ¹æ®æ¡ä»¶å页æ¥è¯¢APPç¨æ·å表 |
| | | * |
| | | * @param sysUser APPç¨æ·ä¿¡æ¯ |
| | | * @return ç¨æ·ä¿¡æ¯éåä¿¡æ¯ |
| | | */ |
| | | public List<SysUser> selectAppUserList(SysUser sysUser); |
| | | /** |
| | | * æ ¹æ®æ¡ä»¶å页æ¥è¯¢å·²é
ç¨æ·è§è²å表 |
| | | * |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | |
| | |
| | | * @return ç¨æ·ä¿¡æ¯éåä¿¡æ¯ |
| | | */ |
| | | public List<SysUser> selectUserList(SysUser user); |
| | | |
| | | /** |
| | | * æ ¹æ®æ¡ä»¶å页æ¥è¯¢APPç¨æ·å表 |
| | | * |
| | | * @param user APPç¨æ·ä¿¡æ¯ |
| | | * @return ç¨æ·ä¿¡æ¯éåä¿¡æ¯ |
| | | */ |
| | | public List<SysUser> selectAppUserList(SysUser user); |
| | | |
| | | /** |
| | | * æ ¹æ®æ¡ä»¶å页æ¥è¯¢å·²åé
ç¨æ·è§è²å表 |
| | |
| | | * @param userIds ç¨æ·idæ°ç» |
| | | */ |
| | | public void clearUserCache(String[] userIds); |
| | | |
| | | } |
| | |
| | | public List<SysUser> selectUserList(SysUser user) { |
| | | return userMapper.selectUserList(user); |
| | | } |
| | | @Override |
| | | @DataScope(deptAlias = "d", userAlias = "u") |
| | | public List<SysUser> selectAppUserList(SysUser user) { |
| | | return userMapper.selectAppUserList(user); |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®æ¡ä»¶å页æ¥è¯¢å·²åé
ç¨æ·è§è²å表 |
| | |
| | | <!-- æ°æ®èå´è¿æ»¤ --> |
| | | ${params.dataScope} |
| | | </select> |
| | | |
| | | <select id="selectAppUserList" parameterType="SysUser" resultMap="SysUserResult"> |
| | | <include refid="selectUserVo"/> |
| | | where u.del_flag = '0' |
| | | and LOWER(r.role_name) like '%app%' |
| | | <if test="deptId != null and deptId != 0"> |
| | | AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE cast(#{deptId} as |
| | | varchar) = any(string_to_array(ancestors,',')) )) |
| | | </if> |
| | | <!-- æ°æ®èå´è¿æ»¤ --> |
| | | ${params.dataScope} |
| | | </select> |
| | | <select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult"> |
| | | select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time |
| | | from sys_user u |