Browse Source

Merge remote-tracking branch 'origin/dev_ic_diaodong' into dev_ic_diaodong

dev
yinzuomei 4 years ago
parent
commit
a739d1dfad
  1. 4
      epmet-cloud-generator/src/main/resources/application.yml
  2. 17
      epmet-cloud-generator/src/main/resources/template/Controller.java.vm
  3. 17
      epmet-cloud-generator/src/main/resources/template/DTO.java.vm
  4. 17
      epmet-cloud-generator/src/main/resources/template/Dao.java.vm
  5. 17
      epmet-cloud-generator/src/main/resources/template/Entity.java.vm
  6. 17
      epmet-cloud-generator/src/main/resources/template/Excel.java.vm
  7. 17
      epmet-cloud-generator/src/main/resources/template/Redis.java.vm
  8. 17
      epmet-cloud-generator/src/main/resources/template/Service.java.vm
  9. 17
      epmet-cloud-generator/src/main/resources/template/ServiceImpl.java.vm
  10. 5
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/PageListAnalysisFormDTO.java
  11. 5
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandPageFormDTO.java
  12. 43
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java
  13. 10
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java
  14. 151
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java
  15. 7
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml
  16. 91
      epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/IcOftenUseFunctionDTO.java
  17. 42
      epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/IcOftenUseFunctionController.java
  18. 33
      epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/IcOftenUseFunctionDao.java
  19. 61
      epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/IcOftenUseFunctionEntity.java
  20. 51
      epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/IcOftenUseFunctionService.java
  21. 52
      epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/IcOftenUseFunctionServiceImpl.java
  22. 7
      epmet-module/gov-access/gov-access-server/src/main/resources/mapper/IcOftenUseFunctionDao.xml
  23. 27
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java
  24. 1
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseDao.java
  25. 3
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java
  26. 32
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java
  27. 4
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml
  28. 74
      epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/IcIndividualCategoryManageDTO.java
  29. 42
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcIndividualCategoryManageController.java
  30. 16
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/IcIndividualCategoryManageDao.java
  31. 44
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/IcIndividualCategoryManageEntity.java
  32. 38
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/IcIndividualCategoryManageService.java
  33. 45
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcIndividualCategoryManageServiceImpl.java
  34. 7
      epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcIndividualCategoryManageDao.xml

4
epmet-cloud-generator/src/main/resources/application.yml

@ -10,8 +10,8 @@ spring:
#MySQL配置
driverClassName: com.mysql.jdbc.Driver
url: jdbc:mysql://192.168.1.140:3306/epmet_data_statistical?useUnicode=true&characterEncoding=UTF-8&useSSL=false
username: epmet_dba
password: EpmEt-dbA-UsEr
username: root
password: root
#oracle配置
# driverClassName: oracle.jdbc.OracleDriver
# url: jdbc:oracle:thin:@192.168.10.10:1521:helowin

17
epmet-cloud-generator/src/main/resources/template/Controller.java.vm

@ -1,20 +1,3 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package ${package}.controller;
import ${main}.commons.tools.page.PageData;

17
epmet-cloud-generator/src/main/resources/template/DTO.java.vm

@ -1,20 +1,3 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package ${package}.dto;
import java.io.Serializable;

17
epmet-cloud-generator/src/main/resources/template/Dao.java.vm

@ -1,20 +1,3 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package ${package}.dao;
import ${main}.commons.mybatis.dao.BaseDao;

17
epmet-cloud-generator/src/main/resources/template/Entity.java.vm

@ -1,20 +1,3 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package ${package}.entity;
import com.baomidou.mybatisplus.annotation.TableName;

17
epmet-cloud-generator/src/main/resources/template/Excel.java.vm

@ -1,20 +1,3 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package ${package}.excel;
import cn.afterturn.easypoi.excel.annotation.Excel;

17
epmet-cloud-generator/src/main/resources/template/Redis.java.vm

@ -1,20 +1,3 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package ${package}.redis;
import ${main}.commons.tools.redis.RedisUtils;

17
epmet-cloud-generator/src/main/resources/template/Service.java.vm

@ -1,20 +1,3 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package ${package}.service;
import ${main}.commons.mybatis.service.BaseService;

17
epmet-cloud-generator/src/main/resources/template/ServiceImpl.java.vm

@ -1,20 +1,3 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package ${package}.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;

5
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/PageListAnalysisFormDTO.java

@ -53,4 +53,9 @@ public class PageListAnalysisFormDTO implements Serializable {
* 数据分析-服务措施分析排除已取消
*/
private String excludeStatus;
/**
* 搜索关键词
*/
private String keyword;
}

5
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandPageFormDTO.java

@ -74,4 +74,9 @@ public class UserDemandPageFormDTO extends PageFormDTO implements Serializable {
* 希望截止
*/
private String wantServiceEndTime;
/**
* 搜索关键词
*/
private String keyword;
}

43
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java

@ -21,8 +21,12 @@ import com.epmet.commons.rocketmq.messages.ServerSatisfactionCalFormDTO;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.constant.MqConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.dto.form.mq.eventmsg.BasePointEventMsg;
import com.epmet.commons.tools.enums.EventEnum;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.feign.ResultDataResolver;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ExcelUtils;
@ -30,12 +34,16 @@ import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.constant.SystemMessageType;
import com.epmet.constant.UserDemandConstant;
import com.epmet.dto.form.LoginUserDetailsFormDTO;
import com.epmet.dto.form.SystemMsgFormDTO;
import com.epmet.dto.form.demand.*;
import com.epmet.dto.result.LoginUserDetailsResultDTO;
import com.epmet.dto.result.demand.*;
import com.epmet.feign.EpmetMessageOpenFeignClient;
import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.service.*;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.PostMapping;
@ -57,7 +65,7 @@ import java.util.List;
@Slf4j
@RestController
@RequestMapping("userdemand")
public class IcUserDemandRecController {
public class IcUserDemandRecController implements ResultDataResolver {
@Autowired
private IcUserDemandRecService icUserDemandRecService;
@ -71,6 +79,8 @@ public class IcUserDemandRecController {
private IcPartyUnitService icPartyUnitService;
@Autowired
private EpmetMessageOpenFeignClient epmetMessageOpenFeignClient;
@Autowired
private EpmetUserOpenFeignClient userOpenFeignClient;
/**
* 根据服务方类型查询 下拉框
@ -321,5 +331,36 @@ public class IcUserDemandRecController {
return new Result<CategoryAnalysisResDTO>().ok(icUserDemandRecService.categoryAnalysis(formDTO));
}
/**
* 搜索需求根据需求人精确搜索需求方需求内容模糊搜索
* @return
*/
@PostMapping("search")
public Result search(@RequestBody UserDemandPageFormDTO input, @LoginUser TokenDto loginUser) {
ValidatorUtils.validateEntity(input);
String keyword = input.getKeyword();
Integer pageNo = input.getPageNo();
Integer pageSize = input.getPageSize();
if (StringUtils.isBlank(keyword)) {
return new Result();
}
LoginUserDetailsFormDTO form = new LoginUserDetailsFormDTO();
form.setApp(loginUser.getApp());
form.setClient(loginUser.getClient());
form.setUserId(loginUser.getUserId());
LoginUserDetailsResultDTO loginUserDetail = getResultDataOrThrowsException(userOpenFeignClient.getLoginUserDetails(form),
ServiceConstant.EPMET_USER_SERVER,
EpmetErrorCode.SERVER_ERROR.getCode(),
"【社区查询】查找当前人所属组织失败",
null);
PageData<DemandRecResultDTO> page = icUserDemandRecService.search(loginUser.getCustomerId(), loginUserDetail.getAgencyId(), keyword, pageNo, pageSize);
return new Result().ok(page);
}
}

10
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java

@ -214,4 +214,14 @@ public interface IcUserDemandRecService extends BaseService<IcUserDemandRecEntit
*/
UserDemandRelResDTO queryUserDemandRel(UserDemandRelFormDTO formDTO);
/**
* 社区查询 根据"需求人"精确查询根据"需求内容""服务方"模糊查询
* @param customerId 客户ID
* @param keyword 关键词
* @param keyword 关键词
* @param pageNo
* @param pageSize
* @return
*/
PageData<DemandRecResultDTO> search(String customerId, String agencyId, String keyword, Integer pageNo, Integer pageSize);
}

151
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java

@ -22,12 +22,14 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.AppClientConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.enums.DictTypeEnum;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.feign.ResultDataResolver;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.scan.param.TextScanParamDTO;
@ -77,7 +79,7 @@ import java.util.stream.Collectors;
*/
@Slf4j
@Service
public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecDao, IcUserDemandRecEntity> implements IcUserDemandRecService {
public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecDao, IcUserDemandRecEntity> implements IcUserDemandRecService, ResultDataResolver {
@Autowired
private IcUserDemandOperateLogDao operateLogDao;
@Autowired
@ -792,67 +794,76 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD
list=baseDao.pageListAnalysis(formDTO);
}
if(CollectionUtils.isNotEmpty(list)){
//1、查询网格信息
List<String> gridIds=list.stream().map(DemandRecResultDTO::getGridId).collect(Collectors.toList());
Result<List<AllGridsByUserIdResultDTO>> gridInfoRes=govOrgOpenFeignClient.getGridListByGridIds(gridIds);
List<AllGridsByUserIdResultDTO> gridInfoList = gridInfoRes.success() && !CollectionUtils.isEmpty(gridInfoRes.getData()) ? gridInfoRes.getData() : new ArrayList<>();
Map<String, AllGridsByUserIdResultDTO> gridInfoMap = gridInfoList.stream().collect(Collectors.toMap(AllGridsByUserIdResultDTO::getGridId, Function.identity()));
//2、查询分类名称
List<String> categoryCodes=list.stream().map(DemandRecResultDTO::getCategoryCode).collect(Collectors.toList());
List<IcResiDemandDictEntity> dictList=demandDictService.listByCodes(formDTO.getCustomerId(),categoryCodes);
Map<String, String> dictMap = dictList.stream().collect(Collectors.toMap(IcResiDemandDictEntity::getCategoryCode, IcResiDemandDictEntity::getCategoryName));
fillDemandsInfo(list, formDTO.getCustomerId());
}
return new PageData<>(list, total);
}
//3、查询志愿者
// 服务方类型:志愿者:volunteer;社会组织:social_org;社区自组织:community_org;区域党建单位:party_unit;
Map<String,String> userInfoMap=new HashMap<>();
Set<String> userIdList=list.stream().filter(item->null!=item.getServiceType()&&item.getServiceType().equals(UserDemandConstant.VOLUNTEER)).map(DemandRecResultDTO::getServerId).collect(Collectors.toSet());
if(CollectionUtils.isNotEmpty(userIdList)){
Result<List<UserBaseInfoResultDTO>> userInfoRes = epmetUserOpenFeignClient.queryUserBaseInfo(new ArrayList<>(userIdList));
if(!userInfoRes.success()||CollectionUtils.isEmpty(userInfoRes.getData())){
throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(),"查询志愿者信息异常");
}
userInfoMap=userInfoRes.getData().stream().collect(Collectors.toMap(UserBaseInfoResultDTO::getUserId, UserBaseInfoResultDTO::getRealName));
/**
* 填充需求信息
* @param demandList 需求列表
* @param customerId 客户id
*/
public void fillDemandsInfo(List<DemandRecResultDTO> demandList, String customerId) {
//1、查询网格信息
List<String> gridIds=demandList.stream().map(DemandRecResultDTO::getGridId).collect(Collectors.toList());
Result<List<AllGridsByUserIdResultDTO>> gridInfoRes=govOrgOpenFeignClient.getGridListByGridIds(gridIds);
List<AllGridsByUserIdResultDTO> gridInfoList = gridInfoRes.success() && !CollectionUtils.isEmpty(gridInfoRes.getData()) ? gridInfoRes.getData() : new ArrayList<>();
Map<String, AllGridsByUserIdResultDTO> gridInfoMap = gridInfoList.stream().collect(Collectors.toMap(AllGridsByUserIdResultDTO::getGridId, Function.identity()));
//2、查询分类名称
List<String> categoryCodes=demandList.stream().map(DemandRecResultDTO::getCategoryCode).collect(Collectors.toList());
List<IcResiDemandDictEntity> dictList=demandDictService.listByCodes(customerId,categoryCodes);
Map<String, String> dictMap = dictList.stream().collect(Collectors.toMap(IcResiDemandDictEntity::getCategoryCode, IcResiDemandDictEntity::getCategoryName));
//3、查询志愿者
// 服务方类型:志愿者:volunteer;社会组织:social_org;社区自组织:community_org;区域党建单位:party_unit;
Map<String,String> userInfoMap=new HashMap<>();
Set<String> userIdList=demandList.stream().filter(item->null!=item.getServiceType()&&item.getServiceType().equals(UserDemandConstant.VOLUNTEER)).map(DemandRecResultDTO::getServerId).collect(Collectors.toSet());
if(CollectionUtils.isNotEmpty(userIdList)){
Result<List<UserBaseInfoResultDTO>> userInfoRes = epmetUserOpenFeignClient.queryUserBaseInfo(new ArrayList<>(userIdList));
if(!userInfoRes.success()||CollectionUtils.isEmpty(userInfoRes.getData())){
throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(),"查询志愿者信息异常");
}
userInfoMap=userInfoRes.getData().stream().collect(Collectors.toMap(UserBaseInfoResultDTO::getUserId, UserBaseInfoResultDTO::getRealName));
}
for(DemandRecResultDTO res:list){
if (null != gridInfoMap && gridInfoMap.containsKey(res.getGridId())) {
res.setGridName(gridInfoMap.get(res.getGridId()).getGridName());
}
for(DemandRecResultDTO res:demandList){
if (null != gridInfoMap && gridInfoMap.containsKey(res.getGridId())) {
res.setGridName(gridInfoMap.get(res.getGridId()).getGridName());
}
if (null != dictMap && dictMap.containsKey(res.getCategoryCode())) {
res.setCategoryName(dictMap.get(res.getCategoryCode()));
}
res.setFirstCategoryName(demandDictService.getCategoryName(formDTO.getCustomerId(), res.getFirstCategoryCode()));
if (null != userInfoMap && userInfoMap.containsKey(res.getServerId())) {
res.setServiceName(userInfoMap.get(res.getServerId()));
}
//社区帮办:community;楼长帮办:building_caption;党员帮办:party;自身上报:self_help
//待处理:pending;已取消canceled;已派单:assigned;已接单:have_order;已完成:finished
//服务方类型:志愿者:volunteer;社会组织:social_org;社区自组织:community_org;区域党建单位:party_unit;
switch (res.getServiceType())
{
case UserDemandConstant.PARTY_UNIT:
res.setServiceShowName(res.getServiceName().concat("(区域化党建单位)"));
break;
case UserDemandConstant.SOCIAL_ORG:
res.setServiceShowName(res.getServiceName().concat("(社会组织)"));
break;
case UserDemandConstant.COMMUNITY_ORG:
res.setServiceShowName(res.getServiceName().concat("(社区自组织)"));
break;
case UserDemandConstant.VOLUNTEER:
res.setServiceShowName(res.getServiceName().concat("(志愿者)"));
break;
default:
res.setServiceShowName(res.getServiceName());
log.warn("serviceType 错误");
break;
}
res.setServiceShowFlag(StringUtils.isNotBlank(res.getServerId()));
if (null != dictMap && dictMap.containsKey(res.getCategoryCode())) {
res.setCategoryName(dictMap.get(res.getCategoryCode()));
}
res.setFirstCategoryName(demandDictService.getCategoryName(customerId, res.getFirstCategoryCode()));
if (null != userInfoMap && userInfoMap.containsKey(res.getServerId())) {
res.setServiceName(userInfoMap.get(res.getServerId()));
}
//社区帮办:community;楼长帮办:building_caption;党员帮办:party;自身上报:self_help
//待处理:pending;已取消canceled;已派单:assigned;已接单:have_order;已完成:finished
//服务方类型:志愿者:volunteer;社会组织:social_org;社区自组织:community_org;区域党建单位:party_unit;
switch (res.getServiceType())
{
case UserDemandConstant.PARTY_UNIT:
res.setServiceShowName(res.getServiceName().concat("(区域化党建单位)"));
break;
case UserDemandConstant.SOCIAL_ORG:
res.setServiceShowName(res.getServiceName().concat("(社会组织)"));
break;
case UserDemandConstant.COMMUNITY_ORG:
res.setServiceShowName(res.getServiceName().concat("(社区自组织)"));
break;
case UserDemandConstant.VOLUNTEER:
res.setServiceShowName(res.getServiceName().concat("(志愿者)"));
break;
default:
res.setServiceShowName(res.getServiceName());
log.warn("serviceType 错误");
break;
}
res.setServiceShowFlag(StringUtils.isNotBlank(res.getServerId()));
}
return new PageData<>(list, total);
}
/**
@ -1603,7 +1614,35 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD
return res;
}
@Override
public PageData<DemandRecResultDTO> search(String customerId, String agencyId, String keyword, Integer pageNo, Integer pageSize) {
CustomerAgencyDTO agency = getResultDataOrThrowsException(govOrgOpenFeignClient.getAgencyById(agencyId), ServiceConstant.GOV_ORG_SERVER,
EpmetErrorCode.SERVER_ERROR.getCode(), "【社区查询-查询需求列表】查询当前staff所属组织信息失败", null);
if (agency == null) {
throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(), "【社区查询-查询需求列表】查询当前staff所属组织信息失败");
}
String gridPids;
if(NumConstant.ZERO_STR.equals(agency.getPid())){
gridPids = agencyId;
}else{
gridPids = agency.getPids().concat(StrConstant.COLON).concat(agencyId);
}
PageListAnalysisFormDTO queryForm = new PageListAnalysisFormDTO();
queryForm.setCustomerId(customerId);
queryForm.setGridPids(gridPids);
queryForm.setKeyword(keyword);
PageHelper.startPage(pageNo, pageSize);
List<DemandRecResultDTO> list = baseDao.pageListAnalysis(queryForm);
// 填充信息
fillDemandsInfo(list, customerId);
return new PageData<>(list, new PageInfo<>(list).getTotal());
}
}

7
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml

@ -325,6 +325,13 @@
<if test="null != excludeStatus and excludeStatus !='' ">
and r.STATUS !=#{excludeStatus}
</if>
<if test="null != keyword and keyword != ''">
AND (
r.DEMAND_USER_NAME = #{keyword}
OR match(r.CONTENT) against (#{keyword} in boolean mode )
OR s.SERVER_NAME like CONCAT('%',#{keyword},'%')
)
</if>
order by r.WANT_SERVICE_TIME desc,r.REPORT_TIME asc
</select>

91
epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/IcOftenUseFunctionDTO.java

@ -0,0 +1,91 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 常用功能
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-01-17
*/
@Data
public class IcOftenUseFunctionDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 用户ID
*/
private String userId;
/**
* 菜单ID
*/
private String menuId;
/**
* 排序
*/
private Integer sort;
/**
* 删除标记
*/
private Integer delFlag;
/**
* 乐观锁
*/
private String revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

42
epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/IcOftenUseFunctionController.java

@ -0,0 +1,42 @@
package com.epmet.controller;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.dto.IcOftenUseFunctionDTO;
import com.epmet.service.IcOftenUseFunctionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
/**
* 常用功能
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-01-17
*/
@RestController
@RequestMapping("icoftenusefunction")
public class IcOftenUseFunctionController {
@Autowired
private IcOftenUseFunctionService icOftenUseFunctionService;
@PostMapping
public Result save(@RequestBody IcOftenUseFunctionDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
icOftenUseFunctionService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody IcOftenUseFunctionDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
icOftenUseFunctionService.update(dto);
return new Result();
}
}

33
epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/IcOftenUseFunctionDao.java

@ -0,0 +1,33 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.IcOftenUseFunctionEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 常用功能
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-01-17
*/
@Mapper
public interface IcOftenUseFunctionDao extends BaseDao<IcOftenUseFunctionEntity> {
}

61
epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/IcOftenUseFunctionEntity.java

@ -0,0 +1,61 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 常用功能
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-01-17
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("ic_often_use_function")
public class IcOftenUseFunctionEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户ID
*/
private String customerId;
/**
* 用户ID
*/
private String userId;
/**
* 菜单ID
*/
private String menuId;
/**
* 排序
*/
private Integer sort;
}

