parent
53f02bb9c0
commit
45a91d0af6
28 changed files with 903 additions and 61 deletions
@ -0,0 +1,179 @@ |
||||
package com.hisense.hiatmp.server_api.controller; |
||||
|
||||
import com.github.pagehelper.PageHelper; |
||||
import com.github.pagehelper.PageInfo; |
||||
import com.hisense.hiatmp.model.common.DTO.ThtTricycleInfoBaseDTO; |
||||
import com.hisense.hiatmp.model.common.HighDangerBase; |
||||
import com.hisense.hiatmp.model.common.Operator; |
||||
import com.hisense.hiatmp.model.common.ServerResponse; |
||||
import com.hisense.hiatmp.model.common.VO.TricycleListVO; |
||||
import com.hisense.hiatmp.model.common.VO.TricycleWarningListVO; |
||||
import com.hisense.hiatmp.model.common.enums.RoleEnum; |
||||
import com.hisense.hiatmp.model.dmr.EnumType; |
||||
import com.hisense.hiatmp.server_api.service.OperatorService; |
||||
import com.hisense.hiatmp.server_api.service.TricycleService; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import javax.servlet.http.HttpServletRequest; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
/* |
||||
* @ClassName TricycleController |
||||
* @Description 三轮车信息登记Controller |
||||
* @Author zhangxu |
||||
* @Date 2024/09/03 12:47 |
||||
* @Version 1.0 |
||||
* @Since JDK 1.8+ |
||||
*/ |
||||
@RestController |
||||
@Slf4j |
||||
@RequestMapping("/tricycle") |
||||
public class TricycleController { |
||||
|
||||
@Autowired |
||||
private TricycleService tricycleService; |
||||
|
||||
@Autowired |
||||
private OperatorService operatorService; |
||||
|
||||
|
||||
|
||||
@GetMapping("getTricycleList") |
||||
@ApiOperation("获取信息登记列表") |
||||
public ServerResponse<?> getTricycleList(HttpServletRequest request, |
||||
@RequestParam String nuserId, |
||||
@RequestParam String status, |
||||
@RequestParam(defaultValue = "") String search |
||||
// ,@RequestParam(defaultValue = "1") Integer pageNum,
|
||||
// @RequestParam(defaultValue = "10") Integer pageSize
|
||||
){ |
||||
log.info("/getTricycleList(【三轮车】获取信息登记列表)接口被调用,调用ip: {}, 入参:{}", request.getRemoteAddr(), nuserId); |
||||
int roleFlag = 0; |
||||
|
||||
Operator operatorById = operatorService.getOperatorById(nuserId); |
||||
String cdepartmentid = operatorById.getCdepartmentid(); |
||||
List<String> roleById = operatorService.getRoleById(nuserId); |
||||
|
||||
if (!roleById.isEmpty()) { |
||||
for (String role : roleById){ |
||||
if(RoleEnum.VILLAGE_CADRE.getName().equals(role)){ |
||||
roleFlag = 1; |
||||
break; |
||||
}else if(RoleEnum.TRICYCLE_SQUADRON_POLICE_OFFICERS.getName().equals(role)){ |
||||
roleFlag = 2; |
||||
break; |
||||
} |
||||
} |
||||
} else { |
||||
return ServerResponse.error("当前用户无权限"); |
||||
} |
||||
// PageHelper.startPage(pageNum, pageSize);
|
||||
List<TricycleListVO> tricycleList = tricycleService.getTricycleList(roleFlag,cdepartmentid,status,search); |
||||
// PageInfo<TricycleListVO> pageInfo = new PageInfo<>(tricycleList);
|
||||
log.info("/getTricycleList(【三轮车】获取信息登记列表))接口数据返回,调用ip: {}, 出参:{}", request.getRemoteAddr(), tricycleList); |
||||
return ServerResponse.ok(tricycleList); |
||||
// return ServerResponse.ok(pageInfo);
|
||||
} |
||||
|
||||
@PostMapping("saveTricycleInfo") |
||||
@ApiOperation("新增/保存农三轮登记信息") |
||||
public ServerResponse<?> saveTricycleInfo(HttpServletRequest request, |
||||
@RequestBody ThtTricycleInfoBaseDTO tricycleInfo |
||||
){ |
||||
log.info("/saveTricycleInfo(【三轮车】保存登记数据)接口被调用,调用ip: {}, 入参:{}", request.getRemoteAddr(), tricycleInfo); |
||||
|
||||
|
||||
int affect = tricycleService.saveTricycleInfo(tricycleInfo); |
||||
if(affect > 0 ){ |
||||
log.info("/saveTricycleInfo(【三轮车】保存登记数据))接口数据返回,调用ip: {}, 出参:{}", request.getRemoteAddr(), tricycleInfo); |
||||
return ServerResponse.ok("登记信息数据提交成功"); |
||||
}else{ |
||||
return ServerResponse.error("新增/保存数据失败"); |
||||
} |
||||
} |
||||
|
||||
@GetMapping("/getTricycleInfoEnumType") |
||||
@ApiOperation(value = "获取登记页面数据字典") |
||||
public ServerResponse<?> getTricycleInfoEnumType(HttpServletRequest request){ |
||||
|
||||
log.info("/getTricycleInfoEnumType(【三轮车】获取登记数据字典)接口被调用, 调用ip: {}", request.getRemoteAddr()); |
||||
Map<String, List<EnumType>> tricycleInfoEnumType = tricycleService.getTricycleInfoEnumType(); |
||||
|
||||
if(tricycleInfoEnumType.isEmpty()){ |
||||
return ServerResponse.error("获取字典数据失败"); |
||||
} |
||||
|
||||
log.info("/getTricycleInfoEnumType(【三轮车】获取登记数据字典)接口数据返回,调用ip: {}, 出参:{}", request.getRemoteAddr(), tricycleInfoEnumType); |
||||
return ServerResponse.ok(tricycleInfoEnumType); |
||||
} |
||||
|
||||
|
||||
/** |
||||
* 回显单条数据的详情信息 |
||||
* @param request |
||||
* @param id 主键ID |
||||
* @return |
||||
*/ |
||||
@GetMapping("/getTricycleInfoBaseById") |
||||
@ApiOperation(value = "回显单条数据的详情信息") |
||||
public ServerResponse<?> getTricycleInfoBaseById(HttpServletRequest request, |
||||
@RequestParam String id){ |
||||
|
||||
log.info("/getTricycleInfoById(【三轮车】回显单条数据的详情信息)接口被调用, 调用ip: {}", request.getRemoteAddr()); |
||||
ThtTricycleInfoBaseDTO tricycleInfoBaseById = tricycleService.getTricycleInfoBaseById(id); |
||||
|
||||
if(tricycleInfoBaseById == null){ |
||||
return ServerResponse.error("单条登记信息数据获取失败"); |
||||
} |
||||
|
||||
log.info("/getTricycleInfoById(【三轮车】回显单条数据的详情信息)接口数据返回,调用ip: {}, 出参:{}", request.getRemoteAddr(), tricycleInfoBaseById); |
||||
return ServerResponse.ok(tricycleInfoBaseById); |
||||
} |
||||
|
||||
|
||||
/** |
||||
* 获取预警处理列表 |
||||
* @param request |
||||
* @param nuserId |
||||
* @param distributionStatus |
||||
* @param completeStatus |
||||
* @return |
||||
*/ |
||||
@GetMapping("/getTricycleWarningList") |
||||
@ApiOperation(value = "获取预警处理列表") |
||||
public ServerResponse<?> getTricycleWarningList(HttpServletRequest request, |
||||
@RequestParam String nuserId, |
||||
@RequestParam String distributionStatus, // 分配状态
|
||||
@RequestParam String completeStatus // 完成状态
|
||||
){ |
||||
log.info("/getTricycleWarningList(【三轮车】获取预警处理列表)接口被调用, 调用ip: {},入参:{}", request.getRemoteAddr(),nuserId); |
||||
int roleFlag = 0; |
||||
|
||||
// 权限判断
|
||||
Operator operatorById = operatorService.getOperatorById(nuserId); |
||||
String cdepartmentid = operatorById.getCdepartmentid(); |
||||
List<String> roleById = operatorService.getRoleById(nuserId); |
||||
if (!roleById.isEmpty()) { |
||||
for (String role : roleById){ |
||||
if(RoleEnum.VILLAGE_CADRE.getName().equals(role)){ |
||||
roleFlag = 1; |
||||
break; |
||||
}else if(RoleEnum.TRICYCLE_SQUADRON_POLICE_OFFICERS.getName().equals(role)){ |
||||
roleFlag = 2; |
||||
break; |
||||
} |
||||
} |
||||
} else { |
||||
return ServerResponse.error("当前用户无权限"); |
||||
} |
||||
// 中队民警展示 未分配 未完成 状态的数据
|
||||
List<TricycleWarningListVO> tricycleWarningListList = tricycleService.getTricycleWarningList(roleFlag,distributionStatus,completeStatus); |
||||
|
||||
log.info("/getTricycleWarningList(【三轮车】获取预警处理列表)接口数据返回,调用ip: {}, 出参:{}", request.getRemoteAddr(), tricycleWarningListList); |
||||
return ServerResponse.ok(tricycleWarningListList); |
||||
} |
||||
} |
||||
@ -0,0 +1,27 @@ |
||||
package com.hisense.hiatmp.server_api.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.hisense.hiatmp.model.dmr.EnumType; |
||||
import com.hisense.hiatmp.model.dmr.LineInfo; |
||||
import com.hisense.hiatmp.server_api.model.ModuleCustomConfig; |
||||
import com.hisense.hiatmp.server_api.model.StreetCommunity; |
||||
import io.lettuce.core.dynamic.annotation.Param; |
||||
import org.springframework.stereotype.Repository; |
||||
|
||||
import java.util.List; |
||||
|
||||
@Repository |
||||
public interface EnumTypeMapper extends BaseMapper<EnumType> { |
||||
|
||||
|
||||
List<EnumType> getVehicleTypeEnum(); |
||||
|
||||
List<EnumType> getVehicleColorEnum(); |
||||
|
||||
List<EnumType> getVehicleStatusEnum(); |
||||
|
||||
List<EnumType> getVehicleInsuranceEnum(); |
||||
|
||||
List<EnumType> getVehicleAuthorizedModelEnum(); |
||||
|
||||
} |
||||
@ -0,0 +1,25 @@ |
||||
package com.hisense.hiatmp.server_api.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.hisense.hiatmp.model.common.DTO.ThtTricycleInfoBaseDTO; |
||||
import com.hisense.hiatmp.model.common.VO.TricycleListVO; |
||||
import com.hisense.hiatmp.model.common.VO.TricycleWarningListVO; |
||||
import com.hisense.hiatmp.model.dmr.LineInfo; |
||||
import com.hisense.hiatmp.server_api.model.ModuleCustomConfig; |
||||
import com.hisense.hiatmp.server_api.model.StreetCommunity; |
||||
import io.lettuce.core.dynamic.annotation.Param; |
||||
import org.apache.ibatis.annotations.Select; |
||||
import org.springframework.stereotype.Repository; |
||||
|
||||
import java.util.List; |
||||
|
||||
@Repository |
||||
public interface ThtTricycleInfoBaseMapper extends BaseMapper<ThtTricycleInfoBaseDTO> { |
||||
|
||||
List<TricycleListVO> getTricycleList(@Param("roleFlag") int roleFlag,@Param("cdepartmentid") String cdepartmentid,@Param("status") String status,@Param("search") String search); |
||||
|
||||
List<TricycleWarningListVO> getTricycleWarningList(@Param("roleFlag") int roleFlag, @Param("distributionStatus") String distributionStatus, @Param("completeStatus") String completeStatus); |
||||
// int saveTricycleInfo(ThtTricycleInfoBaseDTO infoBaseDTO);
|
||||
|
||||
ThtTricycleInfoBaseDTO getTricycleInfoBaseById(String vehicleId); |
||||
} |
||||
@ -0,0 +1,14 @@ |
||||
package com.hisense.hiatmp.server_api.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.hisense.hiatmp.model.common.DTO.ThtTricycleWarningBaseDTO; |
||||
import com.hisense.hiatmp.model.common.VO.TricycleWarningListVO; |
||||
import org.springframework.stereotype.Repository; |
||||
|
||||
@Repository |
||||
public interface ThtTricycleWarningBaseMapper extends BaseMapper<ThtTricycleWarningBaseDTO> { |
||||
|
||||
TricycleWarningListVO getTricycleWarningList(); |
||||
|
||||
|
||||
} |
||||
@ -0,0 +1,26 @@ |
||||
package com.hisense.hiatmp.server_api.service; |
||||
|
||||
import com.hisense.hiatmp.model.common.DTO.ThtTricycleInfoBaseDTO; |
||||
import com.hisense.hiatmp.model.common.VO.TricycleListVO; |
||||
import com.hisense.hiatmp.model.common.VO.TricycleWarningListVO; |
||||
import com.hisense.hiatmp.model.dmr.EnumType; |
||||
|
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
public interface TricycleService { |
||||
|
||||
List<TricycleListVO> getTricycleList(int roleFlag,String cdepartmentid,String status,String search); |
||||
|
||||
List<TricycleWarningListVO> getTricycleWarningList(int roleFlag, String distributionStatus, String completeStatus); |
||||
|
||||
int saveTricycleInfo(ThtTricycleInfoBaseDTO infoBaseDTO); |
||||
|
||||
Map<String, List<EnumType>> getTricycleInfoEnumType(); |
||||
|
||||
ThtTricycleInfoBaseDTO getTricycleInfoBaseById(String id); |
||||
|
||||
|
||||
|
||||
|
||||
} |
||||
@ -0,0 +1,131 @@ |
||||
package com.hisense.hiatmp.server_api.service.impl; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
||||
import com.hisense.hiatmp.model.common.DTO.ThtTricycleInfoBaseDTO; |
||||
import com.hisense.hiatmp.model.common.VO.TricycleListVO; |
||||
import com.hisense.hiatmp.model.common.VO.TricycleWarningListVO; |
||||
import com.hisense.hiatmp.model.dmr.EnumType; |
||||
import com.hisense.hiatmp.server_api.mapper.ConfigMapper; |
||||
import com.hisense.hiatmp.server_api.mapper.EnumTypeMapper; |
||||
import com.hisense.hiatmp.server_api.mapper.ThtTricycleInfoBaseMapper; |
||||
import com.hisense.hiatmp.server_api.mapper.ThtTricycleWarningBaseMapper; |
||||
import com.hisense.hiatmp.server_api.model.StreetCommunity; |
||||
import com.hisense.hiatmp.server_api.service.TricycleService; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import java.time.LocalDate; |
||||
import java.time.format.DateTimeFormatter; |
||||
import java.util.*; |
||||
|
||||
/* |
||||
* Created by liuhao on 2019/3/29. |
||||
* 三轮车相关的Service实现 |
||||
* |
||||
* @author liuhao |
||||
* @date 2019/3/29 10:25 |
||||
* @since 1.0.0 |
||||
*/ |
||||
@Service |
||||
public class TricycleServiceImpl implements TricycleService { |
||||
|
||||
@Autowired |
||||
ThtTricycleInfoBaseMapper tricycleInfoBaseMapper; |
||||
|
||||
@Autowired |
||||
ConfigMapper configMapper; |
||||
|
||||
@Autowired |
||||
EnumTypeMapper enumTypeMapper; |
||||
|
||||
@Autowired |
||||
ThtTricycleWarningBaseMapper warningBaseMapper; |
||||
|
||||
@Override |
||||
public List<TricycleListVO> getTricycleList(int roleFlag,String cdepartmentid,String stauts,String search) { |
||||
List<TricycleListVO> tricycleList = tricycleInfoBaseMapper.getTricycleList(roleFlag, cdepartmentid,stauts,search); |
||||
|
||||
for (int i = 0; i < tricycleList.size(); i++) { |
||||
String villageCommunity = tricycleList.get(i).getVillageCommunity(); |
||||
StreetCommunity streetCommunityBySq = configMapper.getStreetCommunityBySq(villageCommunity); |
||||
if(streetCommunityBySq == null){ |
||||
continue; |
||||
} |
||||
tricycleList.get(i).setVillageCommunity(streetCommunityBySq.getSqname()); |
||||
tricycleList.get(i).setStreetCommunity(streetCommunityBySq.getJdname()); |
||||
} |
||||
|
||||
return tricycleList; |
||||
} |
||||
|
||||
|
||||
@Override |
||||
public List<TricycleWarningListVO> getTricycleWarningList(int roleFlag, String distributionStatus, String completeStatus) { |
||||
|
||||
warningBaseMapper.getTricycleWarningList(); |
||||
|
||||
// List<TricycleListVO> tricycleList = tricycleInfoBaseMapper.getTricycleList(roleFlag, cdepartmentid,stauts);
|
||||
//
|
||||
// for (int i = 0; i < tricycleList.size(); i++) {
|
||||
// String villageCommunity = tricycleList.get(i).getVillageCommunity();
|
||||
// StreetCommunity streetCommunityBySq = configMapper.getStreetCommunityBySq(villageCommunity);
|
||||
// if(streetCommunityBySq == null){
|
||||
// continue;
|
||||
// }
|
||||
// tricycleList.get(i).setVillageCommunity(streetCommunityBySq.getSqname());
|
||||
// tricycleList.get(i).setStreetCommunity(streetCommunityBySq.getJdname());
|
||||
// }
|
||||
|
||||
return null; |
||||
} |
||||
|
||||
@Override |
||||
public int saveTricycleInfo(ThtTricycleInfoBaseDTO infoBaseDTO) { |
||||
|
||||
|
||||
ThtTricycleInfoBaseDTO tricycleInfoBaseById = tricycleInfoBaseMapper.getTricycleInfoBaseById(infoBaseDTO.getVehicleId()); |
||||
if(tricycleInfoBaseById != null) { |
||||
infoBaseDTO.setStatus("1"); |
||||
UpdateWrapper<ThtTricycleInfoBaseDTO> updateWrapper = new UpdateWrapper<>(); |
||||
updateWrapper.eq("vehicle_id", infoBaseDTO.getVehicleId()); |
||||
// ThtTricycleInfoBaseDTO thtTricycleInfoBaseDTO = tricycleInfoBaseMapper.selectOne(new QueryWrapper<ThtTricycleInfoBaseDTO>().lambda().eq(ThtTricycleInfoBaseDTO::getVehicleId,infoBaseDTO.getVehicleId()));
|
||||
return tricycleInfoBaseMapper.update(infoBaseDTO,updateWrapper); |
||||
} |
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd"); |
||||
Random random = new Random(); |
||||
int i = random.nextInt(90000) + 10000; |
||||
String vehicleId = "DJ" + LocalDate.now().format(formatter) + i; |
||||
|
||||
infoBaseDTO.setVehicleId(vehicleId); |
||||
// if(infoBaseDTO.getVehicleLicense())
|
||||
UUID uuid = UUID.fromString(UUID.randomUUID().toString()); |
||||
String id = uuid.toString().replaceAll("-", ""); |
||||
infoBaseDTO.setId(id); |
||||
infoBaseDTO.setStatus("1"); |
||||
return tricycleInfoBaseMapper.insert(infoBaseDTO); |
||||
} |
||||
|
||||
@Override |
||||
public Map<String, List<EnumType>> getTricycleInfoEnumType() { |
||||
Map<String, List<EnumType>> enumMap = new HashMap<>(); |
||||
List<EnumType> vehicleTypeEnum = enumTypeMapper.getVehicleTypeEnum(); |
||||
List<EnumType> vehicleColorEnum = enumTypeMapper.getVehicleColorEnum(); |
||||
List<EnumType> getVehicleStatusEnum = enumTypeMapper.getVehicleStatusEnum(); |
||||
List<EnumType> getVehicleInsuranceEnum = enumTypeMapper.getVehicleInsuranceEnum(); |
||||
List<EnumType> getVehicleAuthorizedModelEnum = enumTypeMapper.getVehicleAuthorizedModelEnum(); |
||||
|
||||
enumMap.put("vehicleTypeEnum",vehicleTypeEnum); |
||||
enumMap.put("vehicleColorEnum",vehicleColorEnum); |
||||
enumMap.put("getVehicleStatusEnum",getVehicleStatusEnum); |
||||
enumMap.put("getVehicleInsuranceEnum",getVehicleInsuranceEnum); |
||||
enumMap.put("getVehicleAuthorizedModelEnum",getVehicleAuthorizedModelEnum); |
||||
|
||||
return enumMap; |
||||
} |
||||
|
||||
@Override |
||||
public ThtTricycleInfoBaseDTO getTricycleInfoBaseById(String id) { |
||||
return tricycleInfoBaseMapper.selectById(id); |
||||
} |
||||
} |
||||
@ -0,0 +1,32 @@ |
||||
<?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.hisense.hiatmp.server_api.mapper.EnumTypeMapper"> |
||||
|
||||
<select id="getVehicleTypeEnum" resultType="com.hisense.hiatmp.model.dmr.EnumType"> |
||||
SELECT x.* FROM public.enum_type x |
||||
WHERE enumtypeid ='13004' and enumname like '%三%' order by enumname |
||||
</select> |
||||
|
||||
<select id="getVehicleColorEnum" resultType="com.hisense.hiatmp.model.dmr.EnumType"> |
||||
SELECT x.* FROM public.enum_type x |
||||
WHERE enumname like '%%' and enumtypeid ='745' order by enumname |
||||
</select> |
||||
|
||||
<select id="getVehicleInsuranceEnum" resultType="com.hisense.hiatmp.model.dmr.EnumType"> |
||||
SELECT x.* FROM public.enum_type x |
||||
WHERE enumname like '%%' and enumtypeid ='900006' order by enumname |
||||
</select> |
||||
|
||||
<select id="getVehicleStatusEnum" resultType="com.hisense.hiatmp.model.dmr.EnumType"> |
||||
SELECT x.* FROM public.enum_type x |
||||
WHERE enumname like '%%' and enumtypeid ='132' order by enumname |
||||
</select> |
||||
|
||||
<select id="getVehicleAuthorizedModelEnum" resultType="com.hisense.hiatmp.model.dmr.EnumType"> |
||||
SELECT x.* FROM public.enum_type x |
||||
WHERE enumtypeid ='9140013' order by enumname |
||||
</select> |
||||
|
||||
|
||||
</mapper> |
||||
@ -0,0 +1,34 @@ |
||||
<?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.hisense.hiatmp.server_api.mapper.ThtTricycleInfoBaseMapper"> |
||||
|
||||
<select id="getTricycleList" resultType="com.hisense.hiatmp.model.common.VO.TricycleListVO"> |
||||
select DISTINCT ttib.id, |
||||
ttib.* |
||||
from |
||||
tht_tricycle_info_base ttib |
||||
<if test="roleFlag == 1"> |
||||
INNER JOIN tlv_street_community tsc on tsc.sqcode = #{cdepartmentid} |
||||
and ttib.village_community = tsc.sqcode |
||||
</if> |
||||
<if test="roleFlag == 2"> |
||||
INNER JOIN tlv_street_community tsc on tsc.zdcode = #{cdepartmentid} |
||||
and ttib.village_community = tsc.sqcode |
||||
</if> |
||||
where |
||||
1 = 1 |
||||
<if test="status != 0"> |
||||
AND ttib.status = #{status} |
||||
</if> |
||||
<if test="search != null and search != ''"> |
||||
AND ttib.vehicle_license like concat(concat('%',#{search}),'%') |
||||
</if> |
||||
</select> |
||||
|
||||
<select id="getTricycleInfoBaseById" resultType="com.hisense.hiatmp.model.common.DTO.ThtTricycleInfoBaseDTO"> |
||||
select * from tht_tricycle_info_base where vehicle_id = #{vehicleId} |
||||
|
||||
</select> |
||||
|
||||
</mapper> |
||||
@ -0,0 +1,30 @@ |
||||
<?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.hisense.hiatmp.server_api.mapper.ThtTricycleWarningBaseMapper"> |
||||
<select id="getTricycleWarningList" resultType="com.hisense.hiatmp.model.common.VO.TricycleWarningListVO"> |
||||
select |
||||
* |
||||
from |
||||
tht_tricycle_warning_base |
||||
<if test="roleFlag == 1"> |
||||
INNER JOIN tlv_street_community tsc on tsc.sqcode = #{cdepartmentid} |
||||
and ttib.village_community = tsc.sqcode |
||||
</if> |
||||
<if test="roleFlag == 2"> |
||||
INNER JOIN tlv_street_community tsc on tsc.zdcode = #{cdepartmentid} |
||||
and ttib.village_community = tsc.sqcode |
||||
</if> |
||||
where |
||||
1 = 1 |
||||
<if test="status != ''"> |
||||
AND ttib.status = #{status} |
||||
</if> |
||||
</select> |
||||
|
||||
<select id="getTricycleInfoBaseById" resultType="com.hisense.hiatmp.model.common.DTO.ThtTricycleInfoBaseDTO"> |
||||
select * from tht_tricycle_info_base where vehicle_id = #{vehicleId} |
||||
|
||||
</select> |
||||
|
||||
</mapper> |
||||
@ -0,0 +1,145 @@ |
||||
package com.hisense.hiatmp.model.common.DTO; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType; |
||||
import com.baomidou.mybatisplus.annotation.TableId; |
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import lombok.Data; |
||||
|
||||
import java.io.Serializable; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* @description tht_tricycle_info_base |
||||
* @author BEJSON |
||||
* @date 2024-09-03 |
||||
*/ |
||||
@Data |
||||
@TableName("tht_tricycle_info_base") |
||||
public class ThtTricycleInfoBaseDTO implements Serializable { |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
// @TableId(type = IdType.AUTO)
|
||||
/** |
||||
* nid |
||||
*/ |
||||
private String id; |
||||
|
||||
/** |
||||
* vehicle_license |
||||
*/ |
||||
private String vehicleLicense; |
||||
|
||||
/** |
||||
* vehicle_color |
||||
*/ |
||||
private String vehicleColor; |
||||
|
||||
/** |
||||
* vahicle_brand |
||||
*/ |
||||
private String vehicleBrand; |
||||
|
||||
/** |
||||
* vin |
||||
*/ |
||||
private String vin; |
||||
|
||||
/** |
||||
* vehicle_insurance |
||||
*/ |
||||
private String vehicleInsurance; |
||||
|
||||
/** |
||||
* vehicle_status |
||||
*/ |
||||
private String vehicleStatus; |
||||
|
||||
/** |
||||
* driver_name |
||||
*/ |
||||
private String driverName; |
||||
|
||||
/** |
||||
* driver_id_number |
||||
*/ |
||||
private String driverIdNumber; |
||||
|
||||
/** |
||||
* driver_phone |
||||
*/ |
||||
private String driverPhone; |
||||
|
||||
/** |
||||
* driver_address |
||||
*/ |
||||
private String driverAddress; |
||||
|
||||
/** |
||||
* driver_authorized_model |
||||
*/ |
||||
private String driverAuthorizedModel; |
||||
|
||||
/** |
||||
* street_community |
||||
*/ |
||||
private String streetCommunity; |
||||
|
||||
/** |
||||
* village_community |
||||
*/ |
||||
private String villageCommunity; |
||||
|
||||
/** |
||||
* community_cadre |
||||
*/ |
||||
private String communityCadre; |
||||
|
||||
/** |
||||
* community_cadre_phone |
||||
*/ |
||||
private String communityCadrePhone; |
||||
|
||||
/** |
||||
* insert_personnel |
||||
*/ |
||||
private String insertPersonnel; |
||||
|
||||
/** |
||||
* insert_time |
||||
*/ |
||||
private Date insertTime; |
||||
|
||||
/** |
||||
* register_status |
||||
*/ |
||||
private String registerStatus; |
||||
|
||||
/** |
||||
* cadre_driver_img |
||||
*/ |
||||
private String cadreDriverImg; |
||||
|
||||
/** |
||||
* guarantee_img |
||||
*/ |
||||
private String guaranteeImg; |
||||
|
||||
/** |
||||
* driving_img |
||||
*/ |
||||
private String drivingImg; |
||||
|
||||
/** |
||||
* driver_img |
||||
*/ |
||||
private String driverImg; |
||||
|
||||
private String status; |
||||
|
||||
private String vehicleId; |
||||
|
||||
private String vehicleType; |
||||
|
||||
public ThtTricycleInfoBaseDTO() {} |
||||
} |
||||
@ -0,0 +1,78 @@ |
||||
package com.hisense.hiatmp.model.common.DTO; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType; |
||||
import com.baomidou.mybatisplus.annotation.TableId; |
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import lombok.Data; |
||||
import org.apache.poi.hpsf.Date; |
||||
|
||||
import java.io.Serializable; |
||||
|
||||
/** |
||||
* @description tht_tricycle_warning_processing_base |
||||
* @author BEJSON |
||||
* @date 2024-09-05 |
||||
*/ |
||||
@Data |
||||
@TableName("tht_tricycle_warning_base") |
||||
public class ThtTricycleWarningBaseDTO implements Serializable { |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
@TableId(type = IdType.AUTO) |
||||
/** |
||||
* nid |
||||
*/ |
||||
private String nid; |
||||
|
||||
/** |
||||
* warning_id |
||||
*/ |
||||
private String warningId; |
||||
|
||||
/** |
||||
* vehicle_license |
||||
*/ |
||||
private String vehicleLicense; |
||||
|
||||
/** |
||||
* problem_description |
||||
*/ |
||||
private String problemDescription; |
||||
|
||||
/** |
||||
* illegal_activities |
||||
*/ |
||||
private String illegalActivities; |
||||
|
||||
/** |
||||
* driver_name |
||||
*/ |
||||
private String driverName; |
||||
|
||||
/** |
||||
* warning_time |
||||
*/ |
||||
private Date warningTime; |
||||
|
||||
/** |
||||
* Illegal_img |
||||
*/ |
||||
private String illegalImg; |
||||
|
||||
/** |
||||
* distribution_community |
||||
*/ |
||||
private String distributionCommunity; |
||||
|
||||
/** |
||||
* processing_records_id |
||||
*/ |
||||
private String processingRecordsId; |
||||
|
||||
/** |
||||
* status |
||||
*/ |
||||
private String status; |
||||
|
||||
} |
||||
@ -0,0 +1,14 @@ |
||||
package com.hisense.hiatmp.model.common.VO; |
||||
|
||||
import com.hisense.hiatmp.model.dmr.EnumType; |
||||
import lombok.Data; |
||||
|
||||
import java.util.ArrayList; |
||||
import java.util.HashMap; |
||||
import java.util.List; |
||||
|
||||
@Data |
||||
public class TricycleInfoEnumTypeVO { |
||||
|
||||
List<EnumType> enumTypes; |
||||
} |
||||
@ -0,0 +1,24 @@ |
||||
package com.hisense.hiatmp.model.common.VO; |
||||
|
||||
import lombok.Data; |
||||
/* |
||||
三轮车模块列表展示 |
||||
*/ |
||||
@Data |
||||
public class TricycleListVO { |
||||
|
||||
// 主键
|
||||
private String id; |
||||
// 驾驶号牌
|
||||
private String vehicleLicense; |
||||
// 驾驶人姓名
|
||||
private String driverName; |
||||
// 车辆类型
|
||||
private String vehicleType; |
||||
// 村社区
|
||||
private String villageCommunity; |
||||
// 镇街道
|
||||
private String streetCommunity; |
||||
|
||||
private String vehicleId; |
||||
} |
||||
@ -0,0 +1,25 @@ |
||||
package com.hisense.hiatmp.model.common.VO; |
||||
|
||||
import lombok.Data; |
||||
|
||||
import java.util.Date; |
||||
|
||||
/* |
||||
三轮车模块列表展示 |
||||
*/ |
||||
@Data |
||||
public class TricycleWarningListVO { |
||||
|
||||
// 主键
|
||||
private String id; |
||||
// 驾驶号牌
|
||||
private String vehicleLicense; |
||||
// 驾驶人姓名
|
||||
private String driverName; |
||||
// 预警ID
|
||||
private String warningId; |
||||
// 违法行为
|
||||
private String illegalActivities; |
||||
// 预警时间
|
||||
private Date warningTime; |
||||
} |
||||
@ -0,0 +1,19 @@ |
||||
package com.hisense.hiatmp.model.common.enums; |
||||
|
||||
public enum RoleEnum { |
||||
|
||||
VILLAGE_CADRE("村干部农三轮"), |
||||
TRICYCLE_SQUADRON_POLICE_OFFICERS("中队民警农三轮") |
||||
; |
||||
|
||||
private String name; |
||||
|
||||
|
||||
RoleEnum(String roleEnum) { |
||||
this.name = roleEnum; |
||||
} |
||||
|
||||
public String getName() { |
||||
return name; |
||||
} |
||||
} |
||||
Loading…
Reference in new issue