Browse Source

Merge remote-tracking branch 'origin/develop' into release_temp

master
yinzuomei 4 years ago
parent
commit
e55d3cb787
  1. 2
      epmet-cloud-generator/src/main/java/io/renren/utils/GenUtils.java
  2. 23
      epmet-cloud-generator/src/main/resources/template/Controller.java.vm
  3. 77
      epmet-cloud-generator/src/main/resources/template/Controller.java.vm_bak
  4. 87
      epmet-cloud-generator/src/main/resources/template/ServiceImpl.java.vm.bak
  5. 1
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/BizTypeEnum.java
  6. 7
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/datastats/DataStatsDao.java
  7. 7
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/evaluationindex/EvaluationIndexDao.java
  8. 6
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/DataStatsService.java
  9. 9
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java
  10. 8
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/EvaluationIndexService.java
  11. 11
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/impl/EvaluationIndexServiceImpl.java
  12. 11
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java
  13. 18
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/datastats/DatsStatsDao.xml
  14. 16
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/evaluationindex/EvaluationIndexDao.xml
  15. 56
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/GridProjectToProjectMainDTO.java
  16. 23
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ShiBeiICJobController.java
  17. 8
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactAgencyProjectDailyDao.java
  18. 65
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsProjectServiceImpl.java
  19. 8
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactAgencyProjectDailyService.java
  20. 12
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactAgencyProjectDailyServiceImpl.java
  21. 17
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactAgencyProjectDailyDao.xml
  22. 23
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/DelPartyServiceCenterResultDTO.java
  23. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java
  24. 27
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPartyServiceCenterDao.java
  25. 51
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java
  26. 49
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterDao.xml
  27. 105
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/MemoAttachmentDTO.java
  28. 80
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/MemoAttrDTO.java
  29. 105
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/MemoConcernDTO.java
  30. 85
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/MemoDifficultyDTO.java
  31. 75
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/MemoWorkDiaryDTO.java
  32. 72
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/MemoAttachmentController.java
  33. 72
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/MemoAttrController.java
  34. 72
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/MemoConcernController.java
  35. 72
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/MemoDifficultyController.java
  36. 72
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/MemoWorkDiaryController.java
  37. 16
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/MemoAttachmentDao.java
  38. 16
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/MemoAttrDao.java
  39. 16
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/MemoConcernDao.java
  40. 16
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/MemoDifficultyDao.java
  41. 16
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/MemoWorkDiaryDao.java
  42. 71
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/MemoAttachmentEntity.java
  43. 48
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/MemoAttrEntity.java
  44. 73
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/MemoConcernEntity.java
  45. 53
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/MemoDifficultyEntity.java
  46. 43
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/MemoWorkDiaryEntity.java
  47. 78
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/MemoAttachmentService.java
  48. 78
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/MemoAttrService.java
  49. 78
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/MemoConcernService.java
  50. 78
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/MemoDifficultyService.java
  51. 78
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/MemoWorkDiaryService.java
  52. 83
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/MemoAttachmentServiceImpl.java
  53. 83
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/MemoAttrServiceImpl.java
  54. 83
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/MemoConcernServiceImpl.java
  55. 83
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/MemoDifficultyServiceImpl.java
  56. 83
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/MemoWorkDiaryServiceImpl.java
  57. 8
      epmet-module/gov-project/gov-project-server/src/main/resources/mapper/MemoAttachmentDao.xml
  58. 8
      epmet-module/gov-project/gov-project-server/src/main/resources/mapper/MemoAttrDao.xml
  59. 8
      epmet-module/gov-project/gov-project-server/src/main/resources/mapper/MemoConcernDao.xml
  60. 8
      epmet-module/gov-project/gov-project-server/src/main/resources/mapper/MemoDifficultyDao.xml
  61. 8
      epmet-module/gov-project/gov-project-server/src/main/resources/mapper/MemoWorkDiaryDao.xml
  62. 2
      epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataPatrolChangeEventListener.java
  63. 4
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java
  64. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StatsResiWarnServiceImpl.java

2
epmet-cloud-generator/src/main/java/io/renren/utils/GenUtils.java

@ -125,7 +125,7 @@ public class GenUtils {
map.put("pk", tableEntity.getPk());
map.put("className", tableEntity.getClassName());
map.put("classname", tableEntity.getClassname());
map.put("pathName", tableEntity.getClassname().toLowerCase());
map.put("pathName", tableEntity.getClassname());
map.put("columns", tableEntity.getColumns());
map.put("hasBigDecimal", hasBigDecimal);
map.put("main", main);

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

@ -1,5 +1,6 @@
package ${package}.controller;
import ${main}.commons.tools.aop.NoRepeatSubmit;
import ${main}.commons.tools.page.PageData;
import ${main}.commons.tools.utils.ExcelUtils;
import ${main}.commons.tools.utils.Result;
@ -28,23 +29,24 @@ import java.util.Map;
@RestController
@RequestMapping("${pathName}")
public class ${className}Controller {
@Autowired
private ${className}Service ${classname}Service;
@GetMapping("page")
@RequestMapping("page")
public Result<PageData<${className}DTO>> page(@RequestParam Map<String, Object> params){
PageData<${className}DTO> page = ${classname}Service.page(params);
return new Result<PageData<${className}DTO>>().ok(page);
}
@GetMapping("{id}")
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET})
public Result<${className}DTO> get(@PathVariable("id") String id){
${className}DTO data = ${classname}Service.get(id);
return new Result<${className}DTO>().ok(data);
}
@PostMapping
@NoRepeatSubmit
@PostMapping("save")
public Result save(@RequestBody ${className}DTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
@ -52,7 +54,8 @@ public class ${className}Controller {
return new Result();
}
@PutMapping
@NoRepeatSubmit
@PostMapping("update")
public Result update(@RequestBody ${className}DTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
@ -60,7 +63,7 @@ public class ${className}Controller {
return new Result();
}
@DeleteMapping
@PostMapping("delete")
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
@ -68,10 +71,6 @@ public class ${className}Controller {
return new Result();
}
@GetMapping("export")
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<${className}DTO> list = ${classname}Service.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, ${className}Excel.class);
}
}
}

77
epmet-cloud-generator/src/main/resources/template/Controller.java.vm_bak

@ -0,0 +1,77 @@
package ${package}.controller;
import ${main}.commons.tools.page.PageData;
import ${main}.commons.tools.utils.ExcelUtils;
import ${main}.commons.tools.utils.Result;
import ${main}.commons.tools.validator.AssertUtils;
import ${main}.commons.tools.validator.ValidatorUtils;
import ${main}.commons.tools.validator.group.AddGroup;
import ${main}.commons.tools.validator.group.UpdateGroup;
import ${main}.commons.tools.validator.group.DefaultGroup;
import ${package}.dto.${className}DTO;
import ${package}.excel.${className}Excel;
import ${package}.service.${className}Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* ${comments}
*
* @author ${author} ${email}
* @since ${version} ${date}
*/
@RestController
@RequestMapping("${pathName}")
public class ${className}Controller {
@Autowired
private ${className}Service ${classname}Service;
@GetMapping("page")
public Result<PageData<${className}DTO>> page(@RequestParam Map<String, Object> params){
PageData<${className}DTO> page = ${classname}Service.page(params);
return new Result<PageData<${className}DTO>>().ok(page);
}
@GetMapping("{id}")
public Result<${className}DTO> get(@PathVariable("id") String id){
${className}DTO data = ${classname}Service.get(id);
return new Result<${className}DTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody ${className}DTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
${classname}Service.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody ${className}DTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
${classname}Service.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
${classname}Service.delete(ids);
return new Result();
}
@GetMapping("export")
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<${className}DTO> list = ${classname}Service.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, ${className}Excel.class);
}
}

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

@ -0,0 +1,87 @@
package ${package}.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import ${main}.commons.mybatis.service.impl.BaseServiceImpl;
import ${main}.commons.tools.page.PageData;
import ${main}.commons.tools.utils.ConvertUtils;
import ${package}.commons.tools.constant.FieldConstant;
import ${package}.dao.${className}Dao;
import ${package}.dto.${className}DTO;
import ${package}.entity.${className}Entity;
import ${package}.redis.${className}Redis;
import ${package}.service.${className}Service;
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;
/**
* ${comments}
*
* @author ${author} ${email}
* @since ${version} ${date}
*/
@Service
public class ${className}ServiceImpl extends BaseServiceImpl<${className}Dao, ${className}Entity> implements ${className}Service {
@Autowired
private ${className}Redis ${classname}Redis;
@Override
public PageData<${className}DTO> page(Map<String, Object> params) {
IPage<${className}Entity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, ${className}DTO.class);
}
@Override
public List<${className}DTO> list(Map<String, Object> params) {
List<${className}Entity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, ${className}DTO.class);
}
private QueryWrapper<${className}Entity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<${className}Entity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public ${className}DTO get(String id) {
${className}Entity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, ${className}DTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(${className}DTO dto) {
${className}Entity entity = ConvertUtils.sourceToTarget(dto, ${className}Entity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(${className}DTO dto) {
${className}Entity entity = ConvertUtils.sourceToTarget(dto, ${className}Entity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
}

1
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/BizTypeEnum.java

@ -16,6 +16,7 @@ public enum BizTypeEnum {
GROUP("group", "小组"),
TOPIC("topic", "话题"),
ISSUE("issue", "议题"),
GRID_PROJECT("grid_project", "网格项目"),
PROJECT("project", "项目"),
ARTICLE("article", "文章(党建声音)"),
;

7
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/datastats/DataStatsDao.java

@ -366,4 +366,11 @@ public interface DataStatsDao {
* @author sun
*/
List<GridDateIdResultDTO> gridDateProjectIncrList(GridLivelyFormDTO formDTO);
/**
* @Description 查询直属下级组织下网格在查询时间段内存在创建项目记录一个网格一天一条
* @author sun
*/
List<GridDateIdResultDTO> getGridProejctToProjectMain(GridLivelyFormDTO formDTO);
}

7
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/evaluationindex/EvaluationIndexDao.java

@ -21,6 +21,8 @@ import com.epmet.dataaggre.dto.datastats.result.GovrnRatioResultDTO;
import com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerAgencyDTO;
import com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerGridDTO;
import com.epmet.dataaggre.dto.evaluationindex.ScreenGovernRankDataDailyDTO;
import com.epmet.dataaggre.dto.govorg.form.GridLivelyFormDTO;
import com.epmet.dataaggre.dto.govorg.result.GridDateIdResultDTO;
import com.epmet.dataaggre.dto.govproject.form.ProjectCategoryTotalFormDTO;
import com.epmet.dataaggre.dto.govproject.result.ProjectCategoryTotalResultDTO;
import org.apache.ibatis.annotations.Mapper;
@ -111,4 +113,9 @@ public interface EvaluationIndexDao {
*/
List<ProjectCategoryTotalResultDTO> projectCategoryList(ProjectCategoryTotalFormDTO formDTO);
/**
* @Description 查询直属下级组织下网格在查询时间段内存在创建项目记录一个网格一天一条
* @author sun
*/
List<GridDateIdResultDTO> getGridProejctToProjectMain(GridLivelyFormDTO formDTO);
}

6
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/DataStatsService.java

@ -292,4 +292,10 @@ public interface DataStatsService {
* @author sun
*/
List<GridDateIdResultDTO> getGridDateProjectIncrList(GridLivelyFormDTO formDTO);
/**
* @Description 查询直属下级组织下网格在查询时间段内存在创建项目记录一个网格一天一条
* @author sun
*/
List<GridDateIdResultDTO> getGridProejctToProjectMain(GridLivelyFormDTO formDTO);
}

9
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/datastats/impl/DataStatsServiceImpl.java

@ -2220,4 +2220,13 @@ public class DataStatsServiceImpl implements DataStatsService, ResultDataResolve
public List<GridDateIdResultDTO> getGridDateProjectIncrList(GridLivelyFormDTO formDTO) {
return dataStatsDao.gridDateProjectIncrList(formDTO);
}
/**
* @Description 查询直属下级组织下网格在查询时间段内存在创建项目记录一个网格一天一条
* @author sun
*/
@Override
public List<GridDateIdResultDTO> getGridProejctToProjectMain(GridLivelyFormDTO formDTO) {
return dataStatsDao.getGridProejctToProjectMain(formDTO);
}
}

8
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/EvaluationIndexService.java

@ -6,6 +6,8 @@ import com.epmet.dataaggre.dto.evaluationindex.ScreenAgencyOrGridListDTO;
import com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerAgencyDTO;
import com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerGridDTO;
import com.epmet.dataaggre.dto.evaluationindex.ScreenGovernRankDataDailyDTO;
import com.epmet.dataaggre.dto.govorg.form.GridLivelyFormDTO;
import com.epmet.dataaggre.dto.govorg.result.GridDateIdResultDTO;
import com.epmet.dataaggre.dto.govproject.form.ProjectCategoryTotalFormDTO;
import com.epmet.dataaggre.dto.govproject.result.ProjectCategoryTotalResultDTO;
@ -93,4 +95,10 @@ public interface EvaluationIndexService {
* @author sun
*/
List<ProjectCategoryTotalResultDTO> projectCategoryList(ProjectCategoryTotalFormDTO formDTO);
/**
* @Description 查询直属下级组织下网格在查询时间段内存在创建项目记录一个网格一天一条
* @author sun
*/
List<GridDateIdResultDTO> getGridProejctToProjectMain(GridLivelyFormDTO formDTO);
}

11
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/evaluationindex/impl/EvaluationIndexServiceImpl.java

@ -11,6 +11,8 @@ import com.epmet.dataaggre.dto.evaluationindex.ScreenAgencyOrGridListDTO;
import com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerAgencyDTO;
import com.epmet.dataaggre.dto.evaluationindex.ScreenCustomerGridDTO;
import com.epmet.dataaggre.dto.evaluationindex.ScreenGovernRankDataDailyDTO;
import com.epmet.dataaggre.dto.govorg.form.GridLivelyFormDTO;
import com.epmet.dataaggre.dto.govorg.result.GridDateIdResultDTO;
import com.epmet.dataaggre.dto.govproject.form.ProjectCategoryTotalFormDTO;
import com.epmet.dataaggre.dto.govproject.result.ProjectCategoryTotalResultDTO;
import com.epmet.dataaggre.service.evaluationindex.EvaluationIndexService;
@ -217,4 +219,13 @@ public class EvaluationIndexServiceImpl implements EvaluationIndexService {
return evaluationIndexDao.projectCategoryList(formDTO);
}
/**
* @Description 查询直属下级组织下网格在查询时间段内存在创建项目记录一个网格一天一条
* @author sun
*/
@Override
public List<GridDateIdResultDTO> getGridProejctToProjectMain(GridLivelyFormDTO formDTO) {
return evaluationIndexDao.getGridProejctToProjectMain(formDTO);
}
}

11
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java

@ -36,6 +36,7 @@ import com.epmet.dataaggre.excel.GridLivelyExcel;
import com.epmet.dataaggre.service.commonservice.AreaCodeService;
import com.epmet.dataaggre.service.datastats.DataStatsService;
import com.epmet.dataaggre.service.epmetuser.EpmetUserService;
import com.epmet.dataaggre.service.evaluationindex.EvaluationIndexService;
import com.epmet.dataaggre.service.govorg.GovOrgService;
import com.epmet.dataaggre.service.opercrm.CustomerRelation;
import com.epmet.dto.result.UploadImgResultDTO;
@ -92,6 +93,8 @@ public class GovOrgServiceImpl implements GovOrgService {
private OssFeignClient ossFeignClient;
@Autowired
private IcBuildingDao icBuildingDao;
@Autowired
private EvaluationIndexService evaluationIndexService;
/**
* @param staffId
@ -696,8 +699,12 @@ public class GovOrgServiceImpl implements GovOrgService {
Map<String, GridInfoResultDTO> gridMap = gridList.stream().collect(Collectors.toMap(GridInfoResultDTO :: getGridId, v -> v, (v1, v2) -> v1));
//2.查询直属下级组织下网格在查询时间段内存在例行工作次数的网格,一天一条
List<GridDateIdResultDTO> workList = epmetUserService.getGridDateRoutineWorkList(formDTO);
//3.查询直属下级组织下网格在查询时间段内存在上报事件(直接立项)数的网格,一天一条
List<GridDateIdResultDTO> projectList = dataStatsService.getGridDateProjectIncrList(formDTO);
/*//3.查询直属下级组织下网格在查询时间段内存在上报事件(直接立项)数的网格,一天一条
List<GridDateIdResultDTO> projectList = dataStatsService.getGridDateProjectIncrList(formDTO);*/
/*//3.查询直属下级组织下网格在查询时间段内存在创建项目记录,一个网格一天一条
List<GridDateIdResultDTO> projectList = dataStatsService.getGridProejctToProjectMain(formDTO);*/
//3.查询直属下级组织下网格在查询时间段内存在创建项目记录,一个网格一天一条[改查screen_project_data表,因为平阴三个街道和小程序的数据都在这个表有]
List<GridDateIdResultDTO> projectList = evaluationIndexService.getGridProejctToProjectMain(formDTO);
//4.汇总数据,一个网格一天只记录一条数据,这条数据可能是例行工作的也可能是上报事件的,也可能某一天两个数都有,但只记录一条
Set<String> map = workList.stream().map(o -> o.getGridId() + o.getDateId()).collect(Collectors.toSet());
projectList.stream().filter(pro -> !map.contains(pro.getGridId() + pro.getDateId())).forEach(p -> workList.add(p));

18
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/datastats/DatsStatsDao.xml

@ -1184,4 +1184,22 @@
AND pids LIKE CONCAT('%', #{agencyId}, '%')
GROUP BY grid_id, date_id
</select>
<select id="getGridProejctToProjectMain" resultType="com.epmet.dataaggre.dto.govorg.result.GridDateIdResultDTO">
SELECT
grid_id gridId,
date_id dateId,
pids pids
FROM
fact_origin_project_main_daily
WHERE
del_flag = '0'
AND grid_id IS NOT NULL
AND grid_id != ''
AND date_id <![CDATA[ >= ]]> #{startTime}
AND date_id <![CDATA[ <= ]]> #{endTime}
AND pids LIKE CONCAT('%', #{agencyId}, '%')
GROUP BY grid_id, date_id
</select>
</mapper>

16
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/evaluationindex/EvaluationIndexDao.xml

@ -196,4 +196,20 @@
ORDER BY project_total DESC
</select>
<select id="getGridProejctToProjectMain" resultType="com.epmet.dataaggre.dto.govorg.result.GridDateIdResultDTO">
SELECT
org_id gridId,
DATE_FORMAT(project_create_time, "%Y%m%d") dateId,
all_parent_ids pids
FROM
screen_project_data
WHERE
del_flag = '0'
AND org_type = 'grid'
AND DATE_FORMAT(created_time, "%Y%m%d") <![CDATA[ >= ]]> #{startTime}
AND DATE_FORMAT(created_time, "%Y%m%d") <![CDATA[ <= ]]> #{endTime}
AND all_parent_ids LIKE CONCAT('%', #{agencyId}, '%')
GROUP BY org_id, DATE_FORMAT(project_create_time, "%Y%m%d")
</select>
</mapper>

56
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/extract/result/GridProjectToProjectMainDTO.java

@ -0,0 +1,56 @@
/**
* 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.extract.result;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 网格项目main表数据
*/
@Data
public class GridProjectToProjectMainDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 项目ID
*/
private String projectId;
/**
* 项目的发布日期yyyyMMdd
*/
private String dateId;
/**
* 网格ID
*/
private String gridId;
/**
* 状态
*/
private String projectStatus;
/**
* resolved unresolved
* */
private String isResolved;
}

23
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/ShiBeiICJobController.java

@ -73,6 +73,9 @@ public class ShiBeiICJobController {
if (bizType.equals(BizTypeEnum.PROJECT.getType())) {
this.agencyProjectStats(customerId, d);
}
if (bizType.equals(BizTypeEnum.GRID_PROJECT.getType())) {
this.gridProjectStats(customerId, d);
}
}
/**
@ -95,6 +98,26 @@ public class ShiBeiICJobController {
new Result();
}
/**
* @Author sun
* @Description 数据-项目-网格日()统计
**/
private void gridProjectStats(String customerId, String dateId) {
try {
if (StringUtils.isNotBlank(dateId)) {
dateId = DateUtils.format(DateUtils.parseDate(dateId, DateUtils.DATE_PATTERN_YYYYMMDD));
}
StatsFormDTO formDTO = new StatsFormDTO();
formDTO.setCustomerId(customerId);
formDTO.setDate(dateId);
statsProjectService.gridProjectStats(formDTO);
} catch (Exception e) {
log.error("网格项目日、月统计失败,参数为:{}" + customerId + StrConstant.HYPHEN + dateId, e);
}
new Result();
}
private void extractUserPointData(String customerId, String dateId) {
try {
//基层治理 - 热心市民 screen_party_user_rank_data

8
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/stats/FactAgencyProjectDailyDao.java

@ -18,8 +18,10 @@
package com.epmet.dao.stats;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.extract.result.GridProjectToProjectMainDTO;
import com.epmet.dto.project.form.MonthProjectListFormDTO;
import com.epmet.entity.evaluationindex.screen.ScreenUserTotalDataEntity;
import com.epmet.entity.project.ProjectEntity;
import com.epmet.entity.stats.FactAgencyProjectDailyEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -60,4 +62,10 @@ public interface FactAgencyProjectDailyDao extends BaseDao<FactAgencyProjectDail
**/
List<ScreenUserTotalDataEntity> selectProjectCountByOrgLevel(@Param("orgLevel") String orgLevel, @Param("customerId") String customerId, @Param("dateId")String dateId );
/**
* @Author sun
* @Description 查询客户项目main表里是网格项目的数据
**/
List<GridProjectToProjectMainDTO> getGridProjectToProjectMain(ProjectEntity projectEntity);
}

65
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsProjectServiceImpl.java

@ -5,12 +5,11 @@ import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.constant.PingYinConstant;
import com.epmet.constant.ProjectConstant;
import com.epmet.dto.ProjectDTO;
import com.epmet.dto.StatsFormDTO;
import com.epmet.dto.extract.result.GridProjectToProjectMainDTO;
import com.epmet.dto.project.form.MonthProjectListFormDTO;
import com.epmet.dto.stats.DimAgencyDTO;
import com.epmet.dto.stats.DimGridDTO;
import com.epmet.entity.issue.IssueEntity;
import com.epmet.entity.org.CustomerAgencyEntity;
import com.epmet.entity.project.ProjectEntity;
import com.epmet.entity.project.ProjectProcessEntity;
@ -677,26 +676,16 @@ public class StatsProjectServiceImpl implements StatsProjectService {
}
//2022.3.3 end sun
//3:根据客户Id查询项目业务表已结案数据(查询传入日期及之前的数据)
ProjectEntity projectEntity = new ProjectEntity();
projectEntity.setCustomerId(customerId);
projectEntity.setCreatedTime(date);
projectEntity.setStatus(ProjectConstant.CLOSED);
List<ProjectEntity> projectList = projectService.getProjectList(projectEntity);
//4:查询项目处理进展表中有效数据(创建日期截取yyyy-mm-dd格式字段值)(查询传入日期及之前的数据)
List<ProjectProcessEntity> processList = projectProcessService.getProcessList(projectEntity);
//5:网格层级日月统计
//3:网格层级日月统计
if (null != dimGridList && dimGridList.size() > NumConstant.ZERO) {
//5.1:执行网格日数据统计
//3-1:执行网格日数据统计
try {
gridDateProjectStats(customerId, dimId, date, dimGridList, projectList, processList);
gridDateProjectStats(customerId, dimId, date, dimGridList);
} catch (Exception e) {
log.error(String.format(ProjectConstant.STATS_FAILED_PREFIX, "gridDateProjectStats", customerId, dimId.getDateId()), e);
}
//5.2:执行网格月数据统计
//3-2:执行网格月数据统计
try {
gridMonthProjectStats(customerId, dimId, dimGridList);
} catch (Exception e) {
@ -712,22 +701,44 @@ public class StatsProjectServiceImpl implements StatsProjectService {
* @Author sun
* @Description 数据-项目-网格日统计
**/
private String gridDateProjectStats(String customerId, DimIdGenerator.DimIdBean dimId, Date date, List<DimGridEntity> dimGridList, List<ProjectEntity> projectList, List<ProjectProcessEntity> processList) {
private String gridDateProjectStats(String customerId, DimIdGenerator.DimIdBean dimId, Date date, List<DimGridEntity> dimGridList) {
//批量网格日统计新增对象
List<FactGridProjectDailyEntity> gridDateEntityList = new ArrayList<>();
//计算百分比使用,保留小数点后两位
NumberFormat numberFormat = NumberFormat.getInstance();
numberFormat.setMaximumFractionDigits(6);
//1:根据客户Id查询议题库已转项目的网格项目关系数据
/*//1:根据客户Id查询议题库已转项目的网格项目关系数据
IssueEntity issueEntity = new IssueEntity();
issueEntity.setCustomerId(customerId);
issueEntity.setCreatedTime(date);
List<IssueEntity> gridProjectList = issueService.getGridProjectList(issueEntity);
List<IssueEntity> gridProjectList = issueService.getGridProjectList(issueEntity);*/
//2:遍历网格维度数据,统计每个网格各项指标数据
ProjectEntity projectEntity = new ProjectEntity();
projectEntity.setCustomerId(customerId);
projectEntity.setCreatedTime(date);
//2022.3.11 网格项目数据原先查的是来源议题的项目,现在网格的项目有来源议题、事件上报给网格、网格员在网格内上报事件,所以网格的项目统计改查询项目的main表中网格项目数据
//1.查询客户项目main表里是网格项目的数据
List<GridProjectToProjectMainDTO> gridProjectList = factAgencyProjectDailyService.getGridProjectToProjectMain(projectEntity);
//2.筛选出已结案项目,用于后续统计结案项目的已解决未解决数
List<ProjectEntity> projectList = new ArrayList<>();
ProjectEntity entity = null;
for (GridProjectToProjectMainDTO gp : gridProjectList){
if(ProjectConstant.CLOSED.equals(gp.getProjectStatus())){
entity = new ProjectEntity();
entity.setId(gp.getProjectId() );
entity.setClosedStatus(gp.getIsResolved());
projectList.add(entity);
}
}
//3.查询客户下项目节点表数据,用于统计不同状态项目数、日增量数
List<ProjectProcessEntity> processList = projectProcessService.getProcessList(projectEntity);
//4:遍历网格维度数据,统计每个网格各项指标数据
for (DimGridEntity grid : dimGridList) {
//2.1:存放网格下的项目Id
//4-1:存放网格下的项目Id
Map<String, String> map = new HashMap<>();
gridProjectList.forEach(gridProject -> {
if (grid.getId().equals(gridProject.getGridId())) {
@ -748,7 +759,7 @@ public class StatsProjectServiceImpl implements StatsProjectService {
Map<String, String> closeMap = new HashMap<>();
//存放前一日已结案项目Id,用于统计日增量中已结案项目的已解决、未解决数量
Map<String, String> closeDateMap = new HashMap<>();
//2.2:遍历进展数据,统计截止当日的项目总量、处理中总量、已结案总量以及日增量中的项目总量、处理中总量、已结案总量
//4-2:遍历进展数据,统计截止当日的项目总量、处理中总量、已结案总量以及日增量中的项目总量、处理中总量、已结案总量
//截止当日项目总数
projectTotal.addAndGet(map.size());
processList.forEach(process -> {
@ -771,7 +782,7 @@ public class StatsProjectServiceImpl implements StatsProjectService {
}
}
});
//2.3:遍历项目业务数据,统计截止当日的已结案已解决总量、已结案未解决总量以及日增量中的已结案已解决总量、已结案未解决总量
//4-3:遍历项目业务数据,统计截止当日的已结案已解决总量、已结案未解决总量以及日增量中的已结案已解决总量、已结案未解决总量
projectList.forEach(project -> {
//当前机关及下级
if (map.containsKey(project.getId())) {
@ -798,7 +809,7 @@ public class StatsProjectServiceImpl implements StatsProjectService {
}
});
//2.4:封装日数据对象
//4-4:封装日数据对象
FactGridProjectDailyEntity gridDailyEntity = new FactGridProjectDailyEntity();
gridDailyEntity.setCustomerId(customerId);
gridDailyEntity.setAgencyId(grid.getAgencyId());
@ -830,16 +841,16 @@ public class StatsProjectServiceImpl implements StatsProjectService {
gridDateEntityList.add(gridDailyEntity);
}
//3:批量新增数据,先删后增
//5:批量新增数据,先删后增
if (null != gridDateEntityList && gridDateEntityList.size() > NumConstant.ZERO) {
//3.1:根据客户Id、日维度Id批量物理删除一下可能存在的历史数据
//5-1:根据客户Id、日维度Id批量物理删除一下可能存在的历史数据
FactAgencyProjectDailyEntity delEntity = new FactAgencyProjectDailyEntity();
delEntity.setCustomerId(customerId);
delEntity.setDateId(dimId.getDateId());
log.info("StatsProjectServiceImpl.gridDateProjectStats-根据客户Id、日维度Id批量删除网格项目日统计表数据,对应客户Id:" + customerId + ",日维度Id:" + dimId.getDateId());
factGridProjectDailyService.delDateProject(delEntity);
//3.2:批量保存网格日统计数据
//5-2:批量保存网格日统计数据
log.info("StatsProjectServiceImpl.gridDateProjectStats-批量新增网格项目日统计表数据,对应客户Id:" + customerId + ",日维度Id:" + dimId.getDateId());
factGridProjectDailyService.insertBatch(gridDateEntityList);
}

8
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactAgencyProjectDailyService.java

@ -18,7 +18,9 @@
package com.epmet.service.stats;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.dto.extract.result.GridProjectToProjectMainDTO;
import com.epmet.dto.project.form.MonthProjectListFormDTO;
import com.epmet.entity.project.ProjectEntity;
import com.epmet.entity.stats.FactAgencyProjectDailyEntity;
import java.util.List;
@ -44,4 +46,10 @@ public interface FactAgencyProjectDailyService extends BaseService<FactAgencyPro
* @Description 根据客户Id日维度Id批量物理删除一下可能存在的历史数据
**/
void delDateProject(FactAgencyProjectDailyEntity delEntity);
/**
* @Author sun
* @Description 查询客户项目main表里是网格项目的数据
**/
List<GridProjectToProjectMainDTO> getGridProjectToProjectMain(ProjectEntity projectEntity);
}

12
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactAgencyProjectDailyServiceImpl.java

@ -21,7 +21,9 @@ import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.constant.DataSourceConstant;
import com.epmet.dao.stats.FactAgencyProjectDailyDao;
import com.epmet.dto.extract.result.GridProjectToProjectMainDTO;
import com.epmet.dto.project.form.MonthProjectListFormDTO;
import com.epmet.entity.project.ProjectEntity;
import com.epmet.entity.stats.FactAgencyProjectDailyEntity;
import com.epmet.service.stats.FactAgencyProjectDailyService;
import org.springframework.stereotype.Service;
@ -58,4 +60,14 @@ public class FactAgencyProjectDailyServiceImpl extends BaseServiceImpl<FactAgenc
public void delDateProject(FactAgencyProjectDailyEntity delEntity) {
baseDao.delDateProject(delEntity);
}
/**
* @Author sun
* @Description 查询客户项目main表里是网格项目的数据
**/
@Override
public List<GridProjectToProjectMainDTO> getGridProjectToProjectMain(ProjectEntity projectEntity) {
return baseDao.getGridProjectToProjectMain(projectEntity);
}
}

17
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/stats/FactAgencyProjectDailyDao.xml

@ -44,5 +44,22 @@
AND DATE_ID = #{dateId}
</select>
<select id="getGridProjectToProjectMain" resultType="com.epmet.dto.extract.result.GridProjectToProjectMainDTO">
SELECT
id projectId,
date_id dateId,
grid_id gridId,
project_status projectStatus,
is_resolved isResolved
FROM
fact_origin_project_main_daily
WHERE
del_flag = '0'
AND grid_id IS NOT NULL
AND grid_id != ''
AND customer_id = #{customerId}
AND date_id <![CDATA[ <= ]]> DATE_FORMAT(#{createdTime}, "%Y%m%d")
</select>
</mapper>

23
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/DelPartyServiceCenterResultDTO.java

@ -0,0 +1,23 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2022/3/15 10:43 上午
* @DESC
*/
@Data
public class DelPartyServiceCenterResultDTO implements Serializable {
private static final long serialVersionUID = -2238226229442700788L;
private String date;
private String matterId;
private String timeId;
private String startTime;
private String endTime;
private String centerName;
}

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java

@ -84,7 +84,7 @@ public class IcPartyServiceCenterController {
return new Result();
}
@DeleteMapping
@PostMapping("del")
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");

27
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPartyServiceCenterDao.java

@ -19,12 +19,14 @@ package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.result.AllMattersResultDTO;
import com.epmet.dto.result.DelPartyServiceCenterResultDTO;
import com.epmet.dto.result.PartyServiceCenterListResultDTO;
import com.epmet.entity.IcPartyServiceCenterEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* 党群服务中心
@ -61,4 +63,29 @@ public interface IcPartyServiceCenterDao extends BaseDao<IcPartyServiceCenterEnt
List<AllMattersResultDTO> getAllMattersByOrgId(@Param("matterIds")List<String> matterIds);
/**
* Desc: 根据党群服务中心查询可预约事项ID
* @param centerIds
* @author zxc
* @date 2022/3/15 9:33 上午
*/
List<String> selectMatterByIds(@Param("centerIds")List<String> centerIds);
/**
* Desc: 根据事项ID查询预约记录
* @param matterIds
* @author zxc
* @date 2022/3/15 9:46 上午
*/
List<DelPartyServiceCenterResultDTO> selectAppointmentList(@Param("matterIds")List<String> matterIds);
/**
* Desc: 删除可预约事项
* @param centerIds
* @author zxc
* @date 2022/3/15 1:37 下午
*/
void delMatters(@Param("centerIds")List<String> centerIds);
}

51
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java

@ -41,7 +41,6 @@ import com.epmet.constant.PartyServiceCenterConstant;
import com.epmet.dao.IcMatterAppointmentRecordDao;
import com.epmet.dao.IcPartyServiceCenterDao;
import com.epmet.dto.IcPartyServiceCenterDTO;
import com.epmet.dto.RegisterRelationDTO;
import com.epmet.dto.TimeDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
@ -63,6 +62,7 @@ import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors;
@ -130,8 +130,53 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl<IcPartyServ
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
List<String> centerIds = Arrays.asList(ids);
List<String> matterIds = baseDao.selectMatterByIds(centerIds);
if (CollectionUtils.isEmpty(matterIds)){
baseDao.deleteBatchIds(centerIds);
}else {
List<DelPartyServiceCenterResultDTO> appointmentList = baseDao.selectAppointmentList(matterIds);
if (CollectionUtils.isEmpty(appointmentList)){
baseDao.deleteBatchIds(centerIds);
baseDao.delMatters(centerIds);
}else {
List<String> names = new ArrayList<>();
Map<String, List<DelPartyServiceCenterResultDTO>> groupByMatterId = appointmentList.stream().collect(Collectors.groupingBy(DelPartyServiceCenterResultDTO::getMatterId));
groupByMatterId.forEach((k,v) -> {
if (getMatterAppointmentList(v)){
names.add(v.get(0).getCenterName());
}
});
if (CollectionUtils.isNotEmpty(names)){
throw new EpmetException(names.stream().collect(Collectors.joining("、")) + "存在未来时间的预约事项,不允许删除");
}
baseDao.deleteBatchIds(centerIds);
baseDao.delMatters(centerIds);
}
}
}
public boolean getMatterAppointmentList(List<DelPartyServiceCenterResultDTO> list){
AtomicBoolean result = new AtomicBoolean(false);
if (CollectionUtils.isNotEmpty(list)){
list.forEach(l -> {
int[] timeIds = Arrays.asList(l.getTimeId().split(",")).stream().mapToInt(m -> Integer.parseInt(m)).toArray();
List<String> intervalTimeList = getIntervalTimeList(l.getStartTime(), l.getEndTime(), 30);
for (int timeId : timeIds) {
for (int i1 = 0; i1 < intervalTimeList.size(); i1++) {
if (timeId == i1 + 1){
String date = l.getDate() + " " + intervalTimeList.get(i1) + ":00";
if (DateUtils.parse(date,DateUtils.DATE_TIME_PATTERN).after(new Date())){
result.set(true);
return;
}
}
}
}
});
}
return result.get();
}
/**

49
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPartyServiceCenterDao.xml

@ -118,4 +118,53 @@
</foreach>
)
</select>
<!-- 根据党群服务中心查询可预约事项ID -->
<select id="selectMatterByIds" resultType="java.lang.String">
SELECT
ID
FROM ic_party_service_center_matter
WHERE DEL_FLAG = 0
AND PARTY_SERVICE_CENTER_ID IN (
<foreach collection="centerIds" item="centerId" separator=",">
#{centerId}
</foreach>
)
</select>
<!-- 根据事项ID查询预约记录 -->
<select id="selectAppointmentList" resultType="com.epmet.dto.result.DelPartyServiceCenterResultDTO">
SELECT
r.APPOINTMENT_DATE AS date,
r.MATTER_ID AS matterId,
r.TIME_ID AS timeId,
m.START_TIME AS startTime,
m.END_TIME AS endTime,
c.CENTER_NAME
FROM ic_matter_appointment_record r
INNER JOIN ic_party_service_center_matter m ON (m.ID = r.MATTER_ID AND m.DEL_FLAG = 0)
INNER JOIN ic_party_service_center c ON (c.id = m.PARTY_SERVICE_CENTER_ID AND c.DEL_FLAG = 0)
WHERE r.DEL_FLAG = 0
AND r.`STATUS` = 'appointing'
AND STR_TO_DATE(r.APPOINTMENT_DATE,'%Y-%m-%d') >= DATE_FORMAT(NOW(),'%Y-%m-%d')
AND r.MATTER_ID IN (
<foreach collection="matterIds" item="matterId" separator=",">
#{matterId}
</foreach>
)
</select>
<!-- 删除可预约事项 -->
<update id="delMatters">
UPDATE ic_party_service_center_matter
SET del_flag = 1,
UPDATED_TIME = NOW()
WHERE DEL_FLAG = 0
AND PARTY_SERVICE_CENTER_ID IN (
<foreach collection="centerIds" item="centerId" separator=",">
#{centerId}
</foreach>
)
</update>
</mapper>

105
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/MemoAttachmentDTO.java

@ -0,0 +1,105 @@
package com.epmet.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 备忘录-附件表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-03-15
*/
@Data
public class MemoAttachmentDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* REMIND_MSG.ID
*/
private String remindMsgId;
/**
* 文件名
*/
private String fileName;
/**
* 附件名uuid随机生成
*/
private String attachmentName;
/**
* 文件大小单位b
*/
private Integer attachmentSize;
/**
* 文件格式JPGPNGPDFJPEGBMPMP4WMAM4AMP3DOCDOCXXLS
*/
private String attachmentFormat;
/**
* 附件类型图片 - image 视频 - video 语音 - voice 文档 - doc
*/
private String attachmentType;
/**
* 附件地址
*/
private String attachmentUrl;
/**
* 语音或视频时长,
*/
private Integer duration;
/**
* 排序字段
*/
private Integer sort;
/**
* 删除标记 0未删除1已删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

80
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/MemoAttrDTO.java

@ -0,0 +1,80 @@
package com.epmet.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 备忘录-属性表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-03-15
*/
@Data
public class MemoAttrDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 唯一标识
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 提醒时间
*/
private Date remindTime;
/**
* 业务类型 人员关怀concern难点堵点difficulty工作日志work_diary
*/
private String type;
/**
* 阅读标记1 已读0未读
*/
private Integer readFlag;
/**
* 接收人ID
*/
private String receiver;
/**
* 删除标识0.未删除 1.已删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

105
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/MemoConcernDTO.java

@ -0,0 +1,105 @@
package com.epmet.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 备忘录-人文关怀
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-03-15
*/
@Data
public class MemoConcernDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 唯一标识(同memo_attr表Id)
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 关怀类型
*/
private String concernType;
/**
* 关怀对象
*/
private String resiName;
/**
* 关怀对象电话
*/
private String phnoe;
/**
* 关怀对象地址
*/
private String address;
/**
* 关怀事项
*/
private String content;
/**
* 计划执行时间
*/
private Date scheduledTime;
/**
* 实际执行时间
*/
private Date actualTime;
/**
* 状态 0未完成 1已完成
*/
private Integer status;
/**
* 提醒时间
*/
private Date remindTime;
/**
* 删除标识0.未删除 1.已删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 操作人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

85
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/MemoDifficultyDTO.java

@ -0,0 +1,85 @@
package com.epmet.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 备忘录-难点读点
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-03-15
*/
@Data
public class MemoDifficultyDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 唯一标识(同memo_attr表Id)
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 内容
*/
private String content;
/**
* 解决方式
*/
private String resolveWay;
/**
* 备注
*/
private String remark;
/**
* 计划执行时间
*/
private Date scheduledTime;
/**
* 提醒时间
*/
private Date remindTime;
/**
* 删除标识0.未删除 1.已删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

75
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/MemoWorkDiaryDTO.java

@ -0,0 +1,75 @@
package com.epmet.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 备忘录-工作日志
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-03-15
*/
@Data
public class MemoWorkDiaryDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 唯一标识(同memo_attr表Id)
*/
private String id;
/**
* 客户ID
*/
private String customerId;
/**
* 工作事项
*/
private String workType;
/**
* 内容
*/
private String content;
/**
* 提醒时间
*/
private Date remindTime;
/**
* 删除标识0.未删除 1.已删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

72
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/MemoAttachmentController.java

@ -0,0 +1,72 @@
package com.epmet.controller;
import com.epmet.commons.tools.aop.NoRepeatSubmit;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.MemoAttachmentDTO;
import com.epmet.service.MemoAttachmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
* 备忘录-附件表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-03-15
*/
@RestController
@RequestMapping("memoAttachment")
public class MemoAttachmentController {
@Autowired
private MemoAttachmentService memoAttachmentService;
@RequestMapping("page")
public Result<PageData<MemoAttachmentDTO>> page(@RequestParam Map<String, Object> params){
PageData<MemoAttachmentDTO> page = memoAttachmentService.page(params);
return new Result<PageData<MemoAttachmentDTO>>().ok(page);
}
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET})
public Result<MemoAttachmentDTO> get(@PathVariable("id") String id){
MemoAttachmentDTO data = memoAttachmentService.get(id);
return new Result<MemoAttachmentDTO>().ok(data);
}
@NoRepeatSubmit
@PostMapping("save")
public Result save(@RequestBody MemoAttachmentDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
memoAttachmentService.save(dto);
return new Result();
}
@NoRepeatSubmit
@PostMapping("update")
public Result update(@RequestBody MemoAttachmentDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
memoAttachmentService.update(dto);
return new Result();
}
@PostMapping("delete")
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
memoAttachmentService.delete(ids);
return new Result();
}
}

72
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/MemoAttrController.java

@ -0,0 +1,72 @@
package com.epmet.controller;
import com.epmet.commons.tools.aop.NoRepeatSubmit;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.MemoAttrDTO;
import com.epmet.service.MemoAttrService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
* 备忘录-属性表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-03-15
*/
@RestController
@RequestMapping("memoAttr")
public class MemoAttrController {
@Autowired
private MemoAttrService memoAttrService;
@RequestMapping("page")
public Result<PageData<MemoAttrDTO>> page(@RequestParam Map<String, Object> params){
PageData<MemoAttrDTO> page = memoAttrService.page(params);
return new Result<PageData<MemoAttrDTO>>().ok(page);
}
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET})
public Result<MemoAttrDTO> get(@PathVariable("id") String id){
MemoAttrDTO data = memoAttrService.get(id);
return new Result<MemoAttrDTO>().ok(data);
}
@NoRepeatSubmit
@PostMapping("save")
public Result save(@RequestBody MemoAttrDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
memoAttrService.save(dto);
return new Result();
}
@NoRepeatSubmit
@PostMapping("update")
public Result update(@RequestBody MemoAttrDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
memoAttrService.update(dto);
return new Result();
}
@PostMapping("delete")
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
memoAttrService.delete(ids);
return new Result();
}
}

72
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/MemoConcernController.java

@ -0,0 +1,72 @@
package com.epmet.controller;
import com.epmet.commons.tools.aop.NoRepeatSubmit;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.MemoConcernDTO;
import com.epmet.service.MemoConcernService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
* 备忘录-人文关怀
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-03-15
*/
@RestController
@RequestMapping("memoConcern")
public class MemoConcernController {
@Autowired
private MemoConcernService memoConcernService;
@RequestMapping("page")
public Result<PageData<MemoConcernDTO>> page(@RequestParam Map<String, Object> params){
PageData<MemoConcernDTO> page = memoConcernService.page(params);
return new Result<PageData<MemoConcernDTO>>().ok(page);
}
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET})
public Result<MemoConcernDTO> get(@PathVariable("id") String id){
MemoConcernDTO data = memoConcernService.get(id);
return new Result<MemoConcernDTO>().ok(data);
}
@NoRepeatSubmit
@PostMapping("save")
public Result save(@RequestBody MemoConcernDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
memoConcernService.save(dto);
return new Result();
}
@NoRepeatSubmit
@PostMapping("update")
public Result update(@RequestBody MemoConcernDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
memoConcernService.update(dto);
return new Result();
}
@PostMapping("delete")
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
memoConcernService.delete(ids);
return new Result();
}
}

72
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/MemoDifficultyController.java

@ -0,0 +1,72 @@
package com.epmet.controller;
import com.epmet.commons.tools.aop.NoRepeatSubmit;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.MemoDifficultyDTO;
import com.epmet.service.MemoDifficultyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
* 备忘录-难点读点
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-03-15
*/
@RestController
@RequestMapping("memoDifficulty")
public class MemoDifficultyController {
@Autowired
private MemoDifficultyService memoDifficultyService;
@RequestMapping("page")
public Result<PageData<MemoDifficultyDTO>> page(@RequestParam Map<String, Object> params){
PageData<MemoDifficultyDTO> page = memoDifficultyService.page(params);
return new Result<PageData<MemoDifficultyDTO>>().ok(page);
}
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET})
public Result<MemoDifficultyDTO> get(@PathVariable("id") String id){
MemoDifficultyDTO data = memoDifficultyService.get(id);
return new Result<MemoDifficultyDTO>().ok(data);
}
@NoRepeatSubmit
@PostMapping("save")
public Result save(@RequestBody MemoDifficultyDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
memoDifficultyService.save(dto);
return new Result();
}
@NoRepeatSubmit
@PostMapping("update")
public Result update(@RequestBody MemoDifficultyDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
memoDifficultyService.update(dto);
return new Result();
}
@PostMapping("delete")
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
memoDifficultyService.delete(ids);
return new Result();
}
}

72
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/MemoWorkDiaryController.java

@ -0,0 +1,72 @@
package com.epmet.controller;
import com.epmet.commons.tools.aop.NoRepeatSubmit;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.MemoWorkDiaryDTO;
import com.epmet.service.MemoWorkDiaryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
* 备忘录-工作日志
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-03-15
*/
@RestController
@RequestMapping("memoWorkDiary")
public class MemoWorkDiaryController {
@Autowired
private MemoWorkDiaryService memoWorkDiaryService;
@RequestMapping("page")
public Result<PageData<MemoWorkDiaryDTO>> page(@RequestParam Map<String, Object> params){
PageData<MemoWorkDiaryDTO> page = memoWorkDiaryService.page(params);
return new Result<PageData<MemoWorkDiaryDTO>>().ok(page);
}
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET})
public Result<MemoWorkDiaryDTO> get(@PathVariable("id") String id){
MemoWorkDiaryDTO data = memoWorkDiaryService.get(id);
return new Result<MemoWorkDiaryDTO>().ok(data);
}
@NoRepeatSubmit
@PostMapping("save")
public Result save(@RequestBody MemoWorkDiaryDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
memoWorkDiaryService.save(dto);
return new Result();
}
@NoRepeatSubmit
@PostMapping("update")
public Result update(@RequestBody MemoWorkDiaryDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
memoWorkDiaryService.update(dto);
return new Result();
}
@PostMapping("delete")
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
memoWorkDiaryService.delete(ids);
return new Result();
}
}

