|
|
|
@ -1,39 +1,35 @@
|
|
|
|
|
package com.ruoyi.jjh.declaration.service.impl;
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
|
|
|
import com.alibaba.fastjson2.JSONArray;
|
|
|
|
|
import com.alibaba.fastjson2.JSONObject;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
|
|
import com.ruoyi.common.context.SecurityContextHolder;
|
|
|
|
|
import com.ruoyi.common.exception.ServiceException;
|
|
|
|
|
import com.ruoyi.common.utils.DateUtils;
|
|
|
|
|
import com.ruoyi.common.utils.SecurityUtils;
|
|
|
|
|
import com.ruoyi.jjh.declaration.component.TimingRemindService;
|
|
|
|
|
import com.ruoyi.jjh.declaration.entity.*;
|
|
|
|
|
import com.ruoyi.jjh.declaration.entity.dto.*;
|
|
|
|
|
import com.ruoyi.jjh.declaration.entity.dto.ApprovalDeclarationRecordsQueryDto;
|
|
|
|
|
import com.ruoyi.jjh.declaration.entity.dto.BmsApprovalInfoUpdateDto;
|
|
|
|
|
import com.ruoyi.jjh.declaration.entity.dto.BmsDeclarationRecordsDto;
|
|
|
|
|
import com.ruoyi.jjh.declaration.entity.vo.ApprovalDeclarationRecordsQueryVo;
|
|
|
|
|
import com.ruoyi.jjh.declaration.entity.vo.BmsDeclarationRecordsQueryVo;
|
|
|
|
|
import com.ruoyi.jjh.declaration.entity.vo.BmsMunicipalBureauReviewQueryVo;
|
|
|
|
|
import com.ruoyi.jjh.declaration.entity.vo.DeclarationRecordsVo;
|
|
|
|
|
import com.ruoyi.jjh.declaration.mapper.BmsDeclarationRecordsMapper;
|
|
|
|
|
import com.ruoyi.jjh.declaration.service.*;
|
|
|
|
|
import com.ruoyi.jjh.ent.entity.JProject;
|
|
|
|
|
import com.ruoyi.jjh.ent.entity.JSmartDeclaration;
|
|
|
|
|
import com.ruoyi.jjh.ent.service.JProjectService;
|
|
|
|
|
import io.swagger.models.auth.In;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
import java.util.*;
|
|
|
|
|
import java.util.concurrent.atomic.AtomicReference;
|
|
|
|
|
import java.util.function.Function;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.Arrays;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Objects;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 在线申报记录Service业务层处理
|
|
|
|
@ -47,14 +43,12 @@ public class BmsDeclarationRecordsServiceImpl extends ServiceImpl<BmsDeclaration
|
|
|
|
|
@Autowired
|
|
|
|
|
private ICommonService iCommonService;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private IBmsFieldInfoService iBmsFieldInfoService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
private IBmsTemplateRecordService iBmsTemplateRecordService;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private IBmsFileInfoService iBmsFileInfoService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private IBmsApprovalInfoService iBmsApprovalInfoService;
|
|
|
|
@ -65,63 +59,7 @@ public class BmsDeclarationRecordsServiceImpl extends ServiceImpl<BmsDeclaration
|
|
|
|
|
@Autowired
|
|
|
|
|
private IBmsEnterpriseBasicInfoService iBmsEnterpriseBasicInfoService;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private IBmsOutQuitProductsService iBmsOutQuitProductsService;
|
|
|
|
|
/**
|
|
|
|
|
* 项目落户奖补
|
|
|
|
|
*/
|
|
|
|
|
@Resource
|
|
|
|
|
private IBmsProjectSettlementAwardService bmsProjectSettlementAwardService;
|
|
|
|
|
/**
|
|
|
|
|
* 做大做强奖
|
|
|
|
|
*/
|
|
|
|
|
@Autowired
|
|
|
|
|
private IBmsBigStrongAwardService bmsBigStrongAwardService;
|
|
|
|
|
/**
|
|
|
|
|
* 载体建设奖补
|
|
|
|
|
*/
|
|
|
|
|
@Autowired
|
|
|
|
|
private IBmsCarrierConstructionAwardService bmsCarrierConstructionAwardService;
|
|
|
|
|
/**
|
|
|
|
|
* 平台建设奖补
|
|
|
|
|
*/
|
|
|
|
|
@Autowired
|
|
|
|
|
private IBmsPlatformConstructionAwardService bmsPlatformConstructionAwardService;
|
|
|
|
|
/**
|
|
|
|
|
* 品牌打造奖补
|
|
|
|
|
*/
|
|
|
|
|
@Autowired
|
|
|
|
|
private IBmsBrandingAwardService bmsBrandingAwardService;
|
|
|
|
|
/**
|
|
|
|
|
* 场景开放奖补
|
|
|
|
|
*/
|
|
|
|
|
@Autowired
|
|
|
|
|
private IBmsSceneOpeningAwardService bmsSceneOpeningAwardService;
|
|
|
|
|
/**
|
|
|
|
|
* 信用管理奖补
|
|
|
|
|
*/
|
|
|
|
|
@Autowired
|
|
|
|
|
private IBmsCreditManagementService bmsCreditManagementService;
|
|
|
|
|
/**
|
|
|
|
|
* 5G+工业互联网奖补
|
|
|
|
|
*/
|
|
|
|
|
@Autowired
|
|
|
|
|
private IBmsIndustrialInternetAwardService bmsIndustrialInternetAwardService;
|
|
|
|
|
/**
|
|
|
|
|
* 制造服务业有效投入奖补
|
|
|
|
|
*/
|
|
|
|
|
@Autowired
|
|
|
|
|
private IBmsManufacturingServicesAwardService bmsManufacturingServicesAwardService;
|
|
|
|
|
/**
|
|
|
|
|
* 物流发展奖补
|
|
|
|
|
*/
|
|
|
|
|
@Autowired
|
|
|
|
|
private IBmsLogisticsDevelopmentAwardService bmsLogisticsDevelopmentAwardService;
|
|
|
|
|
/**
|
|
|
|
|
* 两业融合奖补
|
|
|
|
|
*/
|
|
|
|
|
@Autowired
|
|
|
|
|
private IBmsIntegrationIndustriesService bmsIntegrationIndustriesService;
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
private JProjectService jProjectService;
|
|
|
|
|
|
|
|
|
@ -196,7 +134,9 @@ public class BmsDeclarationRecordsServiceImpl extends ServiceImpl<BmsDeclaration
|
|
|
|
|
return baseMapper.approvalList(approvalDeclarationRecordsQueryDto);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 审批
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
|
public int updateApprovalInfo(BmsApprovalInfoUpdateDto bmsApprovalInfoUpdateDto) {
|
|
|
|
@ -204,9 +144,9 @@ public class BmsDeclarationRecordsServiceImpl extends ServiceImpl<BmsDeclaration
|
|
|
|
|
List<BmsApprovalInfo> list = iBmsApprovalInfoService.lambdaQuery().eq(BmsApprovalInfo::getDeclarationRecordsId, bmsApprovalInfoUpdateDto.getDeclarationRecordsId()).orderByDesc(BmsApprovalInfo::getSort).list();
|
|
|
|
|
BmsApprovalInfo ba = list.get(0);
|
|
|
|
|
// 如果当前的deptId和最新一条的审批记录一样的话
|
|
|
|
|
if(ba.getApprovalStatus()!=0 || !Objects.equals(ba.getApprovalDept(), SecurityUtils.getDeptId())){
|
|
|
|
|
if (ba.getApprovalStatus() != 0 || !Objects.equals(ba.getApprovalDept(), SecurityUtils.getDeptId())) {
|
|
|
|
|
throw new ServiceException("无法审批!");
|
|
|
|
|
}else {
|
|
|
|
|
} else {
|
|
|
|
|
ba.setId(null);
|
|
|
|
|
ba.setApprovalById(SecurityUtils.getUserId());
|
|
|
|
|
ba.setApprovalStatus(bmsApprovalInfoUpdateDto.getApprovalStatus());
|
|
|
|
@ -215,16 +155,16 @@ public class BmsDeclarationRecordsServiceImpl extends ServiceImpl<BmsDeclaration
|
|
|
|
|
ba.setSort(list.size() + 1);
|
|
|
|
|
iBmsApprovalInfoService.save(ba);
|
|
|
|
|
}
|
|
|
|
|
int num = approval(bmsApprovalInfoUpdateDto, ba.getProcessId(),list.size() + 1);
|
|
|
|
|
int num = approval(bmsApprovalInfoUpdateDto, ba.getProcessId(), list.size() + 1);
|
|
|
|
|
return num;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int approval(BmsApprovalInfoUpdateDto bmsApprovalInfoUpdateDto, Long id, Integer a) {
|
|
|
|
|
//获取审批之前的流程
|
|
|
|
|
BmsProcessInfo bmsProcessInfo = iBmsProcessInfoService.getById(id);
|
|
|
|
|
if(bmsApprovalInfoUpdateDto.getApprovalStatus()==1){
|
|
|
|
|
if (bmsApprovalInfoUpdateDto.getApprovalStatus() == 1) {
|
|
|
|
|
//根据审批之前的流程获取下一个流程id的详情数据
|
|
|
|
|
if(bmsProcessInfo.getNextProcessId()!=0){
|
|
|
|
|
if (bmsProcessInfo.getNextProcessId() != 0) {
|
|
|
|
|
BmsProcessInfo newBmsProcessInfo = iBmsProcessInfoService.getById(bmsProcessInfo.getNextProcessId());
|
|
|
|
|
BmsApprovalInfo ar = new BmsApprovalInfo();
|
|
|
|
|
ar.setProcessId(bmsProcessInfo.getNextProcessId());
|
|
|
|
@ -280,46 +220,46 @@ public class BmsDeclarationRecordsServiceImpl extends ServiceImpl<BmsDeclaration
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 新增在线申报记录
|
|
|
|
|
*
|
|
|
|
|
* @param bmsDeclarationRecordsAddDto 在线申报记录
|
|
|
|
|
* @return 结果
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public int insertBmsDeclarationRecords(BmsDeclarationRecordsAddDto bmsDeclarationRecordsAddDto) {
|
|
|
|
|
iCommonService.checkEnterprise(bmsDeclarationRecordsAddDto.getEnterpriseId(), bmsDeclarationRecordsAddDto.getTemplateId());
|
|
|
|
|
BmsDeclarationRecords bmsDeclarationRecords = new BmsDeclarationRecords();
|
|
|
|
|
BeanUtil.copyProperties(bmsDeclarationRecordsAddDto, bmsDeclarationRecords);
|
|
|
|
|
bmsDeclarationRecords.setMatter("");
|
|
|
|
|
// 新增在线申请记录
|
|
|
|
|
int num = baseMapper.insert(bmsDeclarationRecords);
|
|
|
|
|
// 批量保存字段信息
|
|
|
|
|
List<BmsFieldInfoAddDto> fieldList = bmsDeclarationRecordsAddDto.getFieldList();
|
|
|
|
|
List<BmsFieldInfo> fieldInfoList = new ArrayList<>();
|
|
|
|
|
if (null != fieldList && fieldList.size() > 0) {
|
|
|
|
|
fieldList.forEach(x -> {
|
|
|
|
|
BmsFieldInfo bmsFieldInfo = new BmsFieldInfo();
|
|
|
|
|
BeanUtil.copyProperties(x, bmsFieldInfo);
|
|
|
|
|
bmsFieldInfo.setDetailId(bmsDeclarationRecords.getId());
|
|
|
|
|
fieldInfoList.add(bmsFieldInfo);
|
|
|
|
|
});
|
|
|
|
|
iBmsFieldInfoService.saveOrUpdateBatch(fieldInfoList);
|
|
|
|
|
}
|
|
|
|
|
// 批量保存文件信息
|
|
|
|
|
List<BmsFileInfoAddDto> fileList = bmsDeclarationRecordsAddDto.getFileList();
|
|
|
|
|
List<BmsFileInfo> fileInfoList = new ArrayList<>();
|
|
|
|
|
if (null != fileList && fileList.size() > 0) {
|
|
|
|
|
fileList.forEach(x -> {
|
|
|
|
|
BmsFileInfo bmsFileInfo = new BmsFileInfo();
|
|
|
|
|
BeanUtil.copyProperties(x, bmsFileInfo);
|
|
|
|
|
bmsFileInfo.setDetailId(bmsDeclarationRecords.getId());
|
|
|
|
|
fileInfoList.add(bmsFileInfo);
|
|
|
|
|
});
|
|
|
|
|
iBmsFileInfoService.saveOrUpdateBatch(fileInfoList);
|
|
|
|
|
}
|
|
|
|
|
return num;
|
|
|
|
|
}
|
|
|
|
|
// /**
|
|
|
|
|
// * 新增在线申报记录
|
|
|
|
|
// *
|
|
|
|
|
// * @param bmsDeclarationRecordsAddDto 在线申报记录
|
|
|
|
|
// * @return 结果
|
|
|
|
|
// */
|
|
|
|
|
// @Override
|
|
|
|
|
// public int insertBmsDeclarationRecords(BmsDeclarationRecordsAddDto bmsDeclarationRecordsAddDto) {
|
|
|
|
|
// iCommonService.checkEnterprise(bmsDeclarationRecordsAddDto.getEnterpriseId(), bmsDeclarationRecordsAddDto.getTemplateId());
|
|
|
|
|
// BmsDeclarationRecords bmsDeclarationRecords = new BmsDeclarationRecords();
|
|
|
|
|
// BeanUtil.copyProperties(bmsDeclarationRecordsAddDto, bmsDeclarationRecords);
|
|
|
|
|
// bmsDeclarationRecords.setMatter("");
|
|
|
|
|
// // 新增在线申请记录
|
|
|
|
|
// int num = baseMapper.insert(bmsDeclarationRecords);
|
|
|
|
|
// // 批量保存字段信息
|
|
|
|
|
// List<BmsFieldInfoAddDto> fieldList = bmsDeclarationRecordsAddDto.getFieldList();
|
|
|
|
|
// List<BmsFieldInfo> fieldInfoList = new ArrayList<>();
|
|
|
|
|
// if (null != fieldList && fieldList.size() > 0) {
|
|
|
|
|
// fieldList.forEach(x -> {
|
|
|
|
|
// BmsFieldInfo bmsFieldInfo = new BmsFieldInfo();
|
|
|
|
|
// BeanUtil.copyProperties(x, bmsFieldInfo);
|
|
|
|
|
// bmsFieldInfo.setDetailId(bmsDeclarationRecords.getId());
|
|
|
|
|
// fieldInfoList.add(bmsFieldInfo);
|
|
|
|
|
// });
|
|
|
|
|
// iBmsFieldInfoService.saveOrUpdateBatch(fieldInfoList);
|
|
|
|
|
// }
|
|
|
|
|
// // 批量保存文件信息
|
|
|
|
|
// List<BmsFileInfoAddDto> fileList = bmsDeclarationRecordsAddDto.getFileList();
|
|
|
|
|
// List<BmsFileInfo> fileInfoList = new ArrayList<>();
|
|
|
|
|
// if (null != fileList && fileList.size() > 0) {
|
|
|
|
|
// fileList.forEach(x -> {
|
|
|
|
|
// BmsFileInfo bmsFileInfo = new BmsFileInfo();
|
|
|
|
|
// BeanUtil.copyProperties(x, bmsFileInfo);
|
|
|
|
|
// bmsFileInfo.setDetailId(bmsDeclarationRecords.getId());
|
|
|
|
|
// fileInfoList.add(bmsFileInfo);
|
|
|
|
|
// });
|
|
|
|
|
// iBmsFileInfoService.saveOrUpdateBatch(fileInfoList);
|
|
|
|
|
// }
|
|
|
|
|
// return num;
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 修改在线申报记录
|
|
|
|
@ -366,10 +306,12 @@ public class BmsDeclarationRecordsServiceImpl extends ServiceImpl<BmsDeclaration
|
|
|
|
|
for (Object o : js1) {
|
|
|
|
|
JSONObject parse = JSONObject.parse(o.toString());
|
|
|
|
|
if ("el-upload".equals(parse.get("tag"))) {
|
|
|
|
|
if (parse.get("defaultValue") != null) {
|
|
|
|
|
String[] split = parse.get("defaultValue").toString().split(",");
|
|
|
|
|
strList.addAll(Arrays.asList(split));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return strList;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|