|
@@ -2,26 +2,28 @@ package com.dayou.service.impl;
|
|
|
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
import com.dayou.common.BaseEntity;
|
|
import com.dayou.common.BaseEntity;
|
|
-import com.dayou.dto.AssetsPrincipalMembersDTO;
|
|
|
|
-import com.dayou.dto.AssetsSelectDTO;
|
|
|
|
-import com.dayou.dto.TaskRecordDTO;
|
|
|
|
-import com.dayou.dto.WorkNodeCommit;
|
|
|
|
|
|
+import com.dayou.dto.*;
|
|
import com.dayou.entity.Assets;
|
|
import com.dayou.entity.Assets;
|
|
-import com.dayou.enums.MainBusinessEnum;
|
|
|
|
|
|
+import com.dayou.entity.BusinessNumber;
|
|
import com.dayou.exception.ErrorCode;
|
|
import com.dayou.exception.ErrorCode;
|
|
import com.dayou.mapper.AssetsMapper;
|
|
import com.dayou.mapper.AssetsMapper;
|
|
|
|
+import com.dayou.mapper.BusinessNumberMapper;
|
|
import com.dayou.service.IAssetsService;
|
|
import com.dayou.service.IAssetsService;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.dayou.service.IBusinessNumberService;
|
|
import com.dayou.service.IBusinessNumberService;
|
|
import com.dayou.service.workflow.IWorkFlowService;
|
|
import com.dayou.service.workflow.IWorkFlowService;
|
|
import com.dayou.vo.AssetsOrderFundInvoiceVO;
|
|
import com.dayou.vo.AssetsOrderFundInvoiceVO;
|
|
import com.dayou.vo.AssetsVO;
|
|
import com.dayou.vo.AssetsVO;
|
|
-import com.dayou.workflow.annotation.FinishTask;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
|
|
|
|
|
+import java.util.Calendar;
|
|
|
|
+
|
|
|
|
+import static com.dayou.enums.MainBusinessEnum.ASSET_BUSINESS;
|
|
|
|
+import static com.dayou.enums.ProductionEnum.*;
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* <p>
|
|
* <p>
|
|
* 资产业务订单表 服务实现类
|
|
* 资产业务订单表 服务实现类
|
|
@@ -42,6 +44,9 @@ public class AssetsServiceImpl extends ServiceImpl<AssetsMapper, Assets> impleme
|
|
@Autowired
|
|
@Autowired
|
|
private AssetsMapper assetsMapper;
|
|
private AssetsMapper assetsMapper;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private BusinessNumberMapper businessNumberMapper;
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 条件查询资产任务列表
|
|
* 条件查询资产任务列表
|
|
* @param page 分页条件
|
|
* @param page 分页条件
|
|
@@ -88,7 +93,7 @@ public class AssetsServiceImpl extends ServiceImpl<AssetsMapper, Assets> impleme
|
|
//新增订单信息
|
|
//新增订单信息
|
|
this.save(assets);
|
|
this.save(assets);
|
|
//发起流程
|
|
//发起流程
|
|
- return workFlowService.openingOrder(MainBusinessEnum.ASSET_BUSINESS,assets.getId(),null,assets.getRemark());
|
|
|
|
|
|
+ return workFlowService.openingOrder(ASSET_BUSINESS,assets.getId(),null,assets.getRemark());
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -126,4 +131,37 @@ public class AssetsServiceImpl extends ServiceImpl<AssetsMapper, Assets> impleme
|
|
//逻辑删除
|
|
//逻辑删除
|
|
return this.removeById(id);
|
|
return this.removeById(id);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 资产业务产品取号
|
|
|
|
+ * @param takeAssetsProductionNoDTO 取号dto
|
|
|
|
+ * @return String
|
|
|
|
+ */
|
|
|
|
+ @Override
|
|
|
|
+ public String takeAssetsProductionNo(TakeAssetsProductionNoDTO takeAssetsProductionNoDTO) {
|
|
|
|
+ Calendar calendar = Calendar.getInstance();
|
|
|
|
+ int nowYear = calendar.get(Calendar.YEAR);
|
|
|
|
+ String productionNo = "(" + nowYear +")";;
|
|
|
|
+ //取号产品为意见书
|
|
|
|
+ if (takeAssetsProductionNoDTO.getProductionType().equals(STATEMENT.getCode())){
|
|
|
|
+ //获取取号信息
|
|
|
|
+ BusinessNumber businessNumber = assetsMapper.getBusinessNum(STATEMENT.getCode() + "_NUMBER", ASSET_BUSINESS.getCode(), nowYear);
|
|
|
|
+ productionNo = "川友预报字" + productionNo;
|
|
|
|
+ } else if (takeAssetsProductionNoDTO.getProductionType().equals(REPORT.getCode())) { //取号产品为评估报告
|
|
|
|
+ productionNo = "川友评报字" + productionNo;;
|
|
|
|
+ } else if (takeAssetsProductionNoDTO.getProductionType().equals(CONSULT.getCode())) { //取号产品为咨询报告
|
|
|
|
+ productionNo = "川友咨报字" + productionNo;;
|
|
|
|
+ }else if (takeAssetsProductionNoDTO.getProductionType().equals(LETTER.getCode())) { //取号产品为意见函
|
|
|
|
+ productionNo = "川友字" + productionNo;;
|
|
|
|
+ }
|
|
|
|
+ return productionNo;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public BusinessNumber addBusinessNumber(String takeType, String businessType, Integer year){
|
|
|
|
+ BusinessNumber businessNumber = new BusinessNumber();
|
|
|
|
+ businessNumber.setTakeType(takeType);
|
|
|
|
+ businessNumber.setBusinessType(businessType);
|
|
|
|
+ businessNumber.setYear(year);
|
|
|
|
+ return null;
|
|
|
|
+ }
|
|
}
|
|
}
|