diff --git a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/servlet/ServletUtils.java b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/servlet/ServletUtils.java index 61038de9..1bcd6421 100644 --- a/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/servlet/ServletUtils.java +++ b/yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/servlet/ServletUtils.java @@ -14,12 +14,11 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.net.URLEncoder; +import java.nio.file.Paths; import java.util.Map; /** * 客户端工具类 - * - */ public class ServletUtils { @@ -45,9 +44,20 @@ public class ServletUtils { public static void writeAttachment(HttpServletResponse response, String filename, byte[] content) throws IOException { // 设置 header 和 contentType response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(filename, "UTF-8")); - response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE); + if (isPdfFile(filename)) { + response.setContentType("application/pdf;charset=utf-8"); + } else { + response.setContentType("application/octet-stream;charset=utf-8"); + } // 输出附件 - IoUtil.write(response.getOutputStream(), false, content); + IoUtil.write(response.getOutputStream(), true, content); + } + + public static boolean isPdfFile(String filePath) { + // 获取文件名(包括扩展名) + String fileName = Paths.get(filePath).getFileName().toString(); + // 检查扩展名是否为.pdf + return fileName.toLowerCase().endsWith(".pdf"); } /** diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/BpmOAImprestController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/BpmOAImprestController.java index f1a3b7ff..d2501a98 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/BpmOAImprestController.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/BpmOAImprestController.java @@ -41,7 +41,7 @@ public class BpmOAImprestController { } @GetMapping("/get") - @Operation(summary = "获得出差申请") + @Operation(summary = "获得备用金申请") @Parameter(name = "id", description = "编号", required = true, example = "1024") public CommonResult getImprest(@RequestParam("id") Long id) { @@ -49,4 +49,15 @@ public class BpmOAImprestController { return success(BpmOAImprestConvert.INSTANCE.convert(imprest)); } + + @GetMapping("/getOne") + @Operation(summary = "获得备用金表单") + @Parameter(name = "userId", description = "编号", required = true, example = "1024") + public CommonResult getImprestByUserId(@RequestParam("userId") Long userId) { + + //根据user 查询审批通过并且未报销得表单。 + BpmOAImprestDO imprest = imprestService.getImprestByUserId(userId); + + return success(BpmOAImprestConvert.INSTANCE.convert(imprest)); + } } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/imprest/BpmOAImprestRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/imprest/BpmOAImprestRespVO.java index 3d261fc7..431838ff 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/imprest/BpmOAImprestRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/imprest/BpmOAImprestRespVO.java @@ -41,6 +41,10 @@ public class BpmOAImprestRespVO extends BpmOABaseRespVO { @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY) private LocalDate date; + @Schema(description = "报销状态", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "报销状态不能为空") + private Integer status; + @Schema(description = "上传文件", requiredMode = Schema.RequiredMode.NOT_REQUIRED) private List fileItems; } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/reimbursement/BpmOAReimbursementCreateReqVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/reimbursement/BpmOAReimbursementCreateReqVO.java index 755f675f..be568bdf 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/reimbursement/BpmOAReimbursementCreateReqVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/reimbursement/BpmOAReimbursementCreateReqVO.java @@ -27,6 +27,10 @@ public class BpmOAReimbursementCreateReqVO { @NotNull(message = "报销总金额中文大写不能为空") private String totalMoneyChinese ; + @Schema(description = "备用金差额", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @NotNull(message = "备用金差额不能为空") + private BigDecimal difference ; + @Schema(description = "报销发票总数", requiredMode = Schema.RequiredMode.REQUIRED) @NotNull(message = "报销发票总数不能为空") private Integer totalQuantity ; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/reimbursement/BpmOAReimbursementRespVO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/reimbursement/BpmOAReimbursementRespVO.java index 42b75a9b..163e50d7 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/reimbursement/BpmOAReimbursementRespVO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/oa/vo/reimbursement/BpmOAReimbursementRespVO.java @@ -28,6 +28,10 @@ public class BpmOAReimbursementRespVO extends BpmOABaseRespVO { @NotNull(message = "报销总金额中文大写不能为空") private String totalMoneyChinese ; + @Schema(description = "备用金差额", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @NotNull(message = "备用金差额不能为空") + private BigDecimal difference ; + @Schema(description = "报销发票总数", requiredMode = Schema.RequiredMode.REQUIRED) @NotNull(message = "报销发票总数不能为空") private Integer totalQuantity ; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/message/BpmMessageConvert.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/message/BpmMessageConvert.java index 3b513622..8648c1a7 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/message/BpmMessageConvert.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/convert/message/BpmMessageConvert.java @@ -5,13 +5,11 @@ import cn.iocoder.yudao.module.system.api.notify.dto.NotifySendSingleToUserReqDT import cn.iocoder.yudao.module.system.api.sms.dto.send.SmsSendSingleToUserReqDTO; import cn.iocoder.yudao.module.system.api.subscribe.dto.MsgData; import cn.iocoder.yudao.module.system.api.subscribe.dto.SubscribeMessageReqDTO; -import org.flowable.bpmn.model.UserTask; import org.mapstruct.Mapper; import org.mapstruct.Mapping; import org.mapstruct.factory.Mappers; import java.util.Date; -import java.util.List; import java.util.Map; @Mapper @@ -32,56 +30,56 @@ public interface BpmMessageConvert { /** - * - * @param openId 微信小程序唯一id + * @param openId 微信小程序唯一id * @param processInstanceName 流程名称 - * @param result 审批结果 - * @param reason 审批原因 - * @param miniProgramState 小程序的状态 + * @param result 审批结果 + * @param reason 审批原因 + * @param miniProgramState 小程序的状态 * @return */ - default SubscribeMessageReqDTO convertApprovalResultNotification(String openId, String processInstanceName, String time, String result, String reason, String miniProgramState) { - SubscribeMessageReqDTO message = new SubscribeMessageReqDTO() ; - message.setToUser(openId) ; - message.setTemplateId("OnJjp5pdjG1PHMoELYaqp3Xq8jWZ5E6ndO0clEIQ4tk") ; + default SubscribeMessageReqDTO convertApprovalResultNotification(String openId, String processInstanceName, String time, String result, String reason, String processInstanceId, + String miniProgramState) { + SubscribeMessageReqDTO message = new SubscribeMessageReqDTO(); + message.setToUser(openId); + message.setTemplateId("OnJjp5pdjG1PHMoELYaqp3Xq8jWZ5E6ndO0clEIQ4tk"); //审批类型 MsgData processType = new MsgData(); - processType.setName("thing1") ; - processType.setValue(processInstanceName) ; + processType.setName("thing1"); + processType.setValue(processInstanceName); message.addData(processType); //发起时间 MsgData createTime = new MsgData(); - createTime.setName("time2") ; - createTime.setValue(time) ; + createTime.setName("time2"); + createTime.setValue(time); message.addData(createTime); //审批时间 MsgData approvalTime = new MsgData(); - approvalTime.setName("time7") ; - approvalTime.setValue(DateUtils.dateFormat(new Date(),DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)) ; + approvalTime.setName("time7"); + approvalTime.setValue(DateUtils.dateFormat(new Date(), DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)); message.addData(approvalTime); //审批结果 MsgData approvalResult = new MsgData(); - approvalResult.setName("phrase3") ; - approvalResult.setValue(result) ; + approvalResult.setName("phrase3"); + approvalResult.setValue(result); message.addData(approvalResult); - if(reason != null ) { + if (reason != null) { MsgData approvalReason = new MsgData(); - approvalReason.setName("thing12") ; - approvalReason.setValue(reason) ; + approvalReason.setName("thing12"); + approvalReason.setValue(reason); message.addData(approvalReason); } - message.setMiniprogramState(miniProgramState) ; + message.setMiniprogramState(miniProgramState); + message.setPage("pages/home/index?id=" + processInstanceId); return message; } /** - * - * @param openId 微信小程序唯一id + * @param openId 微信小程序唯一id * @param processInstanceName 流程名称 * @param startUserNickname 申请人 * @param time 申请时间 @@ -89,35 +87,36 @@ public interface BpmMessageConvert { * @param miniProgramState 小程序的状态 * @return */ - default SubscribeMessageReqDTO convertProcessToDoReminder(String openId, String processInstanceName,String startUserNickname, String time, String schedule, String miniProgramState) { - SubscribeMessageReqDTO message = new SubscribeMessageReqDTO() ; - message.setToUser(openId) ; - message.setTemplateId("3cP4btlFSSiZk65qVewN_WoT_bh0OfUkYzzTsADOrR4") ; + default SubscribeMessageReqDTO convertProcessToDoReminder(String openId, String processInstanceName, String startUserNickname, String time, String schedule, String processInstanceId, String miniProgramState) { + SubscribeMessageReqDTO message = new SubscribeMessageReqDTO(); + message.setToUser(openId); + message.setTemplateId("3cP4btlFSSiZk65qVewN_WoT_bh0OfUkYzzTsADOrR4"); //待办标题 MsgData processType = new MsgData(); - processType.setName("thing1") ; - processType.setValue("您收到了一条新的待办任务:"+processInstanceName) ; + processType.setName("thing1"); + processType.setValue("您收到了一条新的待办任务:" + processInstanceName); message.addData(processType); //申请人 MsgData applicant = new MsgData(); - applicant.setName("thing4") ; - applicant.setValue(startUserNickname) ; + applicant.setName("thing4"); + applicant.setValue(startUserNickname); message.addData(applicant); //申请时间 MsgData createTime = new MsgData(); - createTime.setName("time5") ; - createTime.setValue(time) ; + createTime.setName("time5"); + createTime.setValue(time); message.addData(createTime); //当前进度 MsgData currentSchedule = new MsgData(); - currentSchedule.setName("thing6") ; - currentSchedule.setValue(schedule) ; + currentSchedule.setName("thing6"); + currentSchedule.setValue(schedule); message.addData(currentSchedule); - message.setMiniprogramState(miniProgramState) ; + message.setMiniprogramState(miniProgramState); + message.setPage("pages/bpm/task/todo/examineApprove?id=" + processInstanceId); return message; } } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/oa/BpmOAImprestDO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/oa/BpmOAImprestDO.java index ae59927d..d3429cb6 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/oa/BpmOAImprestDO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/oa/BpmOAImprestDO.java @@ -29,6 +29,13 @@ import java.util.List; @AllArgsConstructor public class BpmOAImprestDO extends BaseDO { + /** + * 是否已报销 0否 1是 2进行中 + */ + public static final Integer FLAG_FALSE = 0; + public static final Integer FLAG_TRUE = 1; + public static final Integer IN_PROGRESS = 2; + /** * 出差表单主键 */ @@ -70,6 +77,14 @@ public class BpmOAImprestDO extends BaseDO { */ private Integer result; + /** + * 报销与否状态 + * 0:未报销 + * 1:已报销 + * 2:进行中 + */ + private Integer status; + /** * 对应的流程编号 * diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/oa/BpmOAReimbursementDO.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/oa/BpmOAReimbursementDO.java index 5e3b5700..3c4b5d27 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/oa/BpmOAReimbursementDO.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/oa/BpmOAReimbursementDO.java @@ -55,6 +55,11 @@ public class BpmOAReimbursementDO extends BaseDO { */ private String totalMoneyChinese; + /** + * 备用差额 + */ + private BigDecimal difference; + /** * 报销发票总张数 */ diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/oa/BpmOAImprestMapper.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/oa/BpmOAImprestMapper.java index a447047a..6fe536d2 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/oa/BpmOAImprestMapper.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/mysql/oa/BpmOAImprestMapper.java @@ -1,7 +1,9 @@ package cn.iocoder.yudao.module.bpm.dal.mysql.oa; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.BpmOAImprestDO; +import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceResultEnum; import org.apache.ibatis.annotations.Mapper; /** @@ -12,4 +14,11 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface BpmOAImprestMapper extends BaseMapperX { + + default BpmOAImprestDO selectByUserId(Long userId, Integer status){ + + return selectOne(new LambdaQueryWrapperX().eq(BpmOAImprestDO::getUserId, userId) + .eq(BpmOAImprestDO::getResult, BpmProcessInstanceResultEnum.PROCESS.getResult()) + .eq(BpmOAImprestDO::getStatus, status)); + } } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/message/BpmMessageServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/message/BpmMessageServiceImpl.java index 239e4f9a..e7a845c2 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/message/BpmMessageServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/message/BpmMessageServiceImpl.java @@ -1,6 +1,5 @@ package cn.iocoder.yudao.module.bpm.service.message; -import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.framework.web.config.WebProperties; import cn.iocoder.yudao.module.bpm.convert.message.BpmMessageConvert; import cn.iocoder.yudao.module.bpm.enums.message.BpmMessageEnum; @@ -17,7 +16,8 @@ import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; import javax.annotation.Resource; -import java.util.*; +import java.util.HashMap; +import java.util.Map; /** * BPM 消息 Service 实现类 @@ -36,7 +36,7 @@ public class BpmMessageServiceImpl implements BpmMessageService { private NotifyMessageSendApi notifyMessageSendApi; @Resource - private SubscribeMessageSendApi subscribeMessageSendApi ; + private SubscribeMessageSendApi subscribeMessageSendApi; @Resource private WebProperties webProperties; @@ -53,15 +53,16 @@ public class BpmMessageServiceImpl implements BpmMessageService { BpmMessageEnum.PROCESS_INSTANCE_APPROVE.getSmsTemplateCode(), templateParams)); //发送审批结果通知 - String openId = getUserOpenId(reqDTO.getStartUserId()) ; - if(openId != null ) { + String openId = getUserOpenId(reqDTO.getStartUserId()); + if (openId != null) { subscribeMessageSendApi.sendApprovalResultNotification( BpmMessageConvert.INSTANCE.convertApprovalResultNotification( - openId,reqDTO.getProcessInstanceName(), reqDTO.getCreateTime(), "通过", reqDTO.getReason(), + openId, reqDTO.getProcessInstanceName(), reqDTO.getCreateTime(), "通过", reqDTO.getReason(), + reqDTO.getProcessInstanceId(), /** * 跳转小程序类型:developer为开发版;trial为体验版;formal为正式版;默认为正式版 */ - "formal") ) ; + "formal")); } } @@ -78,15 +79,16 @@ public class BpmMessageServiceImpl implements BpmMessageService { reqDTO.getStartUserId(), BpmMessageEnum.PROCESS_INSTANCE_REJECT.getSmsTemplateCode(), templateParams)); // //发送审批结果通知 - String openId = getUserOpenId(reqDTO.getStartUserId()) ; - if(openId != null ) { + String openId = getUserOpenId(reqDTO.getStartUserId()); + if (openId != null) { subscribeMessageSendApi.sendApprovalResultNotification( BpmMessageConvert.INSTANCE.convertApprovalResultNotification( - openId,reqDTO.getProcessInstanceName(),reqDTO.getCreateTime(),"不通过", reqDTO.getReason(), + openId, reqDTO.getProcessInstanceName(), reqDTO.getCreateTime(), "不通过", reqDTO.getReason(), + reqDTO.getProcessInstanceId(), /** * 跳转小程序类型:developer为开发版;trial为体验版;formal为正式版;默认为正式版 */ - "formal") ) ; + "formal")); } } @@ -95,10 +97,10 @@ public class BpmMessageServiceImpl implements BpmMessageService { public void sendMessageWhenTaskAssigned(BpmMessageSendWhenTaskCreatedReqDTO reqDTO) { //任务分配 Long startUserId = reqDTO.getStartUserId(); //流程发起人 - Long assigneeUserId = reqDTO.getAssigneeUserId() ; //任务审批人 - String taskName = reqDTO.getTaskName() ; + Long assigneeUserId = reqDTO.getAssigneeUserId(); //任务审批人 + String taskName = reqDTO.getTaskName(); //如果流程发起人和任务审批是同一个人, 那么不发送站内信,否则就发送 - if(!assigneeUserId.toString().equals(startUserId.toString())) { + if (!assigneeUserId.toString().equals(startUserId.toString())) { Map templateParams = new HashMap<>(); templateParams.put("processInstanceName", reqDTO.getProcessInstanceName()); // templateParams.put("taskName", reqDTO.getTaskName()); @@ -112,11 +114,12 @@ public class BpmMessageServiceImpl implements BpmMessageService { reqDTO.getAssigneeUserId(), BpmMessageEnum.TASK_ASSIGNED.getSmsTemplateCode(), templateParams)); //微信小程序订阅消息 //发送OA流程待办提醒 - String openId = getUserOpenId(reqDTO.getStartUserId()) ; //只有在微信小程序登陆过用户才会有openid - if(openId != null ) { - subscribeMessageSendApi.sendProcessToDoReminder( BpmMessageConvert.INSTANCE.convertProcessToDoReminder( - openId, reqDTO.getProcessInstanceName(), reqDTO.getStartUserNickname(),reqDTO.getCreateTime(),reqDTO.getSchedule() , - "formal" ) ) ; + String openId = getUserOpenId(reqDTO.getStartUserId()); //只有在微信小程序登陆过用户才会有openid + if (openId != null) { + subscribeMessageSendApi.sendProcessToDoReminder(BpmMessageConvert.INSTANCE.convertProcessToDoReminder( + openId, reqDTO.getProcessInstanceName(), reqDTO.getStartUserNickname(), reqDTO.getCreateTime(), reqDTO.getSchedule(), + reqDTO.getProcessInstanceId(), + "formal")); } } } @@ -127,10 +130,11 @@ public class BpmMessageServiceImpl implements BpmMessageService { } @Resource - private AdminUserApi adminUserApi ; + private AdminUserApi adminUserApi; + private String getUserOpenId(Long userId) { AdminUserRespDTO adminUserRespDTO = adminUserApi.getUser(userId).getData(); - String openId = adminUserRespDTO.getOpenId() ; - return openId ; + String openId = adminUserRespDTO.getOpenId(); + return openId; } } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAImprestService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAImprestService.java index 0e892fd9..bcb512ae 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAImprestService.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAImprestService.java @@ -37,4 +37,12 @@ public interface BpmOAImprestService { * @return 备用金申请 */ BpmOAImprestDO getImprest(Long id); + + /** + * 获得备用金表单 + * + * @param userId 编号 + * @return 备用金申请 + */ + BpmOAImprestDO getImprestByUserId(Long userId); } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAImprestServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAImprestServiceImpl.java index fbc7a83e..80cdb942 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAImprestServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAImprestServiceImpl.java @@ -45,6 +45,7 @@ public class BpmOAImprestServiceImpl extends BpmOABaseService implements BpmOAIm //插入OA 备用金申请 BpmOAImprestDO imprest = BpmOAImprestConvert.INSTANCE.convert(createReqVO).setUserId(userId) + .setStatus(BpmOAImprestDO.FLAG_FALSE) .setResult(BpmProcessInstanceResultEnum.PROCESS.getResult()); imprestMapper.insert(imprest) ; @@ -83,4 +84,11 @@ public class BpmOAImprestServiceImpl extends BpmOABaseService implements BpmOAIm return imprestMapper.selectById(id); } + + @Override + public BpmOAImprestDO getImprestByUserId(Long userId) { + + //根据user 查询审批通过并且未报销得表单。 + return imprestMapper.selectByUserId(userId, BpmOAImprestDO.FLAG_FALSE); + } } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAProcurePayServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAProcurePayServiceImpl.java index f86c1705..58e3c4ff 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAProcurePayServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAProcurePayServiceImpl.java @@ -69,7 +69,7 @@ public class BpmOAProcurePayServiceImpl extends BpmOABaseService implements BpmO private BpmProcessInstanceService bpmProcessInstanceService; /** - * OA 请假对应的流程定义 KEY + * OA 采购支付对应的流程定义 KEY */ public static final String PROCESS_KEY = "oa_procure_pay"; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAProcureServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAProcureServiceImpl.java index 78b52a52..6db1d31b 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAProcureServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAProcureServiceImpl.java @@ -40,7 +40,7 @@ public class BpmOAProcureServiceImpl extends BpmOABaseService implements BpmOAPr @Resource private BpmProcessInstanceApi processInstanceApi; /** - * OA 请假对应的流程定义 KEY + * OA 采购申请对应的流程定义 KEY */ public static final String PROCESS_KEY = "oa_procure"; diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAReimbursementService.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAReimbursementService.java index ce8f7c2a..823e6519 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAReimbursementService.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAReimbursementService.java @@ -26,10 +26,11 @@ public interface BpmOAReimbursementService { /** * 更新报销申请的状态 * - * @param id 编号 - * @param result 结果 + * @param processInstanceId + * @param id 编号 + * @param result 结果 */ - void updateReimbursementResult(Long id, Integer result); + void updateReimbursementResult(String processInstanceId, Long id, Integer result); /** * 获得报销申请 diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAReimbursementServiceImpl.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAReimbursementServiceImpl.java index e1ebf9a8..f128cd0e 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAReimbursementServiceImpl.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/BpmOAReimbursementServiceImpl.java @@ -5,11 +5,16 @@ import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO; import cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.reimbursement.BpmOAReimbursementCreateReqVO; import cn.iocoder.yudao.module.bpm.controller.admin.upload.UploadUserFile; import cn.iocoder.yudao.module.bpm.convert.oa.BpmOAReimbursementConvert; +import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.BpmOAImprestDO; import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.BpmOAReimbursementDO; +import cn.iocoder.yudao.module.bpm.dal.mysql.oa.BpmOAImprestMapper; import cn.iocoder.yudao.module.bpm.dal.mysql.oa.BpmOAReimbursementMapper; import cn.iocoder.yudao.module.bpm.enums.task.BpmProcessInstanceResultEnum; -import cn.iocoder.yudao.module.infra.api.file.FileApi; +import cn.iocoder.yudao.module.bpm.service.task.BpmProcessInstanceService; +import org.flowable.engine.runtime.ProcessInstance; +import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; import javax.annotation.Resource; @@ -43,7 +48,14 @@ public class BpmOAReimbursementServiceImpl extends BpmOABaseService implements B private BpmProcessInstanceApi processInstanceApi; @Resource - private FileApi fileApi; + @Lazy // 解决循环依赖 + private BpmProcessInstanceService bpmProcessInstanceService; + + @Resource + private BpmOAImprestService bpmOAImprestService; + + @Resource + private BpmOAImprestMapper bpmOAImprestMapper; @Override public Long createReimbursement(Long userId, BpmOAReimbursementCreateReqVO createReqVO) { @@ -57,9 +69,15 @@ public class BpmOAReimbursementServiceImpl extends BpmOABaseService implements B new BpmProcessInstanceCreateReqDTO().setProcessDefinitionKey(PROCESS_KEY) .setVariables(processInstanceVariables).setBusinessKey(String.valueOf(reimbursement.getId()))).getCheckedData(); - // 将工作流的编号,更新到 OA 请假单中 + // 将工作流的编号,更新到 OA 报销表单中 reimbursementMapper.updateById(new BpmOAReimbursementDO().setId(reimbursement.getId()).setProcessInstanceId(processInstanceId)); + //如果是备用金报销,则更新备用金流程status + if (createReqVO.getDifference() != null) { + BpmOAImprestDO bpmOAImprestDO = bpmOAImprestService.getImprestByUserId(userId); + bpmOAImprestMapper.updateById(new BpmOAImprestDO().setId(bpmOAImprestDO.getId()).setStatus(BpmOAImprestDO.IN_PROGRESS)); + } + List fileItems = createReqVO.getFileItems() ; //这里的逻辑,如果fileItems不为空,且有数据,那么说明是上传了附件的,则需要更工作流文件表对应的实例Id if (fileItems != null && !fileItems.isEmpty()) { @@ -69,8 +87,40 @@ public class BpmOAReimbursementServiceImpl extends BpmOABaseService implements B } @Override - public void updateReimbursementResult(Long id, Integer result) { + @Transactional(rollbackFor = Exception.class) + public void updateReimbursementResult(String processInstanceId, Long id, Integer result) { validateLeaveExists(id); + + //审核通过 (最后节点) + if (BpmProcessInstanceResultEnum.APPROVE.getResult().equals(result)) { + + ProcessInstance instance = bpmProcessInstanceService.getProcessInstance(processInstanceId); + BpmOAImprestDO bpmOAImprestDO = bpmOAImprestMapper.selectByUserId(Long.valueOf(instance.getStartUserId()), BpmOAImprestDO.IN_PROGRESS); + + if (instance.isEnded() && bpmOAImprestDO != null) { + + //将相应备用金申请状态改为 已报销 + bpmOAImprestMapper.updateById(new BpmOAImprestDO().setId(bpmOAImprestDO.getId()).setStatus(BpmOAImprestDO.FLAG_TRUE)); + } + } + + // -- 自己取消 + // -- 审核拒绝 + //所有关联的采购申请改为 未支付状态 + if (BpmProcessInstanceResultEnum.REJECT.getResult().equals(result) + || BpmProcessInstanceResultEnum.CANCEL.getResult().equals(result) + || BpmProcessInstanceResultEnum.BACK.getResult().equals(result)) { + + ProcessInstance instance = bpmProcessInstanceService.getProcessInstance(processInstanceId); + BpmOAImprestDO bpmOAImprestDO = bpmOAImprestMapper.selectByUserId(Long.valueOf(instance.getStartUserId()), BpmOAImprestDO.IN_PROGRESS); + + if (bpmOAImprestDO != null) { + + //将相应备用金申请状态改为 未报销 + bpmOAImprestMapper.updateById(new BpmOAImprestDO().setId(bpmOAImprestDO.getId()).setStatus(BpmOAImprestDO.FLAG_FALSE)); + } + } + reimbursementMapper.updateById(new BpmOAReimbursementDO().setId(id).setResult(result)); } diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/listener/BpmOAReimbursementResultListener.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/listener/BpmOAReimbursementResultListener.java index a4fc2ef4..6e3bce2d 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/listener/BpmOAReimbursementResultListener.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/oa/listener/BpmOAReimbursementResultListener.java @@ -2,8 +2,6 @@ package cn.iocoder.yudao.module.bpm.service.oa.listener; import cn.iocoder.yudao.module.bpm.framework.bpm.core.event.BpmProcessInstanceResultEvent; import cn.iocoder.yudao.module.bpm.framework.bpm.core.event.BpmProcessInstanceResultEventListener; -import cn.iocoder.yudao.module.bpm.service.oa.BpmOALeaveService; -import cn.iocoder.yudao.module.bpm.service.oa.BpmOALeaveServiceImpl; import cn.iocoder.yudao.module.bpm.service.oa.BpmOAReimbursementService; import cn.iocoder.yudao.module.bpm.service.oa.BpmOAReimbursementServiceImpl; import org.springframework.stereotype.Component; @@ -28,7 +26,7 @@ public class BpmOAReimbursementResultListener extends BpmProcessInstanceResultEv @Override protected void onEvent(BpmProcessInstanceResultEvent event) { - reimbursementService.updateReimbursementResult(Long.parseLong(event.getBusinessKey()), event.getResult()); + reimbursementService.updateReimbursementResult(event.getId(), Long.parseLong(event.getBusinessKey()), event.getResult()); } } diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/file/FileServiceImpl.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/file/FileServiceImpl.java index 0d381205..03cf1b99 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/file/FileServiceImpl.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/service/file/FileServiceImpl.java @@ -16,23 +16,18 @@ import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO; import cn.iocoder.yudao.module.infra.dal.mysql.file.BpmFileMapper; import cn.iocoder.yudao.module.infra.dal.mysql.file.FileMapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; -import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import lombok.SneakyThrows; import org.springframework.stereotype.Service; import org.springframework.web.multipart.MultipartFile; import javax.annotation.Resource; - import java.util.List; -import java.util.Map; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.module.infra.enums.ErrorCodeConstants.FILE_NOT_EXISTS; /** * 文件 Service 实现类 - * - */ @Service public class FileServiceImpl implements FileService { @@ -58,20 +53,18 @@ public class FileServiceImpl implements FileService { Long userId = SecurityFrameworkUtils.getLoginUserId(); long timestamp = System.currentTimeMillis(); - String[] fileInfo = new String[4] ; - String name = file.getOriginalFilename() ; - String path = null ; - byte[] content = IoUtil.readBytes(file.getInputStream()) ; + String[] fileInfo = new String[4]; + String name = file.getOriginalFilename(); + String path = null; + byte[] content = IoUtil.readBytes(file.getInputStream()); // 计算默认的 path 名 String type = FileTypeUtils.getMineType(content, name); - if (StrUtil.isEmpty(path)) { - //path = FileUtils.generatePath(content, name); - path = userId+"_"+timestamp+""; - String beginPath = name.replace(".","_") ; - path = beginPath+"_"+path+"."+ FileNameUtil.extName(name);; - } + StrUtil.isEmpty(path);//path = FileUtils.generatePath(content, name); + path = userId + "_" + timestamp; + String beginPath = name.replace(".", "_"); + path = beginPath + "_" + path + "." + FileNameUtil.extName(name); // 如果 name 为空,则使用 path 填充 if (StrUtil.isEmpty(name)) { name = path; @@ -90,15 +83,15 @@ public class FileServiceImpl implements FileService { fileDo.setUrl(url); fileDo.setType(type); fileDo.setSize(content.length); - fileDo.setUploadUserId(userId) ; + fileDo.setUploadUserId(userId); bpmFileMapper.insert(fileDo); - fileInfo[0] = name ; - fileInfo[1] = fileDo.getUrl() ; - fileInfo[2] = fileDo.getType() ; + fileInfo[0] = name; + fileInfo[1] = fileDo.getUrl(); + fileInfo[2] = fileDo.getType(); // 返回上传文件的访问路径 //return "{\"name\": \""+ fileInfo[0]+"\", \"path\": \""+ fileInfo[1]+"\", \"type\": \""+ fileInfo[2]+"\" }"; - return fileDo ; + return fileDo; } @Override @@ -162,11 +155,11 @@ public class FileServiceImpl implements FileService { @Override public void deleteFile(String url) throws Exception { - String path = url.substring( url.lastIndexOf("/")+1 ) ; - PageResult fileDOPageResult =fileMapper.selectPage(new FilePageReqVO().setPath(path)); - FileDO file = null ; - if(fileDOPageResult != null && fileDOPageResult.getTotal() >0 ) { - file = fileDOPageResult.getList().get(0) ; + String path = url.substring(url.lastIndexOf("/") + 1); + PageResult fileDOPageResult = fileMapper.selectPage(new FilePageReqVO().setPath(path)); + FileDO file = null; + if (fileDOPageResult != null && fileDOPageResult.getTotal() > 0) { + file = fileDOPageResult.getList().get(0); } if (file == null) { @@ -184,11 +177,11 @@ public class FileServiceImpl implements FileService { @Override public void deleteBpmFile(String url) throws Exception { - String path = url.substring( url.lastIndexOf("/")+1 ) ; - PageResult fileDOPageResult =bpmFileMapper.selectPage(new FilePageReqVO().setPath(path)); - BpmFileDO file = null ; - if(fileDOPageResult != null && fileDOPageResult.getTotal() >0 ) { - file = fileDOPageResult.getList().get(0) ; + String path = url.substring(url.lastIndexOf("/") + 1); + PageResult fileDOPageResult = bpmFileMapper.selectPage(new FilePageReqVO().setPath(path)); + BpmFileDO file = null; + if (fileDOPageResult != null && fileDOPageResult.getTotal() > 0) { + file = fileDOPageResult.getList().get(0); } if (file == null) { throw exception(FILE_NOT_EXISTS); @@ -205,10 +198,10 @@ public class FileServiceImpl implements FileService { @Override public void uploadBpmFileProcessInstanceId(BpmFileUploadReqVO reqVO) { - String processInstanceId = reqVO.getProcessInstanceId() ; - List urls = reqVO.getUrls() ; + String processInstanceId = reqVO.getProcessInstanceId(); + List urls = reqVO.getUrls(); LambdaUpdateWrapper lambdaUpdateWrapper = new LambdaUpdateWrapper<>(); - lambdaUpdateWrapper.in(BpmFileDO::getUrl, urls) ; + lambdaUpdateWrapper.in(BpmFileDO::getUrl, urls); lambdaUpdateWrapper.set(BpmFileDO::getProcessInstanceId, processInstanceId); // 假设 bid 是要更新的 bid 值 // 调用 MyBatis Plus 的 update 方法执行批量更新 bpmFileMapper.update(null, lambdaUpdateWrapper); diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/subscribe/dto/SubscribeMessageReqDTO.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/subscribe/dto/SubscribeMessageReqDTO.java index cc79bfa8..afeaa0d3 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/subscribe/dto/SubscribeMessageReqDTO.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/subscribe/dto/SubscribeMessageReqDTO.java @@ -30,9 +30,13 @@ public class SubscribeMessageReqDTO { @Schema(description = "跳转小程序类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "developer为开发版;trial为体验版;formal为正式版;默认为正式版") @NotNull(message = "跳转小程序类型不能为空") - private String miniprogramState = "formal" ; + private String miniprogramState = "formal"; + + @Schema(description = "小程序页面地址", requiredMode = Schema.RequiredMode.REQUIRED, example = "pages/home/index") + @NotNull(message = "小程序页面地址不能为空") + private String page; public void addData(MsgData data) { - this.data.add(data) ; + this.data.add(data); } } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/subscribe/SubscribeMessageSendApiImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/subscribe/SubscribeMessageSendApiImpl.java index 1e543317..91ec0ae4 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/subscribe/SubscribeMessageSendApiImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/api/subscribe/SubscribeMessageSendApiImpl.java @@ -1,29 +1,15 @@ package cn.iocoder.yudao.module.system.api.subscribe; -import cn.binarywang.wx.miniapp.api.WxMaService; -import cn.binarywang.wx.miniapp.api.WxMaSubscribeService; -import cn.binarywang.wx.miniapp.api.impl.WxMaServiceImpl; import cn.binarywang.wx.miniapp.bean.WxMaSubscribeMessage; -import cn.binarywang.wx.miniapp.config.impl.WxMaRedisBetterConfigImpl; import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.yudao.framework.common.util.cache.CacheUtils; import cn.iocoder.yudao.module.system.api.subscribe.dto.MsgData; import cn.iocoder.yudao.module.system.api.subscribe.dto.SubscribeMessageReqDTO; import cn.iocoder.yudao.module.system.service.social.SocialClientService; -import com.binarywang.spring.starter.wxjava.miniapp.properties.WxMaProperties; -import com.binarywang.spring.starter.wxjava.mp.properties.WxMpProperties; -import com.google.common.cache.CacheLoader; -import com.google.common.cache.LoadingCache; import lombok.SneakyThrows; -import me.chanjar.weixin.common.error.WxErrorException; -import me.chanjar.weixin.common.redis.RedisTemplateWxRedisOps; -import me.chanjar.weixin.mp.api.WxMpService; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; - -import java.time.Duration; import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; @@ -36,7 +22,7 @@ import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; */ @RestController // 提供 RESTful API 接口,给 Feign 调用 @Validated -public class SubscribeMessageSendApiImpl implements SubscribeMessageSendApi{ +public class SubscribeMessageSendApiImpl implements SubscribeMessageSendApi { @Resource private SocialClientService socialClientService; @@ -55,21 +41,21 @@ public class SubscribeMessageSendApiImpl implements SubscribeMessageSendApi{ return success(1L); } - private WxMaSubscribeMessage initWxMaSubscribeMessage( SubscribeMessageReqDTO reqDTO ) { + private WxMaSubscribeMessage initWxMaSubscribeMessage(SubscribeMessageReqDTO reqDTO) { WxMaSubscribeMessage message = WxMaSubscribeMessage.builder() .toUser(reqDTO.getToUser()) .templateId(reqDTO.getTemplateId()) .build(); message.setMiniprogramState(reqDTO.getMiniprogramState()); - List dataList = reqDTO.getData() ; + List dataList = reqDTO.getData(); for (MsgData msgData : dataList) { - WxMaSubscribeMessage.MsgData wxMsgData = new WxMaSubscribeMessage.MsgData() ; - wxMsgData.setName(msgData.getName()) ; - wxMsgData.setValue(msgData.getValue()) ; - message.addData(wxMsgData) ; + WxMaSubscribeMessage.MsgData wxMsgData = new WxMaSubscribeMessage.MsgData(); + wxMsgData.setName(msgData.getName()); + wxMsgData.setValue(msgData.getValue()); + message.addData(wxMsgData); } - message.setPage("pages/home/index") ; - return message ; + message.setPage(reqDTO.getPage()); + return message; } }