|
@@ -3,6 +3,7 @@ package com.ym.mec.biz.service.impl;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.ym.mec.biz.dal.dao.FinancialExpenditureDao;
|
|
|
+import com.ym.mec.biz.dal.dao.OaDao;
|
|
|
import com.ym.mec.biz.dal.dao.OrganizationDao;
|
|
|
import com.ym.mec.biz.dal.dao.TeacherDao;
|
|
|
import com.ym.mec.biz.dal.dto.*;
|
|
@@ -33,12 +34,12 @@ import org.redisson.api.RBucket;
|
|
|
import org.redisson.api.RedissonClient;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.core.io.ClassPathResource;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
+import javax.annotation.Resource;
|
|
|
import java.io.ByteArrayInputStream;
|
|
|
import java.io.File;
|
|
|
import java.io.InputStream;
|
|
@@ -52,21 +53,23 @@ import java.util.stream.Collectors;
|
|
|
@Service
|
|
|
public class FinancialExpenditureServiceImpl extends BaseServiceImpl<Long, FinancialExpenditure> implements FinancialExpenditureService {
|
|
|
|
|
|
- @Autowired
|
|
|
+ @Resource
|
|
|
+ private OaDao oaDao;
|
|
|
+ @Resource
|
|
|
private FinancialExpenditureDao financialExpenditureDao;
|
|
|
- @Autowired
|
|
|
+ @Resource
|
|
|
private OrganizationDao organizationDao;
|
|
|
- @Autowired
|
|
|
+ @Resource
|
|
|
private VipGroupService vipGroupService;
|
|
|
- @Autowired
|
|
|
+ @Resource
|
|
|
private GroupClassService groupClassService;
|
|
|
- @Autowired
|
|
|
+ @Resource
|
|
|
private MusicGroupService musicGroupService;
|
|
|
- @Autowired
|
|
|
+ @Resource
|
|
|
private TeacherDao teacherDao;
|
|
|
- @Autowired
|
|
|
+ @Resource
|
|
|
private FinancialExpenditureService financialExpenditureService;
|
|
|
- @Autowired
|
|
|
+ @Resource
|
|
|
private RedissonClient redissonClient;
|
|
|
|
|
|
@Override
|
|
@@ -239,7 +242,7 @@ public class FinancialExpenditureServiceImpl extends BaseServiceImpl<Long, Finan
|
|
|
if (!bucket.trySet(workOrderId, 2L, TimeUnit.SECONDS)) {
|
|
|
throw new BizException("正在同步oa审批记录,请勿重复操作");
|
|
|
}
|
|
|
- PWorkOrderInfo pWorkOrderInfo = financialExpenditureDao.getWorkOrderInfo(workOrderId);
|
|
|
+ PWorkOrderInfo pWorkOrderInfo = oaDao.getWorkOrderInfo(workOrderId);
|
|
|
if (pWorkOrderInfo != null){
|
|
|
Integer hasFinancial = financialExpenditureDao.findByBatchNoAndProcessNo(workOrderId);
|
|
|
if(hasFinancial != null){
|
|
@@ -254,9 +257,9 @@ public class FinancialExpenditureServiceImpl extends BaseServiceImpl<Long, Finan
|
|
|
}
|
|
|
}
|
|
|
//获取模板
|
|
|
- String formStructure = financialExpenditureDao.getFormStructure(workOrderId);
|
|
|
+ String formStructure = oaDao.getFormStructure(workOrderId);
|
|
|
//获取用户填写的表单
|
|
|
- JSONObject formData = JSONObject.parseObject(financialExpenditureDao.getFormData(workOrderId));
|
|
|
+ JSONObject formData = JSONObject.parseObject(oaDao.getFormData(workOrderId));
|
|
|
OaFormStructureDto oaFormStructureDto = JSONObject.parseObject(formStructure, OaFormStructureDto.class);
|
|
|
List<OaInputDto> oaInputDtos = oaFormStructureDto.getList();
|
|
|
//课程退费和乐团退费需要单独处理
|
|
@@ -389,7 +392,7 @@ public class FinancialExpenditureServiceImpl extends BaseServiceImpl<Long, Finan
|
|
|
financialExpenditure.setApplyUserId(pWorkOrderInfo.getCreator());
|
|
|
financialExpenditure.setProcessId(pWorkOrderInfo.getProcess());
|
|
|
financialExpenditure.setEffectiveTime(DateUtil.format(endTime,DateUtil.ISO_YEAR_MONTH_FORMAT));
|
|
|
- Integer organId = financialExpenditureDao.getDeptId(pWorkOrderInfo.getDeptId());
|
|
|
+ Integer organId = oaDao.getDeptId(pWorkOrderInfo.getDeptId());
|
|
|
Organization organization = organizationDao.get(organId);
|
|
|
if(organization != null){
|
|
|
financialExpenditure.setOrganId(organization.getId());
|
|
@@ -591,7 +594,7 @@ public class FinancialExpenditureServiceImpl extends BaseServiceImpl<Long, Finan
|
|
|
return;
|
|
|
}
|
|
|
JSONObject formData = JSONObject.parseObject(data);
|
|
|
- String formStructure = financialExpenditureDao.getTplInfo(tplInfoId);
|
|
|
+ String formStructure = oaDao.getTplInfo(tplInfoId);
|
|
|
Date now = new Date();
|
|
|
OaFormStructureDto oaFormStructureDto = JSONObject.parseObject(formStructure, OaFormStructureDto.class);
|
|
|
List<OaInputDto> oaInputDtos = oaFormStructureDto.getList();
|