From 87a0bb113e1cc4950c3e8abaaf74b88412582b95 Mon Sep 17 00:00:00 2001 From: xd <844539747@qq.com> Date: Mon, 15 Jul 2024 16:20:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=95=E6=A0=87OA=E6=B5=81=E7=A8=8B=E5=AE=A1?= =?UTF-8?q?=E6=A0=B8=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ruoyi/quartz/domain/OASysBid.java | 42 +++++++++++++++ .../com/ruoyi/quartz/mapper/OABidMapper.java | 38 +++++++++++++ .../ruoyi/quartz/service/OABidService.java | 33 ++++++++++++ .../quartz/service/impl/OABidServiceImpl.java | 54 +++++++++++++++++++ .../java/com/ruoyi/quartz/task/BidTask.java | 48 +++++++++++++++++ .../resources/mapper/quartz/OABidMapper.xml | 27 ++++++++++ ruoyi-ui/src/views/monitor/job/index.vue | 10 ++-- 7 files changed, 247 insertions(+), 5 deletions(-) create mode 100644 ruoyi-quartz/src/main/java/com/ruoyi/quartz/domain/OASysBid.java create mode 100644 ruoyi-quartz/src/main/java/com/ruoyi/quartz/mapper/OABidMapper.java create mode 100644 ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/OABidService.java create mode 100644 ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/OABidServiceImpl.java create mode 100644 ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/BidTask.java create mode 100644 ruoyi-quartz/src/main/resources/mapper/quartz/OABidMapper.xml diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/domain/OASysBid.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/domain/OASysBid.java new file mode 100644 index 0000000..1ef88d3 --- /dev/null +++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/domain/OASysBid.java @@ -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; + } +} diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/mapper/OABidMapper.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/mapper/OABidMapper.java new file mode 100644 index 0000000..bdb998f --- /dev/null +++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/mapper/OABidMapper.java @@ -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 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); +} diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/OABidService.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/OABidService.java new file mode 100644 index 0000000..107faa9 --- /dev/null +++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/OABidService.java @@ -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 selectOABID(); + + /** + * 批量更新投标信息-OA审批状态为已完成 + * @param bidId + * @param state + * @param remark + */ + void updateBidOAApprovalStatus(String bidId,String state,String remark); + + + /** + * 将中间表 根据投标信息单号更新 isfinish=1 表示投标审核流程已结束 + */ + void updateOABidByBidCode(String bidCode); +} diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/OABidServiceImpl.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/OABidServiceImpl.java new file mode 100644 index 0000000..971a5fc --- /dev/null +++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/OABidServiceImpl.java @@ -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 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); + } +} diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/BidTask.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/BidTask.java new file mode 100644 index 0000000..d482aec --- /dev/null +++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/BidTask.java @@ -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 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(); + } + } +} diff --git a/ruoyi-quartz/src/main/resources/mapper/quartz/OABidMapper.xml b/ruoyi-quartz/src/main/resources/mapper/quartz/OABidMapper.xml new file mode 100644 index 0000000..ab15633 --- /dev/null +++ b/ruoyi-quartz/src/main/resources/mapper/quartz/OABidMapper.xml @@ -0,0 +1,27 @@ + + + + + + + update bid set bid_approval_status = #{state},bid_returnRemark = #{remark} + where bid_id = #{bidId} + + + + update sys_oa_bid set isFinish = '1' where bid_code = #{bidCode} + + diff --git a/ruoyi-ui/src/views/monitor/job/index.vue b/ruoyi-ui/src/views/monitor/job/index.vue index 50dfca5..ddadeb3 100644 --- a/ruoyi-ui/src/views/monitor/job/index.vue +++ b/ruoyi-ui/src/views/monitor/job/index.vue @@ -95,15 +95,15 @@ - - + + - - - + + +