修改报销;修改工单需求;调整任务部署

This commit is contained in:
DB 2023-12-22 17:56:44 +08:00
parent a4788fc73e
commit 74ae661c07
32 changed files with 89 additions and 222 deletions

View File

@ -35,16 +35,4 @@ public class EasyLearnCallBackController {
return WxPayNotifyResponse.success("成功");
}
/**
* 微信支付分账通知
* @author DB
* @since 2023/10/27 16:04
* @param xmlData 数据
* @return java.lang.String
*/
@PostMapping("/notify/profitSharing")
public String parseProfitSharingNotifyResult(@RequestBody String xmlData){
easyLearnOrderService.parseProfitSharingNotifyResult(xmlData);
return WxPayNotifyResponse.success("成功");
}
}

View File

@ -44,14 +44,6 @@ public interface EasyLearnOrderService extends IService<EasyLearnOrder> {
*/
void wxPayNotifyOrder(String xmlData);
/**
* 微信支付分账通知
* @author DB
* @since 2023/12/21
* @param xmlData 数据
*/
void parseProfitSharingNotifyResult(String xmlData);
/**
* 一次性支付下单
* @author DB

View File

@ -25,9 +25,9 @@ import com.cpop.jambox.business.vo.EasyLearnPageVo;
import com.cpop.jambox.framework.constant.JamboxRedisConstant;
import com.cpop.pay.framewok.handler.wxPay.WxPayHandler;
import com.cpop.pay.framewok.task.WxPayAsyncTask;
import com.cpop.system.business.service.ProfitSharingService;
import com.github.binarywang.wxpay.bean.notify.WxPayOrderNotifyResult;
import com.github.binarywang.wxpay.bean.request.WxPayUnifiedOrderRequest;
import com.github.binarywang.wxpay.config.WxPayConfig;
import com.github.binarywang.wxpay.exception.WxPayException;
import com.github.binarywang.wxpay.service.WxPayService;
import com.mybatisflex.core.FlexGlobalConfig;
@ -51,7 +51,6 @@ import java.util.concurrent.locks.Lock;
import static com.cpop.jambox.business.entity.table.BrandExtendTableDef.BRAND_EXTEND;
import static com.cpop.jambox.business.entity.table.EasyLearnOrderTableDef.EASY_LEARN_ORDER;
import static com.cpop.jambox.business.entity.table.StoreExtendTableDef.STORE_EXTEND;
import static com.cpop.system.business.entity.table.ProfitSharingTableDef.PROFIT_SHARING;
/**
* 果酱-放心学订单表 服务层实现
@ -358,7 +357,7 @@ public class EasyLearnOrderServiceImpl extends ServiceImpl<EasyLearnOrderMapper,
try {
WxPayService wxPayService = wxPayHandler.getWxPayService();
WxPayOrderNotifyResult notifyResult = wxPayService.parseOrderNotifyResult(xmlData);
if(!StringUtils.equals(notifyResult.getResultCode(),"SUCCESS")){
if (!StringUtils.equals(notifyResult.getResultCode(), "SUCCESS")) {
throw new ServiceException(notifyResult.getReturnMsg());
}
String orderId = notifyResult.getOutTradeNo();
@ -367,7 +366,8 @@ public class EasyLearnOrderServiceImpl extends ServiceImpl<EasyLearnOrderMapper,
//获取订单信息
EasyLearnOrder easyLearnOrder = this.getById(orderId);
//设置子商户
wxPayService.getConfig().setSubMchId(wxPayHandler.getSubMchId(easyLearnOrder.getBrandId(), easyLearnOrder.getStoreId()));
WxPayConfig config = wxPayService.getConfig();
config.setSubMchId(wxPayHandler.getSubMchId(easyLearnOrder.getBrandId(), easyLearnOrder.getStoreId()));
wxPayAsyncTask.asyncWxPayProfitSharing(orderId, notifyResult, wxPayService, OrderSource.EASY_LEARN);
}
//更新订单
@ -379,30 +379,6 @@ public class EasyLearnOrderServiceImpl extends ServiceImpl<EasyLearnOrderMapper,
}
}
/**
* 微信支付分账通知
* @author DB
* @since 2023/12/21
* @param xmlData 数据
*/
@Override
public void parseProfitSharingNotifyResult(String xmlData) {
WxPayService wxPayService = wxPayHandler.getWxPayService();
try {
WxPayOrderNotifyResult notifyResult = wxPayService.parseOrderNotifyResult(xmlData);
//更新分账订单
SpringUtils.getBean(ProfitSharingService.class).updateChain().set(PROFIT_SHARING.OUT_PROFIT_SHARING_ID, notifyResult.getTransactionId())
.set(PROFIT_SHARING.AMOUNT, notifyResult.getTotalFee())
.set(PROFIT_SHARING.PROFIT_SHARING_STATUS, 1)
//当前分账账户
.set(PROFIT_SHARING.PAY_ACCOUNT, wxPayService.getConfig().getSubMchId())
.where(PROFIT_SHARING.ID.eq(notifyResult.getOutTradeNo()))
.update();
} catch (WxPayException e) {
throw new ServiceException(e.getMessage());
}
}
/**
* 一次性支付下单
* @author DB

View File

@ -2,5 +2,3 @@ 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

View File

@ -125,5 +125,3 @@ wx:
notifyUrl: https://frp-oak.top:11899/Cpop-Mall/wxPay/callback/notify/order
#退款通知地址
notifyRefund: https://frp-oak.top:11899/Cpop-Mall/wxPay/callback/notify/refund
#分账通知地址
notifySharing: https://frp-oak.top:11899/Cpop-Mall/wxPay/callback/notify/profitSharing

View File

@ -89,5 +89,3 @@ wx:
notifyUrl: https://api.jamboxsys.com/Cpop-Mall/wxPay/callback/notify/order
#退款通知地址
notifyRefund: https://api.jamboxsys.com/Cpop-Mall/wxPay/callback/notify/refund
#分账通知地址
notifySharing: https://api.jamboxsys.com/Cpop-Mall/wxPay/callback/notify/profitSharing

View File

@ -119,5 +119,3 @@ wx:
notifyUrl: https://test.cpopsz.com/onlineShop/wxPay/callback/notify/order
#退款通知地址
notifyRefund: https://test.cpopsz.com/onlineShop/wxPay/callback/notify/refund
#分账通知地址
notifySharing: https://test.cpopsz.com/onlineShop/wxPay/callback/notify/profitSharing

View File

@ -1,17 +1,13 @@
package com.cpop.mall.business.bo;
import com.cpop.core.annontation.StringArrayConvert;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
/**
* @author DB

View File

@ -50,17 +50,4 @@ public class WxPayCallbackController {
return WxPayNotifyResponse.success("成功");
}
/**
* @descriptions 微信支付分账通知
* @author DB
* @date 2023/10/27 16:04
* @param xmlData 数据
* @return: java.lang.String
*/
@PostMapping("/notify/profitSharing")
public String parseProfitSharingNotifyResult(@RequestBody String xmlData){
orderService.parseProfitSharingNotifyResult(xmlData);
return WxPayNotifyResponse.success("成功");
}
}

