From 88aabfb0c9034b114a39f2de7469262364abc6b8 Mon Sep 17 00:00:00 2001 From: xd Date: Wed, 5 Jun 2024 20:39:30 +0800 Subject: [PATCH] 123 --- .../web/controller/quot/QuotController.java | 2 +- .../com/ruoyi/quartz/domain/OASysQuot.java | 7 ++ .../com/ruoyi/quartz/mapper/OAQuotMapper.java | 7 ++ .../ruoyi/quartz/service/OAQuotService.java | 6 ++ .../service/impl/OAQuotServiceImpl.java | 9 +++ .../com/ruoyi/quartz/task/OAQuotTask.java | 2 + .../resources/mapper/quartz/OAQuotMapper.xml | 10 ++- .../java/com/ruoyi/quot/domain/SysOaQuot.java | 11 ++- .../main/resources/mapper/quot/QuotMapper.xml | 2 + ruoyi-ui/src/views/quot/quot/index.vue | 69 ++++++++++++------- 10 files changed, 92 insertions(+), 33 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/quot/QuotController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/quot/QuotController.java index db89ab4..213463d 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/quot/QuotController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/quot/QuotController.java @@ -487,7 +487,7 @@ public class QuotController extends BaseController sysOaQuot.setQuotTongPrice(quot.getQuotTongPrice()); sysOaQuot.setQuotMatpriceDiff(quot.getQuotMatpriceDiff()); sysOaQuot.setCreateTime(DateUtils.getNowDate()); - + sysOaQuot.setIsFinish("0");// 报价已提交OA审批中 sysOaQuot.setMaterials(quot.getQuotMaterialList()); quotService.insertSysOAQuot(sysOaQuot); diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/domain/OASysQuot.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/domain/OASysQuot.java index 0116023..fa7b6e4 100644 --- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/domain/OASysQuot.java +++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/domain/OASysQuot.java @@ -16,6 +16,9 @@ public class OASysQuot /** 报价单id */ private String quotId; + /** 报价单号 */ + private String quotCode; + /** OA审批状态 */ private String state; @@ -30,6 +33,10 @@ public class OASysQuot this.quotId = quotId; } + public String getQuotCode() {return quotCode;} + + public void setQuotCode(String quotCode) {this.quotCode = quotCode;} + public String getState() { return state; } diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/mapper/OAQuotMapper.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/mapper/OAQuotMapper.java index 0d3c430..e0dfca8 100644 --- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/mapper/OAQuotMapper.java +++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/mapper/OAQuotMapper.java @@ -27,4 +27,11 @@ public interface OAQuotMapper * @param remark */ void updateQuotOAApprovalStatus(@Param("quotId") String quotId, @Param("state") String state, @Param("remark") String remark); + + + /** + * 将中间表 根据报价单号更新 isfinish=1 表示报价流程已结束 + * @param quotCode + */ + void updateOAQuotByQuotCode(String quotCode); } diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/OAQuotService.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/OAQuotService.java index 8e3f163..11c2754 100644 --- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/OAQuotService.java +++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/OAQuotService.java @@ -24,4 +24,10 @@ public interface OAQuotService * @param quotId */ void updateQuotOAApprovalStatus(String quotId,String state,String remark); + + + /** + * 将中间表 根据报价单号更新 isfinish=1 表示报价流程已结束 + */ + void updateOAQuotByQuotCode(String quotCode); } diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/OAQuotServiceImpl.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/OAQuotServiceImpl.java index 55ede91..b84ca9c 100644 --- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/OAQuotServiceImpl.java +++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/OAQuotServiceImpl.java @@ -33,4 +33,13 @@ public class OAQuotServiceImpl implements OAQuotService public void updateQuotOAApprovalStatus(String quotId, String state, String remark) { aAQuotMapper.updateQuotOAApprovalStatus(quotId,state,remark); } + + /** + * 将中间表 根据报价单号更新 isfinish=1 表示报价流程已结束 + * @param quotCode + */ + @Override + public void updateOAQuotByQuotCode(String quotCode) { + aAQuotMapper.updateOAQuotByQuotCode(quotCode); + } } diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/OAQuotTask.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/OAQuotTask.java index 299cd36..6f215bd 100644 --- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/OAQuotTask.java +++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/OAQuotTask.java @@ -47,6 +47,8 @@ public class OAQuotTask for(OASysQuot sysoaquot:quots){ // 批量更新报价单-OA审批状态,备注 quotService.updateQuotOAApprovalStatus(sysoaquot.getQuotId(),sysoaquot.getState(),sysoaquot.getRemark()); + //将中间表 根据报价单号更新 isfinish=1 表示报价流程已结束 + quotService.updateOAQuotByQuotCode(sysoaquot.getQuotCode()); } redisCache.deleteObject("OAQuotTask"); }catch (Exception e) { diff --git a/ruoyi-quartz/src/main/resources/mapper/quartz/OAQuotMapper.xml b/ruoyi-quartz/src/main/resources/mapper/quartz/OAQuotMapper.xml index f799886..d977dc9 100644 --- a/ruoyi-quartz/src/main/resources/mapper/quartz/OAQuotMapper.xml +++ b/ruoyi-quartz/src/main/resources/mapper/quartz/OAQuotMapper.xml @@ -4,20 +4,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> update quot set quot_oa_approval_status = #{state},quot_oa_approval_remark = #{remark} where quot_id = #{quotId} + + + update sys_oa_quot set isFinish = '1' where quot_code = #{quotCode} + diff --git a/ruoyi-system/src/main/java/com/ruoyi/quot/domain/SysOaQuot.java b/ruoyi-system/src/main/java/com/ruoyi/quot/domain/SysOaQuot.java index 48513c0..2373c32 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/quot/domain/SysOaQuot.java +++ b/ruoyi-system/src/main/java/com/ruoyi/quot/domain/SysOaQuot.java @@ -67,6 +67,9 @@ public class SysOaQuot extends BaseEntity /** OA审批备注 */ private String remark; + /** 报价单状态 1-整个报价流程结束(包括已反馈、已驳回) ,0-提交OA待审批*/ + private String isFinish; + /** 明细 */ List materials; @@ -162,9 +165,7 @@ public class SysOaQuot extends BaseEntity return quotQuotationRequire; } - public void setQuotQuotationRequire(String quotQuotationRequire) { - this.quotQuotationRequire = quotQuotationRequire; - } + public void setQuotQuotationRequire(String quotQuotationRequire) {this.quotQuotationRequire = quotQuotationRequire;} public String getQuotLvPrice() { return quotLvPrice; @@ -200,6 +201,10 @@ public class SysOaQuot extends BaseEntity @Override public void setRemark(String remark) { this.remark = remark; } + public String getIsFinish() {return isFinish;} + + public void setIsFinish(String isFinish) {this.isFinish = isFinish;} + public List getMaterials() { return materials; } diff --git a/ruoyi-system/src/main/resources/mapper/quot/QuotMapper.xml b/ruoyi-system/src/main/resources/mapper/quot/QuotMapper.xml index 096d06d..8ef92c8 100644 --- a/ruoyi-system/src/main/resources/mapper/quot/QuotMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/quot/QuotMapper.xml @@ -319,6 +319,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" quot_tong_price, quot_matprice_diff, create_time, + isFinish, #{userId}, @@ -337,6 +338,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{quotTongPrice}, #{quotMatpriceDiff}, #{createTime}, + #{isFinish}, diff --git a/ruoyi-ui/src/views/quot/quot/index.vue b/ruoyi-ui/src/views/quot/quot/index.vue index 6c5ffc9..a0bf9ae 100644 --- a/ruoyi-ui/src/views/quot/quot/index.vue +++ b/ruoyi-ui/src/views/quot/quot/index.vue @@ -365,7 +365,7 @@ 上传文件 - +