parent
2ad098eb9f
commit
9b15da3af9
@ -0,0 +1,82 @@
|
||||
package com.ruoyi.ykmap.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.DataSource;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.DataSourceType;
|
||||
import com.ruoyi.ykmap.entity.response.*;
|
||||
import com.ruoyi.ykmap.service.LineService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 大屏线路接口
|
||||
* @author du
|
||||
* @since 2024/8/14 10:40
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/ykmap/line")
|
||||
@Api(tags = "大屏线路接口")
|
||||
public class LineController extends BaseController {
|
||||
|
||||
@Resource
|
||||
private LineService lineService;
|
||||
|
||||
@ApiOperation(value = "根据车辆id查询线路,装备,人员,标的物", response = GetCarIdInfoResponse.class)
|
||||
@GetMapping("/getCarIdInfo/{id}")
|
||||
public AjaxResult getCarIdInfo(@PathVariable String id) {
|
||||
return success(lineService.getCarIdInfo(id));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "任务明细弹窗线路信息", response = SelectLineInfoResponse.class)
|
||||
@GetMapping("/selectLineInfo/{id}")
|
||||
public AjaxResult selectLineInfo(@PathVariable String id) {
|
||||
return success(lineService.selectLineInfo(id));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "任务明细弹窗装备信息", response = EquipResponse.class)
|
||||
@GetMapping("/equip/{id}")
|
||||
public AjaxResult equip(@PathVariable String id) {
|
||||
return success(lineService.equip(id));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "任务明细弹窗人员信息", response = UserInfoResponse.class)
|
||||
@GetMapping("/userInfo/{id}")
|
||||
public AjaxResult userInfo(@PathVariable String id) {
|
||||
return success(lineService.userInfo(id));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "任务明细弹窗标的物信息", response = ItemsResponse.class)
|
||||
@GetMapping("/items/{id}")
|
||||
public AjaxResult items(@PathVariable String id) {
|
||||
return success(lineService.items(id));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "线路模板具体信息", response = LineTemplateResponse.class)
|
||||
@GetMapping("/lineTemplate")
|
||||
@DataSource(value = DataSourceType.SLAVE)
|
||||
public AjaxResult lineTemplate(String area) {
|
||||
return success(lineService.lineTemplate(area));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "业务已覆盖省份清单", response = SearchCityResponse.class)
|
||||
@GetMapping("/searchCity")
|
||||
@DataSource(value = DataSourceType.SLAVE)
|
||||
public AjaxResult searchCity() {
|
||||
return success(lineService.searchCity());
|
||||
}
|
||||
|
||||
@ApiOperation(value = "业务已覆盖省份个数", response = SearchCityCountResponse.class)
|
||||
@GetMapping("/searchCityCount")
|
||||
@DataSource(value = DataSourceType.SLAVE)
|
||||
public AjaxResult searchCityCount() {
|
||||
return success(lineService.searchCityCount());
|
||||
}
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package com.ruoyi.ykmap.entity.response;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 任务装备返回体
|
||||
* @author du
|
||||
* @since 2024/8/14 11:06
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("任务装备返回体")
|
||||
public class EquipResponse {
|
||||
|
||||
/**
|
||||
* 装备名称
|
||||
*/
|
||||
@ApiModelProperty("装备名称")
|
||||
private String thingType;
|
||||
|
||||
/**
|
||||
* 装备类型
|
||||
*/
|
||||
@ApiModelProperty("装备类型")
|
||||
private String type;
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
package com.ruoyi.ykmap.entity.response;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 根据车辆id查询线路,装备,人员,标的物
|
||||
* @author du
|
||||
* @since 2024/8/15 9:29
|
||||
*/
|
||||
@Data
|
||||
public class GetCarIdInfoResponse {
|
||||
|
||||
/**
|
||||
* 线路类型
|
||||
*/
|
||||
@ApiModelProperty("线路类型")
|
||||
private String lineType;
|
||||
|
||||
|
||||
/**
|
||||
* 装备信息
|
||||
*/
|
||||
@ApiModelProperty("装备信息")
|
||||
private List<EquipResponse> zbList;
|
||||
|
||||
/**
|
||||
* 人员信息
|
||||
*/
|
||||
@ApiModelProperty("人员信息")
|
||||
private List<UserInfoResponse> userList;
|
||||
|
||||
/**
|
||||
* 标的物
|
||||
*/
|
||||
@ApiModelProperty("标的物")
|
||||
private ItemsResponse bdwInfo;
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.ruoyi.ykmap.entity.response;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 标的物信息返回体
|
||||
* @author du
|
||||
* @since 2024/8/14 11:18
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("标的物信息返回体")
|
||||
public class ItemsResponse {
|
||||
|
||||
@ApiModelProperty("数量")
|
||||
private Integer count;
|
||||
}
|
@ -0,0 +1,57 @@
|
||||
package com.ruoyi.ykmap.entity.response;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 线路模板具体信息返回体
|
||||
* @author du
|
||||
* @since 2024/8/14 15:09
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("线路模板具体信息返回体")
|
||||
public class LineTemplateResponse {
|
||||
|
||||
/**
|
||||
* 区域
|
||||
*/
|
||||
@ApiModelProperty("区域")
|
||||
private String area;
|
||||
|
||||
/**
|
||||
* 线路总数
|
||||
*/
|
||||
@ApiModelProperty("线路总数")
|
||||
private Integer lineNum;
|
||||
|
||||
/**
|
||||
* 营业网点总数
|
||||
*/
|
||||
@ApiModelProperty("营业网点总数")
|
||||
private Integer yywdzs;
|
||||
|
||||
/**
|
||||
* 上门收款点总数
|
||||
*/
|
||||
@ApiModelProperty("上门收款点总数")
|
||||
private Integer skdNum;
|
||||
|
||||
/**
|
||||
* ATM机总数
|
||||
*/
|
||||
@ApiModelProperty("ATM机总数")
|
||||
private Integer atmNum;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty("创建时间")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.ruoyi.ykmap.entity.response;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 业务已覆盖省份清单数量
|
||||
* @author du
|
||||
* @since 2024/8/14 17:08
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("业务已覆盖省份清单数量")
|
||||
public class SearchCityCountResponse {
|
||||
|
||||
/**
|
||||
* 个数
|
||||
*/
|
||||
@ApiModelProperty("个数")
|
||||
private Integer count;
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.ruoyi.ykmap.entity.response;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 业务已覆盖省份清单
|
||||
* @author du
|
||||
* @since 2024/8/14 16:04
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("业务已覆盖省份清单")
|
||||
public class SearchCityResponse {
|
||||
|
||||
/**
|
||||
* 省份
|
||||
*/
|
||||
@ApiModelProperty("省份")
|
||||
private String city;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty("创建时间")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package com.ruoyi.ykmap.entity.response;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 线路信息返回体
|
||||
* @author du
|
||||
* @since 2024/8/14 10:51
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("线路信息返回体")
|
||||
public class SelectLineInfoResponse {
|
||||
/**
|
||||
* 任务名称
|
||||
*/
|
||||
@ApiModelProperty("任务名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 任务类型
|
||||
*/
|
||||
@ApiModelProperty("任务类型")
|
||||
private String type;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.ruoyi.ykmap.entity.response;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 人员信息返回体
|
||||
* @author du
|
||||
* @since 2024/8/14 11:10
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("人员信息返回体")
|
||||
public class UserInfoResponse {
|
||||
|
||||
/**
|
||||
* 人员信息
|
||||
*/
|
||||
@ApiModelProperty("人员信息")
|
||||
private String ename;
|
||||
|
||||
/**
|
||||
* 职位名称
|
||||
*/
|
||||
@ApiModelProperty("职位名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@ApiModelProperty("排序")
|
||||
private Integer orderNum;
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package com.ruoyi.ykmap.mapper;
|
||||
|
||||
import com.ruoyi.ykmap.entity.response.*;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 大屏线路数据层
|
||||
*
|
||||
* @author du
|
||||
* @since 2024/8/13 9:49
|
||||
*/
|
||||
public interface LineMapper{
|
||||
|
||||
|
||||
/**
|
||||
* 任务明细弹窗线路信息
|
||||
*/
|
||||
SelectLineInfoResponse selectLineInfo(String id);
|
||||
|
||||
/**
|
||||
* 任务明细弹窗装备信息
|
||||
*/
|
||||
List<EquipResponse> equip(String id);
|
||||
|
||||
/**
|
||||
* 任务明细弹窗人员信息
|
||||
*/
|
||||
List<UserInfoResponse> userInfo(String id);
|
||||
|
||||
/**
|
||||
* 任务明细弹窗标的物信息
|
||||
*/
|
||||
ItemsResponse items(String id);
|
||||
|
||||
/**
|
||||
* 线路模板具体信息
|
||||
*/
|
||||
List<LineTemplateResponse> lineTemplate(@Param("area") String area,@Param("a1") LocalDate a1, @Param("a2")LocalDate a2);
|
||||
|
||||
|
||||
/**
|
||||
* 业务已覆盖省份清单
|
||||
*/
|
||||
List<SearchCityResponse> searchCity(@Param("a1") LocalDate a1, @Param("a2")LocalDate a2);
|
||||
|
||||
/**
|
||||
* 业务已覆盖省份个数
|
||||
*/
|
||||
SearchCityCountResponse searchCityCount(@Param("a1") LocalDate a1, @Param("a2")LocalDate a2);
|
||||
|
||||
String getByCarId(String id);
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
package com.ruoyi.ykmap.service;
|
||||
|
||||
import com.ruoyi.ykmap.entity.response.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 大屏线路业务层
|
||||
* @author du
|
||||
* @since 2024/8/14 10:43
|
||||
*/
|
||||
public interface LineService {
|
||||
|
||||
/**
|
||||
* 任务明细弹窗线路信息
|
||||
*/
|
||||
SelectLineInfoResponse selectLineInfo(String id);
|
||||
|
||||
|
||||
/**
|
||||
* 任务明细弹窗装备信息
|
||||
*/
|
||||
List<EquipResponse> equip(String id);
|
||||
|
||||
/**
|
||||
* 任务明细弹窗人员信息
|
||||
*/
|
||||
List<UserInfoResponse> userInfo(String id);
|
||||
|
||||
/**
|
||||
* 任务明细弹窗标的物信息
|
||||
*/
|
||||
ItemsResponse items(String id);
|
||||
|
||||
/**
|
||||
* 线路模板具体信息
|
||||
*/
|
||||
List<LineTemplateResponse> lineTemplate(String area);
|
||||
|
||||
/**
|
||||
* 业务已覆盖省份清单
|
||||
*/
|
||||
List<SearchCityResponse> searchCity();
|
||||
|
||||
/**
|
||||
* 业务已覆盖省份个数
|
||||
*/
|
||||
SearchCityCountResponse searchCityCount();
|
||||
|
||||
|
||||
/**
|
||||
* 根据车辆id查询线路,装备,人员,标的
|
||||
*/
|
||||
GetCarIdInfoResponse getCarIdInfo(String id);
|
||||
}
|
@ -0,0 +1,125 @@
|
||||
package com.ruoyi.ykmap.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.ruoyi.ykmap.entity.response.*;
|
||||
import com.ruoyi.ykmap.mapper.LineMapper;
|
||||
import com.ruoyi.ykmap.service.LineService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 大屏线路业务处理层
|
||||
*
|
||||
* @author du
|
||||
* @since 2024/8/14 10:44
|
||||
*/
|
||||
@Service
|
||||
public class LineServiceImpl implements LineService {
|
||||
|
||||
@Resource
|
||||
private LineMapper lineMapper;
|
||||
|
||||
/**
|
||||
* 任务明细弹窗线路信息
|
||||
*/
|
||||
@Override
|
||||
public SelectLineInfoResponse selectLineInfo(String id) {
|
||||
return lineMapper.selectLineInfo(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 任务明细弹窗装备信息
|
||||
*/
|
||||
@Override
|
||||
public List<EquipResponse> equip(String id) {
|
||||
return lineMapper.equip(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 任务明细弹窗人员信息
|
||||
*/
|
||||
@Override
|
||||
public List<UserInfoResponse> userInfo(String id) {
|
||||
return lineMapper.userInfo(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 任务明细弹窗标的物信息
|
||||
*/
|
||||
@Override
|
||||
public ItemsResponse items(String id) {
|
||||
return lineMapper.items(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 线路模板具体信息
|
||||
*/
|
||||
@Override
|
||||
public List<LineTemplateResponse> lineTemplate(String area) {
|
||||
LocalDate now = LocalDate.now();
|
||||
if (now.getDayOfMonth() < 26) {
|
||||
LocalDate a1 = now.minusMonths(2).withDayOfMonth(26);
|
||||
LocalDate a2 = now.minusMonths(1).withDayOfMonth(25);
|
||||
return lineMapper.lineTemplate(area, a1, a2);
|
||||
} else {
|
||||
LocalDate a1 = now.minusMonths(1).withDayOfMonth(26);
|
||||
LocalDate a2 = now.withDayOfMonth(25);
|
||||
return lineMapper.lineTemplate(area, a1, a2);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 业务已覆盖省份清单
|
||||
*/
|
||||
@Override
|
||||
public List<SearchCityResponse> searchCity() {
|
||||
LocalDate now = LocalDate.now();
|
||||
if (now.getDayOfMonth() < 26) {
|
||||
LocalDate a1 = now.minusMonths(2).withDayOfMonth(26);
|
||||
LocalDate a2 = now.minusMonths(1).withDayOfMonth(25);
|
||||
return lineMapper.searchCity(a1, a2);
|
||||
} else {
|
||||
LocalDate a1 = now.minusMonths(1).withDayOfMonth(26);
|
||||
LocalDate a2 = now.withDayOfMonth(25);
|
||||
return lineMapper.searchCity(a1, a2);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 业务已覆盖省份个数
|
||||
*/
|
||||
@Override
|
||||
public SearchCityCountResponse searchCityCount() {
|
||||
LocalDate now = LocalDate.now();
|
||||
if (now.getDayOfMonth() < 26) {
|
||||
LocalDate a1 = now.minusMonths(2).withDayOfMonth(26);
|
||||
LocalDate a2 = now.minusMonths(1).withDayOfMonth(25);
|
||||
return lineMapper.searchCityCount(a1, a2);
|
||||
} else {
|
||||
LocalDate a1 = now.minusMonths(1).withDayOfMonth(26);
|
||||
LocalDate a2 = now.withDayOfMonth(25);
|
||||
return lineMapper.searchCityCount(a1, a2);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据车辆id查询线路,装备,人员,标的
|
||||
*/
|
||||
@Override
|
||||
public GetCarIdInfoResponse getCarIdInfo(String id) {
|
||||
//获取该车辆的任务id
|
||||
String bcs = lineMapper.getByCarId(id);
|
||||
GetCarIdInfoResponse res = new GetCarIdInfoResponse();
|
||||
res.setZbList(lineMapper.equip(bcs));
|
||||
res.setUserList(lineMapper.userInfo(bcs));
|
||||
res.setBdwInfo(lineMapper.items(bcs));
|
||||
SelectLineInfoResponse se = lineMapper.selectLineInfo(bcs);
|
||||
if (BeanUtil.isNotEmpty(se)) {
|
||||
res.setLineType(se.getType());
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
<?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.ykmap.mapper.YxlglMapper">
|
||||
<select id="page" resultType="com.ruoyi.ykmap.entity.Yxlgl">
|
||||
select *
|
||||
from zyk_yygl_xlgl.exl_operation_line_data
|
||||
<where>
|
||||
<if test="req.lineType != null and req.lineType != '' ">
|
||||
and line_type like concat('%',#{req.lineType},'%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,10 @@
|
||||
<?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.ykmap.mapper.YywtzMapper">
|
||||
<select id="page" resultType="com.ruoyi.ykmap.entity.Yywtz">
|
||||
select *
|
||||
from zyk_yygl_ywtz.exl_operation_expansion_data
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,10 @@
|
||||
<?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.ykmap.mapper.YywzlMapper">
|
||||
<select id="page" resultType="com.ruoyi.ykmap.entity.Yywzl">
|
||||
select *
|
||||
from zyk_yygl_xlgl.exl_operation_overview_data_route
|
||||
</select>
|
||||
</mapper>
|
Loading…
Reference in new issue