View File

@ -62,15 +62,6 @@ public interface OrderService extends IService<Order> {
*/
void wxPayNotifyOrder(String xmlData);
/**
* @descriptions 分账结果通知
* @author DB
* @date 2023/11/03 9:50
* @param xmlData 加密数据
* @return: void
*/
void parseProfitSharingNotifyResult(String xmlData);
/**
* @descriptions 取消订单
* @author DB

View File

@ -538,31 +538,6 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
}
}
/**
* @descriptions 分账结果通知
* @author DB
* @date 2023/11/03 9:50
* @param xmlData 加密数据
* @return: void
*/
@Override
public void parseProfitSharingNotifyResult(String xmlData) {
WxPayService wxPayService = wxPayHandler.getWxPayService();
try {
WxPayOrderNotifyResult notifyResult = wxPayService.parseOrderNotifyResult(xmlData);
//更新分账订单
SpringUtils.getBean(ProfitSharingService.class).updateChain().set(PROFIT_SHARING.OUT_PROFIT_SHARING_ID, notifyResult.getTransactionId())
.set(PROFIT_SHARING.AMOUNT, notifyResult.getTotalFee())
.set(PROFIT_SHARING.PROFIT_SHARING_STATUS, 1)
//当前分账账户
.set(PROFIT_SHARING.PAY_ACCOUNT, wxPayService.getConfig().getSubMchId())
.where(PROFIT_SHARING.ID.eq(notifyResult.getOutTradeNo()))
.update();
} catch (WxPayException e) {
throw new ServiceException(e.getMessage());
}
}
/**
* @descriptions 取消订单
* @author DB
@ -634,7 +609,6 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
WxPayUnifiedOrderRequest orderRequest = new WxPayUnifiedOrderRequest();
//查询是否是服务商系品牌
String brandId = loginUserInfo.getString("brandId");
Brand brand = SpringUtils.getBean(BrandService.class).getById(brandId);
//需要分账
if (order.getTotalAmount().scaleByPowerOfTen(2).intValue() >= 10) {
//需要分账

View File

@ -44,7 +44,6 @@ public class DataImportBo {
* 导入文件地址
*/
@NotBlank(message = "不能为空")
@StringArrayConvert
@ApiModelProperty(value = "导入文件地址")
private String fileUrl;

View File

@ -1,7 +1,6 @@
package com.cpop.oam.business.bo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.cpop.core.annontation.StringArrayConvert;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ -55,7 +54,6 @@ public class ReimburseApplicationBo implements Serializable {
/**
* 附件
*/
@StringArrayConvert
@ApiModelProperty(value = "附件")
private String attachmentUrl;

View File

@ -50,7 +50,6 @@ public class TaskDemandBo {
/**
* 附件地址
*/
@StringArrayConvert
@ApiModelProperty("附件地址")
private String attachmentUrl;

View File

@ -38,7 +38,6 @@ public class TaskItemBo {
/**
* 测试转部署文件路径
*/
@StringArrayConvert
@ApiModelProperty(value = "测试转部署文件路径")
private String testToFinishUrl;
}

View File

@ -39,7 +39,6 @@ public class TaskIterationBo {
/**
* 附件地址
*/
@StringArrayConvert
@ApiModelProperty("附件地址")
private String attachmentUrl;
}

View File

@ -65,7 +65,6 @@ public class TaskWorkOrderBo {
/**
* 附件地址
*/
@StringArrayConvert
@ApiModelProperty("附件地址")
private String attachmentUrl;

View File

@ -36,7 +36,6 @@ public class TaskWorkOrderRecordBo {
/**
* 附件地址
*/
@StringArrayConvert
@ApiModelProperty(value = "附件地址", required = true)
private String attachmentUrl;

View File

@ -86,7 +86,7 @@ public class DataImportServiceImpl extends ServiceImpl<DataImportMapper, DataImp
@Override
public void insertDataImport(DataImportBo bo) {
DataImport dataImport = BeanUtils.mapToClass(bo, DataImport.class);
dataImport.setImportStatus(false).setSourceType(SourceType.JAMBOX.getName());
dataImport.setImportStatus(false).setSourceType(SourceType.JAMBOX.toString());
this.save(dataImport);
}

View File

@ -92,18 +92,8 @@ public class FinanceReimburseServiceImpl extends ServiceImpl<FinanceReimburseMap
@Override
public Page<FinanceReimburseAuditPageVo> 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.select(FINANCE_REIMBURSE.ALL_COLUMNS)
QueryWrapper.create().select(FINANCE_REIMBURSE.ALL_COLUMNS)
.select(STAFF.NAME.as(FinanceReimbursePageVo::getStaffName))
.select(FINANCE_REIMBURSE_TYPE.TYPE_NAME.as(FinanceReimbursePageVo::getTypeName))
.from(FINANCE_REIMBURSE)
@ -114,6 +104,7 @@ public class FinanceReimburseServiceImpl extends ServiceImpl<FinanceReimburseMap
.and(FINANCE_REIMBURSE.TYPE_ID.eq(bo.getTypeId()))
//理由
.and(FINANCE_REIMBURSE.REMARKS.like(bo.getQuery()).or(STAFF.NAME.like(bo.getQuery())))
.and(FINANCE_REIMBURSE.STATUS.eq(bo.getStatus()))
.orderBy(FINANCE_REIMBURSE.CREATE_TIME.asc()),
FinanceReimburseAuditPageVo.class);
}
@ -235,17 +226,17 @@ public class FinanceReimburseServiceImpl extends ServiceImpl<FinanceReimburseMap
financeReimburse.setStatus(2);
} else {
//下款中
financeReimburse.setStatus(3);
financeReimburse.setStatus(1);
}
} else {
//单次下发金额
if (price.compareTo(bo.getStageAmount()) < 0) {
throw new ServiceException("当前下发金额已超过申请金额!");
} else if (price.compareTo(bo.getStageAmount()) == 0) {
financeReimburse.setStatus(3);
financeReimburse.setStatus(2);
} else {
//下款中
financeReimburse.setStatus(2);
financeReimburse.setStatus(1);
}
}
FinanceReimburseStage entity = new FinanceReimburseStage();

View File

@ -28,16 +28,13 @@ import com.cpop.oam.business.vo.TaskDemandPageVo;
import com.cpop.oam.business.vo.TaskDemandUrgentVo;
import com.cpop.oam.framework.constant.WebHookKeyConstant;
import com.cpop.oam.framework.enums.OamConfigEnum;
import com.cpop.system.business.vo.SysFileVo;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.query.QueryWrapper;
import com.mybatisflex.spring.service.impl.ServiceImpl;
import com.qcloud.cos.model.UploadResult;
import me.chanjar.weixin.common.error.WxErrorException;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Base64;
@ -49,8 +46,6 @@ import static com.cpop.oam.business.entity.table.TaskDemandTableDef.TASK_DEMAND;
import static com.cpop.oam.business.entity.table.TaskTableDef.TASK;
import static com.cpop.system.business.entity.table.BrandTableDef.BRAND;
import static com.cpop.system.business.entity.table.StoreTableDef.STORE;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
/**
* OAM-任务-需求表 服务层实现
@ -118,6 +113,7 @@ public class TaskDemandServiceImpl extends ServiceImpl<TaskDemandMapper, TaskDem
TASK.TASK_RATING,
TASK.RESPONSIBLE_STAFF_ID,
TASK.TASK_RECEIPT_TIME,
TASK.REMARK,
TASK.COMPLETION_DATE,
TASK.TEST_TO_FINISH_URL)
.from(TASK_DEMAND)

View File

@ -80,7 +80,6 @@ public class FinanceReimburseAuditPageVo implements Serializable {
/**
* 附件
*/
@StringArrayConvert
@ApiModelProperty("附件")
private String attachmentUrl;

View File

@ -1,6 +1,5 @@
package com.cpop.oam.business.vo;
import com.cpop.core.annontation.StringArrayConvert;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ -80,7 +79,6 @@ public class FinanceReimbursePageVo implements Serializable {
/**
* 附件
*/
@StringArrayConvert
@ApiModelProperty("附件")
private String attachmentUrl;

View File

@ -1,6 +1,5 @@
package com.cpop.oam.business.vo;
import com.cpop.core.annontation.StringArrayConvert;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ -107,7 +106,6 @@ public class TaskArchivingPagVo {
/**
* 操作流程
*/
@StringArrayConvert
@ApiModelProperty("操作流程")
private String testToFinishUrl;
}

View File

@ -8,7 +8,6 @@ import lombok.experimental.Accessors;
import java.time.LocalDateTime;
import java.time.LocalDate;
import com.cpop.core.annontation.StringArrayConvert;
/**
* 需求分页对象
@ -60,7 +59,6 @@ public class TaskDemandPageVo {
/**
* 附件地址
*/
@StringArrayConvert
@ApiModelProperty("附件地址")
private String attachmentUrl;
@ -138,7 +136,11 @@ public class TaskDemandPageVo {
/**测试转部署文件 */
@ApiModelProperty("测试转部署文件")
@StringArrayConvert
private String testToFinishUrl;
/**
* 备注
*/
@ApiModelProperty("备注")
private String remark;
}

View File

@ -1,6 +1,5 @@
package com.cpop.oam.business.vo;
import com.cpop.core.annontation.StringArrayConvert;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ -33,7 +32,6 @@ public class TaskToBeClaimedPageVo {
/**附件地址 */
@ApiModelProperty(value = "附件地址")
@StringArrayConvert
private String attachmentUrl;
/**任务评级(0:A;1:B;2:C;3:D;4:E) */

View File

@ -8,7 +8,6 @@ import lombok.experimental.Accessors;
import java.time.LocalDateTime;
import com.cpop.core.annontation.StringArrayConvert;
/**
* 任务-工单记录-记录
@ -60,7 +59,6 @@ public class TaskWorkOrderRecordListVo {
/**
* 附件地址
*/
@StringArrayConvert
@ApiModelProperty("附件地址")
private String attachmentUrl;

View File

@ -71,8 +71,4 @@ public class WxPayProperties {
*/
private String sharingAccountName;
/**
* 分账通知
*/
private String notifySharing;
}

View File

@ -1,7 +1,5 @@
package com.cpop.system.business.bo;
import com.cpop.core.annontation.StringArrayConvert;
import com.mybatisflex.annotation.Id;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

View File

@ -106,4 +106,10 @@ public class MenuBo implements Serializable {
@ApiModelProperty("隐藏菜单")
private Boolean hideMenu;
/**
* 是否忽略KeepAlive缓存
*/
@ApiModelProperty("是否忽略KeepAlive缓存")
private Boolean ignoreKeepAlive;
}

View File

@ -88,7 +88,7 @@ public class StoreServiceImpl extends ServiceImpl<StoreMapper, Store> implements
BrandService brandService = SpringUtils.getBean(BrandService.class);
if (brandExtend.isEmpty()) {
brand = new Brand();
brand.setBrandName(brandInfo.getBrandName()).setSourceType(SourceType.JAMBOX.getName());
brand.setBrandName(brandInfo.getBrandName()).setSourceType(SourceType.JAMBOX.toString());
brandService.save(brand);
//保存拓展
RowKey brandKey = RowKey.SNOW_FLAKE_ID;
@ -105,7 +105,7 @@ public class StoreServiceImpl extends ServiceImpl<StoreMapper, Store> implements
brand = brandService.getById(brandExtend.getString("brandId"));
}
Store store = BeanUtils.mapToClass(bo.getStoreInfo(), Store.class);
store.setBrandId(brand.getId()).setSourceType(SourceType.JAMBOX.getName());
store.setBrandId(brand.getId()).setSourceType(SourceType.JAMBOX.toString());
this.save(store);
//拓展
SyncBrandAndStoreBo.StoreInfo storeInfo = bo.getStoreInfo();

View File

@ -1,6 +1,5 @@
package com.cpop.system.business.vo;
import com.cpop.core.annontation.StringArrayConvert;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;