51
epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/IcOftenUseFunctionService.java

@ -0,0 +1,51 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.dto.IcOftenUseFunctionDTO;
import com.epmet.entity.IcOftenUseFunctionEntity;
/**
* 常用功能
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-01-17
*/
public interface IcOftenUseFunctionService extends BaseService<IcOftenUseFunctionEntity> {
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2022-01-17
*/
void save(IcOftenUseFunctionDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2022-01-17
*/
void update(IcOftenUseFunctionDTO dto);
}

52
epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/IcOftenUseFunctionServiceImpl.java

@ -0,0 +1,52 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.impl;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.dao.IcOftenUseFunctionDao;
import com.epmet.dto.IcOftenUseFunctionDTO;
import com.epmet.entity.IcOftenUseFunctionEntity;
import com.epmet.service.IcOftenUseFunctionService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
/**
* 常用功能
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-01-17
*/
@Service
public class IcOftenUseFunctionServiceImpl extends BaseServiceImpl<IcOftenUseFunctionDao, IcOftenUseFunctionEntity> implements IcOftenUseFunctionService {
@Override
@Transactional(rollbackFor = Exception.class)
public void save(IcOftenUseFunctionDTO dto) {
IcOftenUseFunctionEntity entity = ConvertUtils.sourceToTarget(dto, IcOftenUseFunctionEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(IcOftenUseFunctionDTO dto) {
IcOftenUseFunctionEntity entity = ConvertUtils.sourceToTarget(dto, IcOftenUseFunctionEntity.class);
updateById(entity);
}
}

7
epmet-module/gov-access/gov-access-server/src/main/resources/mapper/IcOftenUseFunctionDao.xml

@ -0,0 +1,7 @@
<?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.epmet.dao.IcOftenUseFunctionDao">
</mapper>

27
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java

@ -22,15 +22,22 @@ import cn.afterturn.easypoi.excel.entity.result.ExcelImportResult;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.aop.NoRepeatSubmit;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.feign.ResultDataResolver;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.form.IcHouseFormDTO;
import com.epmet.dto.form.IcNeighborHoodFormDTO;
import com.epmet.dto.form.ListIcNeighborHoodFormDTO;
import com.epmet.dto.form.LoginUserDetailsFormDTO;
import com.epmet.dto.result.HouseInfoDTO;
import com.epmet.dto.result.IcNeighborHoodResultDTO;
import com.epmet.dto.result.LoginUserDetailsResultDTO;
import com.epmet.excel.IcHouseExcel;
import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.feign.GovOrgOpenFeignClient;
import com.epmet.service.HouseService;
import com.epmet.util.ExcelPoiUtils;
import lombok.extern.slf4j.Slf4j;
@ -55,11 +62,14 @@ import java.util.stream.Collectors;
@Slf4j
@RestController
@RequestMapping("house")
public class HouseController {
public class HouseController implements ResultDataResolver {
@Autowired
private HouseService houseService;
@Autowired
private EpmetUserOpenFeignClient userOpenFeignClient;
@PostMapping("houselist")
public Result houseList(@RequestBody ListIcNeighborHoodFormDTO formDTO){
@ -68,7 +78,7 @@ public class HouseController {
String queryScene = "house_manage";
IcNeighborHoodResultDTO icNeighborHoodResultDTO = houseService.listNeighborhood(formDTO.getBuildingId(), formDTO.getOwnerName(),
IcNeighborHoodResultDTO icNeighborHoodResultDTO = houseService.listNeighborhood(null, formDTO.getBuildingId(), formDTO.getOwnerName(),
formDTO.getOwnerPhone(), null,
null, queryScene,
formDTO.getPageNo(), formDTO.getPageSize());
@ -84,7 +94,7 @@ public class HouseController {
*@return
*/
@PostMapping("search")
public Result<IcNeighborHoodResultDTO> searchHouse(@RequestBody ListIcNeighborHoodFormDTO formDTO) {
public Result<IcNeighborHoodResultDTO> searchHouse(@RequestBody ListIcNeighborHoodFormDTO formDTO, @LoginUser TokenDto loginUser) {
String keyword = formDTO.getKeyword();
if (StringUtils.isBlank(keyword)) {
IcNeighborHoodResultDTO r = new IcNeighborHoodResultDTO();
@ -108,7 +118,16 @@ public class HouseController {
// 使用场景:社区查询
String scene = "community_search";
IcNeighborHoodResultDTO icNeighborHoodResultDTO = houseService.listNeighborhood(null, null, null,
LoginUserDetailsFormDTO form = new LoginUserDetailsFormDTO();
form.setUserId(loginUser.getUserId());
form.setClient(loginUser.getClient());
form.setApp(loginUser.getApp());
LoginUserDetailsResultDTO loginUserDetail = getResultDataOrThrowsException(userOpenFeignClient.getLoginUserDetails(form), ServiceConstant.EPMET_USER_SERVER,
EpmetErrorCode.SERVER_ERROR.getCode(),
"【社区查询-查询房屋】查询当前staff所在组织信息失败",
null);
IcNeighborHoodResultDTO icNeighborHoodResultDTO = houseService.listNeighborhood(loginUserDetail.getAgencyId(),null, null, null,
neighborhoodName, buildingName, scene, formDTO.getPageNo(), formDTO.getPageSize());
return new Result<IcNeighborHoodResultDTO>().ok(icNeighborHoodResultDTO);

1
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseDao.java

@ -47,6 +47,7 @@ public interface IcHouseDao extends BaseDao<IcHouseEntity> {
// @Param("building") IcBuildingEntity building,
// @Param("house") IcHouseEntity house);
IPage<Map<String, Object>> searchHouseByPage(IPage<IcHouseEntity> page,
@Param("pids") String pids,
@Param("buildingId") String buildingId,
@Param("ownerName") String ownerName,
@Param("ownerPhone") String ownerPhone,

3
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java

@ -49,7 +49,8 @@ public interface HouseService {
List<Integer> importExcel(String customerId, List<IcHouseExcel> list, String staffId, List<Integer> numList);
IcNeighborHoodResultDTO listNeighborhood(String buildingId,
IcNeighborHoodResultDTO listNeighborhood(String ancestorAgencyId,
String buildingId,
String ownerName,
String ownerPhone,
String neighborHoodName,

32
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java

@ -3,15 +3,21 @@ package com.epmet.service.impl;
import cn.afterturn.easypoi.excel.entity.TemplateExportParams;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.feign.ResultDataResolver;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.dao.IcBuildingDao;
import com.epmet.dao.IcBuildingUnitDao;
import com.epmet.dao.IcHouseDao;
import com.epmet.dao.IcNeighborHoodDao;
import com.epmet.dto.CustomerAgencyDTO;
import com.epmet.dto.IcBuildingDTO;
import com.epmet.dto.IcBuildingUnitDTO;
import com.epmet.dto.IcHouseDTO;
@ -24,6 +30,7 @@ import com.epmet.enums.HousePurposeEnums;
import com.epmet.enums.HouseRentFlagEnums;
import com.epmet.enums.HouseTypeEnums;
import com.epmet.excel.IcHouseExcel;
import com.epmet.feign.GovOrgOpenFeignClient;
import com.epmet.service.HouseService;
import com.epmet.service.IcBuildingService;
import com.epmet.service.IcBuildingUnitService;
@ -42,7 +49,7 @@ import java.util.stream.Collectors;
@Slf4j
@Service
public class HouseServiceImpl implements HouseService {
public class HouseServiceImpl implements HouseService, ResultDataResolver {
@ -60,6 +67,8 @@ public class HouseServiceImpl implements HouseService {
private IcBuildingUnitDao icBuildingUnitDao;
@Resource
private IcHouseDao icHouseDao;
@Autowired
private GovOrgOpenFeignClient govOrgOpenFeignClient;
@Override
@Transactional(rollbackFor = Exception.class)
@ -207,7 +216,8 @@ public class HouseServiceImpl implements HouseService {
}
@Override
public IcNeighborHoodResultDTO listNeighborhood(String buildingId,
public IcNeighborHoodResultDTO listNeighborhood(String ancestorAgencyId,
String buildingId,
String ownerName,
String ownerPhone,
String neighborHoodName,
@ -219,9 +229,25 @@ public class HouseServiceImpl implements HouseService {
//如果类型是house 查房屋
//IPage<Map<String, Object>> resultMap = searchHouse(buildingId, ownerName, ownerPhone, neighborHoodName, buildingName, pageNo, pageSize);
// 查询pids
CustomerAgencyDTO agency = getResultDataOrThrowsException(govOrgOpenFeignClient.getAgencyById(ancestorAgencyId), ServiceConstant.GOV_ORG_SERVER,
EpmetErrorCode.SERVER_ERROR.getCode(), "【社区查询-查询需求列表】查询当前staff所属组织信息失败", null);
if (agency == null) {
throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(), "【社区查询-查询需求列表】查询当前staff所属组织信息失败");
}
String pids;
if(NumConstant.ZERO_STR.equals(agency.getPid())){
pids = ancestorAgencyId;
}else{
pids = agency.getPids().concat(StrConstant.COLON).concat(ancestorAgencyId);
}
IPage<IcHouseEntity> page = new Page<IcHouseEntity>(pageNo,pageSize);
IPage<Map<String, Object>> mapIPage = icHouseDao.searchHouseByPage(page, buildingId, ownerName, ownerPhone, neighborHoodName, buildingName, queryScene);
IPage<Map<String, Object>> mapIPage = icHouseDao.searchHouseByPage(page, pids, buildingId, ownerName, ownerPhone, neighborHoodName, buildingName, queryScene);
List<Map<String, Object>> records = mapIPage.getRecords();
records.forEach(item->{
item.put("houseType", HouseTypeEnums.getTypeValue(item.get("houseTypeKey")));

4
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml

@ -129,7 +129,9 @@
LEFT JOIN ic_neighbor_hood c on a.NEIGHBOR_HOOD_ID = c.ID and c.DEL_FLAG = '0'
LEFT JOIN ic_building_unit d on a.BUILDING_UNIT_ID = d.ID and d.DEL_FLAG = '0'
<where>
<if test="pids != null and pids != ''">
AND c.AGENCY_PIDS like CONCAT(#{pids},'%')
</if>
<if test="buildingId != null and buildingId.trim() != ''">
AND a.BUILDING_ID = #{buildingId}
</if>

74
epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/IcIndividualCategoryManageDTO.java

@ -0,0 +1,74 @@
package com.epmet.dto;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 个人分类管理
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-01-17
*/
@Data
public class IcIndividualCategoryManageDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* ID
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 用户ID
*/
private String userId;
/**
*
*/
private String columnId;
/**
* 排序
*/
private Integer sort;
/**
* 删除标记
*/
private Integer delFlag;
/**
* 乐观锁
*/
private String revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

42
epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcIndividualCategoryManageController.java

@ -0,0 +1,42 @@
package com.epmet.controller;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.dto.IcIndividualCategoryManageDTO;
import com.epmet.service.IcIndividualCategoryManageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
/**
* 个人分类管理
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-01-17
*/
@RestController
@RequestMapping("icindividualcategorymanage")
public class IcIndividualCategoryManageController {
@Autowired
private IcIndividualCategoryManageService icIndividualCategoryManageService;
@PostMapping
public Result save(@RequestBody IcIndividualCategoryManageDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
icIndividualCategoryManageService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody IcIndividualCategoryManageDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
icIndividualCategoryManageService.update(dto);
return new Result();
}
}

16
epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/IcIndividualCategoryManageDao.java

@ -0,0 +1,16 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.IcIndividualCategoryManageEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 个人分类管理
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-01-17
*/
@Mapper
public interface IcIndividualCategoryManageDao extends BaseDao<IcIndividualCategoryManageEntity> {
}

44
epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/IcIndividualCategoryManageEntity.java

@ -0,0 +1,44 @@
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 个人分类管理
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-01-17
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("ic_individual_category_manage")
public class IcIndividualCategoryManageEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户ID
*/
private String customerId;
/**
* 用户ID
*/
private String userId;
/**
*
*/
private String columnId;
/**
* 排序
*/
private Integer sort;
}

38
epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/IcIndividualCategoryManageService.java

@ -0,0 +1,38 @@
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.IcIndividualCategoryManageDTO;
import com.epmet.entity.IcIndividualCategoryManageEntity;
import java.util.List;
import java.util.Map;
/**
* 个人分类管理
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-01-17
*/
public interface IcIndividualCategoryManageService extends BaseService<IcIndividualCategoryManageEntity> {
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2022-01-17
*/
void save(IcIndividualCategoryManageDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2022-01-17
*/
void update(IcIndividualCategoryManageDTO dto);
}

45
epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcIndividualCategoryManageServiceImpl.java

@ -0,0 +1,45 @@
package com.epmet.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.dao.IcIndividualCategoryManageDao;
import com.epmet.dto.IcIndividualCategoryManageDTO;
import com.epmet.entity.IcIndividualCategoryManageEntity;
import com.epmet.service.IcIndividualCategoryManageService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 个人分类管理
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-01-17
*/
@Service
public class IcIndividualCategoryManageServiceImpl extends BaseServiceImpl<IcIndividualCategoryManageDao, IcIndividualCategoryManageEntity> implements IcIndividualCategoryManageService {
@Override
@Transactional(rollbackFor = Exception.class)
public void save(IcIndividualCategoryManageDTO dto) {
IcIndividualCategoryManageEntity entity = ConvertUtils.sourceToTarget(dto, IcIndividualCategoryManageEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(IcIndividualCategoryManageDTO dto) {
IcIndividualCategoryManageEntity entity = ConvertUtils.sourceToTarget(dto, IcIndividualCategoryManageEntity.class);
updateById(entity);
}
}

7
epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcIndividualCategoryManageDao.xml

@ -0,0 +1,7 @@
<?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.epmet.dao.IcIndividualCategoryManageDao">
</mapper>
Loading…
Cancel
Save