| | |
| | | import org.springblade.modules.trar.vo.TrarVO; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.Valid; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * 轨迹记录 |
| | | * 人员轨迹记录 |
| | | * |
| | | * @author BladeX |
| | | * @since 2022-01-06 |
| | |
| | | |
| | | /** |
| | | * 轨迹路线查询 |
| | | * |
| | | * @param rid |
| | | * @param uid |
| | | * @return |
| | |
| | | return R.data(trarService.selectList(rid,uid)); |
| | | } |
| | | |
| | | /** |
| | | * 轨迹路线查询 |
| | | * |
| | | * @param rid |
| | | * @param uid |
| | | * @return |
| | | */ |
| | | @GetMapping("/selectLists") |
| | | public String selectLists(String rid, String uid, HttpServletResponse response) { |
| | | //设置响应头 |
| | | response.setHeader("Access-Control-Allow-Origin", "*"); |
| | | String begin="LINESTRING("; |
| | | String end=")"; |
| | | String url =""; |
| | | List<Trar> list = trarService.selectList(rid, uid); |
| | | for (int i=0;i<list.size();i++){ |
| | | String jd = list.get(i).getJd(); |
| | | String wd = list.get(i).getWd(); |
| | | url+=jd+" "+wd+","; |
| | | } |
| | | String substring = url.substring(0, url.length() - 1); |
| | | String s = begin + substring + end; |
| | | System.out.println(s); |
| | | return s; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | List<TrarVO> selectTrarPage(IPage page, TrarVO trar); |
| | | List selectList(String rid, String uid); |
| | | List<Trar> selectList(String rid, String uid); |
| | | } |
| | |
| | | where is_deleted = 0 |
| | | </select> |
| | | |
| | | <select id="selectList" resultType="java.util.HashMap"> |
| | | <select id="selectList" resultMap="trarResultMap"> |
| | | select jd, wd |
| | | from sys_trar |
| | | where rid = #{rid} |
| | |
| | | */ |
| | | IPage<TrarVO> selectTrarPage(IPage<TrarVO> page, TrarVO trar); |
| | | |
| | | List selectList(String rid, String uid); |
| | | List<Trar> selectList(String rid, String uid); |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List selectList(String rid, String uid) { |
| | | public List<Trar> selectList(String rid, String uid) { |
| | | return baseMapper.selectList(rid,uid); |
| | | } |
| | | |
| | |
| | | |
| | | url: jdbc:mysql://223.82.109.183:2083/qfqkpublic?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true |
| | | username: root |
| | | password: zhba0728 |
| | | password: ZHba@0112 |
| | | |
| | | # url: jdbc:mysql://47.49.36.191:3306/qfqkpublic?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true |
| | | # username: root |