16
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/MemoAttachmentDao.java

@ -0,0 +1,16 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.MemoAttachmentEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 备忘录-附件表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-03-15
*/
@Mapper
public interface MemoAttachmentDao extends BaseDao<MemoAttachmentEntity> {
}

16
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/MemoAttrDao.java

@ -0,0 +1,16 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.MemoAttrEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 备忘录-属性表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-03-15
*/
@Mapper
public interface MemoAttrDao extends BaseDao<MemoAttrEntity> {
}

16
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/MemoConcernDao.java

@ -0,0 +1,16 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.MemoConcernEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 备忘录-人文关怀
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-03-15
*/
@Mapper
public interface MemoConcernDao extends BaseDao<MemoConcernEntity> {
}

16
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/MemoDifficultyDao.java

@ -0,0 +1,16 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.MemoDifficultyEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 备忘录-难点读点
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-03-15
*/
@Mapper
public interface MemoDifficultyDao extends BaseDao<MemoDifficultyEntity> {
}

16
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/MemoWorkDiaryDao.java

@ -0,0 +1,16 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.MemoWorkDiaryEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 备忘录-工作日志
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-03-15
*/
@Mapper
public interface MemoWorkDiaryDao extends BaseDao<MemoWorkDiaryEntity> {
}

71
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/MemoAttachmentEntity.java

@ -0,0 +1,71 @@
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 备忘录-附件表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-03-15
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("memo_attachment")
public class MemoAttachmentEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户ID
*/
private String customerId;
/**
* REMIND_MSG.ID
*/
private String remindMsgId;
/**
* 文件名
*/
private String fileName;
/**
* 附件名uuid随机生成
*/
private String attachmentName;
/**
* 文件大小单位b
*/
private Integer attachmentSize;
/**
* 文件格式JPGPNGPDFJPEGBMPMP4WMAM4AMP3DOCDOCXXLS
*/
private String attachmentFormat;
/**
* 附件类型图片 - image 视频 - video 语音 - voice 文档 - doc
*/
private String attachmentType;
/**
* 附件地址
*/
private String attachmentUrl;
/**
* 语音或视频时长,
*/
private Integer duration;
/**
* 排序字段
*/
private Integer sort;
}

48
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/MemoAttrEntity.java

@ -0,0 +1,48 @@
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-03-15
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("memo_attr")
public class MemoAttrEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户ID
*/
private String customerId;
/**
* 提醒时间
*/
private Date remindTime;
/**
* 业务类型 人员关怀concern难点堵点difficulty工作日志work_diary
*/
private String type;
/**
* 阅读标记1 已读0未读
*/
private Integer readFlag;
/**
* 接收人ID
*/
private String receiver;
}

73
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/MemoConcernEntity.java

@ -0,0 +1,73 @@
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-03-15
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("memo_concern")
public class MemoConcernEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户ID
*/
private String customerId;
/**
* 关怀类型
*/
private String concernType;
/**
* 关怀对象
*/
private String resiName;
/**
* 关怀对象电话
*/
private String phnoe;
/**
* 关怀对象地址
*/
private String address;
/**
* 关怀事项
*/
private String content;
/**
* 计划执行时间
*/
private Date scheduledTime;
/**
* 实际执行时间
*/
private Date actualTime;
/**
* 状态 0未完成 1已完成
*/
private Integer status;
/**
* 提醒时间
*/
private Date remindTime;
}

53
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/MemoDifficultyEntity.java

@ -0,0 +1,53 @@
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-03-15
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("memo_difficulty")
public class MemoDifficultyEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户ID
*/
private String customerId;
/**
* 内容
*/
private String content;
/**
* 解决方式
*/
private String resolveWay;
/**
* 备注
*/
private String remark;
/**
* 计划执行时间
*/
private Date scheduledTime;
/**
* 提醒时间
*/
private Date remindTime;
}

43
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/MemoWorkDiaryEntity.java

@ -0,0 +1,43 @@
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-03-15
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("memo_work_diary")
public class MemoWorkDiaryEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户ID
*/
private String customerId;
/**
* 工作事项
*/
private String workType;
/**
* 内容
*/
private String content;
/**
* 提醒时间
*/
private Date remindTime;
}

78
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/MemoAttachmentService.java

@ -0,0 +1,78 @@
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.MemoAttachmentDTO;
import com.epmet.entity.MemoAttachmentEntity;
import java.util.List;
import java.util.Map;
/**
* 备忘录-附件表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-03-15
*/
public interface MemoAttachmentService extends BaseService<MemoAttachmentEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<MemoAttachmentDTO>
* @author generator
* @date 2022-03-15
*/
PageData<MemoAttachmentDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<MemoAttachmentDTO>
* @author generator
* @date 2022-03-15
*/
List<MemoAttachmentDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return MemoAttachmentDTO
* @author generator
* @date 2022-03-15
*/
MemoAttachmentDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2022-03-15
*/
void save(MemoAttachmentDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2022-03-15
*/
void update(MemoAttachmentDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2022-03-15
*/
void delete(String[] ids);
}

78
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/MemoAttrService.java

@ -0,0 +1,78 @@
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.MemoAttrDTO;
import com.epmet.entity.MemoAttrEntity;
import java.util.List;
import java.util.Map;
/**
* 备忘录-属性表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-03-15
*/
public interface MemoAttrService extends BaseService<MemoAttrEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<MemoAttrDTO>
* @author generator
* @date 2022-03-15
*/
PageData<MemoAttrDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<MemoAttrDTO>
* @author generator
* @date 2022-03-15
*/
List<MemoAttrDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return MemoAttrDTO
* @author generator
* @date 2022-03-15
*/
MemoAttrDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2022-03-15
*/
void save(MemoAttrDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2022-03-15
*/
void update(MemoAttrDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2022-03-15
*/
void delete(String[] ids);
}

78
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/MemoConcernService.java

@ -0,0 +1,78 @@
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.MemoConcernDTO;
import com.epmet.entity.MemoConcernEntity;
import java.util.List;
import java.util.Map;
/**
* 备忘录-人文关怀
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-03-15
*/
public interface MemoConcernService extends BaseService<MemoConcernEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<MemoConcernDTO>
* @author generator
* @date 2022-03-15
*/
PageData<MemoConcernDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<MemoConcernDTO>
* @author generator
* @date 2022-03-15
*/
List<MemoConcernDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return MemoConcernDTO
* @author generator
* @date 2022-03-15
*/
MemoConcernDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2022-03-15
*/
void save(MemoConcernDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2022-03-15
*/
void update(MemoConcernDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2022-03-15
*/
void delete(String[] ids);
}

78
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/MemoDifficultyService.java

@ -0,0 +1,78 @@
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.MemoDifficultyDTO;
import com.epmet.entity.MemoDifficultyEntity;
import java.util.List;
import java.util.Map;
/**
* 备忘录-难点读点
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-03-15
*/
public interface MemoDifficultyService extends BaseService<MemoDifficultyEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<MemoDifficultyDTO>
* @author generator
* @date 2022-03-15
*/
PageData<MemoDifficultyDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<MemoDifficultyDTO>
* @author generator
* @date 2022-03-15
*/
List<MemoDifficultyDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return MemoDifficultyDTO
* @author generator
* @date 2022-03-15
*/
MemoDifficultyDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2022-03-15
*/
void save(MemoDifficultyDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2022-03-15
*/
void update(MemoDifficultyDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2022-03-15
*/
void delete(String[] ids);
}

78
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/MemoWorkDiaryService.java

@ -0,0 +1,78 @@
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.MemoWorkDiaryDTO;
import com.epmet.entity.MemoWorkDiaryEntity;
import java.util.List;
import java.util.Map;
/**
* 备忘录-工作日志
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2022-03-15
*/
public interface MemoWorkDiaryService extends BaseService<MemoWorkDiaryEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<MemoWorkDiaryDTO>
* @author generator
* @date 2022-03-15
*/
PageData<MemoWorkDiaryDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<MemoWorkDiaryDTO>
* @author generator
* @date 2022-03-15
*/
List<MemoWorkDiaryDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return MemoWorkDiaryDTO
* @author generator
* @date 2022-03-15
*/
MemoWorkDiaryDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2022-03-15
*/
void save(MemoWorkDiaryDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2022-03-15
*/
void update(MemoWorkDiaryDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2022-03-15
*/
void delete(String[] ids);
}

83
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/MemoAttachmentServiceImpl.java

@ -0,0 +1,83 @@
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.constant.FieldConstant;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.dao.MemoAttachmentDao;
import com.epmet.dto.MemoAttachmentDTO;
import com.epmet.entity.MemoAttachmentEntity;
import com.epmet.service.MemoAttachmentService;
import org.apache.commons.lang3.StringUtils;
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-03-15
*/
@Service
public class MemoAttachmentServiceImpl extends BaseServiceImpl<MemoAttachmentDao, MemoAttachmentEntity> implements MemoAttachmentService {
@Override
public PageData<MemoAttachmentDTO> page(Map<String, Object> params) {
IPage<MemoAttachmentEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, MemoAttachmentDTO.class);
}
@Override
public List<MemoAttachmentDTO> list(Map<String, Object> params) {
List<MemoAttachmentEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, MemoAttachmentDTO.class);
}
private QueryWrapper<MemoAttachmentEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<MemoAttachmentEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public MemoAttachmentDTO get(String id) {
MemoAttachmentEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, MemoAttachmentDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(MemoAttachmentDTO dto) {
MemoAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, MemoAttachmentEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(MemoAttachmentDTO dto) {
MemoAttachmentEntity entity = ConvertUtils.sourceToTarget(dto, MemoAttachmentEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
}

83
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/MemoAttrServiceImpl.java

@ -0,0 +1,83 @@
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.constant.FieldConstant;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.dao.MemoAttrDao;
import com.epmet.dto.MemoAttrDTO;
import com.epmet.entity.MemoAttrEntity;
import com.epmet.service.MemoAttrService;
import org.apache.commons.lang3.StringUtils;
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-03-15
*/
@Service
public class MemoAttrServiceImpl extends BaseServiceImpl<MemoAttrDao, MemoAttrEntity> implements MemoAttrService {
@Override
public PageData<MemoAttrDTO> page(Map<String, Object> params) {
IPage<MemoAttrEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, MemoAttrDTO.class);
}
@Override
public List<MemoAttrDTO> list(Map<String, Object> params) {
List<MemoAttrEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, MemoAttrDTO.class);
}
private QueryWrapper<MemoAttrEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<MemoAttrEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public MemoAttrDTO get(String id) {
MemoAttrEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, MemoAttrDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(MemoAttrDTO dto) {
MemoAttrEntity entity = ConvertUtils.sourceToTarget(dto, MemoAttrEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(MemoAttrDTO dto) {
MemoAttrEntity entity = ConvertUtils.sourceToTarget(dto, MemoAttrEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
}

83
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/MemoConcernServiceImpl.java

@ -0,0 +1,83 @@
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.constant.FieldConstant;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.dao.MemoConcernDao;
import com.epmet.dto.MemoConcernDTO;
import com.epmet.entity.MemoConcernEntity;
import com.epmet.service.MemoConcernService;
import org.apache.commons.lang3.StringUtils;
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-03-15
*/
@Service
public class MemoConcernServiceImpl extends BaseServiceImpl<MemoConcernDao, MemoConcernEntity> implements MemoConcernService {
@Override
public PageData<MemoConcernDTO> page(Map<String, Object> params) {
IPage<MemoConcernEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, MemoConcernDTO.class);
}
@Override
public List<MemoConcernDTO> list(Map<String, Object> params) {
List<MemoConcernEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, MemoConcernDTO.class);
}
private QueryWrapper<MemoConcernEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<MemoConcernEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public MemoConcernDTO get(String id) {
MemoConcernEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, MemoConcernDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(MemoConcernDTO dto) {
MemoConcernEntity entity = ConvertUtils.sourceToTarget(dto, MemoConcernEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(MemoConcernDTO dto) {
MemoConcernEntity entity = ConvertUtils.sourceToTarget(dto, MemoConcernEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
}

83
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/MemoDifficultyServiceImpl.java

@ -0,0 +1,83 @@
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.constant.FieldConstant;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.dao.MemoDifficultyDao;
import com.epmet.dto.MemoDifficultyDTO;
import com.epmet.entity.MemoDifficultyEntity;
import com.epmet.service.MemoDifficultyService;
import org.apache.commons.lang3.StringUtils;
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-03-15
*/
@Service
public class MemoDifficultyServiceImpl extends BaseServiceImpl<MemoDifficultyDao, MemoDifficultyEntity> implements MemoDifficultyService {
@Override
public PageData<MemoDifficultyDTO> page(Map<String, Object> params) {
IPage<MemoDifficultyEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, MemoDifficultyDTO.class);
}
@Override
public List<MemoDifficultyDTO> list(Map<String, Object> params) {
List<MemoDifficultyEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, MemoDifficultyDTO.class);
}
private QueryWrapper<MemoDifficultyEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<MemoDifficultyEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public MemoDifficultyDTO get(String id) {
MemoDifficultyEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, MemoDifficultyDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(MemoDifficultyDTO dto) {
MemoDifficultyEntity entity = ConvertUtils.sourceToTarget(dto, MemoDifficultyEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(MemoDifficultyDTO dto) {
MemoDifficultyEntity entity = ConvertUtils.sourceToTarget(dto, MemoDifficultyEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
}

83
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/MemoWorkDiaryServiceImpl.java

@ -0,0 +1,83 @@
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.constant.FieldConstant;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.dao.MemoWorkDiaryDao;
import com.epmet.dto.MemoWorkDiaryDTO;
import com.epmet.entity.MemoWorkDiaryEntity;
import com.epmet.service.MemoWorkDiaryService;
import org.apache.commons.lang3.StringUtils;
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-03-15
*/
@Service
public class MemoWorkDiaryServiceImpl extends BaseServiceImpl<MemoWorkDiaryDao, MemoWorkDiaryEntity> implements MemoWorkDiaryService {
@Override
public PageData<MemoWorkDiaryDTO> page(Map<String, Object> params) {
IPage<MemoWorkDiaryEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, MemoWorkDiaryDTO.class);
}
@Override
public List<MemoWorkDiaryDTO> list(Map<String, Object> params) {
List<MemoWorkDiaryEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, MemoWorkDiaryDTO.class);
}
private QueryWrapper<MemoWorkDiaryEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<MemoWorkDiaryEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public MemoWorkDiaryDTO get(String id) {
MemoWorkDiaryEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, MemoWorkDiaryDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(MemoWorkDiaryDTO dto) {
MemoWorkDiaryEntity entity = ConvertUtils.sourceToTarget(dto, MemoWorkDiaryEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(MemoWorkDiaryDTO dto) {
MemoWorkDiaryEntity entity = ConvertUtils.sourceToTarget(dto, MemoWorkDiaryEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
}

8
epmet-module/gov-project/gov-project-server/src/main/resources/mapper/MemoAttachmentDao.xml

@ -0,0 +1,8 @@
<?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.MemoAttachmentDao">
</mapper>

8
epmet-module/gov-project/gov-project-server/src/main/resources/mapper/MemoAttrDao.xml

@ -0,0 +1,8 @@
<?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.MemoAttrDao">
</mapper>

8
epmet-module/gov-project/gov-project-server/src/main/resources/mapper/MemoConcernDao.xml

@ -0,0 +1,8 @@
<?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.MemoConcernDao">
</mapper>

8
epmet-module/gov-project/gov-project-server/src/main/resources/mapper/MemoDifficultyDao.xml

@ -0,0 +1,8 @@
<?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.MemoDifficultyDao">
</mapper>

8
epmet-module/gov-project/gov-project-server/src/main/resources/mapper/MemoWorkDiaryDao.xml

@ -0,0 +1,8 @@
<?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.MemoWorkDiaryDao">
</mapper>

2
epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataPatrolChangeEventListener.java

@ -83,7 +83,7 @@ public class OpenDataPatrolChangeEventListener implements MessageListenerConcurr
}
RLock lock = null;
try {
lock = distributedLock.getLock(String.format("lock:open_data_patrol:%s", msgObj.getPatrolId()),
lock = distributedLock.getLock(String.format("lock:open_data_patrol:%s:%s",tags, msgObj.getObjectId()),
30L, 30L, TimeUnit.SECONDS);
UpsertPatrolRecordForm patrolRecordForm = new UpsertPatrolRecordForm();
patrolRecordForm.setCustomerId(msgObj.getCustomerId());

4
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserImportServiceImpl.java

@ -1590,7 +1590,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res
if ("1".equals(oldValue)) {
IcUserChangeDetailedEntity changeDetail = fillChangeDetail(loginUserCustomerId, resiId, transferChangeRecord.getId(), oldAgencyId,
oldGridId, oldvillageId, oldBuildId, oldUnitId,
oldHomeId, transferChangeRecord.getType(), transferChangeRecord.getTypeName(), key, -1, pids);
oldHomeId, "out", "迁出", key, -1, pids);
icUserChangeDetailedDao.insert(changeDetail);
}
}
@ -1604,7 +1604,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res
if ("1".equals(newValue)) {
IcUserChangeDetailedEntity changeDetail = fillChangeDetail(loginUserCustomerId, resiId, transferChangeRecord.getId(), newAgencyId,
newGridId, newvillageId, newBuildId, newUnitId,
newHomeId, transferChangeRecord.getType(), transferChangeRecord.getTypeName(), key, 1, pids);
newHomeId, "in", "迁入", key, 1, pids);
icUserChangeDetailedDao.insert(changeDetail);
}
}

2
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StatsResiWarnServiceImpl.java

@ -368,7 +368,7 @@ public class StatsResiWarnServiceImpl implements StatsResiWarnService {
//南宁路社区第二网格亿联小区2号楼失业人员超出预警!
BuildingInfoCache infoCache = CustomerIcHouseRedis.getBuildingInfo(dto.getBuildingId());
if (null == infoCache) {
log.error(String.format("获取楼栋信息为null,buildingId=%s", dto.getBuildingId()));
log.warn(String.format("获取楼栋信息为null,buildingId=%s", dto.getBuildingId()));
continue;
}
String categoryName = StringUtils.isBlank(configMap.get(dto.getConfigId())) ? StrConstant.EPMETY_STR : configMap.get(dto.getConfigId());

Loading…
Cancel
Save