投标OA流程审核功能

This commit is contained in:
xd 2024-07-15 16:20:44 +08:00
parent 348c82122a
commit 87a0bb113e
7 changed files with 247 additions and 5 deletions

View File

@ -0,0 +1,42 @@
package com.ruoyi.quartz.domain;
/**
* 投标信息对象 SysOaBid
*
* @author ruoyi
* @date 2024-04-01
*/
public class OASysBid
{
/** 投标信息id */
private String bidId;
/** 投标信息单号 */
private String bidCode;
/** OA审批状态 */
private String state;
/** OA审批备注 */
private String remark;
public String getBidId() { return bidId; }
public void setBidId(String bidId) { this.bidId = bidId; }
public String getBidCode() { return bidCode; }
public void setBidCode(String bidCode) { this.bidCode = bidCode; }
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
}

View File

@ -0,0 +1,38 @@
package com.ruoyi.quartz.mapper;
import com.ruoyi.quartz.domain.OASysBid;
import com.ruoyi.quartz.domain.OASysQuot;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 投标Mapper接口
*
* @author ruoyi
* @date 2024-04-01
*/
public interface OABidMapper
{
/**
* 查询 投标信息-OA审批状态为审批中的单号并且在中间表显示流程已经结束的单据根据单号更新 OA审批状态
* @return
*/
List<OASysBid> selectOABID();
/**
* 批量更新投标信息-OA审批状态为已完成
* @param bidId
* @param state
* @param remark
*/
void updateBidOAApprovalStatus(@Param("bidId") String bidId, @Param("state") String state, @Param("remark") String remark);
/**
* 将中间表 根据投标信息单号更新 isfinish=1 表示投标审核流程已结束
* @param bidCode
*/
void updateOABidByBidCode(String bidCode);
}

View File

@ -0,0 +1,33 @@
package com.ruoyi.quartz.service;
import com.ruoyi.quartz.domain.OASysBid;
import java.util.List;
/**
* 投标Service接口
*
* @author ruoyi
* @date 2024-04-01
*/
public interface OABidService
{
/**
* 查询 投标信息-OA审批状态为审批中的单号并且在中间表显示流程已经结束的单据根据单号更新 OA审批状态
* @return
*/
List<OASysBid> selectOABID();
/**
* 批量更新投标信息-OA审批状态为已完成
* @param bidId
* @param state
* @param remark
*/
void updateBidOAApprovalStatus(String bidId,String state,String remark);
/**
* 将中间表 根据投标信息单号更新 isfinish=1 表示投标审核流程已结束
*/
void updateOABidByBidCode(String bidCode);
}

View File

@ -0,0 +1,54 @@
package com.ruoyi.quartz.service.impl;
import com.ruoyi.quartz.domain.OASysBid;
import com.ruoyi.quartz.domain.OASysQuot;
import com.ruoyi.quartz.mapper.OABidMapper;
import com.ruoyi.quartz.mapper.OAQuotMapper;
import com.ruoyi.quartz.service.OABidService;
import com.ruoyi.quartz.service.OAQuotService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
/**
* 投标Service业务层处理
*
* @author ruoyi
* @date 2024-04-01
*/
@Service
public class OABidServiceImpl implements OABidService
{
@Resource
private OABidMapper aABidMapper;
/**
* 查询 投标信息-OA审批状态为审批中的单号并且在中间表显示流程已经结束的单据根据单号更新 OA审批状态
* @return
*/
@Override
public List<OASysBid> selectOABID() {
return aABidMapper.selectOABID();
}
/**
* 批量更新投标信息-OA审批状态为已完成
* @param bidId
* @param state
* @param remark
*/
@Override
public void updateBidOAApprovalStatus(String bidId,String state,String remark) {
aABidMapper.updateBidOAApprovalStatus(bidId,state,remark);
}
/**
* 将中间表 根据投标信息单号更新 isfinish=1 表示投标审核流程已结束
* @param bidCode
*/
@Override
public void updateOABidByBidCode(String bidCode) {
aABidMapper.updateOABidByBidCode(bidCode);
}
}

View File

@ -0,0 +1,48 @@
package com.ruoyi.quartz.task;
import com.ruoyi.quartz.domain.OASysBid;
import com.ruoyi.quartz.domain.OASysQuot;
import com.ruoyi.quartz.service.OABidService;
import com.ruoyi.quartz.service.OAQuotService;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import java.util.List;
/**
* 定时任务调度-投标信息OA流程状态读取
*
* @author ruoyi
*/
@Component("bidTask")
public class BidTask
{
@Resource
private OABidService bidService;
public static BidTask testUtils;
@PostConstruct
public void init() {
testUtils = this;
}
/**
* 检查OA 事业部经理直营店店长是否审核结束
*/
public void OABidCheck() throws Exception {
try {
// 查询 投标信息-OA审批状态为审批中的单号并且在中间表显示流程已经结束的单据根据单号更新 OA审批状态
List<OASysBid> bids = bidService.selectOABID();
for(OASysBid sysBid:bids){
// 批量更新投标信息-OA审批状态,备注
bidService.updateBidOAApprovalStatus(sysBid.getBidId(),sysBid.getState(),sysBid.getRemark());
//将中间表 根据投标信息单号更新 isfinish=1 表示审核流程已结束
bidService.updateOABidByBidCode(sysBid.getBidCode());
}
} catch (Exception e) {
e.printStackTrace();
}
}
}

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.quartz.mapper.OABidMapper">
<select id="selectOABID" resultType="OASysBid">
select q.bid_id as bidId,q.bid_code as bidCode,sq.state,sq.remark
from bid q
inner join (
select t.bid_code,t.state,t.remark from (
select a.bid_code,a.state,a.remark, row_number() over(partition by bid_code order by create_time desc) rw
from sys_oa_bid a
where a.triggerflag = '1' and a.state in ('1','3') and a.isFinish = '0'
) t where t.rw = 1
) sq on q.bid_code = sq.bid_code
where q.bid_approval_status = '4'
</select>
<update id="updateBidOAApprovalStatus">
update bid set bid_approval_status = #{state},bid_returnRemark = #{remark}
where bid_id = #{bidId}
</update>
<update id="updateOABidByBidCode">
update sys_oa_bid set isFinish = '1' where bid_code = #{bidCode}
</update>
</mapper>

View File

@ -96,14 +96,14 @@
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="任务编号" width="100" align="center" prop="jobId" /> <el-table-column label="任务编号" width="100" align="center" prop="jobId" />
<el-table-column label="任务名称" align="center" prop="jobName" :show-overflow-tooltip="true"/> <el-table-column label="任务名称" align="center" prop="jobName" :show-overflow-tooltip="true"/>
<el-table-column label="任务组名" align="center" prop="jobGroup"> <el-table-column label="任务组名" align="center" prop="jobGroup" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.sys_job_group" :value="scope.row.jobGroup"/> <dict-tag :options="dict.type.sys_job_group" :value="scope.row.jobGroup"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="调用目标字符串" align="center" prop="invokeTarget" :show-overflow-tooltip="true" /> <el-table-column label="调用目标字符串" align="center" prop="invokeTarget" :show-overflow-tooltip="true" width="200"/>
<el-table-column label="cron执行表达式" align="center" prop="cronExpression" :show-overflow-tooltip="true" /> <el-table-column label="cron执行表达式" align="center" prop="cronExpression" :show-overflow-tooltip="true" width="200"/>
<el-table-column label="状态" align="center"> <el-table-column label="状态" align="center" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch <el-switch
v-model="scope.row.status" v-model="scope.row.status"