审核列表修改

duhanyu
杜函宇 2 weeks ago
parent b86adcbf72
commit 332aa7eaaf

@ -40,9 +40,7 @@ public class BmsEnterpriseFillController extends BaseController {
return toAjax(iBmsEnterpriseFillService.add(enterpriseFillResquest));
}
//企业填报之后要新增一条审批记录
//政务端审批之后也要新增一条
//被驳回之后也要新增一条审批记录
/**
*

@ -1,5 +1,6 @@
package com.ruoyi.jjh.declaration.service.impl;
import cn.hutool.core.date.DateTime;
import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@ -149,18 +150,19 @@ public class BmsDeclarationRecordsServiceImpl extends ServiceImpl<BmsDeclaration
public int updateApprovalInfo(BmsApprovalInfoUpdateDto bmsApprovalInfoUpdateDto) {
// 审批记录
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())) {
throw new ServiceException("无法审批!");
} else {
ba.setId(null);
ba.setId(ba.getId());
ba.setApprovalById(SecurityUtils.getUserId());
ba.setApprovalStatus(bmsApprovalInfoUpdateDto.getApprovalStatus());
ba.setApprovalOpinions(bmsApprovalInfoUpdateDto.getApprovalOpinions());
ba.setApprovalAttachment(bmsApprovalInfoUpdateDto.getApprovalAttachment());
ba.setSort(list.size() + 1);
iBmsApprovalInfoService.save(ba);
ba.setApprovalTime(DateTime.now());
iBmsApprovalInfoService.updateById(ba);
}
int num = approval(bmsApprovalInfoUpdateDto, ba.getProcessId(), list.size() + 1);
return num;
@ -169,20 +171,20 @@ public class BmsDeclarationRecordsServiceImpl extends ServiceImpl<BmsDeclaration
public int approval(BmsApprovalInfoUpdateDto bmsApprovalInfoUpdateDto, Long id, Integer a) {
//获取审批之前的流程
BmsProcessInfo bmsProcessInfo = iBmsProcessInfoService.getById(id);
// if (bmsApprovalInfoUpdateDto.getApprovalStatus() == 1) {
// //根据审批之前的流程获取下一个流程id的详情数据
// if (bmsProcessInfo.getNextProcessId() != 0) {
// BmsProcessInfo newBmsProcessInfo = iBmsProcessInfoService.getById(bmsProcessInfo.getNextProcessId());
// BmsApprovalInfo ar = new BmsApprovalInfo();
// ar.setProcessId(bmsProcessInfo.getNextProcessId());
// ar.setDeclarationRecordsId(bmsApprovalInfoUpdateDto.getDeclarationRecordsId());
// ar.setApprovalStatus(0);
// ar.setApprovalDept(newBmsProcessInfo.getApprovalDept());
// ar.setSort(a + 1);
// ar.setIsReview(0);
// iBmsApprovalInfoService.save(ar);
// }
// }
if (bmsApprovalInfoUpdateDto.getApprovalStatus() == 1) {
//根据审批之前的流程获取下一个流程id的详情数据
if (bmsProcessInfo.getNextProcessId() != 0) {
BmsProcessInfo newBmsProcessInfo = iBmsProcessInfoService.getById(bmsProcessInfo.getNextProcessId());
BmsApprovalInfo ar = new BmsApprovalInfo();
ar.setProcessId(bmsProcessInfo.getNextProcessId());
ar.setDeclarationRecordsId(bmsApprovalInfoUpdateDto.getDeclarationRecordsId());
ar.setApprovalStatus(0);
ar.setApprovalDept(newBmsProcessInfo.getApprovalDept());
ar.setSort(a + 1);
ar.setIsReview(0);
iBmsApprovalInfoService.save(ar);
}
}
BmsDeclarationRecords bmsDeclarationRecords = baseMapper.selectById(bmsApprovalInfoUpdateDto.getDeclarationRecordsId());
BmsEnterpriseBasicInfo one = iBmsEnterpriseBasicInfoService.lambdaQuery().eq(BmsEnterpriseBasicInfo::getTyshxydm, bmsDeclarationRecords.getCreditCode()).one();
JProject jp = new JProject();
@ -198,6 +200,8 @@ public class BmsDeclarationRecordsServiceImpl extends ServiceImpl<BmsDeclaration
timingRemindImpl.getContact(one.getTyshxydm(), "您有1个申报任务[初审不通过]");
}
if (bmsApprovalInfoUpdateDto.getApprovalStatus() == 3) {
//生成审批
iCommonService.insertAuditRecord(bmsApprovalInfoUpdateDto.getDeclarationRecordsId(), 0);
jp.setStatus(10);
bmsDeclarationRecords.setStatus(10L);
timingRemindImpl.getContact(one.getTyshxydm(), "您有1个申报任务[初审退回],待重新填报");

@ -5,18 +5,10 @@ import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.jjh.declaration.entity.BmsDeclarationRecords;
import com.ruoyi.jjh.declaration.entity.BmsEnterpriseBasicInfo;
import com.ruoyi.jjh.declaration.entity.BmsEnterpriseDirectory;
import com.ruoyi.jjh.declaration.entity.BmsTemplateRecord;
import com.ruoyi.jjh.declaration.entity.*;
import com.ruoyi.jjh.declaration.entity.request.EnterpriseFileResquest;
import com.ruoyi.jjh.declaration.entity.request.EnterpriseFillResquest;
import com.ruoyi.jjh.declaration.service.IBmsDeclarationRecordsService;
import com.ruoyi.jjh.declaration.service.IBmsEnterpriseBasicInfoService;
import com.ruoyi.jjh.declaration.service.IBmsEnterpriseDirectoryService;
import com.ruoyi.jjh.declaration.service.IBmsEnterpriseFillService;
import com.ruoyi.jjh.declaration.service.IBmsTemplateRecordService;
import com.ruoyi.jjh.declaration.service.ICommonService;
import com.ruoyi.jjh.declaration.service.*;
import com.ruoyi.jjh.ent.entity.JProject;
import com.ruoyi.jjh.ent.service.JProjectService;
import org.springframework.beans.factory.annotation.Autowired;
@ -25,6 +17,7 @@ import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
@ -33,7 +26,8 @@ import java.util.Map;
*/
@Service
public class BmsEnterpriseFillServiceImpl implements IBmsEnterpriseFillService {
@Autowired
private IBmsApprovalInfoService iBmsApprovalInfoService;
@Resource
private IBmsDeclarationRecordsService iBmsDeclarationRecordsService;
@ -180,8 +174,6 @@ public class BmsEnterpriseFillServiceImpl implements IBmsEnterpriseFillService {
addProject.setOtherJson(sm.get("str"));
addProject.setFileJson(sm.get("fileStr"));
jProjectService.updateById(addProject);
// 修改审批状态
iCommonService.insertAuditRecord(enterpriseFillResquest.getDeclarationId(), 0);
}
/**

@ -7,6 +7,7 @@ import com.ruoyi.jjh.ent.entity.JProject;
import com.ruoyi.jjh.ent.entity.JProjectFund;
import com.ruoyi.jjh.ent.entity.request.JTop5FundRequest;
import com.ruoyi.jjh.ent.entity.response.JServicesDevelopResponse;
import com.ruoyi.jjh.ent.entity.response.ThreeYearsFundResponse;
import com.ruoyi.jjh.ent.service.JChiefWorkService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -47,7 +48,7 @@ public class JChiefWorkController extends BaseController {
* -
*/
@PreAuthorize("@ss.hasAnyRoles('admin,other-gov,gov')")
@ApiOperation(value = "政务端-工作台 近三年资金拨付情况")
@ApiOperation(value = "政务端-工作台 近三年资金拨付情况",response = ThreeYearsFundResponse.class)
@GetMapping("/threeYearsFund/{years}")
public AjaxResult getThreeYearsFund(@PathVariable String years) {
return success(jChiefWorkService.getThreeYearsFund(years));

@ -229,8 +229,7 @@
<select id="approvalList"
resultType="com.ruoyi.jjh.declaration.entity.vo.ApprovalDeclarationRecordsQueryVo">
SELECT
IF
( s.approval_status = 0, 0, NULL ) AS approvalStatus,
s.approval_status AS approvalStatus,
e.enterprise_directory,
i.LEVEL,
i.responsibility_unit,
@ -240,28 +239,25 @@
a.`status`,
a.template_record_id,
e.template_id,
a.id AS declarationRecordsId
a.id AS declarationRecordsId,
s.approval_time as approvalTime
FROM
bms_declaration_records a
INNER JOIN bms_enterprise_basic_info c ON a.credit_code = c.tyshxydm
INNER JOIN bms_template_record e ON a.template_record_id = e.id
INNER JOIN bms_template_info i ON e.template_id = i.id
INNER JOIN (
SELECT
a.*
FROM
bms_approval_info a
JOIN ( SELECT declaration_records_id, max( sort ) AS max_sort FROM bms_approval_info
LEFT JOIN bms_enterprise_basic_info c ON a.credit_code = c.tyshxydm
LEFT JOIN bms_template_record e ON a.template_record_id = e.id
LEFT JOIN bms_template_info i ON e.template_id = i.id
LEFT JOIN (SELECT *
FROM bms_approval_info
WHERE id IN (
SELECT MAX(id)
FROM bms_approval_info
GROUP BY declaration_records_id, approval_dept
)) s ON s.declaration_records_id = a.id
LEFT JOIN bms_process_info d on s.process_id = d.id
<where>
<if test="approvalDept != null">
approval_dept = #{approvalDept}
d.approval_dept = #{approvalDept}
</if>
</where>
GROUP BY declaration_records_id ) b ON a.declaration_records_id = b.declaration_records_id
AND a.sort = b.max_sort
) AS s ON a.id = s.declaration_records_id
AND is_before_data = 0
<where>
<if test="enterpriseDirectory != null and enterpriseDirectory != ''">and e.enterprise_directory like
concat('%', #{enterpriseDirectory},
'%')

@ -84,9 +84,9 @@
SELECT
years,
service_type,
plans_num AS fundBudget,
IFNULL(( COALESCE ( one_adjustments, 0 ) + COALESCE ( two_adjustments, 0 )), 0 ) AS additionBudget,
IFNULL( execute_num, 0 ) AS appropriationFund,
ROUND(plans_num,1) AS fundBudget,
IFNULL(ROUND(COALESCE ( one_adjustments, 0 ) + COALESCE ( two_adjustments, 0 ),1), 0 ) AS additionBudget,
IFNULL( ROUND(execute_num,1), 0 ) AS appropriationFund,
IFNULL(
ROUND( execute_num / ( COALESCE ( one_adjustments, 0 ) + COALESCE ( two_adjustments, 0 )+ COALESCE ( plans_num, 0 )) * 100, 0 ),
0

Loading…
Cancel
Save