|
@@ -14,9 +14,7 @@ import com.ym.mec.biz.dal.entity.FinancialExpenditure;
|
|
|
import com.ym.mec.biz.dal.entity.Organization;
|
|
import com.ym.mec.biz.dal.entity.Organization;
|
|
|
import com.ym.mec.biz.dal.enums.*;
|
|
import com.ym.mec.biz.dal.enums.*;
|
|
|
import com.ym.mec.biz.dal.page.FinancialExpenditureQueryInfo;
|
|
import com.ym.mec.biz.dal.page.FinancialExpenditureQueryInfo;
|
|
|
-import com.ym.mec.biz.service.FinancialExpenditureService;
|
|
|
|
|
-import com.ym.mec.biz.service.MusicGroupService;
|
|
|
|
|
-import com.ym.mec.biz.service.VipGroupService;
|
|
|
|
|
|
|
+import com.ym.mec.biz.service.*;
|
|
|
import com.ym.mec.common.dal.BaseDAO;
|
|
import com.ym.mec.common.dal.BaseDAO;
|
|
|
import com.ym.mec.common.entity.HttpResponseResult;
|
|
import com.ym.mec.common.entity.HttpResponseResult;
|
|
|
import com.ym.mec.common.exception.BizException;
|
|
import com.ym.mec.common.exception.BizException;
|
|
@@ -55,6 +53,8 @@ public class FinancialExpenditureServiceImpl extends BaseServiceImpl<Long, Finan
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private VipGroupService vipGroupService;
|
|
private VipGroupService vipGroupService;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
|
|
+ private GroupClassService groupClassService;
|
|
|
|
|
+ @Autowired
|
|
|
private MusicGroupService musicGroupService;
|
|
private MusicGroupService musicGroupService;
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -267,29 +267,31 @@ public class FinancialExpenditureServiceImpl extends BaseServiceImpl<Long, Finan
|
|
|
financialExpenditure.setVipGroupId(Long.parseLong(o.toString()));
|
|
financialExpenditure.setVipGroupId(Long.parseLong(o.toString()));
|
|
|
continue;
|
|
continue;
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
- if(name.contains("乐团编号")){
|
|
|
|
|
|
|
+ }else if(name.contains("课程类型")){
|
|
|
|
|
+ Object o = hashMap.get(inputDto.getModel());
|
|
|
|
|
+ if(o != null){
|
|
|
|
|
+ financialExpenditure.setGroupType(o.toString());
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+ }else if(name.contains("乐团编号")){
|
|
|
Object o = hashMap.get(inputDto.getModel());
|
|
Object o = hashMap.get(inputDto.getModel());
|
|
|
if(o != null){
|
|
if(o != null){
|
|
|
financialExpenditure.setMusicGroupId(o.toString());
|
|
financialExpenditure.setMusicGroupId(o.toString());
|
|
|
continue;
|
|
continue;
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
- if(name.contains("退费项目")){
|
|
|
|
|
|
|
+ }else if(name.contains("退费项目")){
|
|
|
Object o = hashMap.get(inputDto.getModel());
|
|
Object o = hashMap.get(inputDto.getModel());
|
|
|
if(o != null){
|
|
if(o != null){
|
|
|
financialExpenditure.setReturnFeeType(o.toString());
|
|
financialExpenditure.setReturnFeeType(o.toString());
|
|
|
continue;
|
|
continue;
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
- if(name.contains("学员编号")){
|
|
|
|
|
|
|
+ }else if(name.contains("学员编号")){
|
|
|
Object o = hashMap.get(inputDto.getModel());
|
|
Object o = hashMap.get(inputDto.getModel());
|
|
|
if(o != null){
|
|
if(o != null){
|
|
|
financialExpenditure.setStudentId(Integer.parseInt(o.toString()));
|
|
financialExpenditure.setStudentId(Integer.parseInt(o.toString()));
|
|
|
continue;
|
|
continue;
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
- if(name.contains("分部")){
|
|
|
|
|
|
|
+ }else if(name.contains("分部")){
|
|
|
Object o = hashMap.get(inputDto.getModel());
|
|
Object o = hashMap.get(inputDto.getModel());
|
|
|
if(o != null){
|
|
if(o != null){
|
|
|
int organId = Integer.parseInt(o.toString());
|
|
int organId = Integer.parseInt(o.toString());
|
|
@@ -300,8 +302,7 @@ public class FinancialExpenditureServiceImpl extends BaseServiceImpl<Long, Finan
|
|
|
}
|
|
}
|
|
|
continue;
|
|
continue;
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
- if(name.contains("金额")){
|
|
|
|
|
|
|
+ }else if(name.contains("金额")){
|
|
|
Object o = hashMap.get(inputDto.getModel());
|
|
Object o = hashMap.get(inputDto.getModel());
|
|
|
if(o != null){
|
|
if(o != null){
|
|
|
financialExpenditure.setAmount(new BigDecimal(Double.parseDouble(o.toString())));
|
|
financialExpenditure.setAmount(new BigDecimal(Double.parseDouble(o.toString())));
|
|
@@ -337,12 +338,17 @@ public class FinancialExpenditureServiceImpl extends BaseServiceImpl<Long, Finan
|
|
|
if(pWorkOrderInfo.getProcess().equals(22)){
|
|
if(pWorkOrderInfo.getProcess().equals(22)){
|
|
|
for (FinancialExpenditure financialExpenditure : financialExpenditureList) {
|
|
for (FinancialExpenditure financialExpenditure : financialExpenditureList) {
|
|
|
ReturnFeeDto returnFeeDto = new ReturnFeeDto();
|
|
ReturnFeeDto returnFeeDto = new ReturnFeeDto();
|
|
|
- returnFeeDto.setGroupType(GroupType.VIP);
|
|
|
|
|
|
|
+ returnFeeDto.setGroupType(GroupType.valueOfDesc(financialExpenditure.getGroupType()));
|
|
|
returnFeeDto.setAmount(financialExpenditure.getAmount());
|
|
returnFeeDto.setAmount(financialExpenditure.getAmount());
|
|
|
returnFeeDto.setStudentId(financialExpenditure.getStudentId());
|
|
returnFeeDto.setStudentId(financialExpenditure.getStudentId());
|
|
|
returnFeeDto.setConfirmReturnActivityGive(true);
|
|
returnFeeDto.setConfirmReturnActivityGive(true);
|
|
|
|
|
+ returnFeeDto.setGroupId(financialExpenditure.getVipGroupId());
|
|
|
returnFeeDto.setVipGroupId(financialExpenditure.getVipGroupId());
|
|
returnFeeDto.setVipGroupId(financialExpenditure.getVipGroupId());
|
|
|
- vipGroupService.applyRefundForStudentOa(returnFeeDto);
|
|
|
|
|
|
|
+ if(returnFeeDto.getGroupType() == GroupType.VIP){
|
|
|
|
|
+ vipGroupService.applyRefundForStudentOa(returnFeeDto);
|
|
|
|
|
+ }else if(returnFeeDto.getGroupType() == GroupType.COMM || returnFeeDto.getGroupType() == GroupType.PRACTICE){
|
|
|
|
|
+ groupClassService.cancelGroupOa(returnFeeDto);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}else {
|
|
}else {
|
|
|
//退团
|
|
//退团
|
|
@@ -373,12 +379,13 @@ public class FinancialExpenditureServiceImpl extends BaseServiceImpl<Long, Finan
|
|
|
financialExpenditure.setBatchNo(workOrderId.toString());
|
|
financialExpenditure.setBatchNo(workOrderId.toString());
|
|
|
financialExpenditure.setFinancialProcessNo(workOrderId.toString());
|
|
financialExpenditure.setFinancialProcessNo(workOrderId.toString());
|
|
|
Employee employee = employeeDao.get(pWorkOrderInfo.getCreator());
|
|
Employee employee = employeeDao.get(pWorkOrderInfo.getCreator());
|
|
|
|
|
+ Integer organId = financialExpenditureDao.getDeptId(pWorkOrderInfo.getDeptId());
|
|
|
|
|
+ Organization organization = organizationDao.get(organId);
|
|
|
|
|
+ if(organization != null){
|
|
|
|
|
+ financialExpenditure.setOrganId(organization.getId());
|
|
|
|
|
+ financialExpenditure.setOrganName(organization.getName());
|
|
|
|
|
+ }
|
|
|
if(employee != null){
|
|
if(employee != null){
|
|
|
- Organization organization = organizationDao.get(employee.getDeptId());
|
|
|
|
|
- if(organization != null){
|
|
|
|
|
- financialExpenditure.setOrganId(organization.getId());
|
|
|
|
|
- financialExpenditure.setOrganName(organization.getName());
|
|
|
|
|
- }
|
|
|
|
|
List<Integer> userIds = new ArrayList<>();
|
|
List<Integer> userIds = new ArrayList<>();
|
|
|
userIds.add(employee.getUserId());
|
|
userIds.add(employee.getUserId());
|
|
|
List<SimpleUserDto> byIds = employeeDao.findByIds(userIds);
|
|
List<SimpleUserDto> byIds = employeeDao.findByIds(userIds);
|
|
@@ -453,6 +460,12 @@ public class FinancialExpenditureServiceImpl extends BaseServiceImpl<Long, Finan
|
|
|
financialExpenditure.setVipGroupId(Long.parseLong(o.toString()));
|
|
financialExpenditure.setVipGroupId(Long.parseLong(o.toString()));
|
|
|
continue;
|
|
continue;
|
|
|
}
|
|
}
|
|
|
|
|
+ }else if(name.contains("课程类型")){
|
|
|
|
|
+ Object o = hashMap.get(inputDto.getModel());
|
|
|
|
|
+ if(o != null){
|
|
|
|
|
+ financialExpenditure.setGroupType(o.toString());
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
}else if(name.contains("乐团编号")){
|
|
}else if(name.contains("乐团编号")){
|
|
|
Object o = hashMap.get(inputDto.getModel());
|
|
Object o = hashMap.get(inputDto.getModel());
|
|
|
if(o != null){
|
|
if(o != null){
|
|
@@ -483,12 +496,17 @@ public class FinancialExpenditureServiceImpl extends BaseServiceImpl<Long, Finan
|
|
|
if(tplInfoId.equals("11")){
|
|
if(tplInfoId.equals("11")){
|
|
|
for (FinancialExpenditure financialExpenditure : financialExpenditureList) {
|
|
for (FinancialExpenditure financialExpenditure : financialExpenditureList) {
|
|
|
ReturnFeeDto returnFeeDto = new ReturnFeeDto();
|
|
ReturnFeeDto returnFeeDto = new ReturnFeeDto();
|
|
|
- returnFeeDto.setGroupType(GroupType.VIP);
|
|
|
|
|
|
|
+ returnFeeDto.setGroupType(GroupType.valueOfDesc(financialExpenditure.getGroupType()));
|
|
|
returnFeeDto.setAmount(financialExpenditure.getAmount());
|
|
returnFeeDto.setAmount(financialExpenditure.getAmount());
|
|
|
returnFeeDto.setStudentId(financialExpenditure.getStudentId());
|
|
returnFeeDto.setStudentId(financialExpenditure.getStudentId());
|
|
|
returnFeeDto.setConfirmReturnActivityGive(true);
|
|
returnFeeDto.setConfirmReturnActivityGive(true);
|
|
|
|
|
+ returnFeeDto.setGroupId(financialExpenditure.getVipGroupId());
|
|
|
returnFeeDto.setVipGroupId(financialExpenditure.getVipGroupId());
|
|
returnFeeDto.setVipGroupId(financialExpenditure.getVipGroupId());
|
|
|
- vipGroupService.checkApplyRefundForStudentOa(returnFeeDto);
|
|
|
|
|
|
|
+ if(returnFeeDto.getGroupType() == GroupType.VIP){
|
|
|
|
|
+ vipGroupService.checkApplyRefundForStudentOa(returnFeeDto);
|
|
|
|
|
+ }else if(returnFeeDto.getGroupType() == GroupType.COMM || returnFeeDto.getGroupType() == GroupType.PRACTICE){
|
|
|
|
|
+ groupClassService.checkCancelGroupOa(returnFeeDto);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}else {
|
|
}else {
|
|
|
for (FinancialExpenditure financialExpenditure : financialExpenditureList) {
|
|
for (FinancialExpenditure financialExpenditure : financialExpenditureList) {
|