diff --git a/Cpop-Core/src/main/resources/mapper/CoreMapper.xml b/Cpop-Core/src/main/resources/mapper/CoreMapper.xml
index 9ab2674..474be7d 100644
--- a/Cpop-Core/src/main/resources/mapper/CoreMapper.xml
+++ b/Cpop-Core/src/main/resources/mapper/CoreMapper.xml
@@ -135,7 +135,7 @@
config_name = #{configName},
- config_value = #{config_value},
+ config_value = #{configValue},
config_type = #{configType},
diff --git a/Cpop-Mall/Cpop-Mall-Web/src/test/java/com/cpop/mall/web/CpopWxPayTests.java b/Cpop-Mall/Cpop-Mall-Web/src/test/java/com/cpop/mall/web/CpopWxPayTests.java
index 8e3bcf7..fc09845 100644
--- a/Cpop-Mall/Cpop-Mall-Web/src/test/java/com/cpop/mall/web/CpopWxPayTests.java
+++ b/Cpop-Mall/Cpop-Mall-Web/src/test/java/com/cpop/mall/web/CpopWxPayTests.java
@@ -176,8 +176,13 @@ public class CpopWxPayTests {
wxPayService.getProfitSharingService().profitSharingFinish(profitSharingFinishRequest);
}
+ /**
+ * 获取微信支付分用户签约计划
+ * @author DB
+ * @since 2023/12/15
+ */
@Test
- public void getPayPointsUserPlan() throws WxPayException {
+ public void getPayScoreUserSignPlans() throws WxPayException {
wxPayService.getConfig().setServiceId("00003053000000169450961228104460");
String v3 = wxPayService.getV3("https://api.mch.weixin.qq.com/v3/payscore/sign-plan/partner/user-sign-plans/merchant-sign-plan-no/1735294783081091132?sub_mchid=1618925571");
System.out.println(v3);
diff --git a/Cpop-Oam/Cpop-Oam-Web/src/main/resources/application-test.yml b/Cpop-Oam/Cpop-Oam-Web/src/main/resources/application-test.yml
index 8159444..b122111 100644
--- a/Cpop-Oam/Cpop-Oam-Web/src/main/resources/application-test.yml
+++ b/Cpop-Oam/Cpop-Oam-Web/src/main/resources/application-test.yml
@@ -12,6 +12,10 @@ cpop:
publicKeyFile: /root/jambox-union/jambox-oam/script/secretKey/publicKey
# 公钥文件
privateKeyFile: /root/jambox-union/jambox-oam/script/secretKey/privateKey
+ # 公钥文件
+ #publicKeyFile: E:\Cpop\Cpop-Union\Cpop-Core\src\main\resources\static\keyPair\publicKey
+ # 公钥文件
+ #privateKeyFile: E:\Cpop\Cpop-Union\Cpop-Core\src\main\resources\static\keyPair\privateKey
# DataSource Config
spring:
@@ -99,3 +103,9 @@ wx:
privateKeyPath: /root/cpop-union/cpop-oam/script/secretKey/wxPay_key.pem
# 私钥文件
privateCertPath: /root/cpop-union/cpop-oam/script/secretKey/wxPay_cert.pem
+ # p12证书的位置,可以指定绝对路径,也可以指定类路径(以classpath:开头)
+ #keyPath: E:/Cpop/Cpop-Union/Cpop-Core/src/main/resources/static/keyPair/wxPay_cert.p12
+ # 私钥证书
+ #privateKeyPath: E:/Cpop/Cpop-Union/Cpop-Core/src/main/resources/static/keyPair/wxPay_key.pem
+ # 私钥文件
+ #privateCertPath: E:/Cpop/Cpop-Union/Cpop-Core/src/main/resources/static/keyPair/wxPay_cert.pem
\ No newline at end of file
diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/bo/SysConfigInfoBo.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/bo/SysConfigInfoBo.java
index a07fdc8..7d45ec3 100644
--- a/Cpop-Oam/src/main/java/com/cpop/oam/business/bo/SysConfigInfoBo.java
+++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/bo/SysConfigInfoBo.java
@@ -35,16 +35,10 @@ public class SysConfigInfoBo implements Serializable {
private String cancelAfterVerificationStaffPhone;
/**
- * 需求转任务主体品牌
+ * 测试员工手机号
*/
- @NotBlank(message = "需求转任务主体品牌不能为空")
- @ApiModelProperty(value = "需求转任务主体品牌", required = true)
- private String oamDemandToTaskBrand;
+ @NotBlank(message = "测试员工手机号不能为空")
+ @ApiModelProperty(value = "测试员工手机号", required = true)
+ private String testStaffPhone;
- /**
- * 需求转任务主体校区
- */
- @NotBlank(message = "需求转任务主体校区不能为空")
- @ApiModelProperty(value = "需求转任务主体校区", required = true)
- private String oamDemandToTaskStore;
}
diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/OamMallController.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/OamMallController.java
index 13315ed..cbd9a81 100644
--- a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/OamMallController.java
+++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/OamMallController.java
@@ -28,7 +28,6 @@ import java.util.List;
@Api(tags = "商城管理模块")
@RequestMapping("/oamMall")
public class OamMallController {
-
@Autowired
private OamMallService oamMallService;
diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/BrandManagerServiceImpl.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/BrandManagerServiceImpl.java
index f57d726..2369152 100644
--- a/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/BrandManagerServiceImpl.java
+++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/BrandManagerServiceImpl.java
@@ -115,6 +115,13 @@ public class BrandManagerServiceImpl extends ServiceImpl 0) {
+ throw new ServiceException("当前管理员已存在");
+ }
//获取云品牌id
BrandExtend brandExtend = SpringUtils.getBean(BrandExtendService.class).queryChain().where(BrandExtendTableDef.BRAND_EXTEND.BRAND_ID.eq(bo.getBrandId())).one();
//获取用户信息
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 8538115..a0e19a6 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
@@ -24,9 +24,14 @@ import com.cpop.oam.business.vo.FinanceReimburseAuditPageVo;
import com.cpop.oam.business.vo.FinanceReimbursePageVo;
import com.cpop.oam.business.vo.ReimbursePersonStatisticVo;
import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
+import java.time.LocalDateTime;
+import java.util.ArrayList;
import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
import static com.cpop.core.base.table.table.SysUserTableDef.SYS_USER;
import static com.cpop.oam.business.entity.table.FinanceReimburseStageTableDef.FINANCE_REIMBURSE_STAGE;
@@ -107,15 +112,40 @@ public class FinanceReimburseServiceImpl extends ServiceImpl list = this.list(QueryWrapper.create().where(FINANCE_REIMBURSE.ID.in(bo.getIds())));
+ List allFinishReimburseIds = new ArrayList<>();
if (!list.isEmpty()){
list.forEach(item->{
- if (item.getStatus() > 1){
+ if (item.getStatus() > 2){
throw new ServiceException("状态超标");
}
item.setStatus(item.getStatus() + 1);
+ if (list.size() > 1) {
+ //审批转下款,全下
+ if (item.getStatus() == 1){
+ allFinishReimburseIds.add(item.getId());
+ }
+ }
});
+ //存在全下的报销
+ if (!allFinishReimburseIds.isEmpty()) {
+ Map idToPrice = list.stream().collect(Collectors.toMap(FinanceReimburse::getId, item->item));
+ List financeReimburseStages = new ArrayList<>();
+ allFinishReimburseIds.forEach(item -> {
+ FinanceReimburseStage entity = new FinanceReimburseStage();
+ BeanUtils.copyBeanProp(entity, bo);
+ FinanceReimburse financeReimburse = idToPrice.get(item);
+ entity.setFinanceReimburseId(item)
+ .setPaymentTime(LocalDateTime.now())
+ .setStageAmount(financeReimburse.getPrice());
+ financeReimburseStages.add(entity);
+ //修改状态
+ financeReimburse.setStatus(3);
+ });
+ SpringUtils.getBean(FinanceReimburseStageService.class).saveBatch(financeReimburseStages);
+ }
this.updateBatch(list);
}
}
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 56f4a94..f2ca7c8 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
@@ -3,6 +3,7 @@ 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;
@@ -312,9 +313,26 @@ public class TaskServiceImpl extends ServiceImpl implements Ta
@Override
public Page getPersonTaskPage() {
PageDomain pageDomain = SqlUtils.getInstance().getPageDomain();
+ JSONObject loginUserInfo = SecurityUtils.getInstance().getLoginUserInfo();
+ String testStaffPhones = SpringUtils.getBean(RedisService.class).getCacheObject(OamConfigKey.OAM_CONFIG_KEY + OamConfigEnum.TEST_STAFF_PHONE.getKey());
+ 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, 4, 6))
+ //对比当前员工是否是测试管理员
+ .and(TASK_STAFF_GROUP.STAFF_ID.eq(loginUserInfo.getString("id")));
+ }
return this.mapper.paginateAs(pageDomain.getPageNum(),
pageDomain.getPageSize(),
- QueryWrapper.create()
+ queryWrapper
.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))
//个人绩点
@@ -327,9 +345,6 @@ 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, 4, 6))
- .and(TASK_STAFF_GROUP.STAFF_ID.eq(SecurityUtils.getInstance().getLoginUserInfo().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 5633565..9e8e83c 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
@@ -513,6 +513,8 @@ public class TaskWorkOrderServiceImpl extends ServiceImpl staffIds = new HashSet<>();
staffIds.add(task.getResponsibleStaffId());
staffIds.add(task.getRecordStaffId());
- Map staffMap =
- staffService
- .listAs(
- QueryWrapper.create()
- .select(STAFF.ID, STAFF.NAME)
- .select(SYS_USER.PHONE_NUMBER.as(StaffInfoVo::getPhoneNumber))
- .from(STAFF)
- .leftJoin(SYS_USER)
- .on(SYS_USER.ID.eq(STAFF.ID))
- .where(STAFF.ID.in(staffIds)),
- StaffInfoVo.class)
- .stream()
- .collect(Collectors.toMap(StaffInfoVo::getId, item -> item));
+ Map staffMap = staffService.listAs(QueryWrapper.create()
+ .select(STAFF.ID, STAFF.NAME)
+ .select(SYS_USER.PHONE_NUMBER.as(StaffInfoVo::getPhoneNumber))
+ .from(STAFF)
+ .leftJoin(SYS_USER)
+ .on(SYS_USER.ID.eq(STAFF.ID))
+ .where(STAFF.ID.in(staffIds)),
+ StaffInfoVo.class)
+ .stream().collect(Collectors.toMap(StaffInfoVo::getId, item -> item));
List phoneList = new ArrayList<>();
phoneList.add(staffMap.get(task.getResponsibleStaffId()).getPhoneNumber());
// 记录人手机号
@@ -618,7 +616,9 @@ public class TaskWorkOrderServiceImpl extends ServiceImpl implements
.select("cp_j_store_extend.store_cloud_id as storeCloudId")
.leftJoin(STORE_SIGN).on(STORE_SIGN.STORE_ID.eq(STORE.ID))
.leftJoin(BRAND).on(BRAND.ID.eq(STORE.BRAND_ID))
- .leftJoin("cp_j_store_extend").on("`cp_j_store_extend`.`store_id` = `cp_sys_store`.`id`"),
+ .leftJoin("cp_j_store_extend").on("`cp_j_store_extend`.`store_id` = `cp_sys_store`.`id`")
+ .and(STORE.STORE_NAME.like(bo.getName())),
StorePageVo.class);
}
}