diff --git a/Cpop-Jambox/src/main/java/com/cpop/jambox/business/service/impl/EasyLearnOrderServiceImpl.java b/Cpop-Jambox/src/main/java/com/cpop/jambox/business/service/impl/EasyLearnOrderServiceImpl.java index f913a09..a88b3e3 100644 --- a/Cpop-Jambox/src/main/java/com/cpop/jambox/business/service/impl/EasyLearnOrderServiceImpl.java +++ b/Cpop-Jambox/src/main/java/com/cpop/jambox/business/service/impl/EasyLearnOrderServiceImpl.java @@ -42,6 +42,7 @@ import com.mybatisflex.spring.service.impl.ServiceImpl; import com.zaxxer.hikari.HikariDataSource; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.web.client.RestTemplate; import java.util.ArrayList; import java.util.List; @@ -67,6 +68,11 @@ public class EasyLearnOrderServiceImpl extends ServiceImpl= Math.ceil(1 / OrderSource.MALL.getRate())) { + //获取订单信息 + EasyLearnOrder easyLearnOrder = this.getById(orderId); + //设置子商户 + wxPayService.getConfig().setSubMchId(wxPayHandler.getSubMchId(easyLearnOrder.getBrandId(), easyLearnOrder.getStoreId())); wxPayAsyncTask.asyncWxPayProfitSharing(orderId, notifyResult, wxPayService, OrderSource.EASY_LEARN); } + //更新订单 + this.updateChain().set(EASY_LEARN_ORDER.OUT_ORDER_NO, notifyResult.getTransactionId()).where(EASY_LEARN_ORDER.ID.eq(orderId)).update(); + //TODO: 通知波哥办卡 + SpringUtils.getBean(RestTemplate.class); } catch (WxPayException e) { throw new ServiceException(e.getMessage()); } @@ -416,7 +428,7 @@ public class EasyLearnOrderServiceImpl extends ServiceImpl= Math.ceil(1 / OrderSource.EASY_LEARN.getRate())) { diff --git a/Cpop-Jambox/src/main/resources/application-jambox.yml b/Cpop-Jambox/src/main/resources/application-jambox.yml index 8b13789..28881e8 100644 --- a/Cpop-Jambox/src/main/resources/application-jambox.yml +++ b/Cpop-Jambox/src/main/resources/application-jambox.yml @@ -1 +1,6 @@ - +wx: + pay: + #支付通知地址 + notify-url: https://api.jamboxsys.com/Cpop-Mall/easyLearn/callback/notify/order + #分账回调 + notify-sharing: https://api.jamboxsys.com/Cpop-Mall/easyLearn/callback/notify/profitSharing diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/bo/ReimburseApplicationBo.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/bo/ReimburseApplicationBo.java index 62015a6..4f45b57 100644 --- a/Cpop-Oam/src/main/java/com/cpop/oam/business/bo/ReimburseApplicationBo.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/bo/ReimburseApplicationBo.java @@ -59,4 +59,10 @@ public class ReimburseApplicationBo implements Serializable { @ApiModelProperty(value = "附件") private String attachmentUrl; + /** + * 报销申请id + */ + @ApiModelProperty(value = "报销申请id") + private String id; + } diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/FinanceReimburseController.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/FinanceReimburseController.java index 44ff512..3942373 100644 --- a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/FinanceReimburseController.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/FinanceReimburseController.java @@ -1,17 +1,15 @@ package com.cpop.oam.business.controller.backstage; -import com.mybatisflex.core.paginate.Page; -import com.mybatisflex.core.query.QueryWrapper; import com.cpop.common.utils.bean.BeanUtils; -import com.cpop.core.annontation.OperationLog; import com.cpop.core.base.R; -import com.cpop.core.base.enums.OperationLogEnum; import com.cpop.oam.business.bo.*; import com.cpop.oam.business.entity.FinanceReimburseType; import com.cpop.oam.business.service.FinanceReimburseService; import com.cpop.oam.business.service.FinanceReimburseStageService; import com.cpop.oam.business.service.FinanceReimburseTypeService; import com.cpop.oam.business.vo.*; +import com.mybatisflex.core.paginate.Page; +import com.mybatisflex.core.query.QueryWrapper; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; @@ -87,11 +85,25 @@ public class FinanceReimburseController { } /** - * @Description: 财务报销模块-报销审核分页列表 + * 修改报销申请 + * @author DB + * @since 2023/12/21 + * @param bo 请求 + * @return R + */ + @ApiOperation("修改报销申请") + @PutMapping("/updateReimburseApplication") + public R updateReimburseApplication(@RequestBody @Validated ReimburseApplicationBo bo) { + financeReimburseService.updateReimburseApplication(bo); + return R.ok(); + } + + /** + * 财务报销模块-报销审核分页列表 * @param bo 请求参数 - * @return: R> - * @Author: DB - * @Date: 2023/5/30 15:44 + * @return R> + * @author DB + * @since : 2023/5/30 15:44 **/ @PreAuthorize("@aps.hasPermission('financial:audit:list')") @ApiOperation("财务报销模块-报销审核分页列表") diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/entity/FinanceReimburse.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/entity/FinanceReimburse.java index 831c0fe..029775b 100644 --- a/Cpop-Oam/src/main/java/com/cpop/oam/business/entity/FinanceReimburse.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/entity/FinanceReimburse.java @@ -37,7 +37,7 @@ public class FinanceReimburse extends BaseEntity implements Serializable { private String staffId; /** - * 状态:0:已提交;1:审批中;2:下款中;3:已下发;4:驳回 + * 状态:0:审批中;1:下款中;2:已下发-1:驳回 */ private Integer status; diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/entity/Task.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/entity/Task.java index 99a52ca..0efe888 100644 --- a/Cpop-Oam/src/main/java/com/cpop/oam/business/entity/Task.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/entity/Task.java @@ -45,7 +45,7 @@ public class Task extends BaseEntity implements Serializable { private String responsibleStaffId; /** - * 任务状态(-1:失败;0:待审核;1:待接受;2:进行中;3:待测试;4:逾期;5:暂停;6:逾期完成;7:接收超时;8:待部署;9:已归档;10:审核不通过) + * 任务状态(-1:失败;0:待审核;1:待接受;2:进行中;3:待测试;5:暂停;7:接收超时;8:待部署;9:已归档;10:审核不通过) */ private Integer taskStatus; diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/service/FinanceReimburseService.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/service/FinanceReimburseService.java index 3744ff7..744423d 100644 --- a/Cpop-Oam/src/main/java/com/cpop/oam/business/service/FinanceReimburseService.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/service/FinanceReimburseService.java @@ -51,6 +51,14 @@ public interface FinanceReimburseService extends IService { */ void insertReimburseApplication(ReimburseApplicationBo bo); + /** + * 修改报销申请 + * @author DB + * @since 2023/12/21 + * @param bo 请求 + */ + void updateReimburseApplication(ReimburseApplicationBo bo); + /** * @Description: 财务报销模块-个人报销统计 * @return: R> @@ -67,4 +75,5 @@ public interface FinanceReimburseService extends IService { * @return: com.jambox.core.base.R */ void reimbursePay(ReimbursePayBo bo); + } diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/FinanceReimburseServiceImpl.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/FinanceReimburseServiceImpl.java index 38da404..29373da 100644 --- a/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/FinanceReimburseServiceImpl.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/FinanceReimburseServiceImpl.java @@ -57,8 +57,18 @@ public class FinanceReimburseServiceImpl extends ServiceImpl getReimburseAuditPage(FinanceReimburseAuditPageBo bo) { PageDomain pageDomain = SqlUtils.getInstance().getPageDomain(); + QueryWrapper queryWrapper = QueryWrapper.create(); + if (bo.getStatus()!=null){ + if (bo.getStatus() == 0) { + //状态 + queryWrapper.and(FINANCE_REIMBURSE.STATUS.in(0, -1)); + } else { + //状态 + queryWrapper.and(FINANCE_REIMBURSE.STATUS.eq(bo.getStatus())); + } + } return this.mapper.paginateAs(pageDomain.getPageNum(), pageDomain.getPageSize(), - QueryWrapper.create().select(FINANCE_REIMBURSE.ALL_COLUMNS) + queryWrapper.select(FINANCE_REIMBURSE.ALL_COLUMNS) .select(STAFF.NAME.as(FinanceReimbursePageVo::getStaffName)) .select(FINANCE_REIMBURSE_TYPE.TYPE_NAME.as(FinanceReimbursePageVo::getTypeName)) .from(FINANCE_REIMBURSE) @@ -96,82 +114,57 @@ public class FinanceReimburseServiceImpl extends ServiceImpl list = this.list(QueryWrapper.create().where(FINANCE_REIMBURSE.ID.in(bo.getIds()))); + List finishReimburseIds = list.stream().map(FinanceReimburse::getId).collect(Collectors.toList()); + LocalDateTime now = LocalDateTime.now(); + List financeReimburseStages = new ArrayList<>(); //审批批量转下款 if (list.get(0).getStatus() == 1) { - - } - - List allFinishReimburseIds = new ArrayList<>(); - if (!list.isEmpty()){ - list.forEach(item->{ - if (item.getStatus() > 2){ - throw new ServiceException("状态超标"); - } - if (list.size() > 1) { - //审批转下款,全下 - if (item.getStatus() == 1 || item.getStatus() == 2){ - allFinishReimburseIds.add(item.getId()); - } - } else { - //审批转下款,全下 - if (item.getStatus() == 2){ - allFinishReimburseIds.add(item.getId()); - } - } - item.setStatus(item.getStatus() + 1); + Map idToPrice = list.stream().collect(Collectors.toMap(FinanceReimburse::getId, item->item)); + list.forEach(item -> { + FinanceReimburseStage entity = new FinanceReimburseStage(); + entity.setFinanceReimburseId(item.getId()).setPaymentTime(now).setStageAmount(item.getPrice()); + financeReimburseStages.add(entity); + //修改状态 + item.setStatus(2); }); - //存在全下的报销 - if (!allFinishReimburseIds.isEmpty()) { - Map idToPrice = list.stream().collect(Collectors.toMap(FinanceReimburse::getId, item->item)); - //获取已有的报销阶段 - Map> stageMap = SpringUtils.getBean(FinanceReimburseStageService.class).queryChain() - .where(FINANCE_REIMBURSE_STAGE.FINANCE_REIMBURSE_ID.in(allFinishReimburseIds)).list() - .stream().collect(Collectors.groupingBy(FinanceReimburseStage::getFinanceReimburseId)); - List financeReimburseStages = new ArrayList<>(); - allFinishReimburseIds.forEach(item -> { + } else { + //获取已有的报销阶段 + Map> stageMap = SpringUtils.getBean(FinanceReimburseStageService.class).queryChain() + .where(FINANCE_REIMBURSE_STAGE.FINANCE_REIMBURSE_ID.in(finishReimburseIds)).list() + .stream().collect(Collectors.groupingBy(FinanceReimburseStage::getFinanceReimburseId)); + list.forEach(item->{ + if (stageMap.get(item.getId()) != null) { + //减去已下发的 FinanceReimburseStage entity = new FinanceReimburseStage(); - BeanUtils.copyBeanProp(entity, bo); - FinanceReimburse financeReimburse = idToPrice.get(item); - entity.setFinanceReimburseId(item) - .setPaymentTime(LocalDateTime.now()); - if (stageMap.get(item) != null) { - //减去已下发的 - entity.setStageAmount(financeReimburse.getPrice().subtract(stageMap.get(item).stream().map(FinanceReimburseStage::getStageAmount).reduce(BigDecimal.ZERO, BigDecimal::add))); - } else { - entity.setStageAmount(financeReimburse.getPrice()); - } - financeReimburseStages.add(entity); - //修改状态 - financeReimburse.setStatus(3); - }); - SpringUtils.getBean(FinanceReimburseStageService.class).saveBatch(financeReimburseStages); - } - this.updateBatch(list); + entity.setStageAmount(item.getPrice().subtract(stageMap.get(item.getId()).stream().map(FinanceReimburseStage::getStageAmount).reduce(BigDecimal.ZERO, BigDecimal::add))); + item.setStatus(2); + } + }); } + //批量修改 + SpringUtils.getBean(FinanceReimburseStageService.class).saveBatch(financeReimburseStages); + this.updateBatch(list); } /** - * @descriptions 新增报销申请 + * 新增报销申请 * @author DB - * @date 2023/09/21 15:55 + * @since 2023/09/21 15:55 * @param bo 请求参数 - * @return: com.cpop.core.base.R */ @Override public void insertReimburseApplication(ReimburseApplicationBo bo) { @@ -183,6 +176,20 @@ public class FinanceReimburseServiceImpl extends ServiceImpl> diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/StaffServiceImpl.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/StaffServiceImpl.java index 823f58c..7315754 100644 --- a/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/StaffServiceImpl.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/StaffServiceImpl.java @@ -4,8 +4,6 @@ import com.alibaba.fastjson.JSONObject; import com.cpop.common.constant.Constants; import com.cpop.common.utils.StringUtils; import com.cpop.common.utils.bean.BeanUtils; -import com.cpop.common.utils.http.HttpUtils; -import com.cpop.core.base.R; import com.cpop.core.base.entity.LoginUser; import com.cpop.core.base.entity.PageDomain; import com.cpop.core.base.entity.loginInfo.OamStaffLoginInfo; @@ -28,6 +26,8 @@ import com.cpop.oam.business.vo.StaffInfoVo; import com.cpop.oam.business.vo.StaffPageVo; import com.cpop.oam.business.vo.StaffVo; import com.cpop.oam.business.vo.SysOperationLogVo; +import com.cpop.oam.framework.constant.OamConfigKey; +import com.cpop.oam.framework.enums.OamConfigEnum; import com.mybatisflex.core.paginate.Page; import com.mybatisflex.core.query.QueryWrapper; import com.mybatisflex.core.row.Db; @@ -35,18 +35,16 @@ import com.mybatisflex.core.row.DbChain; import com.mybatisflex.core.row.Row; import com.mybatisflex.spring.service.impl.ServiceImpl; import lombok.extern.slf4j.Slf4j; -import me.chanjar.weixin.cp.api.WxCpService; -import me.chanjar.weixin.cp.bean.message.WxCpXmlMessage; -import okhttp3.*; import org.springframework.security.crypto.bcrypt.BCrypt; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.client.RestTemplate; -import java.io.IOException; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; import static com.cpop.core.base.table.table.SysOperationLogTableDef.SYS_OPERATION_LOG; import static com.cpop.core.base.table.table.SysUserTableDef.SYS_USER; @@ -374,13 +372,16 @@ public class StaffServiceImpl extends ServiceImpl implements */ @Override public List getTechnologyStaffList() { + //不查询测试员工 + String testStaffPhone = SpringUtils.getBean(RedisService.class).getCacheObject(OamConfigKey.OAM_CONFIG_KEY + OamConfigEnum.TEST_STAFF_PHONE.getKey()); return this.listAs(QueryWrapper.create() .select(STAFF.ID, STAFF.NAME, STAFF.USER_ID, STAFF.STAFF_TYPE) .from(STAFF) .leftJoin(SYS_USER).on(SYS_USER.ID.eq(STAFF.USER_ID)) .where(STAFF.STAFF_TYPE.eq(0)) //不查询停用的员工 - .and(SYS_USER.STATUS.eq(true)), + .and(SYS_USER.STATUS.eq(true)) + .and(SYS_USER.PHONE_NUMBER.notIn(Arrays.asList(testStaffPhone.split(",")))), StaffVo.class); } diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/TaskServiceImpl.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/TaskServiceImpl.java index c9ea44a..cdd26f2 100644 --- a/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/TaskServiceImpl.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/TaskServiceImpl.java @@ -1,12 +1,6 @@ package com.cpop.oam.business.service.impl; import com.alibaba.fastjson.JSONObject; -import com.cpop.oam.business.service.*; -import com.cpop.oam.business.vo.*; -import com.cpop.oam.framework.constant.OamConfigKey; -import com.mybatisflex.core.paginate.Page; -import com.mybatisflex.core.query.QueryWrapper; -import com.mybatisflex.spring.service.impl.ServiceImpl; import com.cpop.api.tencent.wxWork.handler.WebHookSendHandler; import com.cpop.common.constant.Constants; import com.cpop.common.utils.DateUtils; @@ -25,9 +19,19 @@ import com.cpop.oam.business.entity.Staff; import com.cpop.oam.business.entity.Task; import com.cpop.oam.business.entity.TaskStaffGroup; import com.cpop.oam.business.mapper.TaskMapper; +import com.cpop.oam.business.service.StaffService; +import com.cpop.oam.business.service.TaskService; +import com.cpop.oam.business.service.TaskStaffGroupService; +import com.cpop.oam.business.service.TaskWorkOrderService; +import com.cpop.oam.business.vo.*; +import com.cpop.oam.framework.constant.OamConfigKey; import com.cpop.oam.framework.constant.WebHookKeyConstant; import com.cpop.oam.framework.enums.OamConfigEnum; +import com.mybatisflex.core.paginate.Page; +import com.mybatisflex.core.query.QueryWrapper; +import com.mybatisflex.spring.service.impl.ServiceImpl; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import java.io.IOException; import java.time.LocalDate; @@ -41,17 +45,11 @@ import java.util.concurrent.atomic.AtomicReference; import java.util.stream.Collectors; import static com.cpop.core.base.table.table.SysUserTableDef.SYS_USER; -import static com.cpop.oam.business.entity.table.DutyTableDef.DUTY; import static com.cpop.oam.business.entity.table.StaffTableDef.STAFF; -import static com.cpop.oam.business.entity.table.TaskDemandTableDef.TASK_DEMAND; import static com.cpop.oam.business.entity.table.TaskStaffGroupTableDef.TASK_STAFF_GROUP; import static com.cpop.oam.business.entity.table.TaskTableDef.TASK; import static com.mybatisflex.core.query.QueryMethods.*; -import org.springframework.transaction.annotation.Transactional; - -import javax.swing.*; - /** * OAM-任务表 服务层实现。 * @@ -339,21 +337,9 @@ public class TaskServiceImpl extends ServiceImpl implements Ta if (StringUtils.isBlank(testStaffPhones)) { throw new ServiceException("测试员工手机号未配置,请联系相关人员配置"); } - boolean thisStaffIsTest = Arrays.asList(testStaffPhones.split(",")).contains(loginUserInfo.getString("phoneNumber")); - QueryWrapper queryWrapper = QueryWrapper.create(); - //是否是测试员工 - if (thisStaffIsTest) { - //进行中与已完成的任务 - queryWrapper.and(TASK.TASK_STATUS.in(3, 6)); - } else { - //进行中与已完成的任务 - queryWrapper.and(TASK.TASK_STATUS.in(2, 3)) - //对比当前员工是否是测试管理员 - .and(TASK_STAFF_GROUP.STAFF_ID.eq(loginUserInfo.getString("id"))); - } return this.mapper.paginateAs(pageDomain.getPageNum(), pageDomain.getPageSize(), - queryWrapper + QueryWrapper.create() .select(TASK.ID, TASK.TASK_STATUS, TASK.TASK_CONTENT, TASK.TASK_ITEM, TASK.TASK_RATING, TASK.TASK_RECEIPT_TIME, TASK.EXPECTED_COMPLETION_DATE, TASK.TASK_PROGRESS, TASK.SUBJECT) .select(STAFF.NAME.as(PersonTaskPageVo::getResponsibleStaffName)) //个人绩点 @@ -366,6 +352,9 @@ public class TaskServiceImpl extends ServiceImpl implements Ta .leftJoin(STAFF) .on(STAFF.ID.eq(TASK_STAFF_GROUP.STAFF_ID)) .where(TASK.TASK_TYPE.in(0, 1)) + //对比当前员工是否是测试管理员 + .and(TASK.TASK_STATUS.in(2, 3)) + .and(TASK_STAFF_GROUP.STAFF_ID.eq(loginUserInfo.getString("id"))) .orderBy(TASK.EXPECTED_COMPLETION_DATE.asc()), PersonTaskPageVo.class); } diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/TaskWorkOrderServiceImpl.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/TaskWorkOrderServiceImpl.java index 427f177..6020553 100644 --- a/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/TaskWorkOrderServiceImpl.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/TaskWorkOrderServiceImpl.java @@ -1,37 +1,35 @@ package com.cpop.oam.business.service.impl; import com.alibaba.fastjson.JSONObject; -import com.cpop.common.utils.StringUtils; -import com.cpop.core.base.entity.PageDomain; -import com.cpop.oam.business.bo.TaskDemandBo; -import com.cpop.oam.business.dto.TaskWorkOrderReceiveDealPauseDto; -import com.cpop.oam.business.vo.TaskWorkOrderPersonVo; -import com.cpop.oam.business.vo.TaskWorkOrderReceiveDealPauseVo; -import com.cpop.oam.business.vo.WorkOrderDutyVo; -import com.cpop.oam.framework.enums.OamConfigEnum; -import com.cpop.oam.framework.tasks.WorkOrderAcceptOverTimeTask; -import com.mybatisflex.core.paginate.Page; -import com.mybatisflex.core.query.QueryWrapper; -import com.mybatisflex.spring.service.impl.ServiceImpl; import com.cpop.api.tencent.wxWork.handler.WebHookSendHandler; import com.cpop.common.utils.DateUtils; +import com.cpop.common.utils.StringUtils; import com.cpop.common.utils.bean.BeanUtils; +import com.cpop.core.base.entity.PageDomain; import com.cpop.core.base.exception.ServiceException; +import com.cpop.core.service.RedisService; import com.cpop.core.utils.QuartzUtils; import com.cpop.core.utils.SecurityUtils; import com.cpop.core.utils.SpringUtils; +import com.cpop.core.utils.sql.SqlUtils; import com.cpop.oam.business.bo.PauseWorkOrderBo; +import com.cpop.oam.business.bo.TaskDemandBo; import com.cpop.oam.business.bo.TaskWorkOrderBo; import com.cpop.oam.business.bo.TaskWorkOrderRecordBo; +import com.cpop.oam.business.dto.TaskWorkOrderReceiveDealPauseDto; import com.cpop.oam.business.entity.*; import com.cpop.oam.business.mapper.TaskWorkOrderMapper; import com.cpop.oam.business.service.*; -import com.cpop.oam.business.vo.StaffInfoVo; -import com.cpop.oam.business.vo.TaskWorkOrderPageVo; -import com.cpop.oam.business.vo.TaskWorkOrderRecordListVo; +import com.cpop.oam.business.vo.*; import com.cpop.oam.framework.constant.WebHookKeyConstant; +import com.cpop.oam.framework.enums.OamConfigEnum; import com.cpop.oam.framework.enums.QuartzEnums; +import com.cpop.oam.framework.tasks.WorkOrderAcceptOverTimeTask; import com.cpop.oam.framework.tasks.WorkOrderOvertimeTask; +import com.cpop.oam.framework.tasks.WorkOrderPauseRecoverTask; +import com.mybatisflex.core.paginate.Page; +import com.mybatisflex.core.query.QueryWrapper; +import com.mybatisflex.spring.service.impl.ServiceImpl; import lombok.extern.slf4j.Slf4j; import org.quartz.*; import org.springframework.beans.factory.annotation.Autowired; @@ -57,9 +55,6 @@ import static com.cpop.oam.business.entity.table.TaskWorkOrderTableDef.TASK_WORK import static com.cpop.system.business.entity.table.BrandTableDef.BRAND; import static com.cpop.system.business.entity.table.StoreTableDef.STORE; -import com.cpop.core.utils.sql.SqlUtils; -import com.cpop.core.service.RedisService; - /** * 任务-工单表 服务层实现。 * @@ -538,6 +533,7 @@ public class TaskWorkOrderServiceImpl extends ServiceImpl + + + + org.springframework.boot + spring-boot-maven-plugin + + true + + + + diff --git a/Cpop-Pay/src/main/java/com/cpop/pay/framewok/handler/wxPay/WxPayHandler.java b/Cpop-Pay/src/main/java/com/cpop/pay/framewok/handler/wxPay/WxPayHandler.java index 59da159..9897268 100644 --- a/Cpop-Pay/src/main/java/com/cpop/pay/framewok/handler/wxPay/WxPayHandler.java +++ b/Cpop-Pay/src/main/java/com/cpop/pay/framewok/handler/wxPay/WxPayHandler.java @@ -82,7 +82,7 @@ public class WxPayHandler { * @param notifyUrl 通知地址 * @return com.github.binarywang.wxpay.service.WxPayService */ - public WxPayService getWxPayService(String subAppId, String subMchId,String notifyUrl) { + public WxPayService getWxPayService(String subAppId, String subMchId, String notifyUrl) { WxPayConfig payConfig = wxPayService.getConfig(); //子商户信息 payConfig.setSubAppId(StringUtils.trimToNull(subAppId)); @@ -93,4 +93,28 @@ public class WxPayHandler { wxPayService.setConfig(payConfig); return wxPayService; } + + /** + * 获取子商户 + * @author DB + * @since 2023/12/21 + * @param brandId 品牌id + * @param storeId 校区id + * @return String + */ + public String getSubMchId(String brandId, String storeId) { + //先查校区 + Row store = Db.selectOneByQuery("cp_sys_store", QueryWrapper.create().where("id = ?", storeId)); + String wxMchId = store.getString("wxMchId"); + if (StringUtils.isBlank(wxMchId)){ + //查询品牌 + Row brand = Db.selectOneByQuery("cp_sys_brand", QueryWrapper.create().where("id = ?", brandId)); + wxMchId = brand.getString("wxMchId"); + if (StringUtils.isBlank(wxMchId)){ + //果酱默认商户 + wxMchId = "1618925571"; + } + } + return wxMchId; + } } diff --git a/Cpop-Pay/src/main/java/com/cpop/pay/framewok/task/WxPayAsyncTask.java b/Cpop-Pay/src/main/java/com/cpop/pay/framewok/task/WxPayAsyncTask.java index 7b9c33e..7f08f11 100644 --- a/Cpop-Pay/src/main/java/com/cpop/pay/framewok/task/WxPayAsyncTask.java +++ b/Cpop-Pay/src/main/java/com/cpop/pay/framewok/task/WxPayAsyncTask.java @@ -49,7 +49,7 @@ public class WxPayAsyncTask { ProfitSharingRequest profitSharingRequest = buildProfitSharingRequest(orderId, notifyResult, orderSource); try { Thread.sleep(5000); - wxPayProfitSharing(profitSharingRequest, wxPayService, 0,orderSource); + wxPayProfitSharing(profitSharingRequest, wxPayService, 0, orderSource); } catch (InterruptedException e) { throw new ServiceException(e.getMessage()); } diff --git a/Cpop-System/src/main/java/com/cpop/system/business/entity/Menu.java b/Cpop-System/src/main/java/com/cpop/system/business/entity/Menu.java index 69cb3f5..8189150 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/entity/Menu.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/entity/Menu.java @@ -3,16 +3,13 @@ package com.cpop.system.business.entity; import com.cpop.core.base.entity.BaseEntity; import com.cpop.core.base.entity.BaseInsertListener; import com.cpop.core.base.entity.BaseUpdateListener; -import com.cpop.core.base.enums.UserType; import com.mybatisflex.annotation.Id; import com.mybatisflex.annotation.Table; -import java.io.Serializable; -import java.time.LocalDateTime; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import lombok.*; import lombok.experimental.Accessors; +import java.io.Serializable; + /** * 系统菜单表 实体类。 * @@ -94,6 +91,11 @@ public class Menu extends BaseEntity implements Serializable { */ private Boolean hideMenu; + /** + * 是否忽略KeepAlive缓存 + */ + private Boolean ignoreKeepAlive; + /** * 菜单模块 */ diff --git a/Cpop-System/src/main/java/com/cpop/system/business/entity/Store.java b/Cpop-System/src/main/java/com/cpop/system/business/entity/Store.java index 2c2b519..e62baf5 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/entity/Store.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/entity/Store.java @@ -3,17 +3,14 @@ package com.cpop.system.business.entity; import com.cpop.core.base.entity.BaseEntity; import com.cpop.core.base.entity.BaseInsertListener; import com.cpop.core.base.entity.BaseUpdateListener; -import com.cpop.core.base.enums.SourceType; import com.mybatisflex.annotation.Column; import com.mybatisflex.annotation.Id; import com.mybatisflex.annotation.Table; -import java.io.Serializable; -import java.time.LocalDateTime; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import lombok.*; import lombok.experimental.Accessors; +import java.io.Serializable; + /** * 系统-店铺/校区表 实体类。 * @@ -80,6 +77,11 @@ public class Store extends BaseEntity implements Serializable { */ private Boolean isTest; + /** + * 微信商户id + */ + private String wxMchId; + /** * 逻辑删除(0否1是) */ diff --git a/Cpop-System/src/main/java/com/cpop/system/business/service/impl/MenuServiceImpl.java b/Cpop-System/src/main/java/com/cpop/system/business/service/impl/MenuServiceImpl.java index ef6eff2..5eedc10 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/service/impl/MenuServiceImpl.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/service/impl/MenuServiceImpl.java @@ -243,6 +243,7 @@ public class MenuServiceImpl extends ServiceImpl implements Me meta.setOrderNo(item.getOrderNo()); meta.setTitle(item.getTitle()); meta.setHideMenu(item.getHideMenu()); + meta.setIgnoreKeepAlive(item.getIgnoreKeepAlive()); item.setMeta(meta); }); //构建根节点 diff --git a/Cpop-System/src/main/java/com/cpop/system/business/vo/MenuRouteVo.java b/Cpop-System/src/main/java/com/cpop/system/business/vo/MenuRouteVo.java index 00dd51c..1d3cfa6 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/vo/MenuRouteVo.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/vo/MenuRouteVo.java @@ -107,6 +107,12 @@ public class MenuRouteVo implements Serializable { @ApiModelProperty("隐藏菜单") private Boolean hideMenu; + /** + * 是否忽略KeepAlive缓存 + */ + @ApiModelProperty("是否忽略KeepAlive缓存") + private Boolean ignoreKeepAlive; + /** * 内部定义类 */ @@ -141,5 +147,10 @@ public class MenuRouteVo implements Serializable { * 隐藏子类菜单 */ private Boolean hideChildrenInMenu; + + /** + * 是否忽略KeepAlive缓存 + */ + private Boolean ignoreKeepAlive; } }