diff --git a/epmet-cloud-generator/src/main/resources/template/Controller.java.vm b/epmet-cloud-generator/src/main/resources/template/Controller.java.vm index b0aaad89eb..1e489dca52 100644 --- a/epmet-cloud-generator/src/main/resources/template/Controller.java.vm +++ b/epmet-cloud-generator/src/main/resources/template/Controller.java.vm @@ -71,6 +71,12 @@ public class ${className}Controller { return new Result(); } + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List<${className}DTO> list = ${classname}Service.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, ${className}Excel.class); + } + } diff --git a/epmet-commons/epmet-commons-tools/pom.xml b/epmet-commons/epmet-commons-tools/pom.xml index 7542899ad0..7f1fb8e728 100644 --- a/epmet-commons/epmet-commons-tools/pom.xml +++ b/epmet-commons/epmet-commons-tools/pom.xml @@ -169,13 +169,13 @@ com.google.zxing core - 3.3.2 + 3.4.1 com.google.zxing javase - 3.3.2 + 3.4.1 diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/CustomerGridFormDTO.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/CustomerGridFormDTO.java new file mode 100644 index 0000000000..767f03bc07 --- /dev/null +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/CustomerGridFormDTO.java @@ -0,0 +1,42 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.commons.tools.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + + +/** + * epmet-user端调用gov-org端的入参 + * @author sun + */ +@Data +public class CustomerGridFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + /** + * 网格Id + */ + @NotBlank(message = "网格ID不能为空", groups = {Grid.class}) + private String gridId; + + public interface Grid{} + +} \ No newline at end of file diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/CommonGovOrgFeignClient.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/CommonGovOrgFeignClient.java new file mode 100644 index 0000000000..bb6bfe423b --- /dev/null +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/CommonGovOrgFeignClient.java @@ -0,0 +1,29 @@ +package com.epmet.commons.tools.feign; + +import com.epmet.commons.tools.constant.ServiceConstant; +import com.epmet.commons.tools.dto.form.CustomerGridFormDTO; +import com.epmet.commons.tools.feign.fallback.CommonGovOrgFeignClientFallBackFactory; +import com.epmet.commons.tools.redis.common.bean.GridInfoCache; +import com.epmet.commons.tools.utils.Result; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; + +/** + * @Author zxc + * @DateTime 2022/3/17 1:42 下午 + * @DESC + */ +@FeignClient(name = ServiceConstant.GOV_ORG_SERVER, fallbackFactory = CommonGovOrgFeignClientFallBackFactory.class) +public interface CommonGovOrgFeignClient { + + /** + * @Description 查询网格信息 + * @param customerGridFormDTO + * @author zxc + * @date 2021/11/5 2:54 下午 + */ + @PostMapping("/gov/org/grid/getbaseinfo") + Result getGridInfo(@RequestBody CustomerGridFormDTO customerGridFormDTO); + +} diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/fallback/CommonGovOrgFeignClientFallBackFactory.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/fallback/CommonGovOrgFeignClientFallBackFactory.java new file mode 100644 index 0000000000..8cde59e6e1 --- /dev/null +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/fallback/CommonGovOrgFeignClientFallBackFactory.java @@ -0,0 +1,24 @@ +package com.epmet.commons.tools.feign.fallback; + +import com.epmet.commons.tools.exception.ExceptionUtils; +import com.epmet.commons.tools.feign.CommonGovOrgFeignClient; +import feign.hystrix.FallbackFactory; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Component; + +/** + * @Author zxc + * @DateTime 2022/3/17 1:46 下午 + * @DESC + */ +@Slf4j +@Component +public class CommonGovOrgFeignClientFallBackFactory implements FallbackFactory { + private CommonGovOrgFeignClientFallback fallback = new CommonGovOrgFeignClientFallback(); + @Override + public CommonGovOrgFeignClient create(Throwable cause) { + log.error(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause))); + return fallback; + } + +} diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/fallback/CommonGovOrgFeignClientFallback.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/fallback/CommonGovOrgFeignClientFallback.java new file mode 100644 index 0000000000..c54567c350 --- /dev/null +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/fallback/CommonGovOrgFeignClientFallback.java @@ -0,0 +1,26 @@ +package com.epmet.commons.tools.feign.fallback; + +import com.epmet.commons.tools.constant.ServiceConstant; +import com.epmet.commons.tools.dto.form.CustomerGridFormDTO; +import com.epmet.commons.tools.feign.CommonGovOrgFeignClient; +import com.epmet.commons.tools.redis.common.bean.GridInfoCache; +import com.epmet.commons.tools.utils.ModuleUtils; +import com.epmet.commons.tools.utils.Result; +import org.springframework.stereotype.Component; + +/** + * 调用政府端权限 + * @Author wxz + * @Description + * @Date 2020/4/24 11:17 + **/ +@Component +public class CommonGovOrgFeignClientFallback implements CommonGovOrgFeignClient { + + @Override + public Result getGridInfo(CustomerGridFormDTO customerGridFormDTO) { + return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getGridInfo", customerGridFormDTO); + } + + +} diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/CustomerOrgRedis.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/CustomerOrgRedis.java index f624c04bbc..7cb132b0f5 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/CustomerOrgRedis.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/CustomerOrgRedis.java @@ -1,8 +1,11 @@ package com.epmet.commons.tools.redis.common; import cn.hutool.core.bean.BeanUtil; +import com.alibaba.fastjson.JSON; +import com.epmet.commons.tools.dto.form.CustomerGridFormDTO; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.feign.CommonAggFeignClient; +import com.epmet.commons.tools.feign.CommonGovOrgFeignClient; import com.epmet.commons.tools.redis.RedisKeys; import com.epmet.commons.tools.redis.RedisUtils; import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; @@ -31,14 +34,18 @@ public class CustomerOrgRedis { @Autowired private CommonAggFeignClient commonAggFeignClient; + @Autowired + private CommonGovOrgFeignClient govOrgFeignClient; private static CustomerOrgRedis customerOrgRedis; + @PostConstruct public void init() { customerOrgRedis = this; customerOrgRedis.redisUtils = this.redisUtils; customerOrgRedis.commonAggFeignClient = this.commonAggFeignClient; + customerOrgRedis.govOrgFeignClient = this.govOrgFeignClient; } /** @@ -50,10 +57,13 @@ public class CustomerOrgRedis { public static GridInfoCache getGridInfo(String gridId){ String key = RedisKeys.getGridInfoKey(gridId); Map grid = customerOrgRedis.redisUtils.hGetAll(key); + log.info("grid is {}", JSON.toJSONString(grid)); if (!CollectionUtils.isEmpty(grid)) { return ConvertUtils.mapToEntity(grid, GridInfoCache.class); } - Result gridInfoResult = customerOrgRedis.commonAggFeignClient.getGridInfo(gridId); + CustomerGridFormDTO formDTO = new CustomerGridFormDTO(); + formDTO.setGridId(gridId); + Result gridInfoResult = customerOrgRedis.govOrgFeignClient.getGridInfo(formDTO); if (!gridInfoResult.success()){ throw new RenException("查询网格信息失败..."); } @@ -61,8 +71,10 @@ public class CustomerOrgRedis { //throw new RenException("没有此网格信息..."); return null; } + // feign 方法中已经放缓存 + /*log.info("select grid info is {}", JSON.toJSONString(gridInfoResult.getData())); Map map = BeanUtil.beanToMap(gridInfoResult.getData(), false, true); - customerOrgRedis.redisUtils.hMSet(key, map); + customerOrgRedis.redisUtils.hMSet(key, map);*/ return gridInfoResult.getData(); } @@ -90,4 +102,13 @@ public class CustomerOrgRedis { return agencyInfoResult.getData(); } + /** + * desc:删除网格缓存 + * @param gridId + */ + public static void delGridInfo(String gridId) { + String key = RedisKeys.getGridInfoKey(gridId); + customerOrgRedis.redisUtils.delete(key); + } + } diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/bean/GridInfoCache.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/bean/GridInfoCache.java index cf90afee5b..63114e5794 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/bean/GridInfoCache.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/bean/GridInfoCache.java @@ -113,4 +113,9 @@ public class GridInfoCache implements Serializable { * 坐标区域 */ private String coordinates; + + /** + * 弃用标记 + */ + private Integer abandonFlag; } diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/BarcodeUtils.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/BarcodeUtils.java index ee5369b3af..762063cdf6 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/BarcodeUtils.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/BarcodeUtils.java @@ -1,13 +1,5 @@ package com.epmet.commons.tools.utils; -/** - * desc: - * - * @author: LiuJanJun - * @date: 2022/3/18 11:57 上午 - * @version: 1.0 - */ - import com.google.zxing.BarcodeFormat; import com.google.zxing.EncodeHintType; @@ -28,7 +20,6 @@ import java.io.IOException; import java.util.HashMap; /** - * Author 程鹏 * Date: 2021/08/27 16:01 * Description:二维码生成工具类 */ @@ -95,7 +86,7 @@ public class BarcodeUtils { //x开始的位置:(图片宽度-字体大小*字的个数)/2 int startX = (WIDTH - (FONTSIZE * pressText.length())) / 2; //y开始的位置:图片高度-(图片高度-图片宽度)/2 - int startY = HEIGHT - (HEIGHT - WIDTH) / 2; + int startY = HEIGHT - (HEIGHT - WIDTH) / 2 + FONTSIZE; int imageW = outImage.getWidth(); int imageH = outImage.getHeight(); @@ -115,7 +106,7 @@ public class BarcodeUtils { String s = outStringByByte(pressText, maxSize); g.drawString(s, (WIDTH - (FONTSIZE * (WIDTH / FONTSIZE - 2))) / 2, startY); pressText = pressText.substring(s.length(), pressText.length()); - startY = startY + 30; + startY = startY + 35; } if (v != 0) { g.drawString(pressText, (WIDTH - (FONTSIZE * v)) / 2, startY); @@ -169,9 +160,24 @@ public class BarcodeUtils { } else { return new String(btf, 0, len - 1, "GBK"); } - } - + /*public static void main(String[] args) { + try { + BufferedImage image = BarcodeUtils.drawQRImage("小崽子社区中国国歌过过过过过所多对方水电费是的发生的", "https://epmet-cloud.elinkservice.cn/epmet-oper-gov/#/caiji/b058eb82d65d922fec9dc84f0348fc6a?name=%E5%B0%8F%E5%AF%A8%E5%AD%90%E7%A4%BE%E5%8C%BA&customerId=3fdd0380deff5b30f45376cdf995d1c1&type=community&userId=72d331139a5012b6bba18b40029a2755&123123123111"); + //BufferedImage image = BarcodeUtils.drawQRImage("小崽子社区", "erId=72d331139a5012b6bba18b40029a2755&123123123111"); + //BufferedImage image2 = BarcodeUtils.getQRCode("小崽子社区", "https://epmet-cloud.elinkservice.cn/epmet-oper-gov/#/caiji/b058eb82d65d922fec9dc84f0348fc6a?name=%E5%B0%8F%E5%AF%A8%E5%AD%90%E7%A4%BE%E5%8C%BA&customerId=3fdd0380deff5b30f45376cdf995d1c1&type=community&userId=72d331139a5012b6bba18b40029a2755&123123123111"); + //BufferedImage 转 InputStream + ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); + ImageOutputStream imageOutput = ImageIO.createImageOutputStream(byteArrayOutputStream); + ImageIO.write(image, "png", imageOutput); + InputStream inputStream = new ByteArrayInputStream(byteArrayOutputStream.toByteArray()); + String s = "/Users/liujianjun/Downloads/t.png"; + File file= new File(s); + FileUtils.copyInputStreamToFile(inputStream, file); + } catch (Exception e) { + e.printStackTrace(); + } + }*/ } diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/CustomerGridDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/CustomerGridDTO.java index cacdf2e849..b9c12da858 100644 --- a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/CustomerGridDTO.java +++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/CustomerGridDTO.java @@ -153,4 +153,9 @@ public class CustomerGridDTO implements Serializable { * 联系电话 */ private String mobile; + + /** + * 弃用标记 + */ + private Integer abandonFlag; } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/CustomerGridDao.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/CustomerGridDao.java index 4ee22247f2..2d2c95b424 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/CustomerGridDao.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/CustomerGridDao.java @@ -53,7 +53,7 @@ public interface CustomerGridDao extends BaseDao { /** * @Author sun - * @Description 根据组织Id查询当前组织下所有网格列表 + * @Description 根据组织Id查询当前组织下所有网格列表(未弃用的网格) **/ List selectGridListByAgencyId(@Param("agencyId") String agencyId); diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/govorg/CustomerGridEntity.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/govorg/CustomerGridEntity.java index c58ce50893..baac6f8c53 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/govorg/CustomerGridEntity.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/govorg/CustomerGridEntity.java @@ -99,4 +99,9 @@ public class CustomerGridEntity extends BaseEpmetEntity { * 联系电话 */ private String mobile; + + /** + * 弃用标记 + */ + private Integer abandonFlag; } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerGridDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerGridDao.xml index adc659eae6..c094cc33b8 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerGridDao.xml +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerGridDao.xml @@ -53,6 +53,7 @@ WHERE del_flag = '0' AND pid = #{agencyId} + and ABANDON_FLAG='0' diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java index 1e4a67a0b9..4a566e9226 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java @@ -156,7 +156,7 @@ public class IndexController { /** * @param formDTO - * @Description 数字社区:数据分析-动力网格 + * @Description 数字社区:数据分析-动力网格 数据由市北服务端自己添加的 * @author sun */ @PostMapping("advancedbranchrank-shibei") diff --git a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/org/result/CustomerGridDTO.java b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/org/result/CustomerGridDTO.java index 752bb721cd..9c2d142132 100644 --- a/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/org/result/CustomerGridDTO.java +++ b/epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/org/result/CustomerGridDTO.java @@ -131,4 +131,9 @@ public class CustomerGridDTO implements Serializable { * 所有上级组织名 */ private String allParentName; + + /** + * 弃用标记 + */ + private Integer abandonFlag; } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectLogDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectLogDailyDao.java index 15aee4e27c..c4f2055050 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectLogDailyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectLogDailyDao.java @@ -171,7 +171,7 @@ public interface FactOriginProjectLogDailyDao extends BaseDao selectProjectIdHandledByAgency(@Param("customerId") String customerId, @Param("dimId") String dimId); + List selectProjectIdHandledByAgency(@Param("customerId") String customerId, @Param("level") String level, @Param("dimId") String dimId); /** * @param projectIds diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/org/CustomerGridEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/org/CustomerGridEntity.java index ba86713249..76dee40a36 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/org/CustomerGridEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/org/CustomerGridEntity.java @@ -86,4 +86,9 @@ public class CustomerGridEntity extends BaseEpmetEntity { */ private String syncFlag; + /** + * 弃用标记 + */ + private Integer abandonFlag; + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/DimGridEntity.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/DimGridEntity.java index 2d3fc94740..4db45eaef7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/DimGridEntity.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/entity/stats/DimGridEntity.java @@ -17,6 +17,7 @@ package com.epmet.entity.stats; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; @@ -59,4 +60,10 @@ public class DimGridEntity extends BaseEpmetEntity { private String code; + /** + * 弃用标记 + */ + @TableField(exist = false) + private Integer abandonFlag; + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollCommunityServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollCommunityServiceImpl.java index 13a3103e83..54f9d45421 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollCommunityServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollCommunityServiceImpl.java @@ -141,7 +141,7 @@ public class IndexCollCommunityServiceImpl implements IndexCollCommunityService //办结率 Map handlingRatioMap = factOriginProjectLogDailyService.getHandlingRatio(agencies, customerId, dimId.getMonthId()); //处理效率 - Map efficiencyMap = factOriginProjectLogDailyService.getAgencyWorkPieceRatio(customerId, dimId.getMonthId()); + Map efficiencyMap = factOriginProjectLogDailyService.getAgencyWorkPieceRatio(customerId, OrgTypeConstant.COMMUNITY, dimId.getMonthId()); list.forEach(entity -> { //办结数 entity.setClosedProjectCount(Optional.ofNullable(agencyHandleCount.get(entity.getAgencyId())).orElse(NumConstant.ZERO)); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollDistrictServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollDistrictServiceImpl.java index 494f8f51c1..1b5a724ded 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollDistrictServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollDistrictServiceImpl.java @@ -134,7 +134,7 @@ public class IndexCollDistrictServiceImpl implements IndexCollDistrictService { //办结率 Map handlingRatioMap = factOriginProjectLogDailyService.getHandlingRatio(agencies, customerId, dimId.getMonthId()); //处理效率 - Map efficiencyMap = factOriginProjectLogDailyService.getAgencyWorkPieceRatio(customerId, dimId.getMonthId()); + Map efficiencyMap = factOriginProjectLogDailyService.getAgencyWorkPieceRatio(customerId, OrgTypeConstant.DISTRICT, dimId.getMonthId()); list.forEach(entity -> { //办结数 entity.setClosedProjectCount(agencyHandleCount.get(entity.getAgencyId()) == null ? NumConstant.ZERO : agencyHandleCount.get(entity.getAgencyId())); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollStreetServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollStreetServiceImpl.java index 4d21057556..90ce11c239 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollStreetServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollStreetServiceImpl.java @@ -132,7 +132,7 @@ public class IndexCollStreetServiceImpl implements IndexCollStreetService { //办结率 Map handlingRatioMap = factOriginProjectLogDailyService.getHandlingRatio(agencies, customerId, dimId.getMonthId()); //处理效率 - Map efficiencyMap = factOriginProjectLogDailyService.getAgencyWorkPieceRatio(customerId, dimId.getMonthId()); + Map efficiencyMap = factOriginProjectLogDailyService.getAgencyWorkPieceRatio(customerId, OrgTypeConstant.STREET, dimId.getMonthId()); list.forEach(entity -> { //办结数 entity.setClosedProjectCount(agencyHandleCount.get(entity.getAgencyId()) == null ? NumConstant.ZERO : agencyHandleCount.get(entity.getAgencyId())); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectLogDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectLogDailyService.java index 0dca827c0a..b1ac2c8557 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectLogDailyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectLogDailyService.java @@ -195,7 +195,7 @@ public interface FactOriginProjectLogDailyService extends BaseService getAgencyWorkPieceRatio(String customerId, String dimId); + Map getAgencyWorkPieceRatio(String customerId, String level, String dimId); /** * 网格项目响应度 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectLogDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectLogDailyServiceImpl.java index 5efb3cd2fc..7dc8bac0be 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectLogDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectLogDailyServiceImpl.java @@ -230,50 +230,18 @@ public class FactOriginProjectLogDailyServiceImpl extends BaseServiceImpl getAgencyWorkPieceRatio(String customerId, String dimId) { + public Map getAgencyWorkPieceRatio(String customerId, String level, String dimId) { //计算方法 : 评价周期内办结项目的平均处理时长的倒数 - - //1.评价周期内结案了的项目 - List projectsHandledByAgency = baseDao.selectProjectIdHandledByAgency(customerId, dimId); + //评价周期内每个机关结案了的项目耗时和项目数 + List projectsHandledByAgency = baseDao.selectProjectIdHandledByAgency(customerId, level, dimId); Map efficiencyMap = new HashMap<>(); - List projects = new LinkedList<>(); if (!CollectionUtils.isEmpty(projectsHandledByAgency)) { - Map> agencyProjectsMap = new HashMap<>(); - projectsHandledByAgency.forEach(o -> { String agencyId = o.getAgencyId(); - String projectId = o.getProjectId(); - if(CollectionUtils.isEmpty(agencyProjectsMap.get(agencyId))){ - List projectUnit = new LinkedList<>(); - projectUnit.add(projectId); - agencyProjectsMap.put(agencyId,projectUnit); - }else{ - agencyProjectsMap.get(agencyId).add(projectId); - } - projects.add(projectId); - }); - - //2.结案项目的总耗时 - List costTimes = baseDao.selectProjectCostTime(projects); - - Map projectCostTime = costTimes.stream().collect(Collectors.toMap(ProjectParticipatedAgencyResultDTO::getProjectId,ProjectParticipatedAgencyResultDTO::getCount)); - agencyProjectsMap.forEach((k,v) -> { - //k -> agencyId v -> projects - int total = NumConstant.ZERO; - if(!CollectionUtils.isEmpty(v)){ - for(String p : v){ - Integer cost = projectCostTime.get(p); - total = total + (null == cost ? NumConstant.ZERO : cost); - } - //每个机关的项目平均耗时 - BigDecimal avgCost = new BigDecimal(total).divide(new BigDecimal(v.size()),4, BigDecimal.ROUND_HALF_UP); - - //efficiencyMap.put(k,BigDecimal.ONE.divide(avgCost,4, BigDecimal.ROUND_HALF_UP)); - efficiencyMap.put(k, null == avgCost ? BigDecimal.ZERO : avgCost.setScale(6, BigDecimal.ROUND_HALF_UP)); - }else{ - efficiencyMap.put(k,BigDecimal.ZERO); - } + //每个机关的项目平均耗时 + BigDecimal avgCost = new BigDecimal(o.getSum()).divide(new BigDecimal(o.getCount()),6, RoundingMode.HALF_UP); + efficiencyMap.put(agencyId, avgCost); }); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerGridServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerGridServiceImpl.java index d184f762d1..308a9113c9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerGridServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerGridServiceImpl.java @@ -124,10 +124,15 @@ public class ScreenCustomerGridServiceImpl extends BaseServiceImpl w = new LambdaQueryWrapper<>(); w.eq(ScreenCustomerGridEntity::getGridId, grid.getId()); - screenCustomerGridDao.delete(w); + ScreenCustomerGridEntity e = new ScreenCustomerGridEntity(); + e.setDelFlag(NumConstant.ONE_STR); + e.setUpdatedTime(new Date()); + screenCustomerGridDao.update(e,w); + // 此delete不更新 updatedTime +// screenCustomerGridDao.delete(w); } } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsDimServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsDimServiceImpl.java index d9081c7c6f..b1a1511740 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsDimServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsDimServiceImpl.java @@ -112,6 +112,7 @@ public class StatsDimServiceImpl implements StatsDimService { dimGrid.setAreaCode(updatedGrid.getAreaCode()); dimGrid.setCustomerId(updatedGrid.getCustomerId()); dimGrid.setCode(updatedGrid.getCode()); + dimGrid.setAbandonFlag(updatedGrid.getAbandonFlag()); dimGrids.add(dimGrid); } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimGridServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimGridServiceImpl.java index 0a0fb86ecf..5de49ca847 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimGridServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/DimGridServiceImpl.java @@ -130,7 +130,7 @@ public class DimGridServiceImpl extends BaseServiceImpl - SELECT - ID AS projectId, - SUBSTRING_INDEX(FINISH_ORG_IDS,':',1) AS agencyId - FROM - fact_origin_project_main_daily - WHERE - DEL_FLAG = '0' - AND ID IN ( - - SELECT DISTINCT PROJECT_ID FROM fact_origin_project_log_daily - WHERE DEL_FLAG = '0' AND CUSTOMER_ID = #{customerId} - AND ACTION_CODE = 'close' - + agencyId, + COUNT(projectId) AS count, + SUM(total) AS sum + FROM + ( + SELECT + a.ID AS projectId, + b.ID AS agencyId, + IF( + TIMESTAMPDIFF( DAY, DATE_FORMAT( a.DATE_ID, '%Y-%m-%d' ), DATE_FORMAT( c.DATE_ID, '%Y-%m-%d' ) ) = 0, + 1, + TIMESTAMPDIFF( DAY, DATE_FORMAT( a.DATE_ID, '%Y-%m-%d' ), DATE_FORMAT( c.DATE_ID, '%Y-%m-%d' ) ) + ) * 8 * 60 AS total + FROM + fact_origin_project_main_daily a + INNER JOIN dim_agency b ON a.PIDS LIKE CONCAT( '%', b.ID, '%' ) + AND b.AGENCY_DIM_TYPE = 'all' + AND b.DEL_FLAG = '0' + AND b.`LEVEL` = #{level} + INNER JOIN ( + SELECT DISTINCT + DATE_ID, + PROJECT_ID + FROM fact_origin_project_log_daily + WHERE DEL_FLAG = '0' + AND ACTION_CODE = 'close' + AND IS_ACTIVE = '1' + AND CUSTOMER_ID = #{customerId} AND MONTH_ID = #{dimId} - - ) - ORDER BY agencyId + ) c ON a.ID = c.PROJECT_ID + WHERE + a.DEL_FLAG = '0' + AND a.CUSTOMER_ID = #{customerId} + AND a.PROJECT_STATUS = 'closed' + ) t + GROUP BY + agencyId SELECT f.CUSTOMER_ID, - f.ORG_ID AS "agencyId", + + da.ID AS "agencyId", + f.ORG_ID AS "agencyId", + SUM( TIMESTAMPDIFF( MINUTE, ( DATE_FORMAT( f.INFORMED_DATE, '%Y-%m-%d %H:%i' )), ( DATE_FORMAT( f.PERIOD_TILL_REPLY_FIRSTLY, '%Y-%m-%d %H:%i' )) ) ) AS "sum", COUNT(DISTINCT f.PROJECT_ID) AS "count" FROM fact_origin_project_org_period_daily f - INNER JOIN dim_agency da ON f.ORG_ID = da.ID + INNER JOIN dim_agency da ON (f.PIDS LIKE CONCAT( '%', da.ID, '%' ) OR f.ORG_ID = da.ID) AND da.`LEVEL` = #{level} WHERE - f.ORG_TYPE = #{orgType} + f.DEL_FLAG = '0' + + AND f.ORG_TYPE = #{orgType} + AND DATE_FORMAT(INFORMED_DATE, '%Y%m') = #{monthId} AND PERIOD_TILL_REPLY_FIRSTLY IS NOT NULL AND f.CUSTOMER_ID = #{customerId} GROUP BY f.CUSTOMER_ID, - f.ORG_ID + + da.ID + f.ORG_ID + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/CustomerGridDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/CustomerGridDao.xml index e6cd7f3321..7ab6ca322c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/CustomerGridDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/CustomerGridDao.xml @@ -68,7 +68,8 @@ manage_district, total_user, pid, - pids + pids, + ABANDON_FLAG FROM customer_grid WHERE SYNC_FLAG='1' AND CREATED_TIME #{startTime} diff --git a/epmet-module/data-statistical/data-statistical-server/src/test/java/resources/指标可视化文案1201.docx b/epmet-module/data-statistical/data-statistical-server/src/test/java/resources/指标可视化文案1201.docx new file mode 100644 index 0000000000..86fae3c767 Binary files /dev/null and b/epmet-module/data-statistical/data-statistical-server/src/test/java/resources/指标可视化文案1201.docx differ diff --git a/epmet-module/data-statistical/data-statistical-server/src/test/java/resources/治理能力计算公式.docx b/epmet-module/data-statistical/data-statistical-server/src/test/java/resources/治理能力计算公式.docx new file mode 100644 index 0000000000..e2d9a51e8e Binary files /dev/null and b/epmet-module/data-statistical/data-statistical-server/src/test/java/resources/治理能力计算公式.docx differ diff --git a/epmet-module/epmet-ext/epmet-ext-server/src/main/resources/bootstrap.yml b/epmet-module/epmet-ext/epmet-ext-server/src/main/resources/bootstrap.yml index d4e3824a5d..be7215c750 100644 --- a/epmet-module/epmet-ext/epmet-ext-server/src/main/resources/bootstrap.yml +++ b/epmet-module/epmet-ext/epmet-ext-server/src/main/resources/bootstrap.yml @@ -93,6 +93,12 @@ hystrix: isolation: thread: timeoutInMilliseconds: 60000 + threadpool: + default: + coreSize: 20 + maximumSize: 50 + maxQueueSize: 500 + queueSizeRejectionThreshold: 800 ribbon: ReadTimeout: 300000 diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java index 1a3f20439a..25cf270549 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java @@ -84,4 +84,12 @@ public interface EpmetHeartOpenFeignClient { */ @PostMapping("/heart/resi/volunteer/count") Result getVolunteerCount(@RequestBody VolunteerCommonFormDTO input); + + /** + * 修改志愿者的注册网格 + * @param volunteerInfoDTO + * @return + */ + @PostMapping("/heart/resi/volunteer/modifyVolunteerGrid") + Result modifyVolunteerGrid(@RequestBody VolunteerInfoDTO volunteerInfoDTO); } diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java index aab5bdb70d..06bdc642c9 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java @@ -77,4 +77,15 @@ public class EpmetHeartOpenFeignClientFallback implements EpmetHeartOpenFeignCli public Result getVolunteerCount(VolunteerCommonFormDTO input) { return ModuleUtils.feignConError(ServiceConstant.EPMET_HEART_SERVER, "getVolunteerCount", input); } + + /** + * 修改志愿者的注册网格 + * + * @param volunteerInfoDTO + * @return + */ + @Override + public Result modifyVolunteerGrid(VolunteerInfoDTO volunteerInfoDTO) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_HEART_SERVER, "modifyVolunteerGrid", volunteerInfoDTO); + } } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiVolunteerController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiVolunteerController.java index 39da0690af..410cbdf981 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiVolunteerController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiVolunteerController.java @@ -159,4 +159,15 @@ public class ResiVolunteerController { Integer volunteerCount = volunteerInfoService.getVolunteerCount(customerId, agencyId); return new Result().ok(volunteerCount); } + + /** + * 修改志愿者注册信息_的网格信息 + * @param volunteerInfoDTO + * @return + */ + @PostMapping("modifyVolunteerGrid") + public Result modifyVolunteerGrid(@RequestBody VolunteerInfoDTO volunteerInfoDTO){ + volunteerInfoService.modifyVolunteerGrid(volunteerInfoDTO); + return new Result(); + } } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/VolunteerInfoDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/VolunteerInfoDao.java index ab0b65bf9c..2aa3afa166 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/VolunteerInfoDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/VolunteerInfoDao.java @@ -74,4 +74,11 @@ public interface VolunteerInfoDao extends BaseDao { * @date 2020.08.13 10:06 **/ List selectVolunteerIds(@Param("customerId")String customerId); + + /** + * 修改志愿者注册信息_网格信息 + * @param volunteerInfoDTO + * @return + */ + int updateVolunteerGrid(VolunteerInfoDTO volunteerInfoDTO); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/VolunteerInfoService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/VolunteerInfoService.java index f9db916bbe..7cd4d30769 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/VolunteerInfoService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/VolunteerInfoService.java @@ -111,4 +111,10 @@ public interface VolunteerInfoService extends BaseService { * @return */ Integer getVolunteerCount(String customerId, String agencyId); + + /** + * 修改志愿者注册信息_的网格信息 + * @param volunteerInfoDTO + */ + void modifyVolunteerGrid(VolunteerInfoDTO volunteerInfoDTO); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java index 71417dbb2e..846e342657 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/VolunteerInfoServiceImpl.java @@ -414,4 +414,14 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl + + + UPDATE volunteer_info + SET GRID_ID = #{gridId}, + GRID_NAME = #{gridName}, + PID = #{pid}, + PIDS = #{pids}, + UPDATED_TIME = NOW() + WHERE + del_flag = '0' + AND customer_id = #{customerId} + AND user_id = #{userId} + diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/resources/bootstrap.yml b/epmet-module/epmet-message/epmet-message-server/src/main/resources/bootstrap.yml index 84dd154e10..1c4e2f2bfd 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/resources/bootstrap.yml +++ b/epmet-module/epmet-message/epmet-message-server/src/main/resources/bootstrap.yml @@ -113,6 +113,12 @@ hystrix: isolation: thread: timeoutInMilliseconds: 60000 #缺省为1000 + threadpool: + default: + coreSize: 20 + maximumSize: 50 + maxQueueSize: 500 + queueSizeRejectionThreshold: 800 ribbon: ReadTimeout: 300000 diff --git a/epmet-module/epmet-oss/epmet-oss-server/deploy/docker-compose-dev.yml b/epmet-module/epmet-oss/epmet-oss-server/deploy/docker-compose-dev.yml index 4f5d73ca1a..7e1ef5224e 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/deploy/docker-compose-dev.yml +++ b/epmet-module/epmet-oss/epmet-oss-server/deploy/docker-compose-dev.yml @@ -2,7 +2,6 @@ version: "3.7" services: epmet-oss-server: container_name: epmet-oss-server-dev -# image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-dev/epmet-oss-server:0.3.2 image: 192.168.1.140:5000/epmet-cloud-dev/epmet-oss-server:version_placeholder ports: - "8083:8083" diff --git a/epmet-module/epmet-oss/epmet-oss-server/deploy/docker-compose-test.yml b/epmet-module/epmet-oss/epmet-oss-server/deploy/docker-compose-test.yml index bdc65e1125..23e0394e79 100644 --- a/epmet-module/epmet-oss/epmet-oss-server/deploy/docker-compose-test.yml +++ b/epmet-module/epmet-oss/epmet-oss-server/deploy/docker-compose-test.yml @@ -16,4 +16,4 @@ services: resources: limits: cpus: '0.1' - memory: 250M \ No newline at end of file + memory: 250M diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ComponentVerifyTicketServiceImpl.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ComponentVerifyTicketServiceImpl.java index 0598e6e43d..f8c75e5a64 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ComponentVerifyTicketServiceImpl.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ComponentVerifyTicketServiceImpl.java @@ -245,12 +245,12 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe //存缓存 redisThird.setComponentAccessToken(componentAccessToken); //推送到私有化平台们 - try { - pushComponentAccessToken2PrivateEpmetPlatforms(formDTO); - } catch (Exception e) { - String detail = ExceptionUtils.getErrorStackTrace(e); - log.error(detail); - } + //try { + // pushComponentAccessToken2PrivateEpmetPlatforms(formDTO); + //} catch (Exception e) { + // String detail = ExceptionUtils.getErrorStackTrace(e); + // log.error(detail); + //} } else { throw new RenException(ThirdRunTimeInfoConstant.FAILURE_ACCESS_TOKEN); } diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/resources/bootstrap.yml b/epmet-module/epmet-third/epmet-third-server/src/main/resources/bootstrap.yml index 67b1a2740e..573b117d9d 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/resources/bootstrap.yml +++ b/epmet-module/epmet-third/epmet-third-server/src/main/resources/bootstrap.yml @@ -93,6 +93,12 @@ hystrix: isolation: thread: timeoutInMilliseconds: 60000 + threadpool: + default: + coreSize: 20 + maximumSize: 50 + maxQueueSize: 500 + queueSizeRejectionThreshold: 800 ribbon: ReadTimeout: 300000 @@ -171,4 +177,4 @@ thread: queueCapacity: @thread.threadPool.queue-capacity@ keepAliveSeconds: @thread.threadPool.keep-alive-seconds@ threadNamePrefix: @thread.threadPool.thread-name-prefix@ - rejectedExecutionHandler: @thread.threadPool.rejected-execution-handler@ \ No newline at end of file + rejectedExecutionHandler: @thread.threadPool.rejected-execution-handler@ diff --git a/epmet-module/gov-access/gov-access-server/src/main/resources/bootstrap.yml b/epmet-module/gov-access/gov-access-server/src/main/resources/bootstrap.yml index 94f07d888b..2e3c552976 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/resources/bootstrap.yml +++ b/epmet-module/gov-access/gov-access-server/src/main/resources/bootstrap.yml @@ -112,6 +112,12 @@ hystrix: isolation: thread: timeoutInMilliseconds: 60000 #缺省为1000 + threadpool: + default: + coreSize: 20 + maximumSize: 50 + maxQueueSize: 500 + queueSizeRejectionThreshold: 800 ribbon: ReadTimeout: 300000 @@ -141,4 +147,4 @@ thread: queueCapacity: @thread.threadPool.queue-capacity@ keepAliveSeconds: @thread.threadPool.keep-alive-seconds@ threadNamePrefix: @thread.threadPool.thread-name-prefix@ - rejectedExecutionHandler: @thread.threadPool.rejected-execution-handler@ \ No newline at end of file + rejectedExecutionHandler: @thread.threadPool.rejected-execution-handler@ diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/MemosToRemindFormDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/MemosToRemindFormDTO.java new file mode 100644 index 0000000000..4b5ac76740 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/form/MemosToRemindFormDTO.java @@ -0,0 +1,34 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.Date; + +/** + * @Author sun + * @Description 书记日志-待提醒弹框-提醒内容列表-接口入参 + **/ +@Data +public class MemosToRemindFormDTO implements Serializable { + private static final long serialVersionUID = 4859779755214502427L; + public interface MemoAttr extends CustomerClientShowGroup {} + /** + * 待提醒业务Id + */ + @NotBlank(message = "待提醒业务Id不能为空", groups = { MemoAttr.class }) + private String memoId; + /** + * 到期提醒时间,不传值默认查询当前时间之前的数据(yyyy-MM-dd) + */ + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private String remindTime; + + //token中用户Id + private String userId; + +} + diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/MemosToRemindResultDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/MemosToRemindResultDTO.java new file mode 100644 index 0000000000..43998e8395 --- /dev/null +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/MemosToRemindResultDTO.java @@ -0,0 +1,42 @@ +package com.epmet.dto.result; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.AllArgsConstructor; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * @Author sun + * @Description 书记日志-待提醒弹框-提醒内容列表-接口返参 + **/ +@Data +@AllArgsConstructor +public class MemosToRemindResultDTO implements Serializable { + + private static final long serialVersionUID = 4769136806332933579L; + + /** + * 对应业务数据Id + */ + private String memoId; + /** + * 业务类型 人员关怀:concern;难点堵点:difficulty;工作日志:work_diary + */ + private String type; + /** + * 业务类型 人员关怀:concern;难点堵点:difficulty;工作日志:work_diary + */ + private String typeName; + /** + * 提醒内容 + */ + private String content; + /** + * 提醒时间(日期类型) + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") + private String remindTime; + +} diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java index 5ebed6c49e..221a23af53 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java @@ -376,4 +376,13 @@ public interface GovIssueOpenFeignClient { */ @PostMapping("/gov/issue/issueprojectcategorydict/categoryMap/{customerId}") Result> getCategoryMap(@PathVariable("customerId") String customerId); + + /** + * Desc: 查询网格下是否存在审核中的,表决中的议题 true:存在,false:不存在 + * @param gridId + * @author zxc + * @date 2022/3/15 4:40 下午 + */ + @PostMapping("/gov/issue/issue/audit-reset") + Result issueAuditReset(@RequestParam("gridId")String gridId); } diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java index ae87c2cd6b..20b827a9ad 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java @@ -319,4 +319,9 @@ public class GovIssueOpenFeignClientFallBack implements GovIssueOpenFeignClient public Result> getCategoryMap(String customerId) { return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "getCategoryMap", customerId); } + + @Override + public Result issueAuditReset(String gridId) { + return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "issueAuditReset", gridId); + } } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java index 55f1348b44..ec49c3bb81 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueController.java @@ -322,5 +322,16 @@ public class IssueController { return new Result>().ok(issueService.getProjectCountByGrid(formDTO)); } + /** + * Desc: 查询网格下是否存在审核中的,表决中的议题 true:存在,false:不存在 + * @param gridId + * @author zxc + * @date 2022/3/15 4:40 下午 + */ + @PostMapping("audit-reset") + public Result issueAuditReset(@RequestParam("gridId")String gridId){ + return new Result().ok(issueService.issueAuditReset(gridId)); + } + } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java index 0a82cb5530..1c5ae213ee 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueDao.java @@ -292,4 +292,20 @@ public interface IssueDao extends BaseDao { List selectCategoryNameByIssueList(List issueIds,@Param("customerId")String customerId); + /** + * Desc: 查询网格中表决中的议题个数 + * @param gridId + * @author zxc + * @date 2022/3/15 4:44 下午 + */ + Integer selectVotingIssue(@Param("gridId")String gridId); + + /** + * Desc: 查询网格中审核中的议题个数 + * @param gridId + * @author zxc + * @date 2022/3/15 4:44 下午 + */ + Integer selectAuditIssue(@Param("gridId")String gridId); + } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java index 01e16471da..1c8bd6c376 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/IssueService.java @@ -378,4 +378,12 @@ public interface IssueService extends BaseService { */ List getProjectCountByGrid(ProjectDistributionAnalysisFormDTO formDTO); + /** + * Desc: 查询网格下是否存在审核中的,表决中的议题 true:存在,false:不存在 + * @param gridId + * @author zxc + * @date 2022/3/15 4:40 下午 + */ + Boolean issueAuditReset(String gridId); + } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java index 70e8528491..fd4f54a866 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java @@ -1744,5 +1744,26 @@ public class IssueServiceImpl extends BaseServiceImpl imp return result; } + /** + * Desc: 查询网格下是否存在审核中的,表决中的议题 true:存在,false:不存在 + * @param gridId + * @author zxc + * @date 2022/3/15 4:40 下午 + */ + @Override + public Boolean issueAuditReset(String gridId) { + // 表决中的议题个数 + Integer votingCount = baseDao.selectVotingIssue(gridId); + if (votingCount.compareTo(NumConstant.ZERO) != NumConstant.ZERO){ + return true; + } + // 审核中的议题个数 + Integer auditCount = baseDao.selectAuditIssue(gridId); + if (auditCount.compareTo(NumConstant.ZERO) != NumConstant.ZERO){ + return true; + } + return false; + } + } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml index 3273fb243e..4dbcbb2e9a 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueDao.xml @@ -750,4 +750,24 @@ LEFT JOIN issue_project_category_dict cd ON (cd.CATEGORY_CODE = t1.categoryCode AND cd.DEL_FLAG = '0' AND cd.CUSTOMER_ID = #{customerId}) + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/CustomerGridDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/CustomerGridDTO.java index 7acfd64627..0acd914fa6 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/CustomerGridDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/CustomerGridDTO.java @@ -151,4 +151,8 @@ public class CustomerGridDTO implements Serializable { * 联系电话 */ private String mobile; + /** + * 弃用:1;正常使用:0 + */ + private Integer abandonFlag; } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/ImportGeneralDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/ImportGeneralDTO.java index 9039cda6ef..ac3316379f 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/ImportGeneralDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/ImportGeneralDTO.java @@ -138,6 +138,13 @@ public class ImportGeneralDTO implements Serializable { private Boolean existStatus = false; + private Boolean addStatus = false; + + /** + * 错误信息添加状态 + */ + private Boolean addStatus = false; + /** * 楼栋重复状态 */ diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AbandonGridFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AbandonGridFormDTO.java new file mode 100644 index 0000000000..85f8d7fd34 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AbandonGridFormDTO.java @@ -0,0 +1,15 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.validator.group.AddGroup; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + + +@Data +public class AbandonGridFormDTO implements Serializable { + @NotBlank(message = "网格id不能为空",groups = AddGroup.class) + private String gridId; + private String userId; +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditAgencyFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditAgencyFormDTO.java index 7473027fde..57e535ad25 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditAgencyFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/EditAgencyFormDTO.java @@ -75,7 +75,7 @@ public class EditAgencyFormDTO implements Serializable { /** * open: 选择地区编码必填;closed: 无需选择地区编码;0409新增返参 */ - @NotBlank(message = "areaCodeSwitch不能为空", groups = AddUserInternalGroup.class) + // @NotBlank(message = "areaCodeSwitch不能为空", groups = AddUserInternalGroup.class) private String areaCodeSwitch; /** @@ -108,4 +108,6 @@ public class EditAgencyFormDTO implements Serializable { * 中心点位位置 */ private String centerAddress; + + private String customerId; } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseFormDTO.java index 58376e2032..fb679755d7 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcHouseFormDTO.java @@ -87,19 +87,16 @@ public class IcHouseFormDTO implements Serializable { /** * 房主姓名 */ - @NotBlank(message = "房主姓名不能为空", groups = {AddShowGroup.class, UpdateShowGroup.class}) private String ownerName; /** * 房主电话 */ - @NotBlank(message = "房主电话不能为空", groups = {AddShowGroup.class, UpdateShowGroup.class}) private String ownerPhone; /** * 房主身份证号 */ - @NotBlank(message = "房主身份证号不能为空", groups = {AddShowGroup.class, UpdateShowGroup.class}) private String ownerIdCard; -} \ No newline at end of file +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/CommunityListResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/CommunityListResultDTO.java new file mode 100644 index 0000000000..2e080d97db --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/CommunityListResultDTO.java @@ -0,0 +1,20 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2022/3/21 15:11 + * @DESC + */ +@Data +public class CommunityListResultDTO implements Serializable { + + private static final long serialVersionUID = 4336149113821131764L; + + private String orgId; + + private String orgName; +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/DelPartyServiceCenterResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/DelPartyServiceCenterResultDTO.java new file mode 100644 index 0000000000..30f5f9ceb9 --- /dev/null +++ b/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; +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ExistHouseInfoResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ExistHouseInfoResultDTO.java new file mode 100644 index 0000000000..561925a7c1 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ExistHouseInfoResultDTO.java @@ -0,0 +1,19 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2022/3/25 10:46 + * @DESC + */ +@Data +public class ExistHouseInfoResultDTO implements Serializable { + + private static final long serialVersionUID = -6350975846409029631L; + + private String name; + private String houseId; +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java index 1d82763373..edfc0bdcb7 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java @@ -596,4 +596,13 @@ public interface GovOrgOpenFeignClient { */ @GetMapping("/gov/org/icbuildingunit/{id}") Result getUnitById(@PathVariable("id") String id); + + /** + * Desc: 查询网格下所有的工作人员 + * @param gridId + * @author zxc + * @date 2022/3/21 16:02 + */ + @PostMapping("/gov/org/customerstaffgrid/getallstaffbygridid") + Result> getAllStaffByGridId(@RequestParam("gridId")String gridId); } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java index 21067cb674..d66317aa2b 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java @@ -388,4 +388,9 @@ public class GovOrgOpenFeignClientFallback implements GovOrgOpenFeignClient { public Result getUnitById(String id) { return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getUnitById", id); } + + @Override + public Result> getAllStaffByGridId(String gridId) { + return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getAllStaffByGridId", gridId); + } } diff --git a/epmet-module/gov-org/gov-org-server/pom.xml b/epmet-module/gov-org/gov-org-server/pom.xml index 0cc896b94e..ccf97f89b0 100644 --- a/epmet-module/gov-org/gov-org-server/pom.xml +++ b/epmet-module/gov-org/gov-org-server/pom.xml @@ -136,6 +136,12 @@ 3.0.3 compile + + com.epmet + gov-issue-client + 2.0.0 + compile + diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/ImportErrorMsgConstants.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/ImportErrorMsgConstants.java index 6dce569719..be68d37843 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/ImportErrorMsgConstants.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/ImportErrorMsgConstants.java @@ -9,7 +9,7 @@ public interface ImportErrorMsgConstants { String EXIST_ERROR = "数据已存在"; - String HOUSE_ERROR = "所属组织、所属网格、所属小区、所属楼栋、单元号、房屋类型、房屋用途、出租、房主姓名、房主电话、房主身份证的值未填写,或者所填写信息在系统中未找到"; + String HOUSE_ERROR = "所属组织、所属网格、所属小区、所属楼栋、单元号、房屋类型、房屋用途、出租的值未填写,或者所填写信息在系统中未找到"; String BUILDING_ERROR = "所属组织、所属网格、所属小区、楼栋类型、单元数的值未填写,或者所填写信息在系统中未找到"; diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/AgencyController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/AgencyController.java index fa337b1fd2..1f0f9baa3e 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/AgencyController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/AgencyController.java @@ -17,7 +17,6 @@ package com.epmet.controller; -import com.alibaba.fastjson.JSONObject; import com.epmet.commons.rocketmq.messages.OrgOrStaffMQMsg; import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.annotation.RequirePermission; @@ -43,12 +42,7 @@ import com.epmet.send.SendMqMsgUtil; import com.epmet.service.AgencyService; import com.epmet.service.CustomerAgencyService; import com.epmet.service.IcNeighborHoodService; -import com.google.zxing.BarcodeFormat; -import com.google.zxing.EncodeHintType; -import com.google.zxing.MultiFormatWriter; -import com.google.zxing.WriterException; -import com.google.zxing.client.j2se.MatrixToImageWriter; -import com.google.zxing.common.BitMatrix; +import org.apache.commons.io.FileUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -58,10 +52,11 @@ import javax.imageio.ImageIO; import javax.imageio.stream.ImageOutputStream; import javax.servlet.http.HttpServletResponse; import java.awt.image.BufferedImage; -import java.io.*; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.InputStream; +import java.io.OutputStream; import java.net.URLEncoder; -import java.nio.file.FileSystems; -import java.nio.file.Path; import java.time.LocalDateTime; import java.time.ZoneOffset; import java.util.HashMap; @@ -177,6 +172,7 @@ public class AgencyController { @RequirePermission(requirePermission = RequirePermissionEnum.ORG_AGENCY_UPDATE) public Result editAgency(@LoginUser TokenDto tokenDTO, @RequestBody EditAgencyFormDTO formDTO) { formDTO.setUserId(tokenDTO.getUserId()); + formDTO.setCustomerId(tokenDTO.getCustomerId()); ValidatorUtils.validateEntity(formDTO, EditAgencyFormDTO.DefaultUserShowGroup.class, EditAgencyFormDTO.AddUserInternalGroup.class); Result result = agencyService.editAgency(formDTO); @@ -415,7 +411,9 @@ public class AgencyController { } //url组成:数字社区地址?小区id&用户id //String url = "https://demo.tduckapp.com/s/7314b64b3a26455ab793fb8c640856b6?id="+id; - String url = EnvEnum.getCurrentEnv().getUrl().replace("api/", StrConstant.EPMETY_STR) + String url = EnvEnum.getCurrentEnv().getUrl() + .replace("cloud","open") + .replace("api/", StrConstant.EPMETY_STR) .concat("epmet-oper-gov/#/caiji/") .concat(id).concat("?") .concat("name=").concat(URLEncoder.encode(name,StrConstant.UTF_8)).concat(StrConstant.AND_MARK) @@ -450,4 +448,14 @@ public class AgencyController { } } + /** + * Desc: 查询工作人员所属组织下的所有社区 + * @param tokenDto + * @author zxc + * @date 2022/3/21 15:13 + */ + @PostMapping("community-list") + public Result> getCommunityList(@LoginUser TokenDto tokenDto){ + return new Result>().ok(agencyService.getCommunityList(tokenDto)); + } } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerStaffGridController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerStaffGridController.java index cba514d051..8858cac625 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerStaffGridController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerStaffGridController.java @@ -145,4 +145,15 @@ public class CustomerStaffGridController { public Result> eventOrg(@LoginUser TokenDto tokenDto){ return new Result>().ok(customerStaffGridService.eventOrg(tokenDto.getUserId())); } + + /** + * Desc: 查询网格下所有的工作人员 + * @param gridId + * @author zxc + * @date 2022/3/21 16:02 + */ + @PostMapping("getallstaffbygridid") + public Result> getAllStaffByGridId(@RequestParam("gridId")String gridId){ + return new Result>().ok(customerStaffGridService.getAllStaffByGridId(gridId)); + } } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/GridController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/GridController.java index f7c4d8ec10..8f026e9f44 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/GridController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/GridController.java @@ -7,6 +7,7 @@ import com.epmet.commons.tools.enums.RequirePermissionEnum; 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.commons.tools.validator.group.AddGroup; import com.epmet.dto.CustomerGridDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.*; @@ -226,4 +227,19 @@ public class GridController { ValidatorUtils.validateEntity(formDTO); return new Result>().ok(customerGridService.getGridTree(formDTO)); } + + /** + * 弃用网格 + * @param formDTO + * @return + */ + @RequirePermission(requirePermission = RequirePermissionEnum.ORG_GRID_DELETE) + @PostMapping("abandon") + public Result abandonGrid(@LoginUser TokenDto tokenDto,@RequestBody AbandonGridFormDTO formDTO){ + formDTO.setUserId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(formDTO, AddGroup.class); + customerGridService.abandonGrid(formDTO); + return new Result(); + } + } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java index acdd00b556..ab86eb425b 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java @@ -19,9 +19,6 @@ package com.epmet.controller; import cn.afterturn.easypoi.excel.entity.TemplateExportParams; import cn.afterturn.easypoi.excel.entity.result.ExcelImportResult; -import com.alibaba.excel.EasyExcel; -import com.alibaba.excel.ExcelReader; -import com.alibaba.excel.read.metadata.ReadSheet; import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.constant.NumConstant; @@ -32,40 +29,32 @@ 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.constant.ImportErrorMsgConstants; import com.epmet.constants.ImportTaskConstants; import com.epmet.dao.IcBuildingDao; import com.epmet.dto.form.*; -import com.epmet.dto.result.*; +import com.epmet.dto.result.HouseInfoDTO; +import com.epmet.dto.result.IcNeighborHoodResultDTO; +import com.epmet.dto.result.ImportTaskCommonResultDTO; +import com.epmet.dto.result.LoginUserDetailsResultDTO; import com.epmet.excel.IcHouseExcel; import com.epmet.feign.EpmetCommonServiceOpenFeignClient; import com.epmet.feign.EpmetUserOpenFeignClient; -import com.epmet.feign.GovOrgOpenFeignClient; -import com.epmet.model.HouseInfoModel; -import com.epmet.model.ImportHouseInfoListener; import com.epmet.redis.IcHouseRedis; import com.epmet.service.HouseService; import com.epmet.service.IcHouseService; -import com.epmet.service.IcNeighborHoodService; import com.epmet.util.ExcelPoiUtils; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; -import org.apache.tomcat.util.http.MimeHeaders; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.scheduling.annotation.Async; import org.springframework.util.CollectionUtils; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; -import org.springframework.web.multipart.support.StandardMultipartHttpServletRequest; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import java.io.File; import java.io.IOException; import java.io.InputStream; -import java.lang.reflect.Field; import java.util.*; -import java.util.concurrent.CompletableFuture; import java.util.stream.Collectors; @@ -283,7 +272,7 @@ public class HouseController implements ResultDataResolver { input.setTaskId(importTask.getData().getTaskId()); input.setProcessStatus(ImportTaskConstants.PROCESS_STATUS_FINISHED_FAIL); epmetCommonServiceOpenFeignClient.finishImportTask(input); - log.error("读取文件失败"); + log.error("读取文件失败",e); } houseService.dispose(inputStream,formDTO,importTask); return new Result<>(); diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java index a2f71aa778..df9fa9100d 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPartyServiceCenterController.java +++ b/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"); diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java index fafb2d474d..5e7cd8713a 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java @@ -306,5 +306,15 @@ public interface CustomerAgencyDao extends BaseDao { OrgMobileResultDTO getAgencyMobile(@Param("gridId") String gridId); int updateSubAgencyAreaCodeById(@Param("customerId")String customerId, @Param("agencyId")String agencyId, @Param("operateUserId") String operateUserId); + + /** + * Desc: 查询组织下的社区 + * @param customerId + * @param agencyId + * @author zxc + * @date 2022/3/21 15:23 + */ + List getCommunityList(@Param("customerId")String customerId, @Param("agencyId")String agencyId); + } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerGridDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerGridDao.java index 3dcedd5c73..3de988ec2c 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerGridDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerGridDao.java @@ -172,7 +172,7 @@ public interface CustomerGridDao extends BaseDao { BelongGridNameResultDTO getGridNameByGridId(BelongGridNameFormDTO formDTO); /** - * @Description 根据组织机关Id查询机关下网格列表 + * @Description 根据组织机关Id查询机关下网格列表:未废弃的 * @author sun */ List selectGridList(@Param("agencyId") String agencyId); @@ -367,11 +367,19 @@ public interface CustomerGridDao extends BaseDao { List getStaffGridList(@Param("customerId") String customerId, @Param("orgId") String orgId, @Param("orgType") String orgType); /** - * @Description 根据网格名字查询网格信息 * @param names + * @Description 根据网格名字查询网格信息 * @author zxc * @date 2022/2/12 2:06 下午 */ - List selectGridInfoByNames(@Param("names")List names,@Param("customerId")String customerId); + List selectGridInfoByNames(@Param("names") List names, @Param("customerId") String customerId); + /** + * desc:修改网格工作人员数量 + * + * @param gridId + * @param incrCount 增加人数 负数为 - + * @return + */ + int updateTotalUser(@Param("gridId") String gridId, @Param("incrCount") long incrCount); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffAgencyDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffAgencyDao.java index c1a7f52efa..dfe6f02296 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffAgencyDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffAgencyDao.java @@ -88,7 +88,7 @@ public interface CustomerStaffAgencyDao extends BaseDao selectActSponsorGrid(String staffId); diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffGridDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffGridDao.java index 426a0e6b3a..ed00369f86 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffGridDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffGridDao.java @@ -19,8 +19,8 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.CustomerGridDTO; -import com.epmet.dto.CustomerStaffDepartmentDTO; import com.epmet.dto.CustomerStaffGridDTO; +import com.epmet.dto.StaffOrgRelationDTO; import com.epmet.dto.form.LatestGridFormDTO; import com.epmet.dto.result.EventTitleOrgResultDTO; import com.epmet.dto.result.GridStaffResultDTO; @@ -28,12 +28,11 @@ import com.epmet.entity.CustomerStaffGridEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; -import java.util.HashSet; import java.util.List; import java.util.Set; /** - * 网格人员关系表 + * 网格人员关系表 * * @author generator generator@elink-cn.com * @since v1.0.0 2020-04-20 @@ -115,4 +114,20 @@ public interface CustomerStaffGridDao extends BaseDao { * @date 2021/8/5 5:36 下午 */ List eventOrg(@Param("userId") String userId); -} \ No newline at end of file + + /** + * desc:根据网格id 获取网格下的工作人员及其添加关系 + * @param gridId + * @return + */ + List getGridStaffList(String gridId); + + /** + * Desc: 查询网格下所有的工作人员 + * @param gridId + * @author zxc + * @date 2022/3/21 16:02 + */ + List getAllStaffByGridId(String gridId); + +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingDao.java index 87ee60fcd4..787bf47679 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingDao.java @@ -22,6 +22,7 @@ import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.ImportGeneralDTO; import com.epmet.dto.result.BaseInfoFamilyBuildingResultDTO; import com.epmet.dto.result.BuildingResultDTO; +import com.epmet.dto.result.ExistHouseInfoResultDTO; import com.epmet.dto.result.UpdateBuildingHouseNumResultDTO; import com.epmet.entity.CustomerAgencyEntity; import com.epmet.entity.IcBuildingEntity; @@ -161,7 +162,7 @@ public interface IcBuildingDao extends BaseDao { * @author zxc * @date 2022/2/14 5:32 下午 */ - List selectExistHouse(@Param("ids")List ids); + List selectExistHouse(@Param("ids")List ids); /** * Desc: 查询客户下户数为空的 diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseDao.java index 28c0014f19..f4b4a2c402 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseDao.java @@ -1,24 +1,8 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * 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. - *

- * 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. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - package com.epmet.dao; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.ImportGeneralDTO; import com.epmet.dto.result.HouseInfoDTO; import com.epmet.dto.result.NeighborHoodManageDelResultDTO; import com.epmet.entity.IcHouseEntity; @@ -100,4 +84,12 @@ public interface IcHouseDao extends BaseDao { */ List selectHouseNames(@Param("ids")List ids); + /** + * Desc: 批量更新房屋信息 + * @param houses + * @author zxc + * @date 2022/3/25 10:22 + */ + void houseUpdate(@Param("houses") List houses); + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPartyServiceCenterDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPartyServiceCenterDao.java index 065dc62906..75f75e87fc 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPartyServiceCenterDao.java +++ b/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 getAllMattersByOrgId(@Param("matterIds")List matterIds); + /** + * Desc: 根据党群服务中心查询可预约事项ID + * @param centerIds + * @author zxc + * @date 2022/3/15 9:33 上午 + */ + + List selectMatterByIds(@Param("centerIds")List centerIds); + + /** + * Desc: 根据事项ID查询预约记录 + * @param matterIds + * @author zxc + * @date 2022/3/15 9:46 上午 + */ + List selectAppointmentList(@Param("matterIds")List matterIds); + + /** + * Desc: 删除可预约事项 + * @param centerIds + * @author zxc + * @date 2022/3/15 1:37 下午 + */ + void delMatters(@Param("centerIds")List centerIds); + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/CustomerGridEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/CustomerGridEntity.java index d6018c2a29..70f73c89da 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/CustomerGridEntity.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/CustomerGridEntity.java @@ -109,4 +109,9 @@ public class CustomerGridEntity extends BaseEpmetEntity { * 联系电话 */ private String mobile; + + /** + * 弃用:1;正常使用:0 + */ + private Integer abandonFlag; } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/feign/EpmetUserFeignClient.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/feign/EpmetUserFeignClient.java index 297df14501..8190c9418d 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/feign/EpmetUserFeignClient.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/feign/EpmetUserFeignClient.java @@ -3,28 +3,14 @@ package com.epmet.feign; import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.*; -import com.epmet.dto.CustomerStaffDTO; -import com.epmet.dto.CustomerStaffGridDTO; -import com.epmet.dto.StaffGridListDTO; -import com.epmet.dto.form.AddDepartmentStaffFormDTO; -import com.epmet.dto.form.DepartmentInStaffFormDTO; -import com.epmet.dto.form.StaffInfoFromDTO; -import com.epmet.dto.form.StaffSubmitFromDTO; -import com.epmet.dto.form.StaffsInAgencyFromDTO; -import com.epmet.dto.result.DepartInStaffListResultDTO; -import com.epmet.dto.result.StaffDetailResultDTO; -import com.epmet.dto.result.StaffInfoResultDTO; -import com.epmet.dto.result.StaffInitResultDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.*; -import com.epmet.dto.CustomerStaffDTO; -import com.epmet.dto.CustomerStaffGridDTO; -import com.epmet.dto.StaffGridListDTO; import com.epmet.feign.fallback.EpmetUserFeignClientFallBack; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestParam; import java.util.List; @@ -169,4 +155,22 @@ public interface EpmetUserFeignClient { **/ @PostMapping(value = "/epmetuser/customerstaff/getcustomerstafflist", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE) Result getCustomerStaffList(List staffIdList); + + /** + * desc:删除审核中的徽章认证记录-弃用网格是调用 + * @param customerId + * @param gridId + * @return + */ + @PostMapping("/epmetuser/badge/deleteBadgeCertificateAuditing") + Result deleteBadgeCertificateAuditing(@RequestParam("customerId") String customerId, @RequestParam("gridId") String gridId); + + /** + * desc:删除弃用网格的访问记录-弃用网格是调用 + * @param customerId + * @param gridId + * @return + */ + @PostMapping("/epmetuser/gridlatest/deleteGridLatestData") + Result deleteGridLatestData(@RequestParam("customerId") String customerId, @RequestParam("gridId") String gridId); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/feign/fallback/EpmetUserFeignClientFallBack.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/feign/fallback/EpmetUserFeignClientFallBack.java index f6ac8153ce..4594d36a60 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/feign/fallback/EpmetUserFeignClientFallBack.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/feign/fallback/EpmetUserFeignClientFallBack.java @@ -4,23 +4,8 @@ import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.utils.ModuleUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.*; -import com.epmet.dto.CustomerStaffDTO; -import com.epmet.dto.CustomerStaffGridDTO; -import com.epmet.dto.StaffGridListDTO; -import com.epmet.dto.form.AddDepartmentStaffFormDTO; -import com.epmet.dto.form.DepartmentInStaffFormDTO; -import com.epmet.dto.form.StaffInfoFromDTO; -import com.epmet.dto.form.StaffSubmitFromDTO; -import com.epmet.dto.form.StaffsInAgencyFromDTO; -import com.epmet.dto.result.DepartInStaffListResultDTO; -import com.epmet.dto.result.StaffDetailResultDTO; -import com.epmet.dto.result.StaffInfoResultDTO; -import com.epmet.dto.result.StaffInitResultDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.*; -import com.epmet.dto.CustomerStaffDTO; -import com.epmet.dto.CustomerStaffGridDTO; -import com.epmet.dto.StaffGridListDTO; import com.epmet.feign.EpmetUserFeignClient; import org.springframework.stereotype.Component; @@ -106,4 +91,14 @@ public class EpmetUserFeignClientFallBack implements EpmetUserFeignClient { public Result getCustomerStaffList(List staffIdList) { return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getCustomerStaffList", staffIdList); } + + @Override + public Result deleteBadgeCertificateAuditing(String customerId, String gridId) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "deleteBadgeCertificateAuditing", customerId, gridId); + } + + @Override + public Result deleteGridLatestData(String customerId, String gridId) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "deleteGridLatestData", customerId, gridId); + } } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportBuildingInfoListener.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportBuildingInfoListener.java index 6c1963888a..1de117ca35 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportBuildingInfoListener.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportBuildingInfoListener.java @@ -142,10 +142,14 @@ public class ImportBuildingInfoListener extends AnalysisEventListener existList = groupByBuildingExistStatus.get(true); if (!CollectionUtils.isEmpty(existList)){ existList.forEach(e -> { - nums.add(e.getNum()); - disposeErrorMsg(info,ImportErrorMsgConstants.EXIST_ERROR); + if (!e.getAddStatus()){ + nums.add(e.getNum()); + BuildingInfoModel buildingInfoModel = ConvertUtils.sourceToTarget(e, BuildingInfoModel.class); + disposeErrorMsg(buildingInfoModel,ImportErrorMsgConstants.EXIST_ERROR); + e.setAddStatus(true); + } }); } } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportHouseInfoListener.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportHouseInfoListener.java index 60b609752c..f69987a7b6 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportHouseInfoListener.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportHouseInfoListener.java @@ -15,6 +15,7 @@ import com.epmet.dao.IcBuildingDao; import com.epmet.dto.ImportGeneralDTO; import com.epmet.dto.form.ImportInfoFormDTO; import com.epmet.dto.form.ImportTaskCommonFormDTO; +import com.epmet.dto.result.ExistHouseInfoResultDTO; import com.epmet.dto.result.ImportResultDTO; import com.epmet.dto.result.UpdateBuildingHouseNumResultDTO; import com.epmet.entity.IcHouseEntity; @@ -48,6 +49,7 @@ public class ImportHouseInfoListener extends AnalysisEventListener needDisposeList = new ArrayList<>(); List needInsertList = new ArrayList<>(); + List needUpdateList = new ArrayList<>(); String gridName = null; String agencyName = null; @@ -125,21 +127,6 @@ public class ImportHouseInfoListener extends AnalysisEventListener ids = needInsertList.stream().filter(n -> StringUtils.isNotBlank(n.getBuildingUnitId())).map(m -> m.getBuildingUnitId() + "_" + m.getDoorName()).distinct().collect(Collectors.toList()); + List existHouses = icBuildingDao.selectExistHouse(ids); Map collect = needInsertList.stream().collect(Collectors.groupingBy(n -> n.getBuildingUnitId() + "_" + n.getDoorName(), Collectors.counting())); collect.forEach((k,v) -> { - if (Integer.valueOf(v.toString()).compareTo(1) > 0){ + if (Integer.valueOf(v.toString()).compareTo(1) != 0){ for (ImportGeneralDTO r : needInsertList) { if (k.equals(r.getBuildingUnitId()+"_"+r.getDoorName())){ // 集合里重复的 - nums.add(r.getNum()); + /*nums.add(r.getNum()); disposeErrorMsg(info,ImportErrorMsgConstants.EXIST_ERROR); - r.setExistStatus(true); + r.setExistStatus(true);*/ + if (!r.getAddStatus()){ + for (ExistHouseInfoResultDTO existHouse : existHouses) { + if (existHouse.getName().equals(r.getBuildingUnitId()+"_"+r.getDoorName())){ + r.setHouseId(existHouse.getHouseId()); + break; + } + } + needUpdateList.add(r); + r.setAddStatus(true); + r.setExistStatus(true); + } } } } }); - // 根据单元ID_doorName查询已存在的 - List ids = needInsertList.stream().filter(n -> StringUtils.isNotBlank(n.getBuildingUnitId())).map(m -> m.getBuildingUnitId() + "_" + m.getDoorName()).distinct().collect(Collectors.toList()); - List existHouses = icBuildingDao.selectExistHouse(ids); existHouses.forEach(e -> { for (ImportGeneralDTO n : needInsertList) { - if ((n.getBuildingUnitId()+"_"+n.getDoorName()).equals(e)){ + if ((n.getBuildingUnitId()+"_"+n.getDoorName()).equals(e.getName())){ // 库里存在的 - nums.add(n.getNum()); - disposeErrorMsg(info,ImportErrorMsgConstants.EXIST_ERROR); - n.setExistStatus(true); +// nums.add(n.getNum()); +// disposeErrorMsg(info,ImportErrorMsgConstants.EXIST_ERROR); +// n.setExistStatus(true); + if (!n.getAddStatus()){ + n.setHouseId(e.getHouseId()); + needUpdateList.add(n); + n.setAddStatus(true); + n.setExistStatus(true); + } } } }); @@ -238,6 +242,7 @@ public class ImportHouseInfoListener extends AnalysisEventListener> groupByExistStatus = needInsertList.stream().collect(Collectors.groupingBy(ImportGeneralDTO::getExistStatus)); List importGeneralDTOS = groupByExistStatus.get(false); houseInsert(importGeneralDTOS); + houseUpdate(needUpdateList); // 清除 needDisposeList = new ArrayList<>(); needInsertList = new ArrayList<>(); @@ -526,13 +531,16 @@ public class ImportHouseInfoListener extends AnalysisEventListener list = icBuildingDao.selectHouseTotalIsNull(formDTO.getCustomerId()); + /** + * 2022-03-25 又根据要求,注释更新ic_building户数 + */ + /*List list = icBuildingDao.selectHouseTotalIsNull(formDTO.getCustomerId()); if (!CollectionUtils.isEmpty(list)){ List houseNum = icBuildingDao.selectHouseNum(list); if (!CollectionUtils.isEmpty(houseNum)){ icBuildingDao.allUpdateHouseNum(houseNum); } - } + }*/ // 删除缓存 icHouseRedis.delTemporaryCacheGrids(formDTO.getCustomerId(), formDTO.getUserId()); icHouseRedis.delTemporaryCacheNeighBorHood(formDTO.getCustomerId(), formDTO.getUserId()); @@ -576,4 +584,11 @@ public class ImportHouseInfoListener extends AnalysisEventListener houses){ + if (!CollectionUtils.isEmpty(houses)){ + icHouseService.houseUpdate(houses); + } + } + } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportNeighborHoodInfoListener.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportNeighborHoodInfoListener.java index 2e326c20f0..d50de038dd 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportNeighborHoodInfoListener.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/model/ImportNeighborHoodInfoListener.java @@ -136,10 +136,14 @@ public class ImportNeighborHoodInfoListener extends AnalysisEventListener 0){ for (ImportGeneralDTO r : needDisposeList) { if (k.equals(r.getAgencyName() + "_" + r.getGridName() + "_" + r.getNeighborHoodName())){ - // 集合里重复的 - nums.add(r.getNum()); - disposeErrorMsg(info, ImportErrorMsgConstants.EXIST_ERROR); - r.setExistStatus(true); + if (!r.getAddStatus()){ + // 集合里重复的 + nums.add(r.getNum()); + NeighborHoodInfoModel neighborHoodInfoModel = ConvertUtils.sourceToTarget(r, NeighborHoodInfoModel.class); + disposeErrorMsg(neighborHoodInfoModel, ImportErrorMsgConstants.EXIST_ERROR); + r.setExistStatus(true); + r.setAddStatus(true); + } } } } @@ -152,8 +156,12 @@ public class ImportNeighborHoodInfoListener extends AnalysisEventListener existList = groupByBuildingExistStatus.get(true); if (!CollectionUtils.isEmpty(existList)){ existList.forEach(e -> { - nums.add(e.getNum()); - disposeErrorMsg(info,ImportErrorMsgConstants.EXIST_ERROR); + if (!e.getAddStatus()){ + nums.add(e.getNum()); + NeighborHoodInfoModel neighborHoodInfoModel = ConvertUtils.sourceToTarget(e, NeighborHoodInfoModel.class); + disposeErrorMsg(neighborHoodInfoModel,ImportErrorMsgConstants.EXIST_ERROR); + e.setAddStatus(true); + } }); } List notExistList = groupByBuildingExistStatus.get(false); diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/AgencyService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/AgencyService.java index bacb45d855..629adcc17a 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/AgencyService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/AgencyService.java @@ -1,20 +1,3 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * 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. - *

- * 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. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - package com.epmet.service; import com.epmet.commons.tools.security.dto.TokenDto; @@ -156,4 +139,12 @@ public interface AgencyService { */ List getSonAgencyId(String orgId,String type); + /** + * Desc: 查询工作人员所属组织下的所有社区 + * @param tokenDto + * @author zxc + * @date 2022/3/21 15:13 + */ + List getCommunityList(TokenDto tokenDto); + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerGridService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerGridService.java index cac10ea123..c3ba7c1286 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerGridService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerGridService.java @@ -374,4 +374,17 @@ public interface CustomerGridService extends BaseService { * @date 2022/1/17 3:50 下午 */ List getStaffGridList(String customerId, String orgId, String orgType); + + /** + * 弃用网格,前置条件查询 + * @param formDTO + * @return + */ + void abandonGrid(AbandonGridFormDTO formDTO); + + /** + * desc:移除网格内的工作人员关系 并迁移到组织 + * @param formDTO + */ + void abandonGridForDealBizData(AbandonGridFormDTO formDTO); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerStaffGridService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerStaffGridService.java index 1e78f3725b..99076f48e9 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerStaffGridService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerStaffGridService.java @@ -135,4 +135,13 @@ public interface CustomerStaffGridService extends BaseService eventOrg(String userId); + + /** + * Desc: 查询网格下所有的工作人员 + * @param gridId + * @author zxc + * @date 2022/3/21 16:02 + */ + List getAllStaffByGridId(String gridId); + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcHouseService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcHouseService.java index 66f02d80fa..e2110550bf 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcHouseService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcHouseService.java @@ -1,20 +1,3 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * 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. - *

- * 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. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; @@ -22,6 +5,7 @@ import com.epmet.commons.tools.dto.result.OptionResultDTO; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.dto.IcHouseDTO; +import com.epmet.dto.ImportGeneralDTO; import com.epmet.dto.form.HouseFormDTO; import com.epmet.dto.result.HouseListResultDTO; import com.epmet.entity.IcHouseEntity; @@ -124,4 +108,12 @@ public interface IcHouseService extends BaseService { */ List getHouseList(TokenDto tokenDto, HouseFormDTO formDTO); + /** + * Desc: 批量更新房屋信息 + * @param houses + * @author zxc + * @date 2022/3/25 10:22 + */ + void houseUpdate(List houses); + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/StaffService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/StaffService.java index ccd998c0fc..2c11cd6444 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/StaffService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/StaffService.java @@ -89,7 +89,7 @@ public interface StaffService { * @return com.epmet.dto.result.MineResultDTO */ MineResultDTO mine(StaffInfoFromDTO fromDTO); - + /** * 工作人员调动 * @author zhaoqifeng diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java index c20fd83965..7a81bd7fd0 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java @@ -26,7 +26,9 @@ 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.redis.common.CustomerOrgRedis; import com.epmet.commons.tools.redis.common.CustomerStaffRedis; +import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.security.user.LoginUserUtil; import com.epmet.commons.tools.utils.ConvertUtils; @@ -165,6 +167,8 @@ public class AgencyServiceImpl implements AgencyService { originalEntity.setLongitude(formDTO.getLongitude()); } originalEntity.setCenterAddress(formDTO.getCenterAddress()); + //平阴的工作端小程序与产品入参有差距,为了接口兼容,这个参数不让前端传了... + formDTO.setAreaCodeSwitch(customerOrgParameterService.getAreaCodeSwitch(formDTO.getCustomerId())); //当前客户开启了area_code_switch参数:open: 选择地区编码必填;closed: 无需选择地区编码 if (CustomerAgencyConstant.AREA_CODE_SWITCH_OPEN.equals(formDTO.getAreaCodeSwitch())) { CustomerAgencyEntity parent = customerAgencyDao.selectById(originalEntity.getPid()); @@ -182,7 +186,7 @@ public class AgencyServiceImpl implements AgencyService { } //什么时候要全部置为空呢?原来没有现在有 || 原来与现在不一致 if ((StringUtils.isBlank(originalAreaCode) && StringUtils.isNotBlank(formDTO.getAreaCode())) - || (!formDTO.getAreaCode().equals(originalAreaCode))) { + || (StringUtils.isNotBlank(formDTO.getAreaCode()) && !formDTO.getAreaCode().equals(originalAreaCode))) { updateSubOrg(originalEntity.getCustomerId(), formDTO, originalAreaCode); } } @@ -317,12 +321,13 @@ public class AgencyServiceImpl implements AgencyService { private void checkEditAgencyFormDTO(EditAgencyFormDTO formDTO,CustomerAgencyEntity originalEntity) { //根组织不允许修改 if (StringUtils.isNotBlank(originalEntity.getPid()) && !NumConstant.ZERO_STR.equals(originalEntity.getPid())) { - if (StringUtils.isBlank(formDTO.getAreaCode())) { + //03.23:平阴线上版本与产品主线版本差距太大,平阴的修改组织只能修改组织名称。 + /*if (StringUtils.isBlank(formDTO.getAreaCode())) { throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "area_code_switch is open areaCode不能为空", "组织区划不能为空"); } if (StringUtils.isBlank(formDTO.getParentAreaCode())) { throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "area_code_switch is open parentAreaCode不能为空", "请先设置上级组织的组织区划"); - } + }*/ //如果当前组织已经使用了自定义编码,不允许在选择其他。 if (StringUtils.isNotBlank(originalEntity.getAreaCode()) && originalEntity.getAreaCode().contains("UD") @@ -798,6 +803,29 @@ public class AgencyServiceImpl implements AgencyService { return new ArrayList<>(); } + /** + * Desc: 查询工作人员所属组织下的所有社区 + * @param tokenDto + * @author zxc + * @date 2022/3/21 15:13 + */ + @Override + public List getCommunityList(TokenDto tokenDto) { + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), tokenDto.getUserId()); + if (null == staffInfo){ + throw new EpmetException("未查询到工作人员信息"+staffInfo.getStaffId()); + } + String agencyId = staffInfo.getAgencyId(); + AgencyInfoCache agencyInfo = CustomerOrgRedis.getAgencyInfo(agencyId); + if (null == agencyInfo){ + throw new EpmetException("查询组织信息失败"+agencyInfo); + } + if (agencyInfo.getLevel().equals(CustomerAgencyConstant.COMMUNITY_LEVEL)){ + return new ArrayList<>(); + } + return customerAgencyDao.getCommunityList(tokenDto.getCustomerId(), agencyId); + } + private CustomerAgencyEntity constructInsertEntity(AddAgencyV2FormDTO formDTO, CustomerAgencyDTO parent) { CustomerAgencyEntity insertEntity = ConvertUtils.sourceToTarget(formDTO, CustomerAgencyEntity.class); insertEntity.setOrganizationName(formDTO.getAgencyName()); diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java index db8174b51d..2cb746aab6 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java @@ -250,6 +250,7 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl gridList = customerGridDao.selectGridList(canTick.getAgencyId()); List gridStaffs = new ArrayList<>(); if (null != gridList && gridList.size() > NumConstant.ZERO) { @@ -438,7 +439,7 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl gridList = customerGridDao.selectGridList(canTick.getAgencyId()); List gridStaffs = new ArrayList<>(); if (null != gridList && gridList.size() > NumConstant.ZERO) { @@ -728,6 +729,7 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl gridList = customerGridDao.selectAgencyGridList(agencyEntity.getId()); returnDTO.setGridList(gridList); //递归查询当前组织的下级组织以及每个下级组织对应的网格列表 @@ -762,6 +764,7 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl subAgencyList = baseDao.selectAllSubAgency(subAgencyPids); if (subAgencyList.size() > NumConstant.ZERO) { for (ArticleGridResultDTO sub : subAgencyList) { + //未隐藏的网格 List gridList = customerGridDao.selectAgencyGridList(sub.getAgencyId()); sub.setGridList(gridList); List subAgency = getGridList(sub.getPids() + ":" + sub.getAgencyId()); @@ -826,11 +829,13 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl agencyDeptList = customerDepartmentDao.selectAgencyDeptMsgList(agencyEntity.getId()); returnDTO.setAgencyDeptList(agencyDeptList); //当前机关下网格列表 + // 未隐藏的网格 List agencyGridList = customerGridDao.selectAgencyGridMsgList(agencyEntity.getId()); returnDTO.setAgencyGridList(agencyGridList); } else if (gridParty) { //4.2:查询人员在当前机关下参与的网格列表 //查询当前组织下的网格列表 + //未隐藏的网格 List gridList = customerGridDao.selectAgencyGridList(agencyEntity.getId()); //查询该工作人员在该客户下参与的网格列表 CustomerStaffGridDTO staffGridDTO = new CustomerStaffGridDTO(); @@ -867,6 +872,7 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl list=customerStaffAgencyDao.selectActSponsorGrid(staffId); resultDTO.setAgencyGridList(list); return resultDTO; diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java index cd0080f548..5e7aa468ff 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java @@ -18,8 +18,10 @@ package com.epmet.service.impl; import cn.hutool.core.bean.BeanUtil; +import com.alibaba.fastjson.JSON; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; @@ -27,26 +29,32 @@ import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.dto.result.OptionResultDTO; import com.epmet.commons.tools.enums.DictTypeEnum; +import com.epmet.commons.tools.enums.OrgTypeEnum; 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.page.PageData; import com.epmet.commons.tools.redis.RedisKeys; import com.epmet.commons.tools.redis.RedisUtils; +import com.epmet.commons.tools.redis.common.CustomerOrgRedis; import com.epmet.commons.tools.redis.common.CustomerStaffRedis; +import com.epmet.commons.tools.redis.common.bean.GridInfoCache; import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.security.user.LoginUserUtil; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.constant.CustomerGridConstant; import com.epmet.dao.CustomerGridDao; import com.epmet.dao.CustomerStaffGridDao; +import com.epmet.dao.StaffOrgRelationDao; import com.epmet.dto.*; import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.entity.CustomerGridEntity; -import com.epmet.feign.EpmetAdminOpenFeignClient; -import com.epmet.feign.EpmetMessageOpenFeignClient; -import com.epmet.feign.EpmetUserFeignClient; -import com.epmet.feign.OperCrmOpenFeignClient; +import com.epmet.entity.CustomerStaffGridEntity; +import com.epmet.entity.StaffOrgRelationEntity; +import com.epmet.feign.*; +import com.epmet.resi.partymember.feign.ResiPartyMemberOpenFeignClient; import com.epmet.service.CustomerAgencyService; import com.epmet.service.CustomerGridService; import com.epmet.util.ModuleConstant; @@ -86,11 +94,26 @@ public class CustomerGridServiceImpl extends BaseServiceImpl page(Map params) { @@ -802,14 +825,6 @@ public class CustomerGridServiceImpl extends BaseServiceImpl projectDb = govProjectOpenFeignClient.eventAuditReset(formDTO.getGridId()); + //表决中的议题 + Result issueAuditReset = govIssueOpenFeignClient.issueAuditReset(formDTO.getGridId()); + if (!projectDb.success() || !issueAuditReset.success()) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "校验数据异常", "服务器开小差了..."); + } + if (projectDb.getData().getResiEventStatus()) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "存在未处理的事件", "该网格存在未办结的群众直报事件,请先将事件办结后再操作"); + } + if (projectDb.getData().getProjectStatus()) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "存在未办结的项目", "该网格工作人员名下存在未结案的项目,请先将项目结案或转其它科室部门后再操作"); + } + if (issueAuditReset.getData()) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "存在未关闭的议题", "该网格存在未关闭的议题,请先将议题关闭后再操作"); + } + + //可以弃用、处理数据(网格工作人员所属关系(网格工作人员人数), 删除正在审核中的徽章认证) + this.abandonGridForDealBizData(formDTO); + CustomerOrgRedis.delGridInfo(formDTO.getGridId()); + } + + @Override + public void abandonGridForDealBizData(AbandonGridFormDTO formDTO) { + try { + //根据网格id 获取网格内工作人员及其添加关系 + List staffList = customerStaffGridDao.getGridStaffList(formDTO.getGridId()); + if (staffList == null){ + staffList = new ArrayList<>(); + } + logger.debug("abandonGridForDealBizData staffList:{}", JSON.toJSONString(staffList)); + List updateList = new ArrayList<>(); + staffList.forEach(staffOrg->{ + //只有工作人员是网格添加的才处理 + if(!OrgTypeEnum.GRID.getCode().equals(staffOrg.getOrgType())) { + return; + } + StaffOrgRelationEntity entity = new StaffOrgRelationEntity(); + entity.setId(staffOrg.getId()); + entity.setOrgType(OrgTypeEnum.AGENCY.getCode()); + GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(staffOrg.getOrgId()); + if (gridInfo == null || StringUtils.isBlank(gridInfo.getPid())) { + assert gridInfo != null; + log.error("abandonGridForDealBizData grid:{} pid is not exist", JSON.toJSONString(gridInfo)); + return; + } + entity.setOrgId(gridInfo.getPid()); + updateList.add(entity); + }); + String customerId = loginUserUtil.getLoginUserCustomerId(); + //更新工作人员组织关系 + dealBizDataForAbandon(customerId,formDTO.getGridId(),formDTO.getUserId(), staffList, updateList); + //清空工作人员缓存 + staffList.forEach(staff->CustomerStaffRedis.delStaffInfoFormCache(customerId,staff.getStaffId())); + + } catch (Exception e) { + log.error("abandonGridForDealBizData exception", e); + throw e; + } + + } + @Transactional + public void dealBizDataForAbandon(String customerId, String gridId, String userId,List staffList, List updateList) { + //1.删除工作人员与网格的关系 + LambdaQueryWrapper updateWrapper = new LambdaQueryWrapper<>(); + updateWrapper.eq(CustomerStaffGridEntity::getGridId,gridId); + customerStaffGridDao.delete(updateWrapper); + //2.修改 网格内添加工作人员改为组织 + updateList.forEach(e->{ + staffOrgRelationDao.update(e,null); + }); + //网格对应的人数减少 + long reduceCount = NumConstant.ZERO - staffList.stream().map(StaffOrgRelationDTO::getStaffId).distinct().count(); + log.debug("dealBizDataForAbandon gridId:{} reduceCount:{}",gridId, reduceCount); + customerGridDao.updateTotalUser(gridId, reduceCount); + //删除正在审核中的徽章认证 + Result badgeResult = epmetUserFeignClient.deleteBadgeCertificateAuditing(customerId,gridId); + if (badgeResult == null || !badgeResult.success()){ + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"删除未审核徽章失败,请稍后重试"); + } + //删除废弃网格的访问记录 + Result gridLatestResult = epmetUserFeignClient.deleteGridLatestData(customerId,gridId); + if (gridLatestResult == null || !gridLatestResult.success()){ + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"删除网格访问记录失败,请稍后重试"); + } + //处理成功,隐藏网格 + LambdaUpdateWrapper updateGrid=new LambdaUpdateWrapper<>(); + updateGrid.set(CustomerGridEntity::getAbandonFlag,NumConstant.ONE); + updateGrid.set(CustomerGridEntity::getUpdatedBy,userId); + updateGrid.set(CustomerGridEntity::getUpdatedTime,new Date()); + updateGrid.eq(CustomerGridEntity::getId,gridId); + baseDao.update(null,updateGrid); + } + } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffGridServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffGridServiceImpl.java index c744a1b0a2..4cc572edc8 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffGridServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffGridServiceImpl.java @@ -191,4 +191,15 @@ public class CustomerStaffGridServiceImpl extends BaseServiceImpl eventOrg(String userId) { return baseDao.eventOrg(userId); } + + /** + * Desc: 查询网格下所有的工作人员 + * @param gridId + * @author zxc + * @date 2022/3/21 16:02 + */ + @Override + public List getAllStaffByGridId(String gridId) { + return baseDao.getAllStaffByGridId(gridId); + } } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java index 0ec7984b85..36ace6672d 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java @@ -1,14 +1,12 @@ package com.epmet.service.impl; import cn.afterturn.easypoi.excel.entity.TemplateExportParams; -import cn.hutool.core.bean.BeanUtil; import com.alibaba.excel.EasyExcel; import com.alibaba.excel.ExcelReader; import com.alibaba.excel.read.metadata.ReadSheet; 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; @@ -18,9 +16,8 @@ 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.commons.tools.utils.Result; -import com.epmet.constants.ImportTaskConstants; -import com.epmet.commons.tools.utils.Result; import com.epmet.constant.CustomerGridConstant; +import com.epmet.constants.ImportTaskConstants; import com.epmet.dao.IcBuildingDao; import com.epmet.dao.IcBuildingUnitDao; import com.epmet.dao.IcHouseDao; @@ -29,11 +26,7 @@ import com.epmet.dto.CustomerAgencyDTO; import com.epmet.dto.IcBuildingDTO; import com.epmet.dto.IcBuildingUnitDTO; import com.epmet.dto.IcHouseDTO; -import com.epmet.dto.form.IcHouseFormDTO; -import com.epmet.dto.form.ImportInfoFormDTO; -import com.epmet.dto.form.ImportTaskCommonFormDTO; -import com.epmet.dto.form.ListIcNeighborHoodFormDTO; -import com.epmet.dto.form.NeighborHoodManageDelFormDTO; +import com.epmet.dto.form.*; import com.epmet.dto.result.HouseInfoDTO; import com.epmet.dto.result.IcNeighborHoodResultDTO; import com.epmet.dto.result.ImportTaskCommonResultDTO; @@ -49,25 +42,17 @@ import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.model.HouseInfoModel; import com.epmet.model.ImportHouseInfoListener; import com.epmet.redis.IcHouseRedis; -import com.epmet.service.HouseService; -import com.epmet.service.IcBuildingService; -import com.epmet.service.IcBuildingUnitService; -import com.epmet.service.IcHouseService; import com.epmet.service.*; import com.epmet.util.ExcelPoiUtils; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.scheduling.annotation.Async; -import org.springframework.scheduling.annotation.EnableAsync; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; -import org.springframework.web.multipart.MultipartFile; import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; -import java.io.IOException; import java.io.InputStream; import java.util.*; import java.util.concurrent.ExecutorService; @@ -376,6 +361,7 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { .build(); excelReader.read(readSheet); } catch (Exception e){ + log.error("dispose exception",e); ImportTaskCommonFormDTO input = new ImportTaskCommonFormDTO(); input.setOperatorId(formDTO.getUserId()); input.setTaskId(importTask.getData().getTaskId()); diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcHouseServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcHouseServiceImpl.java index b6d0585694..0e32dbef1e 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcHouseServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcHouseServiceImpl.java @@ -1,20 +1,3 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * 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. - *

- * 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. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - package com.epmet.service.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; @@ -33,6 +16,7 @@ import com.epmet.dao.IcHouseDao; import com.epmet.dto.IcHouseDTO; import com.epmet.dto.IcResiCategoryStatsConfigDTO; import com.epmet.dto.IcResiUserDTO; +import com.epmet.dto.ImportGeneralDTO; import com.epmet.dto.form.HouseFormDTO; import com.epmet.dto.result.HouseListResultDTO; import com.epmet.entity.IcHouseEntity; @@ -141,7 +125,7 @@ public class IcHouseServiceImpl extends BaseServiceImpl { OptionResultDTO dto = new OptionResultDTO(); dto.setValue(item.getId()); - dto.setLabel(item.getHouseName()); + dto.setLabel(item.getDoorName()); return dto; }).collect(Collectors.toList()); } @@ -235,4 +219,16 @@ public class IcHouseServiceImpl extends BaseServiceImpl houses) { + baseDao.houseUpdate(houses); + } + } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java index 8c313c780f..41b5b7dca6 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java +++ b/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,54 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl centerIds = Arrays.asList(ids); + List matterIds = baseDao.selectMatterByIds(centerIds); + if (CollectionUtils.isEmpty(matterIds)){ + baseDao.deleteBatchIds(centerIds); + }else { + List appointmentList = baseDao.selectAppointmentList(matterIds); + if (CollectionUtils.isEmpty(appointmentList)){ + baseDao.deleteBatchIds(centerIds); + baseDao.delMatters(centerIds); + }else { + List names = new ArrayList<>(); + Map> 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("、")) + "存在未来时间的预约事项,不允许删除"); + throw new EpmetException(EpmetErrorCode.MATTER_EXISTS_APPOINTMENT_ERROR.getCode()); + } + baseDao.deleteBatchIds(centerIds); + baseDao.delMatters(centerIds); + } + } + + } + + public boolean getMatterAppointmentList(List 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 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(); } /** diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/bootstrap.yml b/epmet-module/gov-org/gov-org-server/src/main/resources/bootstrap.yml index 8039b75e00..c3883055da 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/bootstrap.yml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/bootstrap.yml @@ -127,6 +127,12 @@ hystrix: isolation: thread: timeoutInMilliseconds: 60000 #缺省为1000 + threadpool: + default: + coreSize: 20 + maximumSize: 50 + maxQueueSize: 500 + queueSizeRejectionThreshold: 800 ribbon: ReadTimeout: 300000 diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.13__abandon_grid.sql b/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.13__abandon_grid.sql new file mode 100644 index 0000000000..37fbf05faa --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.13__abandon_grid.sql @@ -0,0 +1,3 @@ +alter table customer_grid +add column ABANDON_FLAG TINYINT(1) NOT NULL default '0' +comment '弃用:1;正常使用:0' after SYNC_FLAG; \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.14__ic_house_remove_owner.sql b/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.14__ic_house_remove_owner.sql new file mode 100644 index 0000000000..edf66e716e --- /dev/null +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/db/migration/V0.0.14__ic_house_remove_owner.sql @@ -0,0 +1,4 @@ +ALTER TABLE `epmet_gov_org`.`ic_house` + MODIFY COLUMN `OWNER_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '房主姓名' AFTER `RENT_FLAG`, + MODIFY COLUMN `OWNER_PHONE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '房主电话' AFTER `OWNER_NAME`, + MODIFY COLUMN `OWNER_ID_CARD` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '房主身份证号' AFTER `OWNER_PHONE`; diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml index 2cd7210dc5..1e8792cab6 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml @@ -733,6 +733,18 @@ AND cg.id = #{gridId} + + + UPDATE customer_agency SET AREA_CODE = '', diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml index 357c8cebdc..0f08fce996 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml @@ -174,7 +174,9 @@ INNER JOIN customer_staff_grid csg ON cg.id = csg.grid_id WHERE cg.del_flag = '0' + AND cg.ABANDON_FLAG='0' AND csg.del_flag = '0' + AND cg.ABANDON_FLAG='0' AND csg.user_id = #{userId} ORDER BY cg.GRID_NAME ASC @@ -288,6 +290,7 @@ CUSTOMER_GRID WHERE DEL_FLAG = '0' + and ABANDON_FLAG='0' AND PID = #{agencyId} @@ -307,6 +310,7 @@ CUSTOMER_GRID DEL_FLAG = '0' + AND ABANDON_FLAG='0' AND PID = #{agencyId} ORDER BY CREATED_TIME DESC @@ -365,12 +369,14 @@ + @@ -407,6 +413,7 @@ grid_name AS "gridName" FROM customer_grid WHERE del_flag = '0' + and ABANDON_FLAG='0' AND pid = #{agencyId} @@ -428,6 +435,7 @@ WHERE cg.del_flag = '0' AND ca.del_flag = '0' + and cg.ABANDON_FLAG='0' AND cg.pid = #{agencyId} @@ -457,6 +465,7 @@ WHERE grid.del_flag = 0 and grid.SYNC_FLAG='1' + and grid.ABANDON_FLAG='0' AND grid.area_code LIKE CONCAT(#{areaCode},'%') @@ -497,6 +506,7 @@ WHERE a.del_flag = 0 and a.SYNC_FLAG='1' + and a.ABANDON_FLAG='0' AND a.customer_id = #{customerId} ) AS c ORDER BY CONVERT ( gridName USING gbk ) ASC @@ -756,10 +766,12 @@ cg.mobile, IFNULL(cg.longitude,ca.longitude) longitude, - IFNULL(cg.latitude,ca.latitude) latitude + IFNULL(cg.latitude,ca.latitude) latitude, + ca.ORGANIZATION_NAME agencyName, + cg.ABANDON_FLAG FROM customer_grid cg - INNER JOIN customer_agency ca ON ca.pid = '0' AND ca.customer_id = cg.customer_id + INNER JOIN customer_agency ca ON (ca.ID = cg.PID AND ca.customer_id = cg.customer_id) WHERE cg.del_flag = '0' AND ca.del_flag = '0' @@ -834,5 +846,9 @@ ) + + UPDATE customer_grid SET total_user = total_user+#{incrCount} + where id = #{gridId} and del_flag = '0' + diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffAgencyDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffAgencyDao.xml index 5f471060b6..698cdcacaf 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffAgencyDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffAgencyDao.xml @@ -125,7 +125,7 @@ - + diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffGridDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffGridDao.xml index 1d11a957b2..db1fa9571b 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffGridDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffGridDao.xml @@ -173,4 +173,27 @@ AND DEL_FLAG = 0 - \ No newline at end of file + + + + + diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml index c2482d86af..190f93904a 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml @@ -335,8 +335,11 @@ - + SELECT + CONCAT(BUILDING_UNIT_ID,'_',DOOR_NAME) AS name, + ID AS houseId + FROM ic_house WHERE DEL_FLAG = '0' AND CONCAT(BUILDING_UNIT_ID,'_',DOOR_NAME) IN ( diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml index 4a53158d3e..b8f3bfef66 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml @@ -26,6 +26,50 @@ + + + UPDATE ic_house + + + + when id = #{h.houseId} then #{h.houseType} + + + + + when id = #{h.houseId} then #{h.purpose} + + + + + when id = #{h.houseId} then #{h.rentFlag} + + + + + when id = #{h.houseId} then #{h.ownerName} + + + + + when id = #{h.houseId} then #{h.ownerPhone} + + + + + when id = #{h.houseId} then #{h.ownerIdCard} + + + UPDATED_TIME = NOW() + + WHERE DEL_FLAG = '0' + AND ID IN ( + + #{h.houseId} + + ) + + + + + + + + + + UPDATE ic_party_service_center_matter + SET del_flag = 1, + UPDATED_TIME = NOW() + WHERE DEL_FLAG = 0 + AND PARTY_SERVICE_CENTER_ID IN ( + + #{centerId} + + ) + + \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/MemoAttachmentDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/MemoAttachmentDTO.java new file mode 100644 index 0000000000..623da6c057 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/MemoAttachmentDTO.java @@ -0,0 +1,115 @@ +package com.epmet.dto; + +import com.fasterxml.jackson.annotation.JsonIgnore; +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; + + /** + * 主键 + */ + @JsonIgnore + private String id; + + /** + * 客户ID + */ + @JsonIgnore + private String customerId; + + /** + * REMIND_MSG.ID 业务(工作日志、难点堵点、人员关怀)表Id + */ + @JsonIgnore + private String remindMsgId; + + /** + * 文件名 + */ + private String fileName; + + /** + * 附件名(uuid随机生成) + */ + private String attachmentName; + + /** + * 文件大小,单位b + */ + private Integer attachmentSize; + + /** + * 文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS) + */ + private String attachmentFormat; + + /** + * 附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc)) + */ + private String attachmentType; + + /** + * 附件地址 + */ + private String attachmentUrl; + + /** + * 语音或视频时长,秒 + */ + private Integer duration; + + /** + * 排序字段 + */ + @JsonIgnore + private Integer sort; + + /** + * 删除标记 0:未删除,1:已删除 + */ + @JsonIgnore + private String delFlag; + + /** + * 乐观锁 + */ + @JsonIgnore + private Integer revision; + + /** + * 创建人 + */ + @JsonIgnore + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + @JsonIgnore + private String updatedBy; + + /** + * 更新时间 + */ + @JsonIgnore + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/MemoAttrDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/MemoAttrDTO.java new file mode 100644 index 0000000000..6f219e43ad --- /dev/null +++ b/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; + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/MemoConcernDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/MemoConcernDTO.java new file mode 100644 index 0000000000..eb1a825736 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/MemoConcernDTO.java @@ -0,0 +1,120 @@ +package com.epmet.dto; + +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.Date; +import java.util.List; + + +/** + * 备忘录-人文关怀 + * + * @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) + */ + @NotBlank(message = "ID不能为空", groups = { UpdateGroup.class }) + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 关怀类型 + */ + private String concernType; + + /** + * 关怀对象 + */ + @NotBlank(message = "关怀人员不能为空", groups = { AddGroup.class, UpdateGroup.class }) + private String resiName; + + /** + * 关怀对象电话 + */ + private String phone; + + /** + * 关怀对象地址 + */ + private String address; + + /** + * 关怀事项 + */ + @NotBlank(message = "关怀事项不能为空", groups = { AddGroup.class, UpdateGroup.class }) + private String content; + + /** + * 预计关怀时间 + */ + @JsonFormat(pattern="yyyy-MM-dd HH:mm") + private Date scheduledTime; + + /** + * 实际执行时间(预留字段) + */ + @JsonFormat(pattern="yyyy-MM-dd HH:mm") + private Date actualTime; + + /** + * 状态 0未完成 1已完成 + */ + private Integer status; + + /** + * 提醒时间 + */ + @JsonFormat(pattern="yyyy-MM-dd HH:mm") + private Date remindTime; + + /** + * 删除标识:0.未删除 1.已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 操作人 + */ + private String createdBy; + + /** + * 创建时间 + */ + @JsonFormat(pattern="yyyy-MM-dd HH:mm") + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + /** + * 附件 + */ + private List attachmentList; +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/MemoDifficultyDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/MemoDifficultyDTO.java new file mode 100644 index 0000000000..0f1e94e071 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/MemoDifficultyDTO.java @@ -0,0 +1,91 @@ +package com.epmet.dto; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; +import java.util.List; + + +/** + * 备忘录-难点读点 + * + * @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; + + /** + * 预计处理时间 + */ + @JsonFormat(pattern="yyyy-MM-dd HH:mm") + private Date scheduledTime; + + /** + * 提醒时间 + */ + @JsonFormat(pattern="yyyy-MM-dd HH:mm") + private Date remindTime; + + /** + * 删除标识:0.未删除 1.已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + @JsonFormat(pattern="yyyy-MM-dd HH:mm") + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + + private List attachmentList; +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/MemoWorkDiaryDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/MemoWorkDiaryDTO.java new file mode 100644 index 0000000000..517cce113d --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/MemoWorkDiaryDTO.java @@ -0,0 +1,89 @@ +package com.epmet.dto; + +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.Date; +import java.util.List; + + +/** + * 备忘录-工作日志 + * + * @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) + */ + @NotBlank(message = "ID不能为空", groups = { UpdateGroup.class }) + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 工作事项 + */ + private String workType; + + /** + * 内容 + */ + @NotBlank(message = "内容不能为空", groups = { AddGroup.class, UpdateGroup.class }) + private String content; + + /** + * 提醒时间 + */ + @JsonFormat(pattern="yyyy-MM-dd HH:mm") + private Date remindTime; + + /** + * 删除标识:0.未删除 1.已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + @JsonFormat(pattern="yyyy-MM-dd HH:mm") + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + + /** + * 附件 + */ + private List attachmentList; + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/AddMemoDifficultyFromDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/AddMemoDifficultyFromDTO.java new file mode 100644 index 0000000000..3fe64af31d --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/AddMemoDifficultyFromDTO.java @@ -0,0 +1,79 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import com.epmet.dto.MemoAttachmentDTO; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.Date; +import java.util.List; + + +/** + * 备忘录-难点读点 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-03-15 + */ +@Data +public class AddMemoDifficultyFromDTO implements Serializable { + + private static final long serialVersionUID = 1L; + public interface AddMemoDifficulty extends CustomerClientShowGroup {} + + /** + * id + */ + private String id; + + /** + * 内容 + */ + @NotBlank(message = "难点堵点内容不能为空", groups = { AddMemoDifficulty.class }) + @Length(max = 500, message = "难点堵点内容最多为50个字", groups = { AddMemoDifficulty.class }) + private String content; + + /** + * 解决方式 + */ + @Length(max = 500, message = "解决方式最多为500个字", groups = { AddMemoDifficulty.class }) + private String resolveWay; + + /** + * 备注 + */ + @Length(max = 200, message = "备注最多为200个字", groups = { AddMemoDifficulty.class }) + private String remark; + + /** + * 预计处理时间 + */ + @JsonFormat(pattern="yyyy-MM-dd HH:mm") + private Date scheduledTime; + + /** + * 提醒时间 + */ + @JsonFormat(pattern="yyyy-MM-dd HH:mm") + private Date remindTime; + + /** + * 创建时间 + */ + @JsonFormat(pattern="yyyy-MM-dd HH:mm") + private Date createdTime; + + /** + * 附件集合 + */ + private List attachmentList; + + //token中客户ID + private String customerId; + //token中用户Id + private String userId; + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MemoConcernFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MemoConcernFormDTO.java new file mode 100644 index 0000000000..eb0e50978e --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MemoConcernFormDTO.java @@ -0,0 +1,29 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.dto.form.PageFormDTO; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2022/3/15 17:11 + */ +@NoArgsConstructor +@Data +public class MemoConcernFormDTO extends PageFormDTO implements Serializable { + private static final long serialVersionUID = -2355555089163762829L; + private String userId; + private String id; + private String readFlag = "0"; + private String content; + private String concernType; + private String resiName; + private String status; + private String startTime; + private String endTime; + private String scheduledStartTime; + private String scheduledEndTime; +} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MemoDifficultyDetailFromDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MemoDifficultyDetailFromDTO.java new file mode 100644 index 0000000000..6866de9bf7 --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MemoDifficultyDetailFromDTO.java @@ -0,0 +1,34 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; + + +/** + * 备忘录-难点读点 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-03-15 + */ +@Data +public class MemoDifficultyDetailFromDTO implements Serializable { + + private static final long serialVersionUID = 1L; + public interface Detail extends CustomerClientShowGroup {} + + /** + * id + */ + @NotBlank(message = "难点堵点Id不能为空", groups = { Detail.class }) + private String id; + /** + * 阅读标记1 已读;0未读 + */ + @NotNull(message = "阅读标记不能为空", groups = { Detail.class }) + private Integer readFlag; + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MemoDifficultyFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MemoDifficultyFormDTO.java new file mode 100644 index 0000000000..e75f90dd8c --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MemoDifficultyFormDTO.java @@ -0,0 +1,47 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.dto.form.PageFormDTO; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; + +/** + * @Description 难点堵点列表 + * @Author sun + */ +@NoArgsConstructor +@Data +public class MemoDifficultyFormDTO extends PageFormDTO implements Serializable { + private static final long serialVersionUID = 3101320969471756516L; + + /** + * 内容摘要 + */ + private String content; + /** + * 起始预计处理时间 + */ + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private String scheduledStartTime; + /** + * 终止预计处理时间 + */ + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private String scheduledEndTime; + /** + * 起始创建时间Y-%m-%d + */ + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private String startTime; + /** + * 终止创建时间 + */ + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private String endTime; + + //token中用户Id + private String userId; + +} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MemoWorkDiaryFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MemoWorkDiaryFormDTO.java new file mode 100644 index 0000000000..88e3aaef4b --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MemoWorkDiaryFormDTO.java @@ -0,0 +1,25 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.dto.form.PageFormDTO; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2022/3/15 15:09 + */ +@NoArgsConstructor +@Data +public class MemoWorkDiaryFormDTO extends PageFormDTO implements Serializable { + private static final long serialVersionUID = 3101320969471756516L; + private String userId; + private String id; + private String readFlag = "0"; + private String content; + private String workType; + private String startTime; + private String endTime; +} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectAuditResetResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectAuditResetResultDTO.java new file mode 100644 index 0000000000..7ff2a51a2c --- /dev/null +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ProjectAuditResetResultDTO.java @@ -0,0 +1,25 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2022/3/21 15:48 + * @DESC + */ +@Data +public class ProjectAuditResetResultDTO implements Serializable { + + private static final long serialVersionUID = -4523314881244005376L; + + private Boolean projectStatus; + + private Boolean resiEventStatus; + + public ProjectAuditResetResultDTO() { + this.projectStatus = false; + this.resiEventStatus = false; + } +} diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java index 9f58bbb306..70abf989e9 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/GovProjectOpenFeignClient.java @@ -9,10 +9,7 @@ import com.epmet.dto.result.*; import com.epmet.feign.fallback.GovProjectOpenFeignClientFallbackFactory; import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO; import org.springframework.cloud.openfeign.FeignClient; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.*; import java.util.List; @@ -152,4 +149,13 @@ public interface GovProjectOpenFeignClient { **/ @PostMapping("gov/project/resievent/autoAudit") Result autoAudit(); + + /** + * Desc: 查询群众直报是否存在处理中的,true:存在,false:不存在 + * @param gridId + * @author zxc + * @date 2022/3/15 5:05 下午 + */ + @PostMapping("gov/project/project/audit-reset") + Result eventAuditReset(@RequestParam("gridId")String gridId); } diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java index 58da1494d8..8136ac1432 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/feign/fallback/GovProjectOpenFeignClientFallback.java @@ -154,4 +154,9 @@ public class GovProjectOpenFeignClientFallback implements GovProjectOpenFeignCli public Result autoAudit() { return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "autoAudit"); } + + @Override + public Result eventAuditReset(String gridId) { + return ModuleUtils.feignConError(ServiceConstant.GOV_PROJECT_SERVER, "eventAuditReset",gridId); + } } diff --git a/epmet-module/gov-project/gov-project-server/pom.xml b/epmet-module/gov-project/gov-project-server/pom.xml index 12c4b5fbf6..9248a96d25 100644 --- a/epmet-module/gov-project/gov-project-server/pom.xml +++ b/epmet-module/gov-project/gov-project-server/pom.xml @@ -148,6 +148,18 @@ true + + org.apache.maven.plugins + maven-resources-plugin + + + xls + xlsx + doc + docx + + + ${project.basedir}/src/main/java diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/constant/MemoConstant.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/constant/MemoConstant.java new file mode 100644 index 0000000000..b8d5c841dd --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/constant/MemoConstant.java @@ -0,0 +1,12 @@ +package com.epmet.constant; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2022/3/15 16:56 + */ +public interface MemoConstant { + String WORK_DIARY = "work_diary"; + String CONCERN = "concern"; + String DIFFICULTY = "difficulty"; +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/MemoAttachmentController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/MemoAttachmentController.java new file mode 100644 index 0000000000..3090cd1ec7 --- /dev/null +++ b/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> page(@RequestParam Map params){ + PageData page = memoAttachmentService.page(params); + return new Result>().ok(page); + } + + @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) + public Result get(@PathVariable("id") String id){ + MemoAttachmentDTO data = memoAttachmentService.get(id); + return new Result().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(); + } + + + +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/MemoAttrController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/MemoAttrController.java new file mode 100644 index 0000000000..07b1ed3eb6 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/MemoAttrController.java @@ -0,0 +1,106 @@ +package com.epmet.controller; + +import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; +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.dto.form.MemosToRemindFormDTO; +import com.epmet.dto.result.MemosToRemindResultDTO; +import com.epmet.service.MemoAttrService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; +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> page(@RequestParam Map params) { + PageData page = memoAttrService.page(params); + return new Result>().ok(page); + } + + @RequestMapping(value = "{id}", method = {RequestMethod.POST, RequestMethod.GET}) + public Result get(@PathVariable("id") String id) { + MemoAttrDTO data = memoAttrService.get(id); + return new Result().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(); + } + + /** + * @Author sun + * @Description 书记日志-待提醒弹框-提醒内容列表 + **/ + @PostMapping("memosToRemind") + public Result> memosToRemind(@LoginUser TokenDto tokenDTO, @RequestBody MemosToRemindFormDTO formDTO) { + formDTO.setUserId(tokenDTO.getUserId()); + return new Result>().ok(memoAttrService.memosToRemind(formDTO)); + } + + /** + * @Author sun + * @Description 书记日志-待提醒时间列表 + **/ + @PostMapping("memoTime") + public Result> memoTime(@LoginUser TokenDto tokenDTO) { + return new Result>().ok(memoAttrService.memoTime(tokenDTO.getUserId())); + } + + /** + * @Author sun + * @Description 书记日志-提醒列表-我知道了 + **/ + @PostMapping("setReaded") + public Result setReaded(@RequestBody MemosToRemindFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, MemosToRemindFormDTO.MemoAttr.class); + memoAttrService.setReaded(formDTO.getMemoId()); + return new Result(); + } + + +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/MemoConcernController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/MemoConcernController.java new file mode 100644 index 0000000000..474fb56a9e --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/MemoConcernController.java @@ -0,0 +1,198 @@ +package com.epmet.controller; + +import cn.afterturn.easypoi.word.WordExportUtil; +import cn.hutool.core.bean.BeanUtil; +import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.EpmetException; +import com.epmet.commons.tools.exception.ExceptionUtils; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.DateUtils; +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.dto.form.MemoConcernFormDTO; +import com.epmet.service.MemoConcernService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.io.IOUtils; +import org.apache.poi.xwpf.usermodel.XWPFDocument; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpHeaders; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.ServletOutputStream; +import javax.servlet.http.HttpServletResponse; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.URL; +import java.net.URLEncoder; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.Map; + + +/** + * 备忘录-人文关怀 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-03-15 + */ +@Slf4j +@RestController +@RequestMapping("memoConcern") +public class MemoConcernController { + + @Autowired + private MemoConcernService memoConcernService; + + @RequestMapping("page") + public Result> page(@LoginUser TokenDto tokenDto, @RequestBody MemoConcernFormDTO formDTO){ + formDTO.setUserId(tokenDto.getUserId()); + PageData page = memoConcernService.page(formDTO); + return new Result>().ok(page); + } + + @RequestMapping(method = {RequestMethod.POST,RequestMethod.GET}) + public Result get(@RequestBody MemoConcernFormDTO formDTO){ + MemoConcernDTO data = memoConcernService.get(formDTO); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@LoginUser TokenDto tokenDto, @RequestBody MemoConcernDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + + dto.setCustomerId(tokenDto.getCustomerId()); + dto.setCreatedBy(tokenDto.getUserId()); + memoConcernService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("update") + public Result update(@LoginUser TokenDto tokenDto, @RequestBody MemoConcernDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + dto.setCustomerId(tokenDto.getCustomerId()); + memoConcernService.update(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + memoConcernService.delete(ids); + return new Result(); + } + + @PostMapping("/{id}/exportWord") + public void exportWord(@PathVariable("id") String id, HttpServletResponse response) throws Exception { + String templateFilePath = loadTemplate("memo_concern_export_template.docx"); + MemoConcernFormDTO formDTO = new MemoConcernFormDTO(); + formDTO.setId(id); + MemoConcernDTO data = memoConcernService.get(formDTO); + + if (data == null) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "未找到id为" + id + "的关怀项目", "未找到该关怀项目"); + } + + Map map = BeanUtil.beanToMap(data); + + // 创建时间 + if (data.getCreatedTime() != null) { + String createTimeStr = DateUtils.format(data.getCreatedTime(), "yyyy年MM月dd日 HH:mm"); + map.put("createTime", createTimeStr); + } else { + map.put("createTime", ""); + } + + // 预计关怀时间 + if (data.getScheduledTime() != null) { + String scheduledTimeStr = DateUtils.format(data.getScheduledTime(), "yyyy年MM月dd日 HH:mm"); + map.put("scheduledTime", scheduledTimeStr); + } else { + map.put("scheduledTime", ""); + } + + //状态 + map.put("statusName", new Integer(0).equals(data.getStatus()) ? "未完成" : "已完成"); + + XWPFDocument doc = WordExportUtil.exportWord07(templateFilePath, map); + + String suffix = templateFilePath.substring(templateFilePath.lastIndexOf(".")); + + response.setHeader(HttpHeaders.ACCESS_CONTROL_EXPOSE_HEADERS, "Content-Disposition"); + response.setHeader(HttpHeaders.CONTENT_TYPE, "application/vnd.openxmlformats-officedocument.wordprocessingml.document"); + response.setHeader(HttpHeaders.CONTENT_DISPOSITION, "attachment;fileName=" + URLEncoder.encode("人员关怀详情", "UTF-8") + suffix); + + ServletOutputStream fos = null; + try { + fos = response.getOutputStream(); + doc.write(fos); + } finally { + if (fos != null) { + fos.close(); + } + } + } + + /** + * 加载模板 + * @param templateFileName + * @return + * @throws IOException + */ + private String loadTemplate(String templateFileName) throws IOException { + String homeDir = System.getProperty("user.home"); + Path templates = Paths.get(homeDir, "epmet_files", "templates"); + if (Files.notExists(templates)) { + Files.createDirectories(templates); + } + + Path templateFilePath = templates.resolve(templateFileName); + String templateFilePathStr = templateFilePath.toString(); + if (Files.exists(templateFilePath)) { + return templateFilePathStr; + } + + // 将项目中的模板拷贝至用户家目录中 + OutputStream os = null; + InputStream is = null; + try { + is = this.getClass().getClassLoader().getResourceAsStream("templates/" + templateFileName); + os = new FileOutputStream(templateFilePathStr); + IOUtils.copy(is, os); + } finally { + try { + if (is != null) { + is.close(); + } + } catch (IOException e) { + String errorMsg = ExceptionUtils.getThrowableErrorStackTrace(e); + log.error("【导出工作日志doc】关闭输入流出错:{}", errorMsg); + } + try { + if (os != null) { + os.close(); + } + } catch (IOException e) { + String errorMsg = ExceptionUtils.getThrowableErrorStackTrace(e); + log.error("【导出工作日志doc】关闭输出流出错:{}", errorMsg); + } + } + return templateFilePathStr; + } + +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/MemoDifficultyController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/MemoDifficultyController.java new file mode 100644 index 0000000000..e2e201ec48 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/MemoDifficultyController.java @@ -0,0 +1,183 @@ +package com.epmet.controller; + +import cn.afterturn.easypoi.word.WordExportUtil; +import cn.hutool.core.bean.BeanUtil; +import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.EpmetException; +import com.epmet.commons.tools.exception.ExceptionUtils; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.dto.MemoDifficultyDTO; +import com.epmet.dto.form.AddMemoDifficultyFromDTO; +import com.epmet.dto.form.MemoDifficultyDetailFromDTO; +import com.epmet.dto.form.MemoDifficultyFormDTO; +import com.epmet.service.MemoDifficultyService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.io.IOUtils; +import org.apache.poi.xwpf.usermodel.XWPFDocument; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpHeaders; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.ServletOutputStream; +import javax.servlet.http.HttpServletResponse; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.URLEncoder; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.Map; + + +/** + * 备忘录-难点读点 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-03-15 + */ +@Slf4j +@RestController +@RequestMapping("memoDifficulty") +public class MemoDifficultyController { + + @Autowired + private MemoDifficultyService memoDifficultyService; + + @RequestMapping("page") + public Result> page(@LoginUser TokenDto tokenDto, @RequestBody MemoDifficultyFormDTO formDTO){ + formDTO.setUserId(tokenDto.getUserId()); + PageData page = memoDifficultyService.page(formDTO); + return new Result>().ok(page); + } + + @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) + public Result get(@PathVariable("id") String id){ + MemoDifficultyDTO data = memoDifficultyService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@LoginUser TokenDto tokenDTO, @RequestBody AddMemoDifficultyFromDTO dto){ + ValidatorUtils.validateEntity(dto, AddMemoDifficultyFromDTO.AddMemoDifficulty.class); + dto.setCustomerId(tokenDTO.getCustomerId()); + dto.setUserId(tokenDTO.getUserId()); + memoDifficultyService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("update") + public Result update(@LoginUser TokenDto tokenDTO, @RequestBody AddMemoDifficultyFromDTO dto){ + dto.setCustomerId(tokenDTO.getCustomerId()); + memoDifficultyService.update(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + memoDifficultyService.delete(ids); + return new Result(); + } + + @PostMapping("detail") + public Result detail(@RequestBody MemoDifficultyDetailFromDTO fromDTO){ + ValidatorUtils.validateEntity(fromDTO, MemoDifficultyDetailFromDTO.Detail.class); + return new Result().ok(memoDifficultyService.detail(fromDTO)); + } + + @PostMapping("/{id}/exportWord") + public void exportWord(@PathVariable("id") String id, HttpServletResponse response) throws Exception { + String templateFilePath = loadTemplate("memo_difficulty_export_template.docx"); + MemoDifficultyDTO data = memoDifficultyService.get(id); + + if (data == null) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "未找到id为" + id + "的难点堵点项", "未找到该难点堵点项"); + } + + Map map = BeanUtil.beanToMap(data); + + String createTimeStr = DateUtils.format(data.getCreatedTime(), "yyyy年MM月dd日 HH:mm"); + map.put("createTime", createTimeStr); + + String scheduledTimeStr = DateUtils.format(data.getScheduledTime(), "yyyy年MM月dd日 HH:mm"); + map.put("scheduledTime", scheduledTimeStr); + + XWPFDocument doc = WordExportUtil.exportWord07(templateFilePath, map); + + String suffix = templateFilePath.substring(templateFilePath.lastIndexOf(".")); + + response.setHeader(HttpHeaders.ACCESS_CONTROL_EXPOSE_HEADERS, "Content-Disposition"); + response.setHeader(HttpHeaders.CONTENT_TYPE, "application/vnd.openxmlformats-officedocument.wordprocessingml.document"); + response.setHeader(HttpHeaders.CONTENT_DISPOSITION, "attachment;fileName=" + URLEncoder.encode("难点堵点详情", "UTF-8") + suffix); + + ServletOutputStream fos = null; + try { + fos = response.getOutputStream(); + doc.write(fos); + } finally { + if (fos != null) { + fos.close(); + } + } + } + + /** + * 加载模板 + * @param templateFileName + * @return + * @throws IOException + */ + private String loadTemplate(String templateFileName) throws IOException { + String homeDir = System.getProperty("user.home"); + Path templates = Paths.get(homeDir, "epmet_files", "templates"); + if (Files.notExists(templates)) { + Files.createDirectories(templates); + } + + Path templateFilePath = templates.resolve(templateFileName); + String templateFilePathStr = templateFilePath.toString(); + if (Files.exists(templateFilePath)) { + return templateFilePathStr; + } + + // 将项目中的模板拷贝至用户家目录中 + OutputStream os = null; + InputStream is = null; + try { + is = this.getClass().getClassLoader().getResourceAsStream("templates/" + templateFileName); + os = new FileOutputStream(templateFilePathStr); + IOUtils.copy(is, os); + } finally { + try { + if (is != null) { + is.close(); + } + } catch (IOException e) { + String errorMsg = ExceptionUtils.getThrowableErrorStackTrace(e); + log.error("【导出工作日志doc】关闭输入流出错:{}", errorMsg); + } + try { + if (os != null) { + os.close(); + } + } catch (IOException e) { + String errorMsg = ExceptionUtils.getThrowableErrorStackTrace(e); + log.error("【导出工作日志doc】关闭输出流出错:{}", errorMsg); + } + } + return templateFilePathStr; + } + +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/MemoWorkDiaryController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/MemoWorkDiaryController.java new file mode 100644 index 0000000000..7e0dd63b18 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/MemoWorkDiaryController.java @@ -0,0 +1,175 @@ +package com.epmet.controller; + +import cn.afterturn.easypoi.word.WordExportUtil; +import cn.hutool.core.bean.BeanUtil; +import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.exception.ExceptionUtils; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.DateUtils; +import com.epmet.commons.tools.security.dto.TokenDto; +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.dto.form.MemoWorkDiaryFormDTO; +import com.epmet.service.MemoWorkDiaryService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.io.IOUtils; +import org.apache.poi.xwpf.usermodel.XWPFDocument; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpHeaders; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.ServletOutputStream; +import javax.servlet.http.HttpServletResponse; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.URL; +import java.net.URLEncoder; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.HashMap; +import java.util.Map; +import java.util.Optional; + + +/** + * 备忘录-工作日志 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-03-15 + */ +@Slf4j +@RestController +@RequestMapping("memoWorkDiary") +public class MemoWorkDiaryController { + + @Autowired + private MemoWorkDiaryService memoWorkDiaryService; + + @RequestMapping("page") + public Result> page(@LoginUser TokenDto tokenDto, @RequestBody MemoWorkDiaryFormDTO formDTO){ + formDTO.setUserId(tokenDto.getUserId()); + PageData page = memoWorkDiaryService.page(formDTO); + return new Result>().ok(page); + } + + @RequestMapping(method = {RequestMethod.POST,RequestMethod.GET}) + public Result get(@RequestBody MemoWorkDiaryFormDTO formDTO){ + MemoWorkDiaryDTO data = memoWorkDiaryService.get(formDTO); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@LoginUser TokenDto tokenDto, @RequestBody MemoWorkDiaryDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + dto.setCustomerId(tokenDto.getCustomerId()); + dto.setCreatedBy(tokenDto.getUserId()); + memoWorkDiaryService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PostMapping("update") + public Result update(@LoginUser TokenDto tokenDto, @RequestBody MemoWorkDiaryDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + dto.setCustomerId(tokenDto.getCustomerId()); + memoWorkDiaryService.update(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + memoWorkDiaryService.delete(ids); + return new Result(); + } + + @PostMapping("/{id}/exportWord") + public void exportWord(@PathVariable("id") String id, HttpServletResponse response) throws Exception { + String templateFilePath = loadTemplate("memo_work_diary_export_template.docx"); + MemoWorkDiaryFormDTO form = new MemoWorkDiaryFormDTO(); + form.setId(id); + MemoWorkDiaryDTO data = memoWorkDiaryService.get(form); + + Map map = BeanUtil.beanToMap(data); + String createTimeStr = DateUtils.format(data.getCreatedTime(), "yyyy年MM月dd日 HH:mm"); + map.put("createTime", createTimeStr); + + XWPFDocument doc = WordExportUtil.exportWord07(templateFilePath, map); + + String suffix = templateFilePath.substring(templateFilePath.lastIndexOf(".")); + + response.setHeader(HttpHeaders.ACCESS_CONTROL_EXPOSE_HEADERS, "Content-Disposition"); + response.setHeader(HttpHeaders.CONTENT_TYPE, "application/vnd.openxmlformats-officedocument.wordprocessingml.document"); + response.setHeader(HttpHeaders.CONTENT_DISPOSITION, "attachment;fileName=" + URLEncoder.encode("工作日志详情", "UTF-8") + suffix); + + ServletOutputStream fos = null; + try { + fos = response.getOutputStream(); + doc.write(fos); + } finally { + if (fos != null) { + fos.close(); + } + } + } + + /** + * 加载模板 + * @param templateFileName + * @return + * @throws IOException + */ + private String loadTemplate(String templateFileName) throws IOException { + String homeDir = System.getProperty("user.home"); + Path templates = Paths.get(homeDir, "epmet_files", "templates"); + if (Files.notExists(templates)) { + Files.createDirectories(templates); + } + + Path templateFilePath = templates.resolve(templateFileName); + String templateFilePathStr = templateFilePath.toString(); + if (Files.exists(templateFilePath)) { + return templateFilePathStr; + } + + // 将项目中的模板拷贝至用户家目录中 + OutputStream os = null; + InputStream is = null; + try { + is = this.getClass().getClassLoader().getResourceAsStream("templates/" + templateFileName); + os = new FileOutputStream(templateFilePathStr); + IOUtils.copy(is, os); + } finally { + try { + if (is != null) { + is.close(); + } + } catch (IOException e) { + String errorMsg = ExceptionUtils.getThrowableErrorStackTrace(e); + log.error("【导出工作日志doc】关闭输入流出错:{}", errorMsg); + } + try { + if (os != null) { + os.close(); + } + } catch (IOException e) { + String errorMsg = ExceptionUtils.getThrowableErrorStackTrace(e); + log.error("【导出工作日志doc】关闭输出流出错:{}", errorMsg); + } + } + return templateFilePathStr; + } +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java index 077b06e22d..372ff5fb5c 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ProjectController.java @@ -325,4 +325,15 @@ public class ProjectController { projectService.projectWorkMinutesJob(dto); return new Result(); } + + /** + * Desc: 查询群众直报是否存在处理中的,true:存在,false:不存在 + * @param gridId + * @author zxc + * @date 2022/3/15 5:05 下午 + */ + @PostMapping("audit-reset") + public Result eventAuditReset(@RequestParam("gridId")String gridId){ + return new Result().ok(projectService.eventAuditReset(gridId)); + } } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/MemoAttachmentDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/MemoAttachmentDao.java new file mode 100644 index 0000000000..941b5d7ca1 --- /dev/null +++ b/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 { + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/MemoAttrDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/MemoAttrDao.java new file mode 100644 index 0000000000..4ba3580b45 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/MemoAttrDao.java @@ -0,0 +1,32 @@ +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.result.MemosToRemindResultDTO; +import com.epmet.entity.MemoAttrEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.Date; +import java.util.List; + +/** + * 备忘录-属性表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-03-15 + */ +@Mapper +public interface MemoAttrDao extends BaseDao { + + /** + * @Author sun + * @Description 查询提醒内容列表,有时间的按时间查询,没有的查询当前日期之前的数据 + **/ + List memosToRemind(@Param("remindTime") String remindTime, @Param("userId") String userId); + + /** + * @Author sun + * @Description 查询某个人当前日期之后,当日0点之前待提醒时间节点列表 + **/ + List memoTime(@Param("userId") String userId); +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/MemoConcernDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/MemoConcernDao.java new file mode 100644 index 0000000000..99ad577c44 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/MemoConcernDao.java @@ -0,0 +1,28 @@ +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.MemoConcernDTO; +import com.epmet.dto.form.MemoConcernFormDTO; +import com.epmet.entity.MemoConcernEntity; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * 备忘录-人文关怀 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-03-15 + */ +@Mapper +public interface MemoConcernDao extends BaseDao { + /** + * 查询列表 + * + * @Param formDTO + * @Return {@link List < MemoConcernDTO>} + * @Author zhaoqifeng + * @Date 2022/3/15 15:31 + */ + List getPage(MemoConcernFormDTO formDTO); +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/MemoDifficultyDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/MemoDifficultyDao.java new file mode 100644 index 0000000000..032be5b4fe --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/MemoDifficultyDao.java @@ -0,0 +1,30 @@ +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.MemoDifficultyDTO; +import com.epmet.dto.MemoWorkDiaryDTO; +import com.epmet.dto.form.AddMemoDifficultyFromDTO; +import com.epmet.dto.form.MemoDifficultyFormDTO; +import com.epmet.entity.MemoDifficultyEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 备忘录-难点读点 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-03-15 + */ +@Mapper +public interface MemoDifficultyDao extends BaseDao { + + /** + * 难点堵点查询列表 + * @Author sun + */ + List getPage(MemoDifficultyFormDTO formDTO); + + AddMemoDifficultyFromDTO selectByDifficutyId(@Param("id") String id); +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/MemoWorkDiaryDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/MemoWorkDiaryDao.java new file mode 100644 index 0000000000..9431661632 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/MemoWorkDiaryDao.java @@ -0,0 +1,30 @@ +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.MemoWorkDiaryDTO; +import com.epmet.dto.form.MemoWorkDiaryFormDTO; +import com.epmet.entity.MemoWorkDiaryEntity; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * 备忘录-工作日志 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-03-15 + */ +@Mapper +public interface MemoWorkDiaryDao extends BaseDao { + + /** + * 查询列表 + * + * @Param formDTO + * @Return {@link List< MemoWorkDiaryDTO>} + * @Author zhaoqifeng + * @Date 2022/3/15 15:31 + */ + List getPage(MemoWorkDiaryFormDTO formDTO); + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectDao.java index b5a3e5107e..3aaabdf485 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectDao.java @@ -21,10 +21,7 @@ import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.EventProjectInfoDTO; import com.epmet.dto.ProjectDTO; import com.epmet.dto.ProjectStaffDTO; -import com.epmet.dto.form.LatestListFormDTO; -import com.epmet.dto.form.PatrolProjectFormDTO; -import com.epmet.dto.form.ProjectListFromDTO; -import com.epmet.dto.form.ShiftProjectsFromDTO; +import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.entity.ProjectEntity; import org.apache.ibatis.annotations.Mapper; @@ -50,6 +47,14 @@ public interface ProjectDao extends BaseDao { **/ List selectPendList(ProjectListFromDTO fromDTO); + /** + * Desc: 待处理项目列表 + * @param userIds + * @author zxc + * @date 2022/3/21 14:12 + */ + List selectPendListByUserIds(@Param("userIds")List userIds); + /** * 我发起的项目列表 * @@ -283,4 +288,13 @@ public interface ProjectDao extends BaseDao { * @Date 2022/1/12 17:05 */ List getProjectListForWorkMinutes(@Param("customerId")String customerId, @Param("projectId")String projectId, @Param("status")String status); + + /** + * Desc: 查询网格下群众直报处理中的个数 + * @param gridId + * @author zxc + * @date 2022/3/15 5:09 下午 + */ + Integer selectEventStatus(@Param("gridId") String gridId); + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/MemoAttachmentEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/MemoAttachmentEntity.java new file mode 100644 index 0000000000..10dc7ba536 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/MemoAttachmentEntity.java @@ -0,0 +1,78 @@ +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.TableField; +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 业务(工作日志、难点堵点、人员关怀)表Id + */ + private String remindMsgId; + + /** + * 文件名 + */ + private String fileName; + + /** + * 附件名(uuid随机生成) + */ + private String attachmentName; + + /** + * 文件大小,单位b + */ + private Integer attachmentSize; + + /** + * 文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS) + */ + private String attachmentFormat; + + /** + * 附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc)) + */ + private String attachmentType; + + /** + * 附件地址 + */ + private String attachmentUrl; + + /** + * 语音或视频时长,秒 + */ + private Integer duration; + + /** + * 排序字段 + */ + private Integer sort; + + /** + * 物理删除 + */ + @TableField(fill = FieldFill.INSERT) + private String delFlag; +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/MemoAttrEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/MemoAttrEntity.java new file mode 100644 index 0000000000..1345a64b99 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/MemoAttrEntity.java @@ -0,0 +1,52 @@ +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.FieldStrategy; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.apache.ibatis.type.JdbcType; + +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; + + /** + * 提醒时间 + */ + @TableField(value="REMIND_TIME",updateStrategy = FieldStrategy.IGNORED,jdbcType = JdbcType.TIMESTAMP) + private Date remindTime; + + /** + * 业务类型 人员关怀:concern;难点堵点:difficulty;工作日志:work_diary + */ + private String type; + + /** + * 阅读标记1 已读;0未读 + */ + private Integer readFlag; + + /** + * 接收人ID + */ + private String receiver; + +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/MemoConcernEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/MemoConcernEntity.java new file mode 100644 index 0000000000..2961cfad8a --- /dev/null +++ b/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.FieldStrategy; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.apache.ibatis.type.JdbcType; + +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 phone; + + /** + * 关怀对象地址 + */ + private String address; + + /** + * 关怀事项 + */ + private String content; + + /** + * 预计关怀时间 + */ + @TableField(value="SCHEDULED_TIME",updateStrategy = FieldStrategy.IGNORED,jdbcType = JdbcType.TIMESTAMP) + private Date scheduledTime; + + /** + * 实际执行时间(预留字段) + */ + @TableField(value="ACTUAL_TIME",updateStrategy = FieldStrategy.IGNORED,jdbcType = JdbcType.TIMESTAMP) + private Date actualTime; + + /** + * 状态 0未完成 1已完成 + */ + private Integer status; + +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/MemoDifficultyEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/MemoDifficultyEntity.java new file mode 100644 index 0000000000..7ac9750a3e --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/MemoDifficultyEntity.java @@ -0,0 +1,52 @@ +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.FieldStrategy; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.apache.ibatis.type.JdbcType; + +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; + + /** + * 预计处理时间 + */ + @TableField(value="SCHEDULED_TIME",updateStrategy = FieldStrategy.IGNORED,jdbcType = JdbcType.TIMESTAMP) + private Date scheduledTime; + +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/MemoWorkDiaryEntity.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/MemoWorkDiaryEntity.java new file mode 100644 index 0000000000..c5d81f90fa --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/MemoWorkDiaryEntity.java @@ -0,0 +1,38 @@ +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; + +} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/MemoAttachmentService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/MemoAttachmentService.java new file mode 100644 index 0000000000..fa5d0450ea --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/MemoAttachmentService.java @@ -0,0 +1,98 @@ +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 { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-03-15 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-03-15 + */ + List list(Map 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); + + /** + * 根据备忘录ID查询附件 + * + * @Param memoId + * @Return {@link List< MemoAttachmentDTO>} + * @Author zhaoqifeng + * @Date 2022/3/15 15:56 + */ + List getListByMemoId(String memoId); + + /** + * 根据备忘录ID删除附件 + * + * @Param memoId + * @Return + * @Author zhaoqifeng + * @Date 2022/3/15 15:57 + */ + void deleteByMemoId(String memoId); +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/MemoAttrService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/MemoAttrService.java new file mode 100644 index 0000000000..388698df6a --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/MemoAttrService.java @@ -0,0 +1,98 @@ +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.dto.form.MemosToRemindFormDTO; +import com.epmet.dto.result.MemosToRemindResultDTO; +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 { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-03-15 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-03-15 + */ + List list(Map 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); + + /** + * @Author sun + * @Description 书记日志-待提醒弹框-提醒内容列表 + **/ + List memosToRemind(MemosToRemindFormDTO formDTO); + + /** + * @Author sun + * @Description 书记日志-待提醒时间列表 + **/ + List memoTime(String userId); + + /** + * @Author sun + * @Description 书记日志-提醒列表-我知道了 + **/ + void setReaded(String memoId); +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/MemoConcernService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/MemoConcernService.java new file mode 100644 index 0000000000..a7397794a2 --- /dev/null +++ b/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.dto.form.MemoConcernFormDTO; +import com.epmet.entity.MemoConcernEntity; + +import java.util.List; + +/** + * 备忘录-人文关怀 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-03-15 + */ +public interface MemoConcernService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-03-15 + */ + PageData page(MemoConcernFormDTO formDTO); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-03-15 + */ + List list(MemoConcernFormDTO formDTO); + + /** + * 单条查询 + * + * @param id + * @return MemoConcernDTO + * @author generator + * @date 2022-03-15 + */ + MemoConcernDTO get(MemoConcernFormDTO formDTO); + + /** + * 默认保存 + * + * @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); +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/MemoDifficultyService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/MemoDifficultyService.java new file mode 100644 index 0000000000..a016573e03 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/MemoDifficultyService.java @@ -0,0 +1,88 @@ +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.dto.form.AddMemoDifficultyFromDTO; +import com.epmet.dto.form.MemoDifficultyFormDTO; +import com.epmet.dto.form.MemoDifficultyDetailFromDTO; +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 { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-03-15 + */ + PageData page(MemoDifficultyFormDTO formDTO); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-03-15 + */ + List list(Map 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(AddMemoDifficultyFromDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-03-15 + */ + void update(AddMemoDifficultyFromDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-03-15 + */ + void delete(String[] ids); + + /** + * 详情接口 + * @author generator + * @date 2022-03-15 + */ + AddMemoDifficultyFromDTO detail(MemoDifficultyDetailFromDTO fromDTO); +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/MemoWorkDiaryService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/MemoWorkDiaryService.java new file mode 100644 index 0000000000..c3754d3357 --- /dev/null +++ b/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.dto.form.MemoWorkDiaryFormDTO; +import com.epmet.entity.MemoWorkDiaryEntity; + +import java.util.List; + +/** + * 备忘录-工作日志 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-03-15 + */ +public interface MemoWorkDiaryService extends BaseService { + + /** + * 默认分页 + * + * @param formDTO + * @return PageData + * @author generator + * @date 2022-03-15 + */ + PageData page(MemoWorkDiaryFormDTO formDTO); + + /** + * 默认查询 + * + * @param formDTO + * @return java.util.List + * @author generator + * @date 2022-03-15 + */ + List list(MemoWorkDiaryFormDTO formDTO); + + /** + * 单条查询 + * + * @param formDTO + * @return MemoWorkDiaryDTO + * @author generator + * @date 2022-03-15 + */ + MemoWorkDiaryDTO get(MemoWorkDiaryFormDTO formDTO); + + /** + * 默认保存 + * + * @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); +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java index 4757113bc7..d5f4ec3154 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ProjectService.java @@ -376,4 +376,13 @@ public interface ProjectService extends BaseService { * @Date 2022/1/4 16:27 */ PageData approvaledList(ApprovaledListFromDTO formDTO); + + /** + * Desc: 查询群众直报是否存在处理中的,true:存在,false:不存在 + * @param gridId + * @author zxc + * @date 2022/3/15 5:05 下午 + */ + ProjectAuditResetResultDTO eventAuditReset(String gridId); + } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/MemoAttachmentServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/MemoAttachmentServiceImpl.java new file mode 100644 index 0000000000..5710369dee --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/MemoAttachmentServiceImpl.java @@ -0,0 +1,123 @@ +package com.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +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.collections4.CollectionUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.Collections; +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 implements MemoAttachmentService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, MemoAttachmentDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, MemoAttachmentDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper 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)); + } + + /** + * 根据备忘录ID查询附件 + * + * @param memoId + * @Param memoId + * @Return {@link List< MemoAttachmentDTO>} + * @Author zhaoqifeng + * @Date 2022/3/15 15:56 + */ + @Override + public List getListByMemoId(String memoId) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(MemoAttachmentEntity::getRemindMsgId, memoId); + wrapper.orderByAsc(MemoAttachmentEntity::getSort); + List list = baseDao.selectList(wrapper); + if (CollectionUtils.isEmpty(list)) { + return Collections.emptyList(); + } + return ConvertUtils.sourceToTarget(list, MemoAttachmentDTO.class); + } + + /** + * 根据备忘录ID删除附件 + * + * @param memoId + * @Param memoId + * @Return + * @Author zhaoqifeng + * @Date 2022/3/15 15:57 + */ + @Override + public void deleteByMemoId(String memoId) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(MemoAttachmentEntity::getRemindMsgId, memoId); + baseDao.delete(wrapper); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/MemoAttrServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/MemoAttrServiceImpl.java new file mode 100644 index 0000000000..3c43ed0c25 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/MemoAttrServiceImpl.java @@ -0,0 +1,125 @@ +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.constant.NumConstant; +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.dto.form.MemosToRemindFormDTO; +import com.epmet.dto.result.MemosToRemindResultDTO; +import com.epmet.entity.MemoAttrEntity; +import com.epmet.service.MemoAttrService; +import lombok.extern.slf4j.Slf4j; +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 +@Slf4j +public class MemoAttrServiceImpl extends BaseServiceImpl implements MemoAttrService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, MemoAttrDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, MemoAttrDTO.class); + } + + private QueryWrapper getWrapper(Map params) { + String id = (String) params.get(FieldConstant.ID_HUMP); + + QueryWrapper 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)); + } + + /** + * @Author sun + * @Description 书记日志-待提醒弹框-提醒内容列表 + **/ + @Override + public List memosToRemind(MemosToRemindFormDTO formDTO) { + //1.查询提醒内容列表,有时间的按时间查询,没有的查询当前日期之前的数据 + List resultList = baseDao.memosToRemind(formDTO.getRemindTime(), formDTO.getUserId()); + return resultList; + } + + /** + * @Author sun + * @Description 书记日志-待提醒时间列表 + **/ + @Override + public List memoTime(String userId) { + List resultList = baseDao.memoTime(userId); + return resultList; + } + + /** + * @Author sun + * @Description 书记日志-提醒列表-我知道了 + **/ + @Override + public void setReaded(String memoId) { + MemoAttrEntity entity = baseDao.selectById(memoId); + if (null == entity) { + log.warn(String.format("书记日志-提醒列表-修改阅读状态失败,提醒记录不存在,提醒记录Id", memoId)); + } + entity.setReadFlag(NumConstant.ONE); + if (baseDao.updateById(entity) < NumConstant.ONE) { + log.warn(String.format("书记日志-提醒列表-修改阅读状态失败,提醒记录Id", memoId)); + } + } + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/MemoConcernServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/MemoConcernServiceImpl.java new file mode 100644 index 0000000000..533141d83d --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/MemoConcernServiceImpl.java @@ -0,0 +1,157 @@ +package com.epmet.service.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.constant.MemoConstant; +import com.epmet.dao.MemoConcernDao; +import com.epmet.dto.MemoAttachmentDTO; +import com.epmet.dto.MemoAttrDTO; +import com.epmet.dto.MemoConcernDTO; +import com.epmet.dto.form.MemoConcernFormDTO; +import com.epmet.entity.MemoAttachmentEntity; +import com.epmet.entity.MemoConcernEntity; +import com.epmet.service.MemoAttachmentService; +import com.epmet.service.MemoAttrService; +import com.epmet.service.MemoConcernService; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import org.apache.commons.collections4.CollectionUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.stream.Collectors; + +/** + * 备忘录-人文关怀 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-03-15 + */ +@Service +public class MemoConcernServiceImpl extends BaseServiceImpl implements MemoConcernService { + + @Resource + private MemoAttrService memoAttrService; + @Resource + private MemoAttachmentService memoAttachmentService; + + @Override + public PageData page(MemoConcernFormDTO formDTO) { + PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); + List list = baseDao.getPage(formDTO); + PageInfo pageInfo = new PageInfo<>(list); + return new PageData<>(list, pageInfo.getTotal()); + } + + @Override + public List list(MemoConcernFormDTO formDTO) { + List list = baseDao.getPage(formDTO); + return list; + } + + @Override + public MemoConcernDTO get(MemoConcernFormDTO formDTO) { + MemoConcernEntity entity = baseDao.selectById(formDTO.getId()); + MemoConcernDTO dto = ConvertUtils.sourceToTarget(entity, MemoConcernDTO.class); + if (null != dto) { + //获取提醒时间 + MemoAttrDTO memoAttr = memoAttrService.get(formDTO.getId()); + if (null != memoAttr) { + dto.setRemindTime(memoAttr.getRemindTime()); + } + //获取附件列表 + List attachmentList = memoAttachmentService.getListByMemoId(formDTO.getId()); + dto.setAttachmentList(attachmentList); + } + //更新阅读状态 + if (NumConstant.ONE_STR.equals(formDTO.getReadFlag())) { + MemoAttrDTO memoAttrDTO = memoAttrService.get(formDTO.getId()); + memoAttrDTO.setReadFlag(NumConstant.ONE); + memoAttrDTO.setUpdatedTime(null); + memoAttrService.update(memoAttrDTO); + } + return dto; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(MemoConcernDTO dto) { + MemoConcernEntity entity = ConvertUtils.sourceToTarget(dto, MemoConcernEntity.class); + insert(entity); + + //保存属性 + MemoAttrDTO attr = ConvertUtils.sourceToTarget(dto, MemoAttrDTO.class); + attr.setId(entity.getId()); + attr.setType(MemoConstant.CONCERN); + attr.setReadFlag(NumConstant.ZERO); + attr.setReceiver(dto.getCreatedBy()); + memoAttrService.save(attr); + + //删除原来的附件 + memoAttachmentService.deleteByMemoId(entity.getId()); + //保存新的照片 + if (CollectionUtils.isNotEmpty(dto.getAttachmentList())) { + AtomicInteger i = new AtomicInteger(NumConstant.ZERO); + List list = dto.getAttachmentList().stream().map(item -> { + MemoAttachmentEntity e = ConvertUtils.sourceToTarget(item, MemoAttachmentEntity.class); + e.setCustomerId(dto.getCustomerId()); + e.setRemindMsgId(entity.getId()); + e.setSort(i.getAndIncrement()); + return e; + }).collect(Collectors.toList()); + memoAttachmentService.insertBatch(list); + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(MemoConcernDTO dto) { + MemoConcernEntity entity = ConvertUtils.sourceToTarget(dto, MemoConcernEntity.class); + updateById(entity); + + //时间有变动时保存属性,readFlag变为0 + MemoAttrDTO attr = memoAttrService.get(dto.getId()); + if (dto.getRemindTime() != attr.getRemindTime()) { + attr.setRemindTime(dto.getRemindTime()); + attr.setReadFlag(NumConstant.ZERO); + attr.setUpdatedTime(null); + memoAttrService.update(attr); + } + + //删除原来的附件 + memoAttachmentService.deleteByMemoId(entity.getId()); + //保存新的照片 + if (CollectionUtils.isNotEmpty(dto.getAttachmentList())) { + AtomicInteger i = new AtomicInteger(NumConstant.ZERO); + List list = dto.getAttachmentList().stream().map(item -> { + MemoAttachmentEntity e = ConvertUtils.sourceToTarget(item, MemoAttachmentEntity.class); + e.setCustomerId(dto.getCustomerId()); + e.setRemindMsgId(dto.getId()); + e.setSort(i.getAndIncrement()); + return e; + }).collect(Collectors.toList()); + memoAttachmentService.insertBatch(list); + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + List list = Arrays.asList(ids); + baseDao.deleteBatchIds(list); + memoAttrService.delete(ids); + list.forEach(id -> { + //删除附件 + memoAttachmentService.deleteByMemoId(id); + }); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/MemoDifficultyServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/MemoDifficultyServiceImpl.java new file mode 100644 index 0000000000..2ac7232763 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/MemoDifficultyServiceImpl.java @@ -0,0 +1,161 @@ +package com.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.dao.MemoDifficultyDao; +import com.epmet.dto.MemoAttachmentDTO; +import com.epmet.dto.MemoAttrDTO; +import com.epmet.dto.MemoDifficultyDTO; +import com.epmet.dto.form.AddMemoDifficultyFromDTO; +import com.epmet.dto.form.MemoDifficultyFormDTO; +import com.epmet.dto.form.MemoDifficultyDetailFromDTO; +import com.epmet.entity.MemoAttachmentEntity; +import com.epmet.entity.MemoAttrEntity; +import com.epmet.entity.MemoDifficultyEntity; +import com.epmet.service.MemoAttachmentService; +import com.epmet.service.MemoAttrService; +import com.epmet.service.MemoDifficultyService; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import oracle.sql.NUMBER; +import org.apache.commons.collections4.CollectionUtils; +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; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.stream.Collectors; + +/** + * 备忘录-难点读点 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-03-15 + */ +@Service +public class MemoDifficultyServiceImpl extends BaseServiceImpl implements MemoDifficultyService { + @Autowired + private MemoAttrService memoAttrService; + @Autowired + private MemoAttachmentService memoAttachmentService; + + + @Override + public PageData page(MemoDifficultyFormDTO formDTO) { + PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); + List list = baseDao.getPage(formDTO); + PageInfo pageInfo = new PageInfo<>(list); + return new PageData<>(list, pageInfo.getTotal()); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, MemoDifficultyDTO.class); + } + + private QueryWrapper getWrapper(Map params) { + String id = (String) params.get(FieldConstant.ID_HUMP); + + QueryWrapper 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(AddMemoDifficultyFromDTO dto) { + //1.新增难点堵点数据 + MemoDifficultyEntity entity = ConvertUtils.sourceToTarget(dto, MemoDifficultyEntity.class); + insert(entity); + //2.新增备忘录记录数据 + MemoAttrEntity memoAttr = new MemoAttrEntity(); + memoAttr.setId(entity.getId()); + memoAttr.setCustomerId(dto.getCustomerId()); + memoAttr.setRemindTime(dto.getRemindTime()); + memoAttr.setType("difficulty"); + memoAttr.setReceiver(dto.getUserId()); + memoAttrService.insert(memoAttr); + //3.新增难点堵点附件数据 + if (CollectionUtils.isNotEmpty(dto.getAttachmentList())) { + AtomicInteger i = new AtomicInteger(NumConstant.ZERO); + List list = dto.getAttachmentList().stream().map(item -> { + MemoAttachmentEntity e = ConvertUtils.sourceToTarget(item, MemoAttachmentEntity.class); + e.setCustomerId(dto.getCustomerId()); + e.setRemindMsgId(entity.getId()); + e.setSort(i.getAndIncrement()); + return e; + }).collect(Collectors.toList()); + memoAttachmentService.insertBatch(list); + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(AddMemoDifficultyFromDTO dto) { + //1.更新难点堵点主表数据 + MemoDifficultyEntity entity = ConvertUtils.sourceToTarget(dto, MemoDifficultyEntity.class); + updateById(entity); + //2.附件表数据全删全增 + memoAttachmentService.deleteByMemoId(dto.getId()); + if (CollectionUtils.isNotEmpty(dto.getAttachmentList())) { + AtomicInteger i = new AtomicInteger(NumConstant.ZERO); + List list = dto.getAttachmentList().stream().map(item -> { + MemoAttachmentEntity e = ConvertUtils.sourceToTarget(item, MemoAttachmentEntity.class); + e.setCustomerId(dto.getCustomerId()); + e.setRemindMsgId(dto.getId()); + e.setSort(i.getAndIncrement()); + return e; + }).collect(Collectors.toList()); + memoAttachmentService.insertBatch(list); + } + //3.判断更新提醒记录表提醒时间 + MemoAttrDTO memoAttr = new MemoAttrDTO(); + memoAttr.setId(dto.getId()); + memoAttr.setRemindTime(dto.getRemindTime()); + memoAttr.setReadFlag(NumConstant.ZERO); + memoAttrService.update(memoAttr); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + baseDao.deleteBatchIds(Arrays.asList(ids)); + memoAttrService.delete(ids); + for (String id : ids) { + //物理删除附件 + memoAttachmentService.deleteByMemoId(id); + } + } + + @Override + public AddMemoDifficultyFromDTO detail(MemoDifficultyDetailFromDTO fromDTO) { + //0.判断已读,则修改已读标记 + if (fromDTO.getReadFlag() == NumConstant.ONE) { + memoAttrService.setReaded(fromDTO.getId()); + } + //1.查询难点堵点主表数据 + AddMemoDifficultyFromDTO resultDTO = baseDao.selectByDifficutyId(fromDTO.getId()); + //2.查询对应附件数据 + List attachmentList = memoAttachmentService.getListByMemoId(fromDTO.getId()); + resultDTO.setAttachmentList(attachmentList); + return resultDTO; + } + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/MemoWorkDiaryServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/MemoWorkDiaryServiceImpl.java new file mode 100644 index 0000000000..4ab01f2284 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/MemoWorkDiaryServiceImpl.java @@ -0,0 +1,156 @@ +package com.epmet.service.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.constant.MemoConstant; +import com.epmet.dao.MemoWorkDiaryDao; +import com.epmet.dto.MemoAttachmentDTO; +import com.epmet.dto.MemoAttrDTO; +import com.epmet.dto.MemoWorkDiaryDTO; +import com.epmet.dto.form.MemoWorkDiaryFormDTO; +import com.epmet.entity.MemoAttachmentEntity; +import com.epmet.entity.MemoWorkDiaryEntity; +import com.epmet.service.MemoAttachmentService; +import com.epmet.service.MemoAttrService; +import com.epmet.service.MemoWorkDiaryService; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import org.apache.commons.collections4.CollectionUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.stream.Collectors; + +/** + * 备忘录-工作日志 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-03-15 + */ +@Service +public class MemoWorkDiaryServiceImpl extends BaseServiceImpl implements MemoWorkDiaryService { + + @Resource + private MemoAttrService memoAttrService; + @Resource + private MemoAttachmentService memoAttachmentService; + + @Override + public PageData page(MemoWorkDiaryFormDTO formDTO) { + PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); + List list = baseDao.getPage(formDTO); + PageInfo pageInfo = new PageInfo<>(list); + return new PageData<>(list, pageInfo.getTotal()); + } + + @Override + public List list(MemoWorkDiaryFormDTO formDTO) { + List list = baseDao.getPage(formDTO); + return list; + } + + @Override + public MemoWorkDiaryDTO get(MemoWorkDiaryFormDTO formDTO) { + MemoWorkDiaryEntity entity = baseDao.selectById(formDTO.getId()); + MemoWorkDiaryDTO dto = ConvertUtils.sourceToTarget(entity, MemoWorkDiaryDTO.class); + if (null != dto) { + //获取提醒时间 + MemoAttrDTO memoAttr = memoAttrService.get(formDTO.getId()); + if (null != memoAttr) { + dto.setRemindTime(memoAttr.getRemindTime()); + } + //获取附件列表 + List attachmentList = memoAttachmentService.getListByMemoId(formDTO.getId()); + dto.setAttachmentList(attachmentList); + } + //更新阅读状态 + if (NumConstant.ONE_STR.equals(formDTO.getReadFlag())) { + MemoAttrDTO memoAttrDTO = memoAttrService.get(formDTO.getId()); + memoAttrDTO.setReadFlag(NumConstant.ONE); + memoAttrDTO.setUpdatedTime(null); + memoAttrService.update(memoAttrDTO); + } + return dto; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(MemoWorkDiaryDTO dto) { + MemoWorkDiaryEntity entity = ConvertUtils.sourceToTarget(dto, MemoWorkDiaryEntity.class); + insert(entity); + + //保存属性 + MemoAttrDTO attr = ConvertUtils.sourceToTarget(dto, MemoAttrDTO.class); + attr.setId(entity.getId()); + attr.setType(MemoConstant.WORK_DIARY); + attr.setReadFlag(NumConstant.ZERO); + attr.setReceiver(dto.getCreatedBy()); + memoAttrService.save(attr); + + //删除原来的附件 + memoAttachmentService.deleteByMemoId(entity.getId()); + //保存新的照片 + if (CollectionUtils.isNotEmpty(dto.getAttachmentList())) { + AtomicInteger i = new AtomicInteger(NumConstant.ZERO); + List list = dto.getAttachmentList().stream().map(item -> { + MemoAttachmentEntity e = ConvertUtils.sourceToTarget(item, MemoAttachmentEntity.class); + e.setCustomerId(dto.getCustomerId()); + e.setRemindMsgId(entity.getId()); + e.setSort(i.getAndIncrement()); + return e; + }).collect(Collectors.toList()); + memoAttachmentService.insertBatch(list); + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(MemoWorkDiaryDTO dto) { + MemoWorkDiaryEntity entity = ConvertUtils.sourceToTarget(dto, MemoWorkDiaryEntity.class); + updateById(entity); + + //时间有变动时保存属性,readFlag变为0 + MemoAttrDTO attr = memoAttrService.get(dto.getId()); + if (dto.getRemindTime() != attr.getRemindTime()) { + attr.setRemindTime(dto.getRemindTime()); + attr.setReadFlag(NumConstant.ZERO); + attr.setUpdatedTime(null); + memoAttrService.update(attr); + } + + //删除原来的附件 + memoAttachmentService.deleteByMemoId(entity.getId()); + //保存新的照片 + if (CollectionUtils.isNotEmpty(dto.getAttachmentList())) { + AtomicInteger i = new AtomicInteger(NumConstant.ZERO); + List list = dto.getAttachmentList().stream().map(item -> { + MemoAttachmentEntity e = ConvertUtils.sourceToTarget(item, MemoAttachmentEntity.class); + e.setCustomerId(dto.getCustomerId()); + e.setRemindMsgId(dto.getId()); + e.setSort(i.getAndIncrement()); + return e; + }).collect(Collectors.toList()); + memoAttachmentService.insertBatch(list); + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + List list = Arrays.asList(ids); + baseDao.deleteBatchIds(list); + memoAttrService.delete(ids); + list.forEach(id -> { + //删除附件 + memoAttachmentService.deleteByMemoId(id); + }); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java index 6a591d9e8d..12c88a2b3a 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java @@ -234,14 +234,28 @@ public class ProjectServiceImpl extends BaseServiceImpl userIds) { + if (CollectionUtils.isNotEmpty(userIds)){ + List projectList = baseDao.selectPendListByUserIds(userIds); + if (projectList.size() == 0){ + return false; + }else { + return true; + } + } + return false; + } + @Override public List getCreatedList(ProjectListFromDTO fromDTO) { List list = new ArrayList<>(); - //查询条件 - int pageIndex = (fromDTO.getPageNo() - NumConstant.ONE) * fromDTO.getPageSize(); - fromDTO.setPageNo(pageIndex); - List projectList = baseDao.selectCreatedList(fromDTO); //获取客户定制的可滞留天数 Integer finalDays = getDays(fromDTO); @@ -3134,6 +3148,29 @@ public class ProjectServiceImpl extends BaseServiceImpl> allStaffByGridId = govOrgOpenFeignClient.getAllStaffByGridId(gridId); + if (!allStaffByGridId.success()){ + throw new EpmetException("查询网格下的工作人员失败"); + } + if (CollectionUtils.isNotEmpty(allStaffByGridId.getData())){ + result.setProjectStatus(getPendProjectListByUserIds(allStaffByGridId.getData())); + } + return result; + } + + /** * @Description 区间项目分类数量处理 * 查询的是时间段内的分类项目数,查询的时间 是传入一个日期,拼上时间,在进行比较大小 * @param categories diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.21__create_memo_table.sql b/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.21__create_memo_table.sql new file mode 100644 index 0000000000..e719505e40 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.21__create_memo_table.sql @@ -0,0 +1,86 @@ +CREATE TABLE `memo_attachment` ( + `ID` varchar(64) NOT NULL COMMENT '主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', + `REMIND_MSG_ID` varchar(64) NOT NULL COMMENT 'REMIND_MSG.ID 业务(工作日志、难点堵点、人员关怀)表Id', + `FILE_NAME` varchar(255) DEFAULT NULL COMMENT '文件名', + `ATTACHMENT_NAME` varchar(64) DEFAULT NULL COMMENT '附件名(uuid随机生成)', + `ATTACHMENT_SIZE` int(11) DEFAULT NULL COMMENT '文件大小,单位b', + `ATTACHMENT_FORMAT` varchar(64) NOT NULL COMMENT '文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS)', + `ATTACHMENT_TYPE` varchar(64) NOT NULL COMMENT '附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc))', + `ATTACHMENT_URL` varchar(255) NOT NULL COMMENT '附件地址', + `DURATION` int(11) DEFAULT '0' COMMENT '语音或视频时长,秒', + `SORT` int(1) NOT NULL COMMENT '排序字段', + `DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标记 0:未删除,1:已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='备忘录-附件表'; + +CREATE TABLE `memo_attr` ( + `ID` varchar(32) NOT NULL COMMENT '唯一标识', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', + `REMIND_TIME` datetime DEFAULT NULL COMMENT '提醒时间', + `TYPE` varchar(32) NOT NULL COMMENT '业务类型 人员关怀:concern;难点堵点:difficulty;工作日志:work_diary', + `READ_FLAG` tinyint(1) NOT NULL DEFAULT '0' COMMENT '阅读标记1 已读;0未读', + `RECEIVER` varchar(32) NOT NULL COMMENT '接收人ID', + `DEL_FLAG` char(1) NOT NULL COMMENT '删除标识:0.未删除 1.已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='备忘录-属性(通知)表'; + +CREATE TABLE `memo_concern` ( + `ID` varchar(32) NOT NULL COMMENT '唯一标识(同memo_attr表Id)', + `CUSTOMER_ID` varchar(32) NOT NULL COMMENT '客户ID', + `CONCERN_TYPE` varchar(64) DEFAULT NULL COMMENT '关怀类型', + `RESI_NAME` varchar(64) NOT NULL COMMENT '关怀人员', + `PHONE` varchar(64) DEFAULT NULL COMMENT '关怀对象电话', + `ADDRESS` varchar(64) DEFAULT NULL COMMENT '关怀对象地址', + `CONTENT` varchar(1024) NOT NULL COMMENT '关怀事项', + `SCHEDULED_TIME` datetime DEFAULT NULL COMMENT '预计关怀时间', + `ACTUAL_TIME` datetime DEFAULT NULL COMMENT '实际执行时间(预留字段)', + `STATUS` tinyint(1) NOT NULL DEFAULT '0' COMMENT '状态 0未完成 1已完成', + `DEL_FLAG` char(1) NOT NULL COMMENT '删除标识:0.未删除 1.已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) NOT NULL COMMENT '操作人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='备忘录-人文关怀'; + +CREATE TABLE `memo_difficulty` ( + `ID` varchar(32) NOT NULL COMMENT '唯一标识(同memo_attr表Id)', + `CUSTOMER_ID` varchar(32) NOT NULL COMMENT '客户ID', + `CONTENT` varchar(1024) NOT NULL COMMENT '内容', + `RESOLVE_WAY` varchar(512) DEFAULT NULL COMMENT '解决方式', + `REMARK` varchar(255) DEFAULT NULL COMMENT '备注', + `SCHEDULED_TIME` datetime DEFAULT NULL COMMENT '预计处理时间', + `DEL_FLAG` char(1) NOT NULL COMMENT '删除标识:0.未删除 1.已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='备忘录-难点读点'; + +CREATE TABLE `memo_work_diary` ( + `ID` varchar(32) NOT NULL COMMENT '唯一标识(同memo_attr表Id)', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', + `CONTENT` varchar(1024) NOT NULL COMMENT '内容', + `WORK_TYPE` varchar(64) DEFAULT NULL COMMENT '工作事项', + `DEL_FLAG` char(1) NOT NULL COMMENT '删除标识:0.未删除 1.已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='备忘录-工作日志'; \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/MemoAttachmentDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/MemoAttachmentDao.xml new file mode 100644 index 0000000000..f892f237a5 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/MemoAttachmentDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/MemoAttrDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/MemoAttrDao.xml new file mode 100644 index 0000000000..191ad22c0d --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/MemoAttrDao.xml @@ -0,0 +1,96 @@ + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/MemoConcernDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/MemoConcernDao.xml new file mode 100644 index 0000000000..3018238747 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/MemoConcernDao.xml @@ -0,0 +1,53 @@ + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/MemoDifficultyDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/MemoDifficultyDao.xml new file mode 100644 index 0000000000..27b8655c87 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/MemoDifficultyDao.xml @@ -0,0 +1,58 @@ + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/MemoWorkDiaryDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/MemoWorkDiaryDao.xml new file mode 100644 index 0000000000..08b7db4af6 --- /dev/null +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/MemoWorkDiaryDao.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml index 3d6dc43b7f..bef089e81f 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml @@ -41,6 +41,8 @@ ORDER BY psp.created_time, p.created_time ASC LIMIT #{pageNo}, #{pageSize} + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/templates/memo_concern_export_template.docx b/epmet-module/gov-project/gov-project-server/src/main/resources/templates/memo_concern_export_template.docx new file mode 100644 index 0000000000..07d3c0e1f9 Binary files /dev/null and b/epmet-module/gov-project/gov-project-server/src/main/resources/templates/memo_concern_export_template.docx differ diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/templates/memo_difficulty_export_template.docx b/epmet-module/gov-project/gov-project-server/src/main/resources/templates/memo_difficulty_export_template.docx new file mode 100644 index 0000000000..c1e75911d0 Binary files /dev/null and b/epmet-module/gov-project/gov-project-server/src/main/resources/templates/memo_difficulty_export_template.docx differ diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/templates/memo_work_diary_export_template.docx b/epmet-module/gov-project/gov-project-server/src/main/resources/templates/memo_work_diary_export_template.docx new file mode 100644 index 0000000000..2e58a313b6 Binary files /dev/null and b/epmet-module/gov-project/gov-project-server/src/main/resources/templates/memo_work_diary_export_template.docx differ diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcFormItemServiceImpl.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcFormItemServiceImpl.java index 3afb6df67e..e7afee12c9 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcFormItemServiceImpl.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcFormItemServiceImpl.java @@ -71,6 +71,15 @@ public class IcFormItemServiceImpl extends BaseServiceImpl result=baseDao.queryTableHeaderList(formDto.getCustomerId(),formDto.getFormCode()); + + for (TableHeaderResultDTO column : result) { + if ("HOME_ID".equals(column.getColumnName())) { + // web界面table + column.setLabel("所属房屋"); + break; + } + } + if(!CollectionUtils.isEmpty(result)){ list.addAll(result); } diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.17__update_sort_idcard.sql b/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.17__update_sort_idcard.sql new file mode 100644 index 0000000000..9d383f58d9 --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.17__update_sort_idcard.sql @@ -0,0 +1,12 @@ +UPDATE ic_form_list_item +SET SORT = '5' +WHERE + FORM_ITEM_ID IN ( SELECT i.id FROM ic_form_item i WHERE i.LABEL LIKE '%身份证%' AND i.DEL_FLAG = '0' ) + AND DEL_FLAG = '0'; + +UPDATE ic_form_list_item +SET SORT = '6' +WHERE + FORM_ITEM_ID IN ( SELECT i.id FROM ic_form_item i WHERE i.LABEL LIKE '%性别%' AND i.DEL_FLAG = '0' ) + AND DEL_FLAG = '0'; + \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.18__updateSuoShuJiaTing.sql b/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.18__updateSuoShuJiaTing.sql new file mode 100644 index 0000000000..9b4cfd165c --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.18__updateSuoShuJiaTing.sql @@ -0,0 +1 @@ +update ic_form_item set LABEL='房间号' where LABEL='所属家庭'; \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.19__update_addform_idcard_sort.sql b/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.19__update_addform_idcard_sort.sql new file mode 100644 index 0000000000..5305539887 --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.19__update_addform_idcard_sort.sql @@ -0,0 +1,2 @@ +update ic_form_item set SORT='8',UPDATED_TIME=NOW() where LABEL='身份证号' and DEL_FLAG='0'; +update ic_form_item set SORT='9' ,UPDATED_TIME=NOW() where LABEL='性别' and DEL_FLAG='0'; \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.20__updateSuoShuJiaTing.sql b/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.20__updateSuoShuJiaTing.sql new file mode 100644 index 0000000000..d60b78b385 --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.20__updateSuoShuJiaTing.sql @@ -0,0 +1 @@ +update ic_form_item set LABEL='门牌号' where LABEL='房间号'; \ No newline at end of file diff --git a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/controller/StrangerResiGuideController.java b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/controller/StrangerResiGuideController.java index d2e021b4d0..1ffeff276d 100644 --- a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/controller/StrangerResiGuideController.java +++ b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/controller/StrangerResiGuideController.java @@ -131,7 +131,7 @@ public class StrangerResiGuideController { /** * @param * @Author sun - * @Description 单客户-陌生访客根据自动定位获取附近网格数据 + * @Description 单客户-陌生访客根据自动定位获取附近网格数据 陌生人选网格+去其他网格看看 **/ @PostMapping("publiclocationgridlist") Result> publicLocationGridList(@RequestBody PublicCustomerGridListFormDTO formDTO){ diff --git a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/controller/UserGuideController.java b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/controller/UserGuideController.java index 42920ff788..94c19dfdfe 100644 --- a/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/controller/UserGuideController.java +++ b/epmet-module/resi-guide/resi-guide-server/src/main/java/com/epmet/controller/UserGuideController.java @@ -2,6 +2,7 @@ package com.epmet.controller; import com.alibaba.fastjson.JSON; import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; @@ -29,6 +30,7 @@ public class UserGuideController { @Autowired private UserAccessService userAccessService; + @NoRepeatSubmit @PostMapping("entergrid") Result enterGrid(@LoginUser TokenDto token, @RequestBody UserEnterGridFormDTO userEnterGridFormDTO){ logger.info("进网格TokenDto:"+ JSON.toJSON(token)); diff --git a/epmet-module/resi-home/resi-home-server/src/main/java/com/epmet/service/impl/ResiEventServiceImpl.java b/epmet-module/resi-home/resi-home-server/src/main/java/com/epmet/service/impl/ResiEventServiceImpl.java index fa19f94f14..e7d6749e4f 100644 --- a/epmet-module/resi-home/resi-home-server/src/main/java/com/epmet/service/impl/ResiEventServiceImpl.java +++ b/epmet-module/resi-home/resi-home-server/src/main/java/com/epmet/service/impl/ResiEventServiceImpl.java @@ -1,5 +1,6 @@ package com.epmet.service.impl; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.feign.ResultDataResolver; @@ -20,7 +21,6 @@ import org.springframework.stereotype.Service; import java.util.*; import java.util.stream.Collectors; -import java.util.stream.Stream; /** * @author wxz @@ -68,6 +68,12 @@ public class ResiEventServiceImpl implements ResiEventService, ResultDataResolve npcData.stream().forEach(npc -> { if (StringUtils.isBlank(excludeUserId) || !npc.getUserId().equals(excludeUserId)) { OrgInfoResultDTO gridInfo = npcGridInfoMap.get(npc.getGridId()); + String pids; + if (StringUtils.isNotBlank(gridInfo.getPids()) && !NumConstant.ZERO_STR.equals(gridInfo.getPids())) { + pids = gridInfo.getPids().concat(":").concat(gridInfo.getAgencyId()); + } else { + pids = gridInfo.getAgencyId(); + } ResiEventNpcResultDTO resiEventNpcInfo = new ResiEventNpcResultDTO( npc.getUserId(), npc.getGridId(), @@ -75,7 +81,8 @@ public class ResiEventServiceImpl implements ResiEventService, ResultDataResolve npc.getRealName(), npc.getHeadImgUrl(), gridInfo != null ? gridInfo.getAgencyId() : null, - gridInfo != null ? gridInfo.getPids().concat(":").concat(gridInfo.getAgencyId()) : null); + // gridInfo != null ? gridInfo.getPids().concat(":").concat(gridInfo.getAgencyId()) : null + pids); npcResultList.add(resiEventNpcInfo); } } @@ -122,7 +129,13 @@ public class ResiEventServiceImpl implements ResiEventService, ResultDataResolve OrgInfoResultDTO currentGridInfo = currentGridInfos.get(0); // 因为上游接口的值对应问题,这里只好做一个适配,拼接起来,希望上游代码不要再改了... - String pids = currentGridInfo.getPids().concat(":").concat(currentGridInfo.getAgencyId()); + // String pids = currentGridInfo.getPids().concat(":").concat(currentGridInfo.getAgencyId()); + String pids; + if (StringUtils.isNotBlank(currentGridInfo.getPids()) && !NumConstant.ZERO_STR.equals(currentGridInfo.getPids())) { + pids = currentGridInfo.getPids().concat(":").concat(currentGridInfo.getAgencyId()); + } else { + pids = currentGridInfo.getAgencyId(); + } // 父ID列表的index排序字段是从0开始,网格要排在他们前面,则网格的index为-1 targetLevels.add(new ResiEventTargetLevelResultDTO(OrgLevelEnums.GRID.getLevel(), OrgLevelEnums.GRID.getLevelName(), currentGridInfo.getOrgId(), currentGridInfo.getAgencyId(), pids, -1)); @@ -135,7 +148,12 @@ public class ResiEventServiceImpl implements ResiEventService, ResultDataResolve throw new RenException(String.format("根据级别%s没有找到对应的组织级别枚举", porg.getLevel())); } //parentOrgIds.indexOf(porg.getOrgId()为当前orgId在pids中的位置,得到之后,赋值给index字段,treeset会利用这个字段进行排序 - ResiEventTargetLevelResultDTO pLevel = new ResiEventTargetLevelResultDTO(porg.getLevel(), levelName, porg.getOrgId(), porg.getPid(), porg.getPids(), parentOrgIds.indexOf(porg.getOrgId())); + ResiEventTargetLevelResultDTO pLevel = new ResiEventTargetLevelResultDTO(porg.getLevel(), + levelName, + porg.getOrgId(), + porg.getPid(), + porg.getPids(), + parentOrgIds.indexOf(porg.getOrgId())); targetLevels.add(pLevel); }); diff --git a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/grid/service/impl/ResiMineGridServiceImpl.java b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/grid/service/impl/ResiMineGridServiceImpl.java index de5e28a457..68ac4ef3c1 100644 --- a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/grid/service/impl/ResiMineGridServiceImpl.java +++ b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/grid/service/impl/ResiMineGridServiceImpl.java @@ -4,7 +4,10 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.epmet.commons.tools.constant.AppClientConstant; import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.redis.common.CustomerOrgRedis; +import com.epmet.commons.tools.redis.common.bean.GridInfoCache; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.HttpClientManager; @@ -13,6 +16,7 @@ import com.epmet.dto.PaCustomerDTO; import com.epmet.dto.form.LatestGridInfoFormDTO; import com.epmet.dto.result.AllGridsByUserIdResultDTO; import com.epmet.dto.result.LatestGridInfoResultDTO; +import com.epmet.dto.result.UserBaseInfoResultDTO; import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.modules.feign.EpmetUserFeignClient; import com.epmet.modules.feign.GovOrgFeignClient; @@ -25,6 +29,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import java.util.Map; @@ -108,7 +113,24 @@ public class ResiMineGridServiceImpl implements ResiMineGridService { @Override public LatestGridInfoResultDTO latestGridInfo(LatestGridInfoFormDTO formDTO) { logger.info(String.format("居民端获取用户最近访问网格入参%s", JSON.toJSONString(formDTO))); - //1.调用third服务,根据appId获取客户Id + + // 查询注册网格的弃用状态 + LatestGridInfoResultDTO result = new LatestGridInfoResultDTO(); + Result> userBaseInfo = epmetUserOpenFeignClient.queryUserBaseInfo(Arrays.asList(formDTO.getUserId())); + if (!userBaseInfo.success()){ + throw new EpmetException("查询用户基本信息失败"); + } + String registeredGridId = userBaseInfo.getData().get(NumConstant.ZERO).getRegisteredGridId(); + if (StringUtils.isNotBlank(registeredGridId)){ + GridInfoCache grid = CustomerOrgRedis.getGridInfo(registeredGridId); + if (grid != null) { + result.setRegisterGridStatus(grid.getAbandonFlag()); + if (result.getRegisterGridStatus().compareTo(NumConstant.ONE) == NumConstant.ZERO){ + return result; + } + } + } + //1.调用third服务,根据appId获取客户Id JSONObject jsonObject = new JSONObject(); String customerMsgUrl = "https://epmet-cloud.elinkservice.cn/api/third/customermp/getcustomermsg/"; String data = HttpClientManager.getInstance().sendPostByJSON(customerMsgUrl + formDTO.getAppId(), JSON.toJSONString(jsonObject)).getData(); @@ -133,9 +155,14 @@ public class ResiMineGridServiceImpl implements ResiMineGridService { Result userResult = epmetUserOpenFeignClient.latestGridInfo(formDTO); if (!userResult.success()) { logger.error(String.format("居民端获取用户最近访问网格失败,接口入参客户Id->%s,appId->%s,调用epmet-user-server服务返回->%s", formDTO.getCustomerId(), formDTO.getAppId(), JSON.toJSONString(userResult))); + return null; } - - return userResult.getData(); + if (null == userResult.getData()){ + return result; + } + result.setGridId(StringUtils.isNotBlank(userResult.getData().getGridId()) ? userResult.getData().getGridId() : ""); + result.setCustomerId(StringUtils.isNotBlank(userResult.getData().getCustomerId()) ? userResult.getData().getCustomerId() : ""); + return result; } /** diff --git a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/result/WarnAndPartyAuditResultDTO.java b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/result/WarnAndPartyAuditResultDTO.java new file mode 100644 index 0000000000..1b900df696 --- /dev/null +++ b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/result/WarnAndPartyAuditResultDTO.java @@ -0,0 +1,31 @@ +package com.epmet.resi.partymember.dto.partymember.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2022/3/15 8:00 下午 + * @DESC + */ +@Data +public class WarnAndPartyAuditResultDTO implements Serializable { + + private static final long serialVersionUID = 6971169159679812283L; + + /** + * 是否存在党员审核 + */ + private Boolean partyMemberStatus; + + /** + * 是否存在热心居民审核 + */ + private Boolean warnStatus; + + public WarnAndPartyAuditResultDTO() { + this.partyMemberStatus = false; + this.warnStatus = false; + } +} diff --git a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/feign/ResiPartyMemberOpenFeignClient.java b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/feign/ResiPartyMemberOpenFeignClient.java index 0f320cf9be..debdc9afea 100644 --- a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/feign/ResiPartyMemberOpenFeignClient.java +++ b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/feign/ResiPartyMemberOpenFeignClient.java @@ -8,6 +8,7 @@ import com.epmet.resi.partymember.dto.partymember.form.DelPartyMemberBaseInfoFor import com.epmet.resi.partymember.dto.partymember.form.PartyMemberBaseInfoAddFormDTO; import com.epmet.resi.partymember.dto.partymember.result.PartyMemberBaseInfoDetailResultDTO; import com.epmet.resi.partymember.dto.partymember.result.PartymemberBaseInfoResultDTO; +import com.epmet.resi.partymember.dto.partymember.result.WarnAndPartyAuditResultDTO; import com.epmet.resi.partymember.feign.fallback.ResiPartyMemberOpenFeignClientFallback; import com.epmet.resi.partymember.feign.fallback.ResiPartyMemberOpenFeignClientFallbackFactory; import org.springframework.cloud.openfeign.FeignClient; @@ -105,4 +106,13 @@ public interface ResiPartyMemberOpenFeignClient { @PostMapping(value = "/resi/partymember/partymemberinfo/getpartymemberinfobycustomerid") Result> getPartyMemberInfoByCustomerId(@RequestParam("customerId")String customerId); + /** + * Desc: 查询网格下是否存在党员审核 true:存在,false:不存在 + * @param gridId + * @author zxc + * @date 2022/3/15 4:19 下午 + */ + @PostMapping("/resi/partymember/partymemberconfirmmanual/audit-reset") + Result partyMemberAuditReset(@RequestParam("gridId")String gridId); + } diff --git a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/feign/fallback/ResiPartyMemberOpenFeignClientFallback.java b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/feign/fallback/ResiPartyMemberOpenFeignClientFallback.java index 953d5ca326..f7fe137a60 100644 --- a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/feign/fallback/ResiPartyMemberOpenFeignClientFallback.java +++ b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/feign/fallback/ResiPartyMemberOpenFeignClientFallback.java @@ -9,6 +9,7 @@ import com.epmet.resi.partymember.dto.partymember.form.DelPartyMemberBaseInfoFor import com.epmet.resi.partymember.dto.partymember.form.PartyMemberBaseInfoAddFormDTO; import com.epmet.resi.partymember.dto.partymember.result.PartyMemberBaseInfoDetailResultDTO; import com.epmet.resi.partymember.dto.partymember.result.PartymemberBaseInfoResultDTO; +import com.epmet.resi.partymember.dto.partymember.result.WarnAndPartyAuditResultDTO; import com.epmet.resi.partymember.feign.ResiPartyMemberOpenFeignClient; import org.springframework.stereotype.Component; @@ -69,4 +70,9 @@ public class ResiPartyMemberOpenFeignClientFallback implements ResiPartyMemberOp public Result> getPartyMemberInfoByCustomerId(String customerId) { return ModuleUtils.feignConError(ServiceConstant.RESI_PARTYMEMBER_SERVER, "getPartyMemberInfoByCustomerId", customerId); } + + @Override + public Result partyMemberAuditReset(String gridId) { + return ModuleUtils.feignConError(ServiceConstant.RESI_PARTYMEMBER_SERVER, "partyMemberAuditReset", gridId); + } } diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/PartymemberConfirmManualController.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/PartymemberConfirmManualController.java index e776590957..ec0ae2d39c 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/PartymemberConfirmManualController.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/PartymemberConfirmManualController.java @@ -28,6 +28,7 @@ import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.modules.partymember.excel.PartymemberConfirmManualExcel; import com.epmet.modules.partymember.service.PartymemberConfirmManualService; import com.epmet.resi.partymember.dto.partymember.PartymemberConfirmManualDTO; +import com.epmet.resi.partymember.dto.partymember.result.WarnAndPartyAuditResultDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -91,4 +92,15 @@ public class PartymemberConfirmManualController { ExcelUtils.exportExcelToTarget(response, null, list, PartymemberConfirmManualExcel.class); } + /** + * Desc: 查询网格下是否存在党员审核 true:存在,false:不存在 + * @param gridId + * @author zxc + * @date 2022/3/15 4:19 下午 + */ + @PostMapping("audit-reset") + public Result partyMemberAuditReset(@RequestParam("gridId")String gridId){ + return new Result().ok(partymemberConfirmManualService.partyMemberAuditReset(gridId)); + } + } \ No newline at end of file diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/PartymemberConfirmManualDao.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/PartymemberConfirmManualDao.java index 4834e28601..e3154645cf 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/PartymemberConfirmManualDao.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/dao/PartymemberConfirmManualDao.java @@ -20,6 +20,7 @@ package com.epmet.modules.partymember.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.modules.partymember.entity.PartymemberConfirmManualEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; /** * 党员认证人工审核表 人工审核时要展示自动审核的结果,同事允许前台去修改党员认证信息表的数据 @@ -29,5 +30,21 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface PartymemberConfirmManualDao extends BaseDao { - + + /** + * Desc: 查询网格下存在党员审核个数 + * @param gridId + * @author zxc + * @date 2022/3/15 4:24 下午 + */ + Integer partyMemberAuditReset(@Param("gridId")String gridId); + + /** + * Desc: 查询网格下热心居民审核个数 + * @param gridId + * @author zxc + * @date 2022/3/15 8:11 下午 + */ + Integer warnAuditReset(@Param("gridId")String gridId); + } \ No newline at end of file diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/PartymemberConfirmManualService.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/PartymemberConfirmManualService.java index d3e02c1df2..6785ff7ce0 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/PartymemberConfirmManualService.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/PartymemberConfirmManualService.java @@ -21,6 +21,7 @@ import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.modules.partymember.entity.PartymemberConfirmManualEntity; import com.epmet.resi.partymember.dto.partymember.PartymemberConfirmManualDTO; +import com.epmet.resi.partymember.dto.partymember.result.WarnAndPartyAuditResultDTO; import java.util.List; import java.util.Map; @@ -100,4 +101,12 @@ public interface PartymemberConfirmManualService extends BaseService - - - - - - - - - - - - - - - + + + + + \ No newline at end of file diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/CollectListFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/CollectListFormDTO.java index ae5ec4bacb..368db969c4 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/CollectListFormDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/CollectListFormDTO.java @@ -1,32 +1,22 @@ package com.epmet.dto.form; +import com.epmet.commons.tools.dto.form.PageFormDTO; import lombok.Data; -import javax.validation.constraints.NotNull; -import java.io.Serializable; - /** * @Author zxc * @DateTime 2022/3/18 19:00 * @DESC */ @Data -public class CollectListFormDTO implements Serializable { +public class CollectListFormDTO extends PageFormDTO { private static final long serialVersionUID = 2106773724057183577L; public interface CollectListForm{} - @NotNull(message = "pageNo不能为空", groups = CollectListForm.class) - private Integer pageNo; - - @NotNull(message = "pageSize不能为空", groups = CollectListForm.class) - private Integer pageSize; - private String orgId; - private String neighborHoodId; - private String buildingId; - private String houseId; + private String address; /** diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiCollectMemFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiCollectMemFormDTO.java index 4490b9357c..2dccf23b59 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiCollectMemFormDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiCollectMemFormDTO.java @@ -2,10 +2,12 @@ package com.epmet.dto.form; import lombok.Data; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; import java.io.Serializable; +/** + * 家庭成员信息 + * 前端做校验 + */ @Data public class IcResiCollectMemFormDTO implements Serializable { /** @@ -15,30 +17,30 @@ public class IcResiCollectMemFormDTO implements Serializable { /** * 居住成员1姓名 */ - @NotBlank(message = "姓名不能为空", groups = {IcResiCollectFormDTO.InternalShowGroup.class, IcResiCollectFormDTO.ExternalShowGroup.class}) + // @NotBlank(message = "姓名不能为空", groups = {IcResiCollectFormDTO.InternalShowGroup.class, IcResiCollectFormDTO.ExternalShowGroup.class}) private String name; /** * 居住成员1身份证号 */ - @NotBlank(message = "身份证号不能为空", groups = {IcResiCollectFormDTO.InternalShowGroup.class, IcResiCollectFormDTO.ExternalShowGroup.class}) + // @NotBlank(message = "身份证号不能为空", groups = {IcResiCollectFormDTO.InternalShowGroup.class, IcResiCollectFormDTO.ExternalShowGroup.class}) private String idNum; /** * 居住成员1手机号 */ - @NotBlank(message = "手机号不能为空", groups = {IcResiCollectFormDTO.InternalShowGroup.class, IcResiCollectFormDTO.ExternalShowGroup.class}) + // @NotBlank(message = "手机号不能为空", groups = {IcResiCollectFormDTO.InternalShowGroup.class, IcResiCollectFormDTO.ExternalShowGroup.class}) private String mobile; /** * 居住成员1是否参加几轮全员核算检测,数字1-10 */ - @NotBlank(message = "核算检测情况不能为空", groups = {IcResiCollectFormDTO.InternalShowGroup.class, IcResiCollectFormDTO.ExternalShowGroup.class}) + // @NotBlank(message = "核算检测情况不能为空", groups = {IcResiCollectFormDTO.InternalShowGroup.class, IcResiCollectFormDTO.ExternalShowGroup.class}) private String heSuanCount; /** * 居住成员1新冠疫苗接种情况;1:已全程接种;2:未全程接种;0未接种; */ - @NotNull(message = "疫苗接种情况不能为空", groups = {IcResiCollectFormDTO.InternalShowGroup.class, IcResiCollectFormDTO.ExternalShowGroup.class}) + // @NotNull(message = "疫苗接种情况不能为空", groups = {IcResiCollectFormDTO.InternalShowGroup.class, IcResiCollectFormDTO.ExternalShowGroup.class}) private Integer ymjz; } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/ModifyRegGridFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/ModifyRegGridFormDTO.java new file mode 100644 index 0000000000..b54c57ca09 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/ModifyRegGridFormDTO.java @@ -0,0 +1,26 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + + +@Data +public class ModifyRegGridFormDTO implements Serializable { + public interface AddUserInternalGroup { + } + + public interface AddUserShowGroup extends CustomerClientShowGroup { + } + + @NotBlank(message = "userId不能为空", groups = AddUserInternalGroup.class) + private String userId; + @NotBlank(message = "customerId不能为空", groups = AddUserInternalGroup.class) + private String customerId; + + @NotBlank(message = "请选择您所在的网格", groups = AddUserShowGroup.class) + private String gridId; + +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CollectListExcelResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CollectListExcelResultDTO.java new file mode 100644 index 0000000000..b98e4489bd --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CollectListExcelResultDTO.java @@ -0,0 +1,48 @@ +package com.epmet.dto.result; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import cn.afterturn.easypoi.excel.annotation.ExcelCollection; +import lombok.Data; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2022/3/18 19:00 + * @DESC + */ +@Data +public class CollectListExcelResultDTO implements Serializable { + + private static final long serialVersionUID = -5659769436514116680L; + /** + * 户主姓名 + */ + @Excel(name = "户主姓名",width = 30, needMerge = true) + private String houseHolderName; + + /** + * 居住地址 + */ + @Excel(name = "居住地址",width = 40, needMerge = true) + private String address; + + /** + * 房屋类型,1:自有, 0:租住 + */ + @Excel(name = "房屋类型",replace = { "自有_1", "租住_0"}, width = 30, needMerge = true) + private String houseType; + + /** + * 居住人数 + */ + @Excel(name = "居住成员人数",width = 30, needMerge = true) + private Integer totalResi; + + @ExcelCollection(name="家庭成员") + private List listP = new ArrayList<>(); + + +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CollectListMemberExcelResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CollectListMemberExcelResultDTO.java new file mode 100644 index 0000000000..854d1b3c93 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CollectListMemberExcelResultDTO.java @@ -0,0 +1,48 @@ +package com.epmet.dto.result; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.io.Serializable; + +/** + * desc: + * + * @author: LiuJanJun + * @date: 2022/3/21 5:09 下午 + * @version: 1.0 + */ +@Data +public class CollectListMemberExcelResultDTO implements Serializable { + private static final long serialVersionUID = -4290962585956172531L; + /** + * 成员名字 + */ + @Excel(name = "成员姓名", width = 30) + private String memberName; + + /** + * 成员身份证 + */ + @Excel(name = "成员身份证号", width = 30) + private String memberIdNum; + + /** + * 成员电话 + */ + @Excel(name = "成员手机号", width = 30) + private String memberMobile; + + /** + * 核酸检测次数 + */ + @Excel(name = "参加几轮核酸检测", width = 30) + private String heSuanCount = "0"; + + /** + * 疫苗是否全程接种,1:全程接种,2:未全程接种,3:为接种 + */ + @Excel(name = "疫苗接种情况",replace = { "全程接种_1", "未全程接种_2", "未接种_0" }, width = 30) + private String ymjz; + +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CollectListResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CollectListResultDTO.java index 9edcfa4d8d..1d61469165 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CollectListResultDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/CollectListResultDTO.java @@ -4,7 +4,6 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; import java.io.Serializable; -import java.util.ArrayList; import java.util.List; /** @@ -42,13 +41,6 @@ public class CollectListResultDTO implements Serializable { private List list; - public CollectListResultDTO() { - this.houseHolderName = ""; - this.address = ""; - this.houseType = "0"; - this.totalResi = 0; - this.list = new ArrayList<>(); - } @Data public static class CollectListMemberResultDTO{ @@ -77,12 +69,6 @@ public class CollectListResultDTO implements Serializable { */ private Integer ymjz; - public CollectListMemberResultDTO() { - this.memberName = ""; - this.memberIdNum = ""; - this.memberMobile = ""; - this.heSuanCount = "0"; - this.ymjz = 0; - } + } } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/LatestGridInfoResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/LatestGridInfoResultDTO.java index ddf04a0fe7..1601ac09af 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/LatestGridInfoResultDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/LatestGridInfoResultDTO.java @@ -23,4 +23,9 @@ public class LatestGridInfoResultDTO implements Serializable { */ private String gridId; + /** + * 居民注册网格弃用状态 1:弃用,0:正常使用 + */ + private Integer registerGridStatus = 0; + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/BadgeController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/BadgeController.java index e25083f669..eace8b90b0 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/BadgeController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/BadgeController.java @@ -1,7 +1,9 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.annotation.RequirePermission; import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.enums.RequirePermissionEnum; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; @@ -12,7 +14,6 @@ import com.epmet.service.BadgeService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; -import javax.validation.constraints.NotBlank; import java.util.List; import java.util.Map; @@ -206,4 +207,28 @@ public class BadgeController { List users = badgeService.listUsersByBadge(customerId, badgeKey); return new Result>().ok(users); } + + /** + * Desc: 查询网格下是否存在未审核的徽章,true:是,false:否 + * @param gridId + * @author zxc + * @date 2022/3/16 9:42 上午 + */ + @PostMapping("audit-reset") + public Result badgeAuditReset(@RequestParam("gridId")String gridId){ + return new Result().ok(badgeService.badgeAuditReset(gridId)); + } + + /** + * desc:删除审核中的徽章认证记录-弃用网格是调用 + * @param customerId + * @param gridId + * @return + */ + @RequirePermission(requirePermission = RequirePermissionEnum.ORG_GRID_DELETE) + @PostMapping("deleteBadgeCertificateAuditing") + public Result deleteBadgeCertificateAuditing(@RequestParam("customerId") String customerId,@RequestParam("gridId")String gridId){ + return new Result().ok(badgeService.deleteBadgeCertificateAuditing(customerId,gridId)); + } + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/GridLatestController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/GridLatestController.java index c470d793a9..b1b07c4e9e 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/GridLatestController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/GridLatestController.java @@ -143,4 +143,15 @@ public class GridLatestController { return new Result().ok(gridLatestService.latestGridInfo(formDTO)); } + /** + * desc:删除弃用网格的访问记录-弃用网格是调用 + * @param customerId + * @param gridId + * @return + */ + @PostMapping("deleteGridLatestData") + public Result deleteGridLatestData(@RequestParam("customerId") String customerId,@RequestParam("gridId")String gridId){ + return new Result().ok(gridLatestService.deleteGridLatestData(customerId,gridId)); + } + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiCollectController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiCollectController.java index ed1227c01e..7b8df6ad1d 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiCollectController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiCollectController.java @@ -2,12 +2,17 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.form.CollectListFormDTO; import com.epmet.dto.form.IcResiCollectFormDTO; +import com.epmet.dto.result.CollectListExcelResultDTO; +import com.epmet.dto.result.CollectListMemberExcelResultDTO; import com.epmet.dto.result.CollectListResultDTO; import com.epmet.service.IcResiCollectService; import org.springframework.beans.factory.annotation.Autowired; @@ -16,6 +21,8 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import javax.servlet.http.HttpServletResponse; +import java.util.ArrayList; import java.util.List; @@ -68,4 +75,37 @@ public class IcResiCollectController { return new Result>().ok(icResiCollectService.getCollectList(formDTO)); } + /** + * Desc: 查询采集居民信息 + * @param formDTO + * @param tokenDto + * @author zxc + * @date 2022/3/18 19:23 + */ + @PostMapping("export") + public void export(@RequestBody CollectListFormDTO formDTO, @LoginUser TokenDto tokenDto, HttpServletResponse response) throws Exception { + //ValidatorUtils.validateEntity(formDTO,CollectListFormDTO.CollectListForm.class); + //tokenDto.setUserId("73ae6280e46a6653a5605d51d5462725"); + //tokenDto.setCustomerId("45687aa479955f9d06204d415238f7cc"); + formDTO.setUserId(tokenDto.getUserId()); + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setPage(false); + PageData collectList = icResiCollectService.getCollectList(formDTO); + List list =new ArrayList<>(); + + collectList.getList().forEach(o->{ + List children = new ArrayList<>(); + o.getList().forEach(item->{ + CollectListMemberExcelResultDTO resultDTO = ConvertUtils.sourceToTarget(item, CollectListMemberExcelResultDTO.class); + resultDTO.setYmjz(item.getYmjz() == null? StrConstant.EPMETY_STR:String.valueOf(item.getYmjz())); + children.add(resultDTO); + }); + CollectListExcelResultDTO resultDTO = ConvertUtils.sourceToTarget(o, CollectListExcelResultDTO.class); + resultDTO.setListP(children); + list.add(resultDTO); + }); + + ExcelUtils.exportExcelToTarget(response, null, list, CollectListExcelResultDTO.class); + } + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserController.java index 5d5870439e..3f8b17f323 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserController.java @@ -210,4 +210,20 @@ public class UserController { ValidatorUtils.validateEntity(findIcUserFormDTO,FindIcUserFormDTO.AddUserInternalGroup.class); return new Result().ok(userService.findIcUser(findIcUserFormDTO)); } + + /** + * 居民端-修改注册网格 + * @param tokenDto + * @param formDTO + * @return + */ + @PostMapping(value = "modify-reg-grid") + public Result modifyRegGrid(@LoginUser TokenDto tokenDto,@RequestBody ModifyRegGridFormDTO formDTO){ + formDTO.setUserId(tokenDto.getUserId()); + formDTO.setCustomerId(tokenDto.getCustomerId()); + ValidatorUtils.validateEntity(formDTO,ModifyRegGridFormDTO.AddUserShowGroup.class, + ModifyRegGridFormDTO.AddUserInternalGroup.class); + userService.modifyRegGrid(formDTO); + return new Result(); + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/BadgeDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/BadgeDao.java index d2a10f7026..113ed28dee 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/BadgeDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/BadgeDao.java @@ -204,4 +204,13 @@ public interface BadgeDao extends BaseDao { * @date 2021.08.02 10:40 */ List listUsersByBadge(@Param("customerId") String customerId, @Param("badgeKey") String badgeKey); + + /** + * Desc: 查询网格下的徽章审核个数 + * @param gridId + * @author zxc + * @date 2022/3/16 9:52 上午 + */ + Integer badgeAuditReset(@Param("gridId") String gridId); + } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserRegGridChangeRecDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserRegGridChangeRecDao.java new file mode 100644 index 0000000000..c14ace1ab7 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserRegGridChangeRecDao.java @@ -0,0 +1,16 @@ +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.UserRegGridChangeRecEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 用户注册网格变更记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-03-17 + */ +@Mapper +public interface UserRegGridChangeRecDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/UserRegGridChangeRecEntity.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/UserRegGridChangeRecEntity.java new file mode 100644 index 0000000000..262c79e608 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/UserRegGridChangeRecEntity.java @@ -0,0 +1,41 @@ +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-17 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("user_reg_grid_change_rec") +public class UserRegGridChangeRecEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 居民端用户id + */ + private String userId; + + /** + * 原始网格id + */ + private String originGridId; + + /** + * 当前所选择的注册网格 + */ + private String gridId; + +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/BadgeService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/BadgeService.java index fc06714fd9..34defc0541 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/BadgeService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/BadgeService.java @@ -200,4 +200,20 @@ public interface BadgeService extends BaseService { * @date 2021.08.02 10:39 */ List listUsersByBadge(String customerId, String badgeKey); -} \ No newline at end of file + + /** + * Desc: 查询网格下是否存在未审核的徽章,true:是,false:否 + * @param gridId + * @author zxc + * @date 2022/3/16 9:42 上午 + */ + Boolean badgeAuditReset(String gridId); + + /** + * desc:根据网格id 修改审核状态 + * @param customerId + * @param gridId + * @return + */ + Integer deleteBadgeCertificateAuditing(String customerId, String gridId); +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/GridLatestService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/GridLatestService.java index e9ff239d1e..2ba30ae954 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/GridLatestService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/GridLatestService.java @@ -140,4 +140,12 @@ public interface GridLatestService extends BaseService { * @Date 2020/8/3 **/ LatestGridInfoResultDTO latestGridInfo(LatestGridInfoFormDTO formDTO); + + /** + * desc:删除弃用网格的访问记录-弃用网格是调用 + * @param customerId + * @param gridId + * @return + */ + Integer deleteGridLatestData(String customerId, String gridId); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserBadgeCertificateRecordService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserBadgeCertificateRecordService.java index 154c8685db..64e38706b6 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserBadgeCertificateRecordService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserBadgeCertificateRecordService.java @@ -92,4 +92,12 @@ public interface UserBadgeCertificateRecordService extends BaseService { * @return */ EpmetUserFamilyDTO findIcUser(FindIcUserFormDTO findIcUserFormDTO); + + /** + * 居民端-修改注册网格 + * @param formDTO + */ + void modifyRegGrid(ModifyRegGridFormDTO formDTO); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/BadgeServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/BadgeServiceImpl.java index de2f864ff0..2a3809feb3 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/BadgeServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/BadgeServiceImpl.java @@ -24,7 +24,6 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.Constant; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; -import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.exception.ValidateException; @@ -495,4 +494,24 @@ public class BadgeServiceImpl extends BaseServiceImpl imp public List listUsersByBadge(String customerId, String badgeKey) { return baseDao.listUsersByBadge(customerId, badgeKey); } -} \ No newline at end of file + + /** + * Desc: 查询网格下是否存在未审核的徽章,true:是,false:否 + * @param gridId + * @author zxc + * @date 2022/3/16 9:42 上午 + */ + @Override + public Boolean badgeAuditReset(String gridId) { + Integer badgeAuditCount = baseDao.badgeAuditReset(gridId); + if (badgeAuditCount.compareTo(NumConstant.ZERO) != NumConstant.ZERO){ + return true; + } + return false; + } + + @Override + public Integer deleteBadgeCertificateAuditing(String customerId, String gridId) { + return userBadgeCertificateRecordService.deleteBadgeCertificateAuditing(customerId,gridId); + } +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GridLatestServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GridLatestServiceImpl.java index 58f9383078..fabf993292 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GridLatestServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/GridLatestServiceImpl.java @@ -19,6 +19,7 @@ package com.epmet.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; @@ -36,7 +37,6 @@ import com.epmet.dto.result.CustomerUser4PointResultDTO; import com.epmet.dto.result.LatestGridInfoResultDTO; import com.epmet.dto.result.UserBaseInfoResultDTO; import com.epmet.entity.GridLatestEntity; -import com.epmet.feign.EpmetHeartOpenFeignClient; import com.epmet.redis.UserBaseInfoRedis; import com.epmet.service.GridLatestService; import com.epmet.util.ModuleConstant; @@ -210,4 +210,13 @@ public class GridLatestServiceImpl extends BaseServiceImpl wrapper = new LambdaUpdateWrapper(); + wrapper.eq(GridLatestEntity::getCustomerId,customerId) + .eq(GridLatestEntity::getGridId,gridId) + .set(GridLatestEntity::getUpdatedTime,System.currentTimeMillis()); + return baseDao.delete(wrapper); + } + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiCollectServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiCollectServiceImpl.java index 4037180bf0..b1895b608a 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiCollectServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiCollectServiceImpl.java @@ -63,8 +63,11 @@ public class IcResiCollectServiceImpl extends BaseServiceImpl memberList = ConvertUtils.sourceToTarget(formDTO.getMemberList(), IcResiMemberEntity.class); memberList.forEach(mem -> { - mem.setIcResiCollectId(insert.getId()); - icResiMemberDao.insert(mem); + if (StringUtils.isNotBlank(mem.getName()) || StringUtils.isNotBlank(mem.getIdNum())) { + //姓名或份身份证号不为空时插入 + mem.setIcResiCollectId(insert.getId()); + icResiMemberDao.insert(mem); + } }); } else { //更新主表 @@ -86,9 +89,6 @@ public class IcResiCollectServiceImpl extends BaseServiceImpl getCollectList(CollectListFormDTO formDTO) { PageData result = new PageData<>(new ArrayList<>(), 0); if (StringUtils.isBlank(formDTO.getOrgId()) && - StringUtils.isBlank(formDTO.getNeighborHoodId()) && - StringUtils.isBlank(formDTO.getBuildingId()) && - StringUtils.isBlank(formDTO.getHouseId()) && StringUtils.isBlank(formDTO.getAddress()) && StringUtils.isBlank(formDTO.getStartDate()) && StringUtils.isBlank(formDTO.getEndDate()) ){ @@ -98,9 +98,14 @@ public class IcResiCollectServiceImpl extends BaseServiceImpl pageList = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.getCollectList(formDTO)); - result.setList(pageList.getList()); - result.setTotal(Integer.valueOf(String.valueOf(pageList.getTotal()))); + if (formDTO.isPage()){ + PageInfo pageList = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.getCollectList(formDTO)); + result.setList(pageList.getList()); + result.setTotal(Integer.parseInt(String.valueOf(pageList.getTotal()))); + }else { + List collectList = baseDao.getCollectList(formDTO); + result.setList(collectList); + } return result; } @@ -123,16 +128,21 @@ public class IcResiCollectServiceImpl extends BaseServiceImpl newMemberList, Map memMap, String originIcResiCollectId) { for (IcResiMemberEntity entity : newMemberList) { - if (MapUtils.isNotEmpty(memMap) && memMap.containsKey(entity.getIdNum())) { + if(StringUtils.isNotBlank(entity.getIdNum())){ + if (MapUtils.isNotEmpty(memMap) && memMap.containsKey(entity.getIdNum())) { + entity.setIcResiCollectId(originIcResiCollectId); + entity.setCustomerId(memMap.get(entity.getIdNum()).getCustomerId()); + entity.setId(memMap.get(entity.getIdNum()).getId()); + icResiMemberDao.updateById(entity); + continue; + } + } + //与之前历史成员没有匹配到 + if (StringUtils.isNotBlank(entity.getName()) || StringUtils.isNotBlank(entity.getIdNum())) { + //姓名或份身份证号不为空时插入 entity.setIcResiCollectId(originIcResiCollectId); - entity.setCustomerId(memMap.get(entity.getIdNum()).getCustomerId()); - entity.setId(memMap.get(entity.getIdNum()).getId()); - icResiMemberDao.updateById(entity); - continue; + icResiMemberDao.insert(entity); } - //没有插入 - entity.setIcResiCollectId(originIcResiCollectId); - icResiMemberDao.insert(entity); } } -} \ No newline at end of file +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeCertificateRecordServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeCertificateRecordServiceImpl.java index 6f798abc79..a472ebcdae 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeCertificateRecordServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeCertificateRecordServiceImpl.java @@ -17,6 +17,7 @@ package com.epmet.service.impl; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; @@ -97,4 +98,13 @@ public class UserBadgeCertificateRecordServiceImpl extends BaseServiceImpl tWrapper = new LambdaQueryWrapper<>(); + tWrapper.eq(UserBadgeCertificateRecordEntity::getCustomerId,customerId) + .eq(UserBadgeCertificateRecordEntity::getGridId,gridId) + .eq(UserBadgeCertificateRecordEntity::getAuditStatus,"auditing"); + return baseDao.delete(tWrapper); + } + +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserServiceImpl.java index af2a9e2513..12380e64c2 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserServiceImpl.java @@ -1,26 +1,27 @@ package com.epmet.service.impl; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.NumConstant; 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.redis.common.CustomerOrgRedis; +import com.epmet.commons.tools.redis.common.bean.GridInfoCache; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.CpUserDetailRedis; import com.epmet.commons.tools.utils.Result; import com.epmet.constant.UserConstant; -import com.epmet.dao.UserDao; -import com.epmet.dao.UserResiInfoDao; -import com.epmet.dao.UserRoleDao; -import com.epmet.dao.UserWechatDao; +import com.epmet.dao.*; import com.epmet.dto.*; import com.epmet.dto.form.*; import com.epmet.dto.result.*; -import com.epmet.entity.UserBaseInfoEntity; -import com.epmet.entity.UserEntity; -import com.epmet.entity.UserWechatEntity; +import com.epmet.entity.*; +import com.epmet.feign.EpmetHeartOpenFeignClient; import com.epmet.feign.EpmetPointOpenFeignClient; import com.epmet.feign.GovOrgFeignClient; +import com.epmet.redis.UserBaseInfoRedis; import com.epmet.service.IcResiUserService; import com.epmet.service.UserBaseInfoService; import com.epmet.service.UserService; @@ -31,6 +32,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import java.util.ArrayList; import java.util.Arrays; @@ -63,6 +65,19 @@ public class UserServiceImpl extends BaseServiceImpl implem private UserResiInfoDao userResiInfoDao; @Autowired private IcResiUserService icResiUserService; + @Autowired + private RegisterRelationDao registerRelationDao; + @Autowired + private EpmetHeartOpenFeignClient epmetHeartOpenFeignClient; + @Autowired + private ResiUserBadgeDao resiUserBadgeDao; + @Autowired + private UserBadgeCertificateRecordDao userBadgeCertificateRecordDao; + @Autowired + private UserBaseInfoRedis userBaseInfoRedis; + @Autowired + private UserRegGridChangeRecDao UserRegGridChangeRecDao; + private static final Logger log = LoggerFactory.getLogger(UserServiceImpl.class); @@ -417,4 +432,86 @@ public class UserServiceImpl extends BaseServiceImpl implem return result; } + /** + * 居民端-修改注册网格 + * + * @param formDTO + */ + @Transactional(rollbackFor = Exception.class) + @Override + public void modifyRegGrid(ModifyRegGridFormDTO formDTO) { + GridInfoCache newGridInfo= CustomerOrgRedis.getGridInfo(formDTO.getGridId()); + RegisterRelationEntity originReg=registerRelationDao.selectRegisteredGridIdByUserIdAndCustomerId(formDTO.getUserId(),formDTO.getCustomerId()); + if (null == newGridInfo || null == originReg) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "居民端_修改注册网格:查询网格信息异常", "服务器开小差了..."); + } + //修改register_relation表 + LambdaQueryWrapper originWrapper=new LambdaQueryWrapper(); + originWrapper.eq(RegisterRelationEntity::getCustomerId,formDTO.getCustomerId()) + .eq(RegisterRelationEntity::getUserId,formDTO.getUserId()) + .eq(RegisterRelationEntity::getFirstRegister, NumConstant.ONE_STR); + //1、删除废弃网格的(现在生产存在同一个用户相同的网格id多条记录,所以用delete方法) + registerRelationDao.delete(originWrapper); + + //2、删除用户与当前选择的网格的关系,新插入一条注册关系, + LambdaQueryWrapper deleteWrapper=new LambdaQueryWrapper(); + deleteWrapper.eq(RegisterRelationEntity::getCustomerId,formDTO.getCustomerId()) + .eq(RegisterRelationEntity::getUserId,formDTO.getUserId()) + .eq(RegisterRelationEntity::getGridId, formDTO.getGridId()); + registerRelationDao.delete(deleteWrapper); + + RegisterRelationEntity insert=new RegisterRelationEntity(); + insert.setCustomerId(formDTO.getCustomerId()); + insert.setGridId(formDTO.getGridId()); + insert.setUserId(formDTO.getUserId()); + insert.setFirstRegister(NumConstant.ONE_STR); + insert.setRegister(NumConstant.ONE_STR); + insert.setParticipation(NumConstant.ONE_STR); + registerRelationDao.insert(insert); + + //2、修改历史徽章表 + LambdaUpdateWrapper recUpdate=new LambdaUpdateWrapper<>(); + recUpdate.set(UserBadgeCertificateRecordEntity::getGridId,newGridInfo.getId()) + .set(UserBadgeCertificateRecordEntity::getUpdatedBy,formDTO.getUserId()) + .set(UserBadgeCertificateRecordEntity::getUpdatedTime,new Date()); + recUpdate.eq(UserBadgeCertificateRecordEntity::getCustomerId,formDTO.getCustomerId()) + .eq(UserBadgeCertificateRecordEntity::getUserId,formDTO.getUserId()); + userBadgeCertificateRecordDao.update(null,recUpdate); + + LambdaUpdateWrapper badgeUpdate=new LambdaUpdateWrapper<>(); + badgeUpdate.set(ResiUserBadgeEntity::getGridId,newGridInfo.getId()) + .set(ResiUserBadgeEntity::getUpdatedBy,formDTO.getUserId()) + .set(ResiUserBadgeEntity::getUpdatedTime,new Date());; + badgeUpdate.eq(ResiUserBadgeEntity::getCustomerId,formDTO.getCustomerId()) + .eq(ResiUserBadgeEntity::getUserId,formDTO.getUserId()); + resiUserBadgeDao.update(null,badgeUpdate); + + //3、修改支援者信息表 + modifyVolunteerGrid(formDTO,newGridInfo); + + //4、删除用户缓存信息 + userBaseInfoRedis.clearUserCache(Arrays.asList(formDTO.getUserId())); + //5、插入用户注册网格变更记录 + UserRegGridChangeRecEntity log=new UserRegGridChangeRecEntity(); + log.setCustomerId(formDTO.getCustomerId()); + log.setUserId(formDTO.getUserId()); + log.setOriginGridId(originReg.getGridId()); + log.setGridId(formDTO.getGridId()); + UserRegGridChangeRecDao.insert(log); + } + + private void modifyVolunteerGrid(ModifyRegGridFormDTO formDTO, GridInfoCache newGridInfo) { + VolunteerInfoDTO volunteerInfoDTO=new VolunteerInfoDTO(); + volunteerInfoDTO.setCustomerId(formDTO.getCustomerId()); + volunteerInfoDTO.setUserId(formDTO.getUserId()); + volunteerInfoDTO.setGridId(newGridInfo.getId()); + volunteerInfoDTO.setPid(newGridInfo.getPid()); + volunteerInfoDTO.setPids(newGridInfo.getPids()); + volunteerInfoDTO.setGridName(newGridInfo.getGridName()); + Result volunteerRes=epmetHeartOpenFeignClient.modifyVolunteerGrid(volunteerInfoDTO); + if (!volunteerRes.success()) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "居民端_修改注册网格:修改用户志愿者信息异常", "服务器开小差了..."); + } + } + } diff --git a/epmet-user/epmet-user-server/src/main/resources/bootstrap.yml b/epmet-user/epmet-user-server/src/main/resources/bootstrap.yml index 37b078e18f..8636a8411e 100644 --- a/epmet-user/epmet-user-server/src/main/resources/bootstrap.yml +++ b/epmet-user/epmet-user-server/src/main/resources/bootstrap.yml @@ -132,6 +132,12 @@ hystrix: isolation: thread: timeoutInMilliseconds: 60000 #缺省为1000 + threadpool: + default: + coreSize: 20 + maximumSize: 50 + maxQueueSize: 500 + queueSizeRejectionThreshold: 800 ribbon: ReadTimeout: 300000 @@ -175,4 +181,4 @@ thread: queueCapacity: @thread.threadPool.queue-capacity@ keepAliveSeconds: @thread.threadPool.keep-alive-seconds@ threadNamePrefix: @thread.threadPool.thread-name-prefix@ - rejectedExecutionHandler: @thread.threadPool.rejected-execution-handler@ \ No newline at end of file + rejectedExecutionHandler: @thread.threadPool.rejected-execution-handler@ diff --git a/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.25__create_user_reg_grid_rec.sql b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.25__create_user_reg_grid_rec.sql new file mode 100644 index 0000000000..85a0db8e18 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.25__create_user_reg_grid_rec.sql @@ -0,0 +1,14 @@ +CREATE TABLE `user_reg_grid_change_rec` ( + `ID` varchar(64) NOT NULL COMMENT '主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id', + `USER_ID` varchar(64) NOT NULL COMMENT '居民端用户id', + `ORIGIN_GRID_ID` varchar(64) NOT NULL COMMENT '原始网格id', + `GRID_ID` varchar(64) NOT NULL COMMENT '当前所选择的注册网格', + `DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识 1删除;0未删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户注册网格变更记录表'; \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/resources/excel/ic_resi_info_cid_for_easy_excel.xlsx b/epmet-user/epmet-user-server/src/main/resources/excel/ic_resi_info_cid_for_easy_excel.xlsx index bb88725ee6..c72b970c03 100644 Binary files a/epmet-user/epmet-user-server/src/main/resources/excel/ic_resi_info_cid_for_easy_excel.xlsx and b/epmet-user/epmet-user-server/src/main/resources/excel/ic_resi_info_cid_for_easy_excel.xlsx differ diff --git a/epmet-user/epmet-user-server/src/main/resources/excel/ic_resi_info_import_cid_for_easy_excel.xls b/epmet-user/epmet-user-server/src/main/resources/excel/ic_resi_info_import_cid_for_easy_excel.xls index 3be61c72ad..23c9c692af 100644 Binary files a/epmet-user/epmet-user-server/src/main/resources/excel/ic_resi_info_import_cid_for_easy_excel.xls and b/epmet-user/epmet-user-server/src/main/resources/excel/ic_resi_info_import_cid_for_easy_excel.xls differ diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/BadgeDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/BadgeDao.xml index 09c84bde81..275babd61f 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/BadgeDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/BadgeDao.xml @@ -330,4 +330,14 @@ and user_base_info.DEL_FLAG = 0) + + + \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiCollectDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiCollectDao.xml index 7f2c5a9a4d..0be0e43c13 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiCollectDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiCollectDao.xml @@ -30,15 +30,6 @@ AND CONCAT(c.PIDS,':',c.AGENCY_ID) LIKE CONCAT('%',#{orgId},'%') - - AND c.VILLAGE_ID = #{neighborHoodId} - - - AND c.BUILD_ID = #{buildingId} - - - AND c.HOME_ID = #{houseId} - AND c.ADDRESS LIKE CONCAT('%',#{address},'%') diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/RegisterRelationDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/RegisterRelationDao.xml index 74c1691615..3ce51f018a 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/RegisterRelationDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/RegisterRelationDao.xml @@ -79,7 +79,7 @@ diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/UserRegGridChangeRecDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/UserRegGridChangeRecDao.xml new file mode 100644 index 0000000000..4fcd5c664e --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/UserRegGridChangeRecDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file