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 |