Merge remote-tracking branch 'origin/master'
# Conflicts:
# src/main/java/org/springblade/modules/place/service/impl/PlaceServiceImpl.java
15 files modified
9 files added
| New file |
| | |
| | | package org.springblade.common.utils; |
| | | |
| | | import java.util.UUID; |
| | | |
| | | public class IdUtils { |
| | | |
| | | /** |
| | | * 随机生成36位id |
| | | * @return |
| | | */ |
| | | public static String getIdBy36(){ |
| | | //生成uuid |
| | | String randomId = UUID.randomUUID().toString(); |
| | | String trim = randomId.replaceAll("-", ""); |
| | | //再拼接4位 |
| | | long l = System.currentTimeMillis(); |
| | | String time = String.valueOf(l); |
| | | String subTime = time.substring(time.length() - 4); |
| | | return trim + subTime; |
| | | } |
| | | } |
| | |
| | | */ |
| | | public static List<TreeStringNode> getStringNodeTree(Map<String, TreeStringNode> treeMap){ |
| | | List<TreeStringNode> tree = new ArrayList<>(); |
| | | if (treeMap.size() > 1) { |
| | | if (treeMap.size() > 0) { |
| | | treeMap.forEach((id, treeNode) -> { |
| | | if (treeMap.containsKey(treeNode.getParentId())) { |
| | | treeMap.get(treeNode.getParentId()).getChildren().add(treeNode); |
| | |
| | | return R.status(categoryLabelService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | | /** |
| | | * 场所标签临时表 分页 |
| | | */ |
| | | @GetMapping("/getAllList") |
| | | public R getAllList(CategoryLabelVO categoryLabel) { |
| | | return R.data(categoryLabelService.list()); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * 数据处理 |
| | | * 房屋数据处理 |
| | | * @return |
| | | */ |
| | | @GetMapping("/dataHandle") |
| | | @GetMapping("/houseDataHandle") |
| | | public R dataHandle(){ |
| | | return R.data(doorplateAddressService.dataHandle()); |
| | | return R.data(doorplateAddressService.houseDataHandle()); |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | <!--查询所有户室数据--> |
| | | <select id="getHouseList" resultType="org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity"> |
| | | select * from jczz_doorplate_address |
| | | where 1=1 and doorplate_type = '户室牌' |
| | | and address_code not in ( |
| | | select house_code from jczz_house |
| | | ) |
| | | select jda.* from jczz_doorplate_address jda |
| | | left join jczz_house jh on jh.house_code = jda.address_code |
| | | where 1=1 |
| | | and jh.house_code is null |
| | | and doorplate_type = '户室牌' |
| | | </select> |
| | | |
| | | <!--查询商超--> |
| | |
| | | where 1=1 |
| | | and jp.house_code is null |
| | | and (doorplate_type = '小门牌' or (doorplate_type = '中门牌' and address_level = 1)) |
| | | union all |
| | | union |
| | | ( |
| | | select jda.* from jczz_doorplate_address jda |
| | | left join jczz_place jp on jp.house_code = jda.address_code and jp.is_deleted =0 |
| | |
| | | List<DoorplateAddressVOTree> getHouseTree(HouseParam houseParam); |
| | | |
| | | /** |
| | | * 数据处理 |
| | | * 房屋数据处理 |
| | | * @return |
| | | */ |
| | | Object dataHandle(); |
| | | Object houseDataHandle(); |
| | | |
| | | /** |
| | | * 小区数据处理 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 数据处理 |
| | | * 房屋数据处理 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Object dataHandle() { |
| | | // 处理户室数据 |
| | | public Object houseDataHandle() { |
| | | // 处理房屋数据 |
| | | handleHouseData(); |
| | | |
| | | return null; |
| | |
| | | * 处理房屋数据 |
| | | */ |
| | | private void handleHouseData() { |
| | | // 查询所有户室数据 |
| | | // 查询所有户室数据(未入库的) |
| | | List<DoorplateAddressEntity> list = baseMapper.getHouseList(); |
| | | // 需要新增的房屋 list |
| | | List<HouseEntity> houseList = new ArrayList<>(); |
| | |
| | | houseEntity.setCreateTime(new Date()); |
| | | houseEntity.setUpdateUser(AuthUtil.getUserId().toString()); |
| | | houseEntity.setUpdateTime(new Date()); |
| | | // 设置来源 1:地址总表 2:国控采集 |
| | | houseEntity.setSource(1); |
| | | // 加入集合 |
| | | houseList.add(houseEntity); |
| | | } |
| | |
| | | private Integer gridId; |
| | | |
| | | /** |
| | | * 来源 1:地址总表 2:国控采集 |
| | | */ |
| | | @ApiModelProperty(value = "来源 1:地址总表 2:国控采集") |
| | | private Integer source; |
| | | |
| | | /** |
| | | * 创建人 |
| | | */ |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | |
| | | |
| | | <!--自定义分页列表--> |
| | | <select id="selectHousePage" resultType="org.springblade.modules.house.vo.HouseVO"> |
| | | select *,concat(building," ",unit," ",room) as address from jczz_house |
| | | select jh.*,concat(building," ",unit," ",room) as address from jczz_house jh |
| | | left join jczz_doorplate_address jda on jda.address_code = jh.house_code |
| | | where is_deleted = 0 |
| | | <if test="house.id != null "> and id = #{house.id}</if> |
| | | <if test="house.streetCode != null and house.streetCode != ''"> |
| | | and jda.town_street_code like concat('%',#{house.streetCode},'%') |
| | | </if> |
| | | <if test="house.houseCode != null and house.houseCode != ''"> and house_code = #{house.houseCode}</if> |
| | | <if test="house.districtCode != null and house.districtCode != ''"> and district_code = #{house.districtCode}</if> |
| | | <if test="house.districtName != null and house.districtName != ''"> |
| | | and district_name like concat('%',#{house.districtName},'%') |
| | | </if> |
| | | <if test="house.houseName != null and house.houseName != ''"> and house_name = #{house.houseName}</if> |
| | | <if test="house.houseName != null and house.houseName != ''"> and jh.house_name like concat('%',#{house.houseName},'%')</if> |
| | | <if test="house.phone != null and house.phone != ''"> and phone = #{house.phone}</if> |
| | | <if test="house.area != null "> and area = #{house.area}</if> |
| | | <if test="house.propertyPrice != null "> and property_price = #{house.propertyPrice}</if> |
| | |
| | | */ |
| | | private String address; |
| | | |
| | | /** |
| | | * 街道编号 |
| | | */ |
| | | private String streetCode; |
| | | |
| | | private List<UserHouseLabelVO> userHouseLabelVOList = new ArrayList<>(); |
| | | } |
| | |
| | | return R.status(placeService.save(place)); |
| | | } |
| | | |
| | | /** |
| | | * 自定义新增/修改 |
| | | * @param placeVO |
| | | * @return |
| | | */ |
| | | @PostMapping("/add") |
| | | public R add(@RequestBody PlaceVO placeVO){ |
| | | return R.status(placeService.addVO(placeVO)); |
| | | return R.status(placeService.addOrUpdate(placeVO)); |
| | | } |
| | | |
| | | /** |
| | |
| | | return R.status(placeService.updateById(place)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 自定义修改 |
| | | * @param placeVO |
| | | * @return |
| | | */ |
| | | @PostMapping("/updatePlace") |
| | | public R updatePlace(@RequestBody PlaceVO placeVO){ |
| | | return R.status(placeService.updatePlace(placeVO)); |
| | | } |
| | | |
| | | /** |
| | | * 场所表 新增或修改 |
| | | */ |
| | |
| | | </otherwise> |
| | | </choose> |
| | | </if> |
| | | order by jpe.create_time desc,jpe.id desc |
| | | </select> |
| | | |
| | | <!--自定义详情查询--> |
| | |
| | | <if test="place.placeName!=null and place.placeName!=''"> |
| | | and jp.place_name like concat('%',#{place.placeName},'%') |
| | | </if> |
| | | <if test="place.principal!=null and place.principal!=''"> |
| | | and jp.principal like concat('%',#{place.principal},'%') |
| | | </if> |
| | | <if test="place.principalPhone!=null and place.principalPhone!=''"> |
| | | and jp.principal_phone like concat('%',#{place.principalPhone},'%') |
| | | </if> |
| | | <if test="place.isPerfect==1"> |
| | | and |
| | | ( |
| | |
| | | List<TreeStringNode> selectPlaceNodeList(Long userId); |
| | | |
| | | /** |
| | | * 场所信息自定义新增 |
| | | * 场所信息自定义新增/修改 |
| | | * @param placeVO |
| | | * @return |
| | | */ |
| | | Boolean addVO(PlaceVO placeVO); |
| | | Boolean addOrUpdate(PlaceVO placeVO); |
| | | |
| | | /** |
| | | * 历史场所挂接处理-临时 |
| | |
| | | * 场所数据处理-用户信息(场所负责人信息写入到场所表) |
| | | */ |
| | | Object placeUserHandle(); |
| | | |
| | | /** |
| | | * 自定义修改 |
| | | * @param placeVO |
| | | * @return |
| | | */ |
| | | boolean updatePlace(PlaceVO placeVO); |
| | | } |
| | |
| | | package org.springblade.modules.place.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.apache.logging.log4j.util.Strings; |
| | | import org.springblade.common.node.TreeStringNode; |
| | | import org.springblade.common.utils.IdUtils; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity; |
| | | import org.springblade.modules.doorplateAddress.service.IDoorplateAddressService; |
| | | import org.springblade.modules.grid.service.IGridService; |
| | | import org.springblade.modules.place.entity.PlaceEntity; |
| | | import org.springblade.modules.place.entity.PlaceExtEntity; |
| | | import org.springblade.modules.place.entity.PlacePoiLabel; |
| | | import org.springblade.modules.place.entity.PlaceRelEntity; |
| | | import org.springblade.modules.place.entity.*; |
| | | import org.springblade.modules.place.excel.PlaceAndRelExcel; |
| | | import org.springblade.modules.place.excel.PlaceExcel; |
| | | import org.springblade.modules.place.mapper.PlaceMapper; |
| | | import org.springblade.modules.place.service.IPlaceExtService; |
| | | import org.springblade.modules.place.service.IPlacePoiLabelService; |
| | | import org.springblade.modules.place.service.IPlaceRelService; |
| | | import org.springblade.modules.place.service.IPlaceService; |
| | | import org.springblade.modules.place.vo.PlaceVO; |
| | | import org.springblade.modules.place.mapper.PlaceMapper; |
| | | import org.springblade.modules.place.service.IPlaceService; |
| | | import org.springblade.modules.system.entity.User; |
| | | import org.springblade.modules.system.service.IUserService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * 场所表 服务实现类 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 场所信息自定义新增 |
| | | * 场所信息自定义新增/修改 |
| | | * @param placeVO |
| | | * @return |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public Boolean addVO(PlaceVO placeVO) { |
| | | // 设置基础数据 |
| | | placeVO.setCreateUser(AuthUtil.getUserId()); |
| | | placeVO.setCreateTime(new Date()); |
| | | public Boolean addOrUpdate(PlaceVO placeVO) { |
| | | boolean flag = false; |
| | | placeVO.setUpdateUser(AuthUtil.getUserId()); |
| | | placeVO.setUpdateTime(new Date()); |
| | | // 绑定用户信息 |
| | | bindUserHandle(placeVO); |
| | | // 新增场所信息 |
| | | boolean save = save(placeVO); |
| | | // 保存场所详情及任务信息 |
| | | savePlaceExtAndTaskInfo(placeVO); |
| | | // 场所标签信息绑定 |
| | | placeLabelBind(placeVO); |
| | | // 查看是否包含houseCode,如果有,则更新 |
| | | if (!Strings.isBlank(placeVO.getHouseCode())){ |
| | | // 更新,先查询场所信息 |
| | | QueryWrapper<PlaceEntity> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq("is_deleted",0).eq("house_code",placeVO.getHouseCode()); |
| | | PlaceEntity one = getOne(wrapper); |
| | | placeVO.setId(one.getId()); |
| | | // 绑定用户信息 |
| | | bindUserHandle(placeVO); |
| | | // 更新场所信息 |
| | | flag = updateById(placeVO); |
| | | // 保存场所详情及任务信息 |
| | | savePlaceExtAndTaskInfo(placeVO); |
| | | // 场所标签信息绑定(更新,调整) |
| | | placeLabelBind(placeVO); |
| | | }else { |
| | | // 设置基础数据 |
| | | placeVO.setCreateUser(AuthUtil.getUserId()); |
| | | placeVO.setCreateTime(new Date()); |
| | | // 设置来源( 1:地址总表 2:国控采集) |
| | | placeVO.setSource(2); |
| | | // 并生成36位的houseCode |
| | | placeVO.setHouseCode(IdUtils.getIdBy36()); |
| | | // 绑定用户信息 |
| | | bindUserHandle(placeVO); |
| | | // 新增场所信息 |
| | | flag = save(placeVO); |
| | | // 保存场所详情及任务信息 |
| | | savePlaceExtAndTaskInfo(placeVO); |
| | | // 场所标签信息绑定 |
| | | placeLabelBind(placeVO); |
| | | } |
| | | // 位置绑定,通过定位去匹配所在网格 |
| | | // 返回结果 |
| | | return save; |
| | | return flag; |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void placeLabelBind(PlaceVO placeVO) { |
| | | // 先查询对于的场所是否已有标签信息 |
| | | // 查询对应已存在的从业人员 |
| | | QueryWrapper<PlacePoiLabel> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq("place_id",placeVO.getId()); |
| | | List<PlacePoiLabel> oldList = placePoiLabelService.list(wrapper); |
| | | if (oldList.size()>0){ |
| | | // 先将老的全部删除,然后批量插入 |
| | | QueryWrapper<PlacePoiLabel> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("place_id",placeVO.getId()); |
| | | boolean remove = placePoiLabelService.remove(queryWrapper); |
| | | if (remove){ |
| | | // 批量新增 |
| | | savePlaceLabel(placeVO); |
| | | } |
| | | }else { |
| | | savePlaceLabel(placeVO); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 插入场所标签信息 |
| | | * @param placeVO |
| | | */ |
| | | public void savePlaceLabel(PlaceVO placeVO) { |
| | | // 批量新增 |
| | | List<String> labelList = Arrays.asList(placeVO.getLabel().split(",")); |
| | | // 遍历 |
| | | labelList.forEach(labelId->{ |
| | | labelList.forEach(labelId -> { |
| | | PlacePoiLabel placePoiLabel = new PlacePoiLabel(); |
| | | placePoiLabel.setPlaceId(placeVO.getId()); |
| | | placePoiLabel.setPoiCode(Integer.parseInt(labelId)); |
| | |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * 自定义修改 |
| | | * @param placeVO |
| | | * @return |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public boolean updatePlace(PlaceVO placeVO) { |
| | | boolean flag = false; |
| | | // 修改场所信息 |
| | | flag = updateById(placeVO); |
| | | // 修改标签绑定信息 |
| | | |
| | | // 返回 |
| | | return flag; |
| | | } |
| | | } |
| | |
| | | parent_code as parentId, |
| | | name |
| | | FROM blade_region where district_code = '361102' |
| | | <if test="parentCode!=null"> |
| | | and parent_code = #{parentCode} |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | package org.springblade.modules.task.controller; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import lombok.AllArgsConstructor; |
| | | import javax.validation.Valid; |
| | | |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.task.entity.ECallEventEntity; |
| | | import org.springblade.modules.task.vo.ECallEventVO; |
| | | import org.springblade.modules.task.wrapper.ECallEventWrapper; |
| | | import org.springblade.modules.task.service.IECallEventService; |
| | | |
| | | /** |
| | | * e呼即办表 控制器 |
| | | * |
| | | * @author BladeX |
| | | * @since 2023-12-07 |
| | | */ |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("blade-eCallEvent/eCallEvent") |
| | | @Api(value = "e呼即办表", tags = "e呼即办表接口") |
| | | public class ECallEventController { |
| | | |
| | | private final IECallEventService eCallEventService; |
| | | |
| | | /** |
| | | * e呼即办表 详情 |
| | | */ |
| | | @GetMapping("/detail") |
| | | @ApiOperationSupport(order = 1) |
| | | @ApiOperation(value = "详情", notes = "传入eCallEvent") |
| | | public R<ECallEventVO> detail(ECallEventEntity eCallEvent) { |
| | | ECallEventEntity detail = eCallEventService.getOne(Condition.getQueryWrapper(eCallEvent)); |
| | | return R.data(ECallEventWrapper.build().entityVO(detail)); |
| | | } |
| | | /** |
| | | * e呼即办表 分页 |
| | | */ |
| | | @GetMapping("/list") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "分页", notes = "传入eCallEvent") |
| | | public R<IPage<ECallEventVO>> list(ECallEventEntity eCallEvent, Query query) { |
| | | IPage<ECallEventEntity> pages = eCallEventService.page(Condition.getPage(query), Condition.getQueryWrapper(eCallEvent)); |
| | | return R.data(ECallEventWrapper.build().pageVO(pages)); |
| | | } |
| | | |
| | | /** |
| | | * e呼即办表 自定义分页 |
| | | */ |
| | | @GetMapping("/page") |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "分页", notes = "传入eCallEvent") |
| | | public R<IPage<ECallEventVO>> page(ECallEventVO eCallEvent, Query query) { |
| | | IPage<ECallEventVO> pages = eCallEventService.selectECallEventPage(Condition.getPage(query), eCallEvent); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * e呼即办表 新增 |
| | | */ |
| | | @PostMapping("/save") |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "新增", notes = "传入eCallEvent") |
| | | public R save(@Valid @RequestBody ECallEventEntity eCallEvent) { |
| | | return R.status(eCallEventService.save(eCallEvent)); |
| | | } |
| | | |
| | | /** |
| | | * e呼即办表 修改 |
| | | */ |
| | | @PostMapping("/update") |
| | | @ApiOperationSupport(order = 5) |
| | | @ApiOperation(value = "修改", notes = "传入eCallEvent") |
| | | public R update(@Valid @RequestBody ECallEventEntity eCallEvent) { |
| | | return R.status(eCallEventService.updateById(eCallEvent)); |
| | | } |
| | | |
| | | /** |
| | | * e呼即办表 新增或修改 |
| | | */ |
| | | @PostMapping("/submit") |
| | | @ApiOperationSupport(order = 6) |
| | | @ApiOperation(value = "新增或修改", notes = "传入eCallEvent") |
| | | public R submit(@Valid @RequestBody ECallEventEntity eCallEvent) { |
| | | return R.status(eCallEventService.saveOrUpdate(eCallEvent)); |
| | | } |
| | | |
| | | /** |
| | | * e呼即办表 删除 |
| | | */ |
| | | @PostMapping("/remove") |
| | | @ApiOperationSupport(order = 7) |
| | | @ApiOperation(value = "逻辑删除", notes = "传入ids") |
| | | public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
| | | return R.status(eCallEventService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.task.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import lombok.Data; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | import lombok.EqualsAndHashCode; |
| | | import org.springblade.core.tenant.mp.TenantEntity; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | /** |
| | | * e呼即办表 实体类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2023-12-07 |
| | | */ |
| | | @Data |
| | | @TableName("jczz_e_call_event") |
| | | @ApiModel(value = "ECallEvent对象", description = "e呼即办表") |
| | | public class ECallEventEntity implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | @ApiModelProperty("主键id") |
| | | @TableId(value = "id", type = IdType.ASSIGN_ID) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 门牌地址编码 |
| | | */ |
| | | @ApiModelProperty(value = "门牌地址编码") |
| | | private String addressCode; |
| | | |
| | | /** |
| | | * 事件类型 |
| | | */ |
| | | @ApiModelProperty(value = "事件类型") |
| | | private Integer type; |
| | | /** |
| | | * 事件名称 |
| | | */ |
| | | @ApiModelProperty(value = "事件名称") |
| | | private String name; |
| | | /** |
| | | * 社区编号 |
| | | */ |
| | | @ApiModelProperty(value = "社区编号") |
| | | private String communityCode; |
| | | /** |
| | | * 发生地点 |
| | | */ |
| | | @ApiModelProperty(value = "发生地点") |
| | | private String scene; |
| | | /** |
| | | * 发生时间 |
| | | */ |
| | | @ApiModelProperty(value = "发生时间") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date occurrenceTime; |
| | | /** |
| | | * 姓名 |
| | | */ |
| | | @ApiModelProperty(value = "姓名") |
| | | private String realName; |
| | | /** |
| | | * 联系电话 |
| | | */ |
| | | @ApiModelProperty(value = "联系电话") |
| | | private String phone; |
| | | /** |
| | | * 事件简述 |
| | | */ |
| | | @ApiModelProperty(value = "事件简述") |
| | | private String remark; |
| | | /** |
| | | * 回访情况 |
| | | */ |
| | | @ApiModelProperty(value = "回访情况") |
| | | private String retVis; |
| | | /** |
| | | * 处理结果 |
| | | */ |
| | | @ApiModelProperty(value = "处理结果") |
| | | private String disRes; |
| | | /** |
| | | * 数据来源 |
| | | */ |
| | | @ApiModelProperty(value = "数据来源") |
| | | private String source; |
| | | /** |
| | | * 现场图片urls |
| | | */ |
| | | @ApiModelProperty(value = "现场图片urls") |
| | | private String imageUrls; |
| | | /** |
| | | * 处置状态 |
| | | */ |
| | | @ApiModelProperty(value = "处置状态") |
| | | private Integer disStatus; |
| | | |
| | | /** |
| | | * 创建人 |
| | | */ |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | @ApiModelProperty("创建人") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long createUser; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty("创建时间") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 更新人 |
| | | */ |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | @ApiModelProperty("更新人") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Long updateUser; |
| | | |
| | | /** |
| | | * 更新时间 |
| | | */ |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty("更新时间") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 是否删除 |
| | | */ |
| | | @TableLogic |
| | | @ApiModelProperty("是否已删除 0:否 1:是") |
| | | private Integer isDeleted; |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.task.mapper; |
| | | |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springblade.modules.task.entity.ECallEventEntity; |
| | | import org.springblade.modules.task.vo.ECallEventVO; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * e呼即办表 Mapper 接口 |
| | | * |
| | | * @author BladeX |
| | | * @since 2023-12-07 |
| | | */ |
| | | public interface EcCallEventMapper extends BaseMapper<ECallEventEntity> { |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | | * @param page |
| | | * @param eCallEvent |
| | | * @return |
| | | */ |
| | | List<ECallEventVO> selectECallEventPage(IPage page,@Param("eCallEvent") ECallEventVO eCallEvent); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | <?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="org.springblade.modules.task.mapper.EcCallEventMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="eCallEventResultMap" type="org.springblade.modules.task.entity.ECallEventEntity"> |
| | | <result column="id" property="id"/> |
| | | <result column="type" property="type"/> |
| | | <result column="name" property="name"/> |
| | | <result column="community_code" property="communityCode"/> |
| | | <result column="scene" property="scene"/> |
| | | <result column="occurrence_time" property="occurrenceTime"/> |
| | | <result column="real_name" property="realName"/> |
| | | <result column="phone" property="phone"/> |
| | | <result column="remark" property="remark"/> |
| | | <result column="dis_sit" property="disSit"/> |
| | | <result column="ret_vis" property="retVis"/> |
| | | <result column="dis_res" property="disRes"/> |
| | | <result column="source" property="source"/> |
| | | <result column="dis_status" property="disStatus"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="create_user" property="createUser"/> |
| | | <result column="update_time" property="updateTime"/> |
| | | <result column="update_user" property="updateUser"/> |
| | | <result column="is_deleted" property="isDeleted"/> |
| | | </resultMap> |
| | | |
| | | <!--自定义分页查询--> |
| | | <select id="selectECallEventPage" resultType="org.springblade.modules.task.vo.ECallEventVO"> |
| | | select |
| | | * |
| | | from jczz_e_call_event |
| | | where is_deleted = 0 |
| | | <if test="eCallEvent.name!=null and eCallEvent.name!=''"> |
| | | and name like concat('%',#{eCallEvent.name},'%') |
| | | </if> |
| | | <if test="eCallEvent.phone!=null and eCallEvent.phone!=''"> |
| | | and phone like concat('%',#{eCallEvent.phone},'%') |
| | | </if> |
| | | <if test="eCallEvent.realName!=null and eCallEvent.realName!=''"> |
| | | and real_name like concat('%',#{eCallEvent.realName},'%') |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.task.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.springblade.modules.task.entity.ECallEventEntity; |
| | | import org.springblade.modules.task.vo.ECallEventVO; |
| | | import org.springblade.core.mp.base.BaseService; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | /** |
| | | * e呼即办表 服务类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2023-12-07 |
| | | */ |
| | | public interface IECallEventService extends IService<ECallEventEntity> { |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | | * @param page |
| | | * @param eCallEvent |
| | | * @return |
| | | */ |
| | | IPage<ECallEventVO> selectECallEventPage(IPage<ECallEventVO> page, ECallEventVO eCallEvent); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.task.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springblade.modules.task.entity.ECallEventEntity; |
| | | import org.springblade.modules.task.vo.ECallEventVO; |
| | | import org.springblade.modules.task.mapper.EcCallEventMapper; |
| | | import org.springblade.modules.task.service.IECallEventService; |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | /** |
| | | * e呼即办表 服务实现类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2023-12-07 |
| | | */ |
| | | @Service |
| | | public class ECallEventServiceImpl extends ServiceImpl<EcCallEventMapper, ECallEventEntity> implements IECallEventService { |
| | | |
| | | @Override |
| | | public IPage<ECallEventVO> selectECallEventPage(IPage<ECallEventVO> page, ECallEventVO eCallEvent) { |
| | | return page.setRecords(baseMapper.selectECallEventPage(page, eCallEvent)); |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.task.vo; |
| | | |
| | | import org.springblade.modules.task.entity.ECallEventEntity; |
| | | import org.springblade.core.tool.node.INode; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | /** |
| | | * e呼即办表 视图实体类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2023-12-07 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | public class ECallEventVO extends ECallEventEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.task.wrapper; |
| | | |
| | | import org.springblade.core.mp.support.BaseEntityWrapper; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | import org.springblade.modules.task.entity.ECallEventEntity; |
| | | import org.springblade.modules.task.vo.ECallEventVO; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * e呼即办表 包装类,返回视图层所需的字段 |
| | | * |
| | | * @author BladeX |
| | | * @since 2023-12-07 |
| | | */ |
| | | public class ECallEventWrapper extends BaseEntityWrapper<ECallEventEntity, ECallEventVO> { |
| | | |
| | | public static ECallEventWrapper build() { |
| | | return new ECallEventWrapper(); |
| | | } |
| | | |
| | | @Override |
| | | public ECallEventVO entityVO(ECallEventEntity eCallEvent) { |
| | | ECallEventVO eCallEventVO = Objects.requireNonNull(BeanUtil.copy(eCallEvent, ECallEventVO.class)); |
| | | |
| | | //User createUser = UserCache.getUser(eCallEvent.getCreateUser()); |
| | | //User updateUser = UserCache.getUser(eCallEvent.getUpdateUser()); |
| | | //eCallEventVO.setCreateUserName(createUser.getName()); |
| | | //eCallEventVO.setUpdateUserName(updateUser.getName()); |
| | | |
| | | return eCallEventVO; |
| | | } |
| | | |
| | | |
| | | } |