150 changed files with 5363 additions and 1000 deletions
@ -0,0 +1,7 @@ |
|||||
|
UPDATE sys_dict_data |
||||
|
SET DEL_FLAG = '1', |
||||
|
UPDATED_BY = 'yinzuomei', |
||||
|
UPDATED_TIME = NOW(), |
||||
|
remark = '2022.02.21删除社会组织功能,改用联建单位两新组织' |
||||
|
WHERE |
||||
|
dict_value = 'social_org'; |
||||
@ -0,0 +1,15 @@ |
|||||
|
package com.epmet.commons.tools.constant; |
||||
|
|
||||
|
public interface DingDingRobotConstant { |
||||
|
/** |
||||
|
* 尹作梅测试用 |
||||
|
*/ |
||||
|
String YZM_TEST_URL="https://oapi.dingtalk.com/robot/send?access_token=249c5f49006cf14b37f9c3bc502ede34c16926a5ac5a0deeb9c9b4be735c0daf"; |
||||
|
String YZM_TEST_SECRET="SECa03f447d67c62d924b5ae52dd9a7ddd9147d32c1d43f8cb43449f505444bdc6b"; |
||||
|
|
||||
|
/** |
||||
|
* EPMET V3 产品研发群 |
||||
|
*/ |
||||
|
String V3_ROBOT_URL="https://oapi.dingtalk.com/robot/send?access_token=75e9ab857536f3018baa09009646876edbd263d07521a1a22eedfc3852623614"; |
||||
|
String V3_ROBOT_SECRET="SECdc8d3fb6780faa919f38fd43783f76d111255036c3b5bdcbc086dff023ee84d5"; |
||||
|
} |
||||
@ -0,0 +1,27 @@ |
|||||
|
package com.epmet.commons.tools.dto.form; |
||||
|
|
||||
|
import com.dingtalk.api.request.OapiRobotSendRequest; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* 钉钉机器人发送文本通知,@手机号,简参 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class DingTextBriefNessFormDTO { |
||||
|
|
||||
|
/* { |
||||
|
"msgtype":"text", |
||||
|
"text":{ |
||||
|
"content":"我就是我, @15764229697 是不同的烟火" |
||||
|
}, |
||||
|
"at":{ |
||||
|
"atMobiles": [ |
||||
|
"15764229697" |
||||
|
], |
||||
|
"isAtAll":false |
||||
|
} |
||||
|
}*/ |
||||
|
private String msgtype; |
||||
|
private OapiRobotSendRequest.Text text; |
||||
|
private OapiRobotSendRequest.At at; |
||||
|
} |
||||
@ -0,0 +1,19 @@ |
|||||
|
/** |
||||
|
* Copyright (c) 2018 人人开源 All rights reserved. |
||||
|
* |
||||
|
* https://www.renren.io
|
||||
|
* |
||||
|
* 版权所有,侵权必究! |
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.commons.tools.validator.group; |
||||
|
|
||||
|
/** |
||||
|
* 查询 Group |
||||
|
* |
||||
|
* @author Mark sunlightcs@gmail.com |
||||
|
* @since 1.0.0 |
||||
|
*/ |
||||
|
public interface QueryGroup { |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,24 @@ |
|||||
|
package com.epmet.dataaggre.feign; |
||||
|
|
||||
|
|
||||
|
import com.epmet.commons.tools.constant.ServiceConstant; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.dataaggre.dto.govorg.form.GridLivelyFormDTO; |
||||
|
import com.epmet.dataaggre.feign.impl.DataAggregatorOpenFeignClientFallbackFactory; |
||||
|
import org.springframework.cloud.openfeign.FeignClient; |
||||
|
import org.springframework.web.bind.annotation.PostMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestBody; |
||||
|
|
||||
|
@FeignClient(name = ServiceConstant.DATA_AGGREGATOR_SERVER, fallbackFactory = DataAggregatorOpenFeignClientFallbackFactory.class) |
||||
|
// @FeignClient(name = ServiceConstant.DATA_AGGREGATOR_SERVER, fallbackFactory= DataAggregatorOpenFeignClientFallbackFactory.class,url = "localhost:8114")
|
||||
|
public interface DataAggregatorOpenFeignClient { |
||||
|
|
||||
|
/** |
||||
|
* 定时任务导出网格活跃统计表 |
||||
|
* @param form |
||||
|
* @return |
||||
|
*/ |
||||
|
@PostMapping(value = "data/aggregator/org/export-send-msg") |
||||
|
Result exportGridLiveRes(@RequestBody GridLivelyFormDTO form); |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,19 @@ |
|||||
|
package com.epmet.dataaggre.feign.impl; |
||||
|
|
||||
|
import com.epmet.commons.tools.constant.ServiceConstant; |
||||
|
import com.epmet.commons.tools.utils.ModuleUtils; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.dataaggre.dto.govorg.form.GridLivelyFormDTO; |
||||
|
import com.epmet.dataaggre.feign.DataAggregatorOpenFeignClient; |
||||
|
|
||||
|
public class DataAggregatorOpenFeignClientFallback implements DataAggregatorOpenFeignClient { |
||||
|
/** |
||||
|
* 定时任务导出网格活跃统计表 |
||||
|
* @param form |
||||
|
* @return |
||||
|
*/ |
||||
|
@Override |
||||
|
public Result exportGridLiveRes(GridLivelyFormDTO form) { |
||||
|
return ModuleUtils.feignConError(ServiceConstant.DATA_AGGREGATOR_SERVER, "pcworkRecordListExportSendMsg",form); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,17 @@ |
|||||
|
package com.epmet.dataaggre.feign.impl; |
||||
|
|
||||
|
import com.epmet.dataaggre.feign.DataAggregatorOpenFeignClient; |
||||
|
import feign.hystrix.FallbackFactory; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
@Slf4j |
||||
|
@Component |
||||
|
public class DataAggregatorOpenFeignClientFallbackFactory implements FallbackFactory<DataAggregatorOpenFeignClient> { |
||||
|
private DataAggregatorOpenFeignClientFallback fallback = new DataAggregatorOpenFeignClientFallback(); |
||||
|
|
||||
|
@Override |
||||
|
public DataAggregatorOpenFeignClient create(Throwable throwable) { |
||||
|
return null; |
||||
|
} |
||||
|
} |
||||
@ -1,13 +1,20 @@ |
|||||
package com.epmet.constant; |
package com.epmet.constants; |
||||
|
|
||||
/** |
/** |
||||
* 导入任务的业务类型常量 |
* 导入任务的业务类型常量 |
||||
*/ |
*/ |
||||
public interface ImportTaskConstants { |
public interface ImportTaskConstants { |
||||
/** |
/** |
||||
* 居民 |
* 业务类型:居民 |
||||
*/ |
*/ |
||||
String BIZ_TYPE_RESI = "resi"; |
String BIZ_TYPE_RESI = "resi"; |
||||
|
String BIZ_TYPE_NEIGHBOR_HOOD = "neighborHood"; |
||||
|
String BIZ_TYPE_BUILDING = "building"; |
||||
|
String BIZ_TYPE_HOUSE = "house"; |
||||
|
String BIZ_TYPE_PARTY_MEMBER = "party_member"; |
||||
|
String BIZ_TYPE_COMMUNITY_SELF_ORG = "community_self_org"; |
||||
|
String BIZ_TYPE_PARTY_UNIT = "party_unit"; |
||||
|
String BIZ_TYPE_PARTY_ACTIVITY = "party_activity"; |
||||
|
|
||||
/** |
/** |
||||
* 处理状态:处理中 |
* 处理状态:处理中 |
||||
@ -0,0 +1,55 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import com.epmet.commons.tools.dto.form.PageFormDTO; |
||||
|
import com.epmet.commons.tools.validator.group.QueryGroup; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
|
||||
|
@Data |
||||
|
public class ImportTaskCommonFormDTO extends PageFormDTO { |
||||
|
|
||||
|
public interface Create {} |
||||
|
public interface Finish {} |
||||
|
|
||||
|
/** |
||||
|
* 原始文件名 |
||||
|
*/ |
||||
|
@NotBlank(message = "原始文件名必填", groups = { Create.class }) |
||||
|
private String originFileName; |
||||
|
|
||||
|
/** |
||||
|
* 操作者ID |
||||
|
*/ |
||||
|
@NotBlank(message = "操作者ID必填", groups = { Create.class, Finish.class, QueryGroup.class}) |
||||
|
private String operatorId; |
||||
|
|
||||
|
/** |
||||
|
* 业务类型 |
||||
|
*/ |
||||
|
@NotBlank(message = "业务类型必填", groups = { Create.class }) |
||||
|
private String bizType; |
||||
|
|
||||
|
/** |
||||
|
* 任务ID |
||||
|
*/ |
||||
|
@NotBlank(message = "任务ID必填", groups = { Finish.class }) |
||||
|
private String taskId; |
||||
|
|
||||
|
/** |
||||
|
* 处理状态 |
||||
|
*/ |
||||
|
@NotBlank(message = "处理状态必填", groups = { Finish.class }) |
||||
|
private String processStatus; |
||||
|
|
||||
|
/** |
||||
|
* 结果文件 url |
||||
|
*/ |
||||
|
private String resultDescFilePath; |
||||
|
|
||||
|
/** |
||||
|
* 结果描述文本 |
||||
|
*/ |
||||
|
private String resultDesc; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,43 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
@Data |
||||
|
@NoArgsConstructor |
||||
|
public class ImportTaskCommonResultDTO implements Serializable { |
||||
|
public ImportTaskCommonResultDTO(String taskId) { |
||||
|
this.taskId = taskId; |
||||
|
} |
||||
|
|
||||
|
private String taskId; |
||||
|
|
||||
|
/** |
||||
|
* 原始文件名 |
||||
|
*/ |
||||
|
private String originFileName; |
||||
|
|
||||
|
/** |
||||
|
* 业务类型。resi:居民;楼栋:building;房屋:house。依次补充 |
||||
|
*/ |
||||
|
private String bizType; |
||||
|
|
||||
|
/** |
||||
|
* 处理状态。processing:处理中;finished:完成;导入失败:finished_fail |
||||
|
*/ |
||||
|
private String processStatus; |
||||
|
|
||||
|
/** |
||||
|
* 开始导入的时间 |
||||
|
*/ |
||||
|
private Date startTime; |
||||
|
|
||||
|
/** |
||||
|
* 失败文件地址 |
||||
|
*/ |
||||
|
private String resultDescFile; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,82 @@ |
|||||
|
package com.epmet.controller; |
||||
|
|
||||
|
import com.epmet.commons.tools.annotation.LoginUser; |
||||
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
||||
|
import com.epmet.commons.tools.exception.EpmetException; |
||||
|
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.ValidatorUtils; |
||||
|
import com.epmet.commons.tools.validator.group.QueryGroup; |
||||
|
import com.epmet.dto.form.ImportTaskCommonFormDTO; |
||||
|
import com.epmet.dto.result.ImportTaskCommonResultDTO; |
||||
|
import com.epmet.service.ImportTaskService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
@RestController |
||||
|
@RequestMapping("import-task") |
||||
|
public class ImportTaskController { |
||||
|
|
||||
|
@Autowired |
||||
|
private ImportTaskService importTaskService; |
||||
|
|
||||
|
/** |
||||
|
* desc:分页获取个人导入记录 |
||||
|
* @param tokenDto |
||||
|
* @return |
||||
|
*/ |
||||
|
@RequestMapping("page") |
||||
|
public Result<PageData<ImportTaskCommonResultDTO>> list(@LoginUser TokenDto tokenDto, @RequestBody ImportTaskCommonFormDTO param) { |
||||
|
//tokenDto.setUserId("d8dfc6c1fa2538976059f3900036d419");
|
||||
|
param.setOperatorId(tokenDto.getUserId()); |
||||
|
ValidatorUtils.validateEntity(param, QueryGroup.class); |
||||
|
return new Result().ok(importTaskService.page(param)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 创建导入任务 |
||||
|
* @param input |
||||
|
* @return |
||||
|
*/ |
||||
|
@RequestMapping("create") |
||||
|
public Result<ImportTaskCommonResultDTO> createTask(@RequestBody ImportTaskCommonFormDTO input) { |
||||
|
ValidatorUtils.validateEntity(input, ImportTaskCommonFormDTO.Create.class); |
||||
|
String operatorId = input.getOperatorId(); |
||||
|
String bizType = input.getBizType(); |
||||
|
String originFileName = input.getOriginFileName(); |
||||
|
|
||||
|
String taskId = importTaskService.createProcessTask(operatorId, bizType, originFileName); |
||||
|
ImportTaskCommonResultDTO ro = new ImportTaskCommonResultDTO(taskId); |
||||
|
return new Result().ok(ro); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 结束任务 |
||||
|
* @param input |
||||
|
* @return |
||||
|
*/ |
||||
|
@RequestMapping("finish") |
||||
|
public Result finishTask(@RequestBody ImportTaskCommonFormDTO input) { |
||||
|
ValidatorUtils.validateEntity(input, ImportTaskCommonFormDTO.Finish.class); |
||||
|
Boolean finished = importTaskService.finish(input.getTaskId(), input.getProcessStatus(), input.getOperatorId(), input.getResultDescFilePath(), input.getResultDesc()); |
||||
|
if (!finished) { |
||||
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), |
||||
|
"失败,请确认任务是否存在,以及是否已完成", |
||||
|
"失败,请确认任务是否存在,以及是否已完成"); |
||||
|
} |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 检查是否有正在执行的任务。 |
||||
|
* @param bizType 业务类型,非必填,不传则任意一种导入正在执行都会返回true |
||||
|
* @return |
||||
|
*/ |
||||
|
@GetMapping("processing-check") |
||||
|
public Result processingTaskCheck(@RequestParam(value = "biz_type", required = false) String bizType) { |
||||
|
Boolean r = importTaskService.processingTaskCheck(bizType); |
||||
|
return new Result().ok(r); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,54 @@ |
|||||
|
package com.epmet.service; |
||||
|
|
||||
|
|
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.dto.form.ImportTaskCommonFormDTO; |
||||
|
import com.epmet.dto.result.ImportTaskCommonResultDTO; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-02-15 |
||||
|
*/ |
||||
|
public interface ImportTaskService { |
||||
|
|
||||
|
// /**
|
||||
|
// * 检查指定类型该用户是否存在处理中的导入任务
|
||||
|
// * @param operatorId 操作者ID
|
||||
|
// * @param bizType 业务类型。resi:居民
|
||||
|
// * @return
|
||||
|
// */
|
||||
|
// boolean existsProcessingTask(String operatorId, String bizType);
|
||||
|
|
||||
|
/** |
||||
|
* 创建处理任务 |
||||
|
* @param operatorId |
||||
|
* @param bizType |
||||
|
* @param originFileName 原始文件名 |
||||
|
*/ |
||||
|
String createProcessTask(String operatorId, String bizType, String originFileName); |
||||
|
|
||||
|
/** |
||||
|
* 结束导入 |
||||
|
* @param taskId 任务id |
||||
|
* @param processStatus 处理状态 |
||||
|
* @param resultDescFile 结果描述文件 |
||||
|
* @param resultDesc 结果描述文本 |
||||
|
*/ |
||||
|
Boolean finish(String taskId, String processStatus, String operatorId, String resultDescFile, String resultDesc); |
||||
|
|
||||
|
/** |
||||
|
* desc:分页获取个人导入记录 |
||||
|
* @param param |
||||
|
* @return |
||||
|
*/ |
||||
|
PageData<ImportTaskCommonResultDTO> page(ImportTaskCommonFormDTO param); |
||||
|
|
||||
|
/** |
||||
|
* 检查是否有正在执行的任务 |
||||
|
* @param bizType |
||||
|
* @return |
||||
|
*/ |
||||
|
Boolean processingTaskCheck(String bizType); |
||||
|
} |
||||
@ -0,0 +1,123 @@ |
|||||
|
package com.epmet.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
||||
|
import com.epmet.commons.tools.exception.EpmetException; |
||||
|
import com.epmet.commons.tools.security.user.LoginUserUtil; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.ConvertUtils; |
||||
|
import com.epmet.constants.ImportTaskConstants; |
||||
|
import com.epmet.dao.ImportTaskDao; |
||||
|
import com.epmet.dto.form.ImportTaskCommonFormDTO; |
||||
|
import com.epmet.dto.result.ImportTaskCommonResultDTO; |
||||
|
import com.epmet.entity.ImportTaskEntity; |
||||
|
import com.epmet.service.ImportTaskService; |
||||
|
import com.github.pagehelper.Page; |
||||
|
import com.github.pagehelper.PageHelper; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.Date; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-02-15 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class ImportTaskServiceImpl implements ImportTaskService { |
||||
|
|
||||
|
@Autowired |
||||
|
private ImportTaskDao importRecordDao; |
||||
|
|
||||
|
@Autowired |
||||
|
private LoginUserUtil loginUserUtil; |
||||
|
|
||||
|
// /**
|
||||
|
// * 该用户,该业务类型,是否有正在处理的导入任务
|
||||
|
// * @param operatorId 操作者ID
|
||||
|
// * @param bizType 业务类型。resi:居民
|
||||
|
// * @return
|
||||
|
// */
|
||||
|
// @Override
|
||||
|
// public boolean existsProcessingTask(String operatorId, String bizType) {
|
||||
|
// LambdaQueryWrapper<ImportTaskEntity> query = new LambdaQueryWrapper<>();
|
||||
|
// query.eq(ImportTaskEntity::getOperatorId, operatorId);
|
||||
|
// query.eq(ImportTaskEntity::getBizType, bizType);
|
||||
|
// query.eq(ImportTaskEntity::getProcessStatus, ImportTaskConstants.PROCESS_STATUS_PROCESSING);
|
||||
|
//
|
||||
|
// return importRecordDao.selectCount(query) > 0;
|
||||
|
// }
|
||||
|
|
||||
|
/** |
||||
|
* 检查是否有正在执行的任务 |
||||
|
* @param operatorId |
||||
|
* @param bizType |
||||
|
* @return |
||||
|
*/ |
||||
|
public boolean existsProcessingTask(String operatorId, String bizType) { |
||||
|
LambdaQueryWrapper<ImportTaskEntity> query = new LambdaQueryWrapper<>(); |
||||
|
query.eq(ImportTaskEntity::getOperatorId, operatorId); |
||||
|
query.eq(ImportTaskEntity::getBizType, bizType); |
||||
|
query.eq(ImportTaskEntity::getProcessStatus, ImportTaskConstants.PROCESS_STATUS_PROCESSING); |
||||
|
|
||||
|
return importRecordDao.selectCount(query) > 0; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public String createProcessTask(String operatorId, String bizType, String originFileName) { |
||||
|
if (existsProcessingTask(operatorId, bizType)) { |
||||
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), |
||||
|
"存在进行中的导入", |
||||
|
"存在进行中的导入"); |
||||
|
} |
||||
|
|
||||
|
ImportTaskEntity importRecord = new ImportTaskEntity(); |
||||
|
importRecord.setProcessStatus(ImportTaskConstants.PROCESS_STATUS_PROCESSING); |
||||
|
importRecord.setOperatorId(operatorId); |
||||
|
importRecord.setBizType(bizType); |
||||
|
importRecord.setCustomerId(loginUserUtil.getLoginUserCustomerId()); |
||||
|
importRecord.setStartTime(new Date()); |
||||
|
importRecord.setOriginFileName(originFileName); |
||||
|
|
||||
|
importRecordDao.insert(importRecord); |
||||
|
return importRecord.getId(); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public Boolean finish(String taskId, String processStatus, String operatorId, String resultDescFile, String resultDesc) { |
||||
|
return importRecordDao.finish(taskId, processStatus, operatorId, resultDesc, resultDescFile) > 0; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public PageData<ImportTaskCommonResultDTO> page(ImportTaskCommonFormDTO param) { |
||||
|
LambdaQueryWrapper<ImportTaskEntity> queryWrapper = new LambdaQueryWrapper<>(); |
||||
|
queryWrapper.eq(ImportTaskEntity::getOperatorId,param.getOperatorId()) |
||||
|
.orderByDesc(ImportTaskEntity::getStartTime); |
||||
|
Page<ImportTaskEntity> page = PageHelper.startPage(param.getPageNo(), param.getPageSize(), param.isPage()).doSelectPage(() -> { |
||||
|
importRecordDao.selectList(queryWrapper); |
||||
|
}); |
||||
|
List<ImportTaskCommonResultDTO> list = new ArrayList<>(); |
||||
|
page.getResult().forEach(item->{ |
||||
|
ImportTaskCommonResultDTO record = ConvertUtils.sourceToTarget(item, ImportTaskCommonResultDTO.class); |
||||
|
record.setTaskId(item.getId()); |
||||
|
list.add(record); |
||||
|
}); |
||||
|
return new PageData<>(list,page.getTotal()); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public Boolean processingTaskCheck(String bizType) { |
||||
|
LambdaQueryWrapper<ImportTaskEntity> query = new LambdaQueryWrapper<>(); |
||||
|
if (StringUtils.isNotBlank(bizType)) { |
||||
|
query.eq(ImportTaskEntity::getBizType, bizType); |
||||
|
} |
||||
|
query.eq(ImportTaskEntity::getProcessStatus, ImportTaskConstants.PROCESS_STATUS_PROCESSING); |
||||
|
|
||||
|
return importRecordDao.selectCount(query) > 0; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,19 @@ |
|||||
|
CREATE TABLE `import_task` ( |
||||
|
`ID` varchar(64) NOT NULL COMMENT 'ID', |
||||
|
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', |
||||
|
`ORIGIN_FILE_NAME` varchar(128) NOT NULL COMMENT '原始文件名', |
||||
|
`BIZ_TYPE` varchar(32) NOT NULL COMMENT '业务类型。【resi:居民;neighborHood:小区;building:楼栋;house:房屋;party_member:党员;society_org:社会组织;community_self_org:社区自组织】依次补充', |
||||
|
`PROCESS_STATUS` varchar(32) NOT NULL COMMENT '处理状态。processing:处理中;finished_success:成功;finished_unsuccess:未完全成功', |
||||
|
`OPERATOR_ID` varchar(64) NOT NULL COMMENT '谁导入的', |
||||
|
`START_TIME` datetime NOT NULL COMMENT '开始导入的时间', |
||||
|
`RESULT_DESC_FILE` varchar(255) DEFAULT NULL COMMENT '导入失败结果描述文件', |
||||
|
`RESULT_DESC` varchar(255) DEFAULT NULL COMMENT '导入结果描述,可以输入任何描述信息', |
||||
|
`DEL_FLAG` tinyint(1) NOT NULL COMMENT '删除标识:0.未删除 1.已删除', |
||||
|
`REVISION` int(11) NOT NULL COMMENT '乐观锁', |
||||
|
`CREATED_BY` varchar(64) NOT NULL COMMENT '创建人', |
||||
|
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
||||
|
`UPDATED_BY` varchar(64) NOT NULL COMMENT '更新人', |
||||
|
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
||||
|
PRIMARY KEY (`ID`) |
||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 |
||||
|
|
||||
@ -0,0 +1 @@ |
|||||
|
alter table import_task modify column PROCESS_STATUS varchar(32) comment '处理状态。processing:处理中;finished_success:成功;finished_fail:未完全成功' |
||||
@ -0,0 +1,85 @@ |
|||||
|
package com.epmet.dto; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 联建活动与服务事项关联表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-02-21 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IcActivityServiceRelationDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 主键 |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 客户id |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 组织ID |
||||
|
*/ |
||||
|
private String agencyId; |
||||
|
|
||||
|
/** |
||||
|
* 组织的所有上级 |
||||
|
*/ |
||||
|
private String pids; |
||||
|
|
||||
|
/** |
||||
|
* 活动ID |
||||
|
*/ |
||||
|
private String activityId; |
||||
|
|
||||
|
/** |
||||
|
* act_info表ID |
||||
|
*/ |
||||
|
private String actId; |
||||
|
|
||||
|
/** |
||||
|
* 服务事项 |
||||
|
*/ |
||||
|
private String serviceMatter; |
||||
|
|
||||
|
/** |
||||
|
* 删除标识 0未删除、1已删除 |
||||
|
*/ |
||||
|
private String delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,89 @@ |
|||||
|
package com.epmet.dto; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 联建活动与单位关联表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-02-21 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IcActivityUnitRelationDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 主键 |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 客户id |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 组织ID |
||||
|
*/ |
||||
|
private String agencyId; |
||||
|
|
||||
|
/** |
||||
|
* 组织的所有上级 |
||||
|
*/ |
||||
|
private String pids; |
||||
|
|
||||
|
/** |
||||
|
* 活动ID |
||||
|
*/ |
||||
|
private String activityId; |
||||
|
|
||||
|
/** |
||||
|
* act_info表ID |
||||
|
*/ |
||||
|
private String actId; |
||||
|
|
||||
|
/** |
||||
|
* 单位ID |
||||
|
*/ |
||||
|
private String unitId; |
||||
|
|
||||
|
/** |
||||
|
* 服务事项 |
||||
|
*/ |
||||
|
private String serviceMatter; |
||||
|
|
||||
|
/** |
||||
|
* 删除标识 0未删除、1已删除 |
||||
|
*/ |
||||
|
private String delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,79 @@ |
|||||
|
package com.epmet.dto; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 联建活动与服务事项关联表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-02-21 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class LatestActServiceRelationDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 主键 |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 客户id |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 组织ID |
||||
|
*/ |
||||
|
private String agencyId; |
||||
|
|
||||
|
/** |
||||
|
* 组织的所有上级 |
||||
|
*/ |
||||
|
private String pids; |
||||
|
|
||||
|
/** |
||||
|
* latest_act_info表ID |
||||
|
*/ |
||||
|
private String actId; |
||||
|
|
||||
|
/** |
||||
|
* 服务事项 |
||||
|
*/ |
||||
|
private String serviceMatter; |
||||
|
|
||||
|
/** |
||||
|
* 删除标识 0未删除、1已删除 |
||||
|
*/ |
||||
|
private String delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,84 @@ |
|||||
|
package com.epmet.dto; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 联建活动与单位关联表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-02-21 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class LatestActUnitRelationDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 主键 |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 客户id |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 组织ID |
||||
|
*/ |
||||
|
private String agencyId; |
||||
|
|
||||
|
/** |
||||
|
* 组织的所有上级 |
||||
|
*/ |
||||
|
private String pids; |
||||
|
|
||||
|
/** |
||||
|
* latest_act_info表ID |
||||
|
*/ |
||||
|
private String actId; |
||||
|
|
||||
|
/** |
||||
|
* 单位ID |
||||
|
*/ |
||||
|
private String unitId; |
||||
|
|
||||
|
/** |
||||
|
* 服务事项 |
||||
|
*/ |
||||
|
private String serviceMatter; |
||||
|
|
||||
|
/** |
||||
|
* 删除标识 0未删除、1已删除 |
||||
|
*/ |
||||
|
private String delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,25 @@ |
|||||
|
package com.epmet.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.entity.IcActivityServiceRelationEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
/** |
||||
|
* 联建活动与服务事项关联表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-02-21 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface IcActivityServiceRelationDao extends BaseDao<IcActivityServiceRelationEntity> { |
||||
|
/** |
||||
|
* 删除活动所属服务 |
||||
|
* |
||||
|
* @Param activityId |
||||
|
* @Return |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/2/21 16:19 |
||||
|
*/ |
||||
|
void deleteByActivity(@Param("activityId") String activityId); |
||||
|
} |
||||
@ -0,0 +1,25 @@ |
|||||
|
package com.epmet.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.entity.IcActivityUnitRelationEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
/** |
||||
|
* 联建活动与单位关联表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-02-21 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface IcActivityUnitRelationDao extends BaseDao<IcActivityUnitRelationEntity> { |
||||
|
/** |
||||
|
* 删除活动所属单位 |
||||
|
* |
||||
|
* @Param activityId |
||||
|
* @Return |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/2/21 16:19 |
||||
|
*/ |
||||
|
void deleteByActivity(@Param("activityId") String activityId); |
||||
|
} |
||||
@ -0,0 +1,25 @@ |
|||||
|
package com.epmet.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.entity.LatestActServiceRelationEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
/** |
||||
|
* 联建活动与服务事项关联表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-02-21 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface LatestActServiceRelationDao extends BaseDao<LatestActServiceRelationEntity> { |
||||
|
/** |
||||
|
* 删除活动所属服务 |
||||
|
* |
||||
|
* @Param activityId |
||||
|
* @Return |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/2/21 16:19 |
||||
|
*/ |
||||
|
void deleteByActivity(@Param("activityId") String activityId); |
||||
|
} |
||||
@ -0,0 +1,25 @@ |
|||||
|
package com.epmet.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.entity.LatestActUnitRelationEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
/** |
||||
|
* 联建活动与单位关联表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-02-21 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface LatestActUnitRelationDao extends BaseDao<LatestActUnitRelationEntity> { |
||||
|
/** |
||||
|
* 删除活动所属服务 |
||||
|
* |
||||
|
* @Param activityId |
||||
|
* @Return |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/2/21 16:19 |
||||
|
*/ |
||||
|
void deleteByActivity(@Param("activityId") String activityId); |
||||
|
} |
||||
@ -0,0 +1,56 @@ |
|||||
|
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-02-21 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("ic_activity_service_relation") |
||||
|
public class IcActivityServiceRelationEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 客户id |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 组织ID |
||||
|
*/ |
||||
|
private String agencyId; |
||||
|
|
||||
|
/** |
||||
|
* 组织的所有上级 |
||||
|
*/ |
||||
|
private String pids; |
||||
|
|
||||
|
/** |
||||
|
* 活动ID |
||||
|
*/ |
||||
|
private String activityId; |
||||
|
|
||||
|
/** |
||||
|
* act_info表ID |
||||
|
*/ |
||||
|
private String actId; |
||||
|
|
||||
|
/** |
||||
|
* 服务事项 |
||||
|
*/ |
||||
|
private String serviceMatter; |
||||
|
|
||||
|
/** |
||||
|
* 排序 |
||||
|
*/ |
||||
|
private Integer sort; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,56 @@ |
|||||
|
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-02-21 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("ic_activity_unit_relation") |
||||
|
public class IcActivityUnitRelationEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 客户id |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 组织ID |
||||
|
*/ |
||||
|
private String agencyId; |
||||
|
|
||||
|
/** |
||||
|
* 组织的所有上级 |
||||
|
*/ |
||||
|
private String pids; |
||||
|
|
||||
|
/** |
||||
|
* 活动ID |
||||
|
*/ |
||||
|
private String activityId; |
||||
|
|
||||
|
/** |
||||
|
* act_info表ID |
||||
|
*/ |
||||
|
private String actId; |
||||
|
|
||||
|
/** |
||||
|
* 单位ID |
||||
|
*/ |
||||
|
private String unitId; |
||||
|
|
||||
|
/** |
||||
|
* 排序 |
||||
|
*/ |
||||
|
private Integer sort; |
||||
|
|
||||
|
} |
||||
@ -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-02-21 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("latest_act_service_relation") |
||||
|
public class LatestActServiceRelationEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 客户id |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* latest_act_info表ID |
||||
|
*/ |
||||
|
private String actId; |
||||
|
|
||||
|
/** |
||||
|
* 服务事项 |
||||
|
*/ |
||||
|
private String serviceMatter; |
||||
|
|
||||
|
/** |
||||
|
* 排序 |
||||
|
*/ |
||||
|
private Integer sort; |
||||
|
|
||||
|
} |
||||
@ -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-02-21 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("latest_act_unit_relation") |
||||
|
public class LatestActUnitRelationEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 客户id |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* latest_act_info表ID |
||||
|
*/ |
||||
|
private String actId; |
||||
|
|
||||
|
/** |
||||
|
* 单位ID |
||||
|
*/ |
||||
|
private String unitId; |
||||
|
|
||||
|
/** |
||||
|
* 排序 |
||||
|
*/ |
||||
|
private Integer sort; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,37 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.excel; |
||||
|
|
||||
|
import cn.afterturn.easypoi.excel.annotation.Excel; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* 社会自组织导入错误数据存放文件 |
||||
|
* @author sun |
||||
|
*/ |
||||
|
@Data |
||||
|
public class CommunitySelfOrgImportExcel { |
||||
|
|
||||
|
/*@Excel(name = "组织名称", width = 40) |
||||
|
private String agencyName;*/ |
||||
|
@Excel(name = "社会自组织名称", width = 40) |
||||
|
private String societyName; |
||||
|
@Excel(name = "错误信息", width = 50) |
||||
|
private String errorInfo; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,38 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.excel; |
||||
|
|
||||
|
import cn.afterturn.easypoi.excel.annotation.Excel; |
||||
|
import com.epmet.commons.tools.utils.ExcelVerifyInfo; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* 联建活动 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2021-11-19 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IcPartyActivityImportFailedExcel extends ExcelVerifyInfo { |
||||
|
|
||||
|
@Excel(name = "活动标题", width = 40) |
||||
|
private String title; |
||||
|
|
||||
|
@Excel(name = "错误信息", width = 50) |
||||
|
private String errorInfo; |
||||
|
} |
||||
@ -0,0 +1,38 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.excel; |
||||
|
|
||||
|
import cn.afterturn.easypoi.excel.annotation.Excel; |
||||
|
import com.epmet.commons.tools.utils.ExcelVerifyInfo; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* 联建单位 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2021-11-19 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IcPartyUnitImportFailedExcel extends ExcelVerifyInfo { |
||||
|
|
||||
|
@Excel(name = "单位名称", width = 40) |
||||
|
private String unitName; |
||||
|
|
||||
|
@Excel(name = "错误信息", width = 50) |
||||
|
private String errorInfo; |
||||
|
} |
||||
@ -0,0 +1,44 @@ |
|||||
|
package com.epmet.service; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.service.BaseService; |
||||
|
import com.epmet.entity.IcActivityServiceRelationEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 联建活动与服务事项关联表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-02-21 |
||||
|
*/ |
||||
|
public interface IcActivityServiceRelationService extends BaseService<IcActivityServiceRelationEntity> { |
||||
|
/** |
||||
|
* 获取活动所属服务事项 |
||||
|
* |
||||
|
* @Param activityId 活动ID |
||||
|
* @Return {@link List <String>} |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/2/21 14:36 |
||||
|
*/ |
||||
|
List<String> getServiceList(String activityId); |
||||
|
|
||||
|
/** |
||||
|
* 物理删除活动所属服务事项 |
||||
|
* |
||||
|
* @Param activityId |
||||
|
* @Return |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/2/21 16:10 |
||||
|
*/ |
||||
|
void deleteByActivity(String activityId); |
||||
|
|
||||
|
/** |
||||
|
* 逻辑删除活动所属服务事项 |
||||
|
* |
||||
|
* @Param activityId |
||||
|
* @Return |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/2/21 16:10 |
||||
|
*/ |
||||
|
void delete(String activityId); |
||||
|
} |
||||
@ -0,0 +1,44 @@ |
|||||
|
package com.epmet.service; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.service.BaseService; |
||||
|
import com.epmet.entity.IcActivityUnitRelationEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 联建活动与单位关联表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-02-21 |
||||
|
*/ |
||||
|
public interface IcActivityUnitRelationService extends BaseService<IcActivityUnitRelationEntity> { |
||||
|
/** |
||||
|
* 获取活动所属党建单位 |
||||
|
* |
||||
|
* @Param activityId 活动ID |
||||
|
* @Return {@link List<String>} |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/2/21 14:36 |
||||
|
*/ |
||||
|
List<String> getUnitList(String activityId); |
||||
|
|
||||
|
/** |
||||
|
* 物理删除删除活动所属单位 |
||||
|
* |
||||
|
* @Param activityId |
||||
|
* @Return |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/2/21 16:10 |
||||
|
*/ |
||||
|
void deleteByActivity(String activityId); |
||||
|
|
||||
|
/** |
||||
|
* 逻辑删除删除活动所属单位 |
||||
|
* |
||||
|
* @Param activityId |
||||
|
* @Return |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/2/21 16:10 |
||||
|
*/ |
||||
|
void delete(String activityId); |
||||
|
} |
||||
@ -0,0 +1,44 @@ |
|||||
|
package com.epmet.service; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.service.BaseService; |
||||
|
import com.epmet.entity.LatestActServiceRelationEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 联建活动与服务事项关联表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-02-21 |
||||
|
*/ |
||||
|
public interface LatestActServiceRelationService extends BaseService<LatestActServiceRelationEntity> { |
||||
|
/** |
||||
|
* 获取活动所属服务事项列表 |
||||
|
* |
||||
|
* @Param actId |
||||
|
* @Return {@link List < String>} |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/2/22 14:53 |
||||
|
*/ |
||||
|
List<String> getServiceMatterList(String actId); |
||||
|
|
||||
|
/** |
||||
|
* 物理删除活动所属服务事项 |
||||
|
* |
||||
|
* @Param actId |
||||
|
* @Return |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/2/22 14:54 |
||||
|
*/ |
||||
|
void deleteByAct(String actId); |
||||
|
|
||||
|
/** |
||||
|
* 逻辑删除活动所属服务事项 |
||||
|
* |
||||
|
* @Param actId |
||||
|
* @Return |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/2/22 14:54 |
||||
|
*/ |
||||
|
void delete(String actId); |
||||
|
} |
||||
@ -0,0 +1,45 @@ |
|||||
|
package com.epmet.service; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.service.BaseService; |
||||
|
import com.epmet.entity.LatestActUnitRelationEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 联建活动与单位关联表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-02-21 |
||||
|
*/ |
||||
|
public interface LatestActUnitRelationService extends BaseService<LatestActUnitRelationEntity> { |
||||
|
/** |
||||
|
* 获取活动所属联建单位列表 |
||||
|
* |
||||
|
* @Param actId |
||||
|
* @Return {@link List< String>} |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/2/22 14:53 |
||||
|
*/ |
||||
|
List<String> getUnitList(String actId); |
||||
|
|
||||
|
/** |
||||
|
* 物理删除活动所属单位列表 |
||||
|
* |
||||
|
* @Param actId |
||||
|
* @Return |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/2/22 14:54 |
||||
|
*/ |
||||
|
void deleteByAct(String actId); |
||||
|
|
||||
|
/** |
||||
|
* 逻辑删除活动所属单位列表 |
||||
|
* |
||||
|
* @Param actId |
||||
|
* @Return |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/2/22 14:54 |
||||
|
*/ |
||||
|
void delete(String actId); |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,78 @@ |
|||||
|
package com.epmet.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
||||
|
import com.epmet.dao.IcActivityServiceRelationDao; |
||||
|
import com.epmet.entity.IcActivityServiceRelationEntity; |
||||
|
import com.epmet.service.IcActivityServiceRelationService; |
||||
|
import org.apache.commons.collections4.CollectionUtils; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import java.util.Collections; |
||||
|
import java.util.List; |
||||
|
import java.util.stream.Collectors; |
||||
|
|
||||
|
/** |
||||
|
* 联建活动与服务事项关联表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-02-21 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class IcActivityServiceRelationServiceImpl extends BaseServiceImpl<IcActivityServiceRelationDao, IcActivityServiceRelationEntity> implements IcActivityServiceRelationService { |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 获取活动所属服务事项 |
||||
|
* |
||||
|
* @param activityId |
||||
|
* @Param activityId 活动ID |
||||
|
* @Return {@link List <String>} |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/2/21 14:36 |
||||
|
*/ |
||||
|
@Override |
||||
|
public List<String> getServiceList(String activityId) { |
||||
|
LambdaQueryWrapper<IcActivityServiceRelationEntity> wrapper = new LambdaQueryWrapper<>(); |
||||
|
wrapper.eq(IcActivityServiceRelationEntity::getActivityId, activityId); |
||||
|
wrapper.orderByAsc(IcActivityServiceRelationEntity::getSort); |
||||
|
List<IcActivityServiceRelationEntity> list = baseDao.selectList(wrapper); |
||||
|
if (CollectionUtils.isEmpty(list)) { |
||||
|
return Collections.emptyList(); |
||||
|
} |
||||
|
return list.stream().map(IcActivityServiceRelationEntity::getServiceMatter).collect(Collectors.toList()); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除活动所属服务事项 |
||||
|
* |
||||
|
* @param activityId |
||||
|
* @Param activityId |
||||
|
* @Return |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/2/21 16:10 |
||||
|
*/ |
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void deleteByActivity(String activityId) { |
||||
|
baseDao.deleteByActivity(activityId); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 逻辑删除活动所属服务事项 |
||||
|
* |
||||
|
* @param activityId |
||||
|
* @Param activityId |
||||
|
* @Return |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/2/21 16:10 |
||||
|
*/ |
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String activityId) { |
||||
|
LambdaQueryWrapper<IcActivityServiceRelationEntity> wrapper = new LambdaQueryWrapper<>(); |
||||
|
wrapper.eq(IcActivityServiceRelationEntity::getActivityId, activityId); |
||||
|
baseDao.delete(wrapper); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,77 @@ |
|||||
|
package com.epmet.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
||||
|
import com.epmet.dao.IcActivityUnitRelationDao; |
||||
|
import com.epmet.entity.IcActivityUnitRelationEntity; |
||||
|
import com.epmet.service.IcActivityUnitRelationService; |
||||
|
import org.apache.commons.collections4.CollectionUtils; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import java.util.Collections; |
||||
|
import java.util.List; |
||||
|
import java.util.stream.Collectors; |
||||
|
|
||||
|
/** |
||||
|
* 联建活动与单位关联表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-02-21 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class IcActivityUnitRelationServiceImpl extends BaseServiceImpl<IcActivityUnitRelationDao, IcActivityUnitRelationEntity> implements IcActivityUnitRelationService { |
||||
|
|
||||
|
/** |
||||
|
* 获取活动所属党建单位 |
||||
|
* |
||||
|
* @param activityId |
||||
|
* @Param activityId 活动ID |
||||
|
* @Return {@link List <String>} |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/2/21 14:36 |
||||
|
*/ |
||||
|
@Override |
||||
|
public List<String> getUnitList(String activityId) { |
||||
|
LambdaQueryWrapper<IcActivityUnitRelationEntity> wrapper = new LambdaQueryWrapper<>(); |
||||
|
wrapper.eq(IcActivityUnitRelationEntity::getActivityId, activityId); |
||||
|
wrapper.orderByAsc(IcActivityUnitRelationEntity::getSort); |
||||
|
List<IcActivityUnitRelationEntity> list = baseDao.selectList(wrapper); |
||||
|
if (CollectionUtils.isEmpty(list)) { |
||||
|
return Collections.emptyList(); |
||||
|
} |
||||
|
return list.stream().map(IcActivityUnitRelationEntity::getUnitId).collect(Collectors.toList()); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除活动所属单位 |
||||
|
* |
||||
|
* @param activityId |
||||
|
* @Param activityId |
||||
|
* @Return |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/2/21 16:10 |
||||
|
*/ |
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void deleteByActivity(String activityId) { |
||||
|
baseDao.deleteByActivity(activityId); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 逻辑删除删除活动所属单位 |
||||
|
* |
||||
|
* @param activityId |
||||
|
* @Param activityId |
||||
|
* @Return |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/2/21 16:10 |
||||
|
*/ |
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String activityId) { |
||||
|
LambdaQueryWrapper<IcActivityUnitRelationEntity> wrapper = new LambdaQueryWrapper<>(); |
||||
|
wrapper.eq(IcActivityUnitRelationEntity::getActivityId, activityId); |
||||
|
baseDao.delete(wrapper); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,78 @@ |
|||||
|
package com.epmet.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
||||
|
import com.epmet.dao.LatestActServiceRelationDao; |
||||
|
import com.epmet.entity.LatestActServiceRelationEntity; |
||||
|
import com.epmet.service.LatestActServiceRelationService; |
||||
|
import org.apache.commons.collections4.CollectionUtils; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import java.util.Collections; |
||||
|
import java.util.List; |
||||
|
import java.util.stream.Collectors; |
||||
|
|
||||
|
/** |
||||
|
* 联建活动与服务事项关联表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-02-21 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class LatestActServiceRelationServiceImpl extends BaseServiceImpl<LatestActServiceRelationDao, LatestActServiceRelationEntity> implements LatestActServiceRelationService { |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 获取活动所属服务事项列表 |
||||
|
* |
||||
|
* @param actId |
||||
|
* @Param actId |
||||
|
* @Return {@link List < String>} |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/2/22 14:53 |
||||
|
*/ |
||||
|
@Override |
||||
|
public List<String> getServiceMatterList(String actId) { |
||||
|
LambdaQueryWrapper<LatestActServiceRelationEntity> wrapper = new LambdaQueryWrapper<>(); |
||||
|
wrapper.eq(LatestActServiceRelationEntity::getActId, actId); |
||||
|
wrapper.orderByAsc(LatestActServiceRelationEntity::getSort); |
||||
|
List<LatestActServiceRelationEntity> list = baseDao.selectList(wrapper); |
||||
|
if (CollectionUtils.isEmpty(list)) { |
||||
|
return Collections.emptyList(); |
||||
|
} |
||||
|
return list.stream().map(LatestActServiceRelationEntity::getServiceMatter).collect(Collectors.toList()); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除活动所属服务事项 |
||||
|
* |
||||
|
* @param actId |
||||
|
* @Param actId |
||||
|
* @Return |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/2/22 14:54 |
||||
|
*/ |
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void deleteByAct(String actId) { |
||||
|
baseDao.deleteByActivity(actId); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 逻辑删除活动所属服务事项 |
||||
|
* |
||||
|
* @param actId |
||||
|
* @Param actId |
||||
|
* @Return |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/2/22 14:54 |
||||
|
*/ |
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String actId) { |
||||
|
LambdaQueryWrapper<LatestActServiceRelationEntity> wrapper = new LambdaQueryWrapper<>(); |
||||
|
wrapper.eq(LatestActServiceRelationEntity::getActId, actId); |
||||
|
baseDao.delete(wrapper); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,78 @@ |
|||||
|
package com.epmet.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
||||
|
import com.epmet.dao.LatestActUnitRelationDao; |
||||
|
import com.epmet.entity.LatestActUnitRelationEntity; |
||||
|
import com.epmet.service.LatestActUnitRelationService; |
||||
|
import org.apache.commons.collections4.CollectionUtils; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import java.util.Collections; |
||||
|
import java.util.List; |
||||
|
import java.util.stream.Collectors; |
||||
|
|
||||
|
/** |
||||
|
* 联建活动与单位关联表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2022-02-21 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class LatestActUnitRelationServiceImpl extends BaseServiceImpl<LatestActUnitRelationDao, LatestActUnitRelationEntity> implements LatestActUnitRelationService { |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 获取活动所属联建单位列表 |
||||
|
* |
||||
|
* @param actId |
||||
|
* @Param actId |
||||
|
* @Return {@link List < String>} |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/2/22 14:53 |
||||
|
*/ |
||||
|
@Override |
||||
|
public List<String> getUnitList(String actId) { |
||||
|
LambdaQueryWrapper<LatestActUnitRelationEntity> wrapper = new LambdaQueryWrapper<>(); |
||||
|
wrapper.eq(LatestActUnitRelationEntity::getActId, actId); |
||||
|
wrapper.orderByAsc(LatestActUnitRelationEntity::getSort); |
||||
|
List<LatestActUnitRelationEntity> list = baseDao.selectList(wrapper); |
||||
|
if (CollectionUtils.isEmpty(list)) { |
||||
|
return Collections.emptyList(); |
||||
|
} |
||||
|
return list.stream().map(LatestActUnitRelationEntity::getUnitId).collect(Collectors.toList()); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除活动所属单位列表 |
||||
|
* |
||||
|
* @param actId |
||||
|
* @Param actId |
||||
|
* @Return |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/2/22 14:54 |
||||
|
*/ |
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void deleteByAct(String actId) { |
||||
|
baseDao.deleteByActivity(actId); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 逻辑删除活动所属单位列表 |
||||
|
* |
||||
|
* @param actId |
||||
|
* @Param actId |
||||
|
* @Return |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2022/2/22 14:54 |
||||
|
*/ |
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String actId) { |
||||
|
LambdaQueryWrapper<LatestActUnitRelationEntity> wrapper = new LambdaQueryWrapper<>(); |
||||
|
wrapper.eq(LatestActUnitRelationEntity::getActId, actId); |
||||
|
baseDao.delete(wrapper); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,68 @@ |
|||||
|
CREATE TABLE `ic_activity_service_relation` ( |
||||
|
`ID` varchar(64) NOT NULL COMMENT '主键', |
||||
|
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id', |
||||
|
`AGENCY_ID` varchar(64) NOT NULL COMMENT '组织ID', |
||||
|
`PIDS` varchar(255) DEFAULT NULL COMMENT '组织的所有上级', |
||||
|
`ACTIVITY_ID` varchar(32) NOT NULL COMMENT '活动ID', |
||||
|
`ACT_ID` varchar(64) DEFAULT NULL COMMENT 'act_info表ID', |
||||
|
`SERVICE_MATTER` varchar(32) NOT NULL DEFAULT '1' COMMENT '服务事项', |
||||
|
`SORT` int(4) DEFAULT NULL COMMENT '排序', |
||||
|
`DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除、1已删除', |
||||
|
`REVISION` int(11) NOT NULL DEFAULT '0' 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 `ic_activity_unit_relation` ( |
||||
|
`ID` varchar(64) NOT NULL COMMENT '主键', |
||||
|
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id', |
||||
|
`AGENCY_ID` varchar(64) NOT NULL COMMENT '组织ID', |
||||
|
`PIDS` varchar(255) DEFAULT NULL COMMENT '组织的所有上级', |
||||
|
`ACTIVITY_ID` varchar(32) NOT NULL COMMENT '活动ID', |
||||
|
`ACT_ID` varchar(64) DEFAULT NULL COMMENT 'act_info表ID', |
||||
|
`UNIT_ID` varchar(32) NOT NULL COMMENT '单位ID', |
||||
|
`SORT` int(4) DEFAULT '1' COMMENT '排序', |
||||
|
`DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除、1已删除', |
||||
|
`REVISION` int(11) NOT NULL DEFAULT '0' 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 `latest_act_service_relation` ( |
||||
|
`ID` varchar(64) NOT NULL COMMENT '主键', |
||||
|
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id', |
||||
|
`ACT_ID` varchar(64) DEFAULT NULL COMMENT 'latest_act_info表ID', |
||||
|
`SERVICE_MATTER` varchar(32) NOT NULL COMMENT '服务事项', |
||||
|
`SORT` int(4) DEFAULT '1' COMMENT '排序', |
||||
|
`DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除、1已删除', |
||||
|
`REVISION` int(11) NOT NULL DEFAULT '0' 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 `latest_act_unit_relation` ( |
||||
|
`ID` varchar(64) NOT NULL DEFAULT '1' COMMENT '主键', |
||||
|
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id', |
||||
|
`ACT_ID` varchar(64) DEFAULT NULL COMMENT 'latest_act_info表ID', |
||||
|
`UNIT_ID` varchar(32) NOT NULL COMMENT '单位ID', |
||||
|
`SORT` int(4) DEFAULT NULL COMMENT '排序', |
||||
|
`DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除、1已删除', |
||||
|
`REVISION` int(11) NOT NULL DEFAULT '0' 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='联建活动与单位关联表'; |
||||
|
|
||||
|
ALTER TABLE `epmet_heart`.`ic_party_activity` |
||||
|
MODIFY COLUMN `UNIT_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '单位ID' AFTER `ACT_ID`, |
||||
|
MODIFY COLUMN `SERVICE_MATTER` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '服务事项' AFTER `UNIT_ID`; |
||||
|
|
||||
|
UPDATE act_info SET ACT_TYPE = 'heart' WHERE ACT_TYPE IS NULL; |
||||
@ -0,0 +1,40 @@ |
|||||
|
INSERT INTO ic_activity_unit_relation |
||||
|
SELECT |
||||
|
UUID() AS ID, |
||||
|
CUSTOMER_ID, |
||||
|
AGENCY_ID, |
||||
|
PIDS, |
||||
|
ID AS ACTIVITY_ID, |
||||
|
ACT_ID, |
||||
|
UNIT_ID, |
||||
|
1 AS SORT, |
||||
|
DEL_FLAG, |
||||
|
REVISION, |
||||
|
CREATED_BY, |
||||
|
NOW(), |
||||
|
UPDATED_BY, |
||||
|
NOW() |
||||
|
FROM |
||||
|
ic_party_activity |
||||
|
WHERE UNIT_ID IS NOT NULL AND UNIT_ID != ''; |
||||
|
UPDATE ic_activity_unit_relation SET ID = REPLACE (ID, '-', ''); |
||||
|
INSERT INTO ic_activity_service_relation |
||||
|
SELECT |
||||
|
UUID() AS ID, |
||||
|
CUSTOMER_ID, |
||||
|
AGENCY_ID, |
||||
|
PIDS, |
||||
|
ID AS ACTIVITY_ID, |
||||
|
ACT_ID, |
||||
|
SERVICE_MATTER, |
||||
|
1 AS SORT, |
||||
|
DEL_FLAG, |
||||
|
REVISION, |
||||
|
CREATED_BY, |
||||
|
NOW(), |
||||
|
UPDATED_BY, |
||||
|
NOW() |
||||
|
FROM |
||||
|
ic_party_activity |
||||
|
WHERE SERVICE_MATTER IS NOT NULL AND UNIT_ID != ''; |
||||
|
UPDATE ic_activity_service_relation SET ID = REPLACE (ID, '-', ''); |
||||
@ -0,0 +1,26 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
|
||||
|
<mapper namespace="com.epmet.dao.IcActivityServiceRelationDao"> |
||||
|
|
||||
|
<resultMap type="com.epmet.entity.IcActivityServiceRelationEntity" id="icActivityServiceRelationMap"> |
||||
|
<result property="id" column="ID"/> |
||||
|
<result property="customerId" column="CUSTOMER_ID"/> |
||||
|
<result property="agencyId" column="AGENCY_ID"/> |
||||
|
<result property="pids" column="PIDS"/> |
||||
|
<result property="activityId" column="ACTIVITY_ID"/> |
||||
|
<result property="actId" column="ACT_ID"/> |
||||
|
<result property="serviceMatter" column="SERVICE_MATTER"/> |
||||
|
<result property="delFlag" column="DEL_FLAG"/> |
||||
|
<result property="revision" column="REVISION"/> |
||||
|
<result property="createdBy" column="CREATED_BY"/> |
||||
|
<result property="createdTime" column="CREATED_TIME"/> |
||||
|
<result property="updatedBy" column="UPDATED_BY"/> |
||||
|
<result property="updatedTime" column="UPDATED_TIME"/> |
||||
|
</resultMap> |
||||
|
<delete id="deleteByActivity"> |
||||
|
DELETE FROM ic_activity_service_relation WHERE ACTIVITY_ID = #{activityId} |
||||
|
</delete> |
||||
|
|
||||
|
|
||||
|
</mapper> |
||||
@ -0,0 +1,26 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
|
||||
|
<mapper namespace="com.epmet.dao.IcActivityUnitRelationDao"> |
||||
|
|
||||
|
<resultMap type="com.epmet.entity.IcActivityUnitRelationEntity" id="icActivityUnitRelationMap"> |
||||
|
<result property="id" column="ID"/> |
||||
|
<result property="customerId" column="CUSTOMER_ID"/> |
||||
|
<result property="agencyId" column="AGENCY_ID"/> |
||||
|
<result property="pids" column="PIDS"/> |
||||
|
<result property="activityId" column="ACTIVITY_ID"/> |
||||
|
<result property="actId" column="ACT_ID"/> |
||||
|
<result property="unitId" column="UNIT_ID"/> |
||||
|
<result property="delFlag" column="DEL_FLAG"/> |
||||
|
<result property="revision" column="REVISION"/> |
||||
|
<result property="createdBy" column="CREATED_BY"/> |
||||
|
<result property="createdTime" column="CREATED_TIME"/> |
||||
|
<result property="updatedBy" column="UPDATED_BY"/> |
||||
|
<result property="updatedTime" column="UPDATED_TIME"/> |
||||
|
</resultMap> |
||||
|
<delete id="deleteByActivity"> |
||||
|
DELETE FROM ic_activity_unit_relation WHERE ACTIVITY_ID = #{activityId} |
||||
|
</delete> |
||||
|
|
||||
|
|
||||
|
</mapper> |
||||
@ -0,0 +1,24 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
|
||||
|
<mapper namespace="com.epmet.dao.LatestActServiceRelationDao"> |
||||
|
|
||||
|
<resultMap type="com.epmet.entity.LatestActServiceRelationEntity" id="latestActServiceRelationMap"> |
||||
|
<result property="id" column="ID"/> |
||||
|
<result property="customerId" column="CUSTOMER_ID"/> |
||||
|
<result property="agencyId" column="AGENCY_ID"/> |
||||
|
<result property="pids" column="PIDS"/> |
||||
|
<result property="actId" column="ACT_ID"/> |
||||
|
<result property="serviceMatter" column="SERVICE_MATTER"/> |
||||
|
<result property="delFlag" column="DEL_FLAG"/> |
||||
|
<result property="revision" column="REVISION"/> |
||||
|
<result property="createdBy" column="CREATED_BY"/> |
||||
|
<result property="createdTime" column="CREATED_TIME"/> |
||||
|
<result property="updatedBy" column="UPDATED_BY"/> |
||||
|
<result property="updatedTime" column="UPDATED_TIME"/> |
||||
|
</resultMap> |
||||
|
<delete id="deleteByActivity"> |
||||
|
DELETE FROM latest_act_service_relation WHERE ACT_ID = #{activityId} |
||||
|
</delete> |
||||
|
|
||||
|
</mapper> |
||||
@ -0,0 +1,24 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
|
||||
|
<mapper namespace="com.epmet.dao.LatestActUnitRelationDao"> |
||||
|
|
||||
|
<resultMap type="com.epmet.entity.LatestActUnitRelationEntity" id="latestActUnitRelationMap"> |
||||
|
<result property="id" column="ID"/> |
||||
|
<result property="customerId" column="CUSTOMER_ID"/> |
||||
|
<result property="agencyId" column="AGENCY_ID"/> |
||||
|
<result property="pids" column="PIDS"/> |
||||
|
<result property="actId" column="ACT_ID"/> |
||||
|
<result property="unitId" column="UNIT_ID"/> |
||||
|
<result property="delFlag" column="DEL_FLAG"/> |
||||
|
<result property="revision" column="REVISION"/> |
||||
|
<result property="createdBy" column="CREATED_BY"/> |
||||
|
<result property="createdTime" column="CREATED_TIME"/> |
||||
|
<result property="updatedBy" column="UPDATED_BY"/> |
||||
|
<result property="updatedTime" column="UPDATED_TIME"/> |
||||
|
</resultMap> |
||||
|
<delete id="deleteByActivity"> |
||||
|
DELETE FROM latest_act_unit_relation WHERE ACT_ID = #{activityId} |
||||
|
</delete> |
||||
|
|
||||
|
</mapper> |
||||
@ -0,0 +1,68 @@ |
|||||
|
package com.epmet.task; |
||||
|
|
||||
|
import com.alibaba.fastjson.JSON; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
||||
|
import com.epmet.dataaggre.dto.govorg.form.GridLivelyFormDTO; |
||||
|
import com.epmet.dataaggre.feign.DataAggregatorOpenFeignClient; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
import java.text.DateFormat; |
||||
|
import java.text.SimpleDateFormat; |
||||
|
import java.util.Calendar; |
||||
|
import java.util.Date; |
||||
|
import java.util.GregorianCalendar; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 每个星期一的凌晨5点执行,查询网格活跃度统计导出excel,上传oss, 发送钉钉@小雷哥 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@Component("exportGridLiveResTask") |
||||
|
public class ExportGridLiveResTask implements ITask { |
||||
|
|
||||
|
@Autowired |
||||
|
private DataAggregatorOpenFeignClient dataAggregatorFeignClient; |
||||
|
|
||||
|
@Override |
||||
|
public void run(String params) { |
||||
|
if(StringUtils.isBlank(params)){ |
||||
|
return; |
||||
|
} |
||||
|
GridLivelyFormDTO formDTO = new GridLivelyFormDTO(); |
||||
|
if (StringUtils.isNotBlank(params)) { |
||||
|
formDTO = JSON.parseObject(params, GridLivelyFormDTO.class); |
||||
|
} |
||||
|
//默认获取当前日期的上一个自然周
|
||||
|
if (StringUtils.isBlank(formDTO.getStartTime()) || StringUtils.isBlank(formDTO.getEndTime())) { |
||||
|
Calendar calendar = Calendar.getInstance(); |
||||
|
calendar.add(Calendar.DATE, -1); |
||||
|
//上周日的日期
|
||||
|
Date yesterday = calendar.getTime(); |
||||
|
DateFormat format = new SimpleDateFormat("yyyyMMdd"); |
||||
|
Calendar c = new GregorianCalendar(); |
||||
|
//这里设置一周开始时间是星期一
|
||||
|
c.setFirstDayOfWeek(Calendar.MONDAY); |
||||
|
c.setTime(yesterday); |
||||
|
c.set(Calendar.DAY_OF_WEEK, c.getFirstDayOfWeek()); |
||||
|
//获取当前自然周的起始时间
|
||||
|
String beginTime = format.format(c.getTime()); |
||||
|
c.set(Calendar.DAY_OF_WEEK, c.getFirstDayOfWeek() + 6); |
||||
|
//当前自然周的截止时间
|
||||
|
String endTime = format.format(c.getTime()); |
||||
|
formDTO.setStartTime(beginTime); |
||||
|
formDTO.setEndTime(endTime); |
||||
|
} |
||||
|
ValidatorUtils.validateEntity(formDTO,GridLivelyFormDTO.Grid.class); |
||||
|
Result result = dataAggregatorFeignClient.exportGridLiveRes(formDTO); |
||||
|
if(!result.success()){ |
||||
|
log.error(String.format("exportGridLiveResTask网格活跃度统计导出失败,入参:%s",params)); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
||||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue