|
@@ -20,6 +20,7 @@ import com.jeeplus.finance.reimbursementApproval.approvalInfo.service.dto.*;
|
|
|
//import com.jeeplus.pubmodules.oss.domain.WorkAttachment;
|
|
|
//import com.jeeplus.pubmodules.oss.mapper.OssServiceMapper;
|
|
|
//import com.jeeplus.pubmodules.serialNumTpl.service.SerialnumTplService;
|
|
|
+import com.jeeplus.flowable.feign.IFlowableApi;
|
|
|
import com.jeeplus.sys.domain.Office;
|
|
|
import com.jeeplus.sys.domain.WorkAttachmentInfo;
|
|
|
import com.jeeplus.sys.feign.*;
|
|
@@ -202,7 +203,10 @@ public class CwReimbursementInfoService {
|
|
|
if (com.jeeplus.utils.StringUtils.isNotEmpty(dto.getNo())) {
|
|
|
queryWrapper.like("a.no", dto.getNo());
|
|
|
}
|
|
|
-
|
|
|
+ // 付款状态
|
|
|
+ if (com.jeeplus.utils.StringUtils.isNotEmpty(dto.getPaymentStatus())) {
|
|
|
+ queryWrapper.like("a.payment_status", dto.getPaymentStatus());
|
|
|
+ }
|
|
|
// 如果当前用户是部门主任,则可以查看部门所有的项目、自己创建的项目以及所属项目组的项目
|
|
|
// 如果当前用户是员工,则可以查看自己创建的项目以及所属项目组的项目
|
|
|
StringBuilder officeIds = new StringBuilder();
|
|
@@ -633,7 +637,19 @@ public class CwReimbursementInfoService {
|
|
|
info.setApprovalTime(new Date());
|
|
|
}
|
|
|
}
|
|
|
+ //获取当前审核节点
|
|
|
+ String currentTaskName = SpringUtil.getBean(IFlowableApi.class).getCurrentTaskName(dto.getProcInsId());
|
|
|
+ //当前节点为财务审批且通过
|
|
|
+ if ("财务审批".equals(currentTaskName) && "2".equals(dto.getType())){
|
|
|
+ //判断付款时间存不存在,不存在则添加
|
|
|
+ if (null == cwReimbursementInfo.getPaymentTime()){
|
|
|
+ info.setPaymentStatus("1");
|
|
|
+ info.setPaymentTime(new Date());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
infoMapper.updateById(info);
|
|
|
+
|
|
|
// 修改报销详情列表信息
|
|
|
// 删除原有数据
|
|
|
LambdaQueryWrapper<CwReimbursementDetailInfo> detailWrapper = new LambdaQueryWrapper<>();
|
|
@@ -1148,4 +1164,28 @@ public class CwReimbursementInfoService {
|
|
|
}
|
|
|
return reimbursementInfoUpHi;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 修改付款状态
|
|
|
+ * @param id
|
|
|
+ */
|
|
|
+ public String updatePaymentStatus(String id,String paymentStatus) {
|
|
|
+ //根据id查询报销信息
|
|
|
+ CwReimbursementInfo reimbursementInfo = infoMapper.getById(id);
|
|
|
+ //判断当前付款状态是付款还是撤回付款
|
|
|
+ if ("1".equals(paymentStatus)){
|
|
|
+ //判断付款时间是否存在
|
|
|
+ if (null != reimbursementInfo.getPaymentTime()){
|
|
|
+ return "该报销已经付款,请勿重复付款";
|
|
|
+ }else {
|
|
|
+ infoMapper.updatePaymentById(id,paymentStatus);
|
|
|
+ }
|
|
|
+ return "付款成功";
|
|
|
+ }else if ("0".equals(paymentStatus)){
|
|
|
+ infoMapper.updatePaymentById(id,paymentStatus);
|
|
|
+ return "付款撤回成功";
|
|
|
+ }else {
|
|
|
+ return "付款失败,请确认后付款";
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|