From 185ef591722f5c9db08a1f8e015151fabe95fc35 Mon Sep 17 00:00:00 2001 From: xd <844539747@qq.com> Date: Thu, 8 Aug 2024 11:05:22 +0800 Subject: [PATCH] '111222' --- .../web/controller/quot/QuotController.java | 1 + .../main/java/com/ruoyi/quot/domain/Quot.java | 6 +- .../com/ruoyi/quot/domain/QuotSecDiff.java | 138 ++++++++++++++++++ .../java/com/ruoyi/quot/domain/SysOaQuot.java | 7 + .../main/resources/mapper/quot/QuotMapper.xml | 65 ++++++++- ruoyi-ui/src/views/quot/quot/index.vue | 11 +- .../statisticsQuot/statisticsQuot/index.vue | 1 + 7 files changed, 221 insertions(+), 8 deletions(-) create mode 100644 ruoyi-system/src/main/java/com/ruoyi/quot/domain/QuotSecDiff.java 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 0e166ea..1ed004f 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 @@ -813,6 +813,7 @@ public class QuotController extends BaseController sysOaQuot.setQuotTongPrice(quot.getQuotTongPrice()); sysOaQuot.setQuotMatpriceDiff(quot.getQuotMatpriceDiff()); sysOaQuot.setQuotMatpriceDiff2(quot.getQuotMatpriceDiff2()); + sysOaQuot.setQuotBjyRemark(quot.getQuotBjyRemark()); // 上传反馈清单 QuotFile quotFile = new QuotFile(); diff --git a/ruoyi-system/src/main/java/com/ruoyi/quot/domain/Quot.java b/ruoyi-system/src/main/java/com/ruoyi/quot/domain/Quot.java index 0335469..9c329ee 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/quot/domain/Quot.java +++ b/ruoyi-system/src/main/java/com/ruoyi/quot/domain/Quot.java @@ -134,7 +134,8 @@ public class Quot extends BaseEntity /** 报价单区分(1:报价生成询价单-传明细 2:创建询价单-传附件) */ private String quotDistinguish; - + /** 报价员备注 */ + private String quotBjyRemark; /** 技术协助 */ private String quotJsxzStandard;//技术协助-标准 @@ -391,11 +392,12 @@ public class Quot extends BaseEntity public String getQuotHandle() { return quotHandle; } public void setQuotHandle(String quotHandle) { this.quotHandle = quotHandle; } - public String getQuotDistinguish() {return quotDistinguish;} public void setQuotDistinguish(String quotDistinguish) {this.quotDistinguish = quotDistinguish;} + public String getQuotBjyRemark() { return quotBjyRemark; } + public void setQuotBjyRemark(String quotBjyRemark) { this.quotBjyRemark = quotBjyRemark; } public List getQuotMaterialList() { return quotMaterialList; } public void setQuotMaterialList(List quotMaterialList) diff --git a/ruoyi-system/src/main/java/com/ruoyi/quot/domain/QuotSecDiff.java b/ruoyi-system/src/main/java/com/ruoyi/quot/domain/QuotSecDiff.java new file mode 100644 index 0000000..4833bfd --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/quot/domain/QuotSecDiff.java @@ -0,0 +1,138 @@ +package com.ruoyi.quot.domain; + +import com.ruoyi.common.core.domain.BaseEntity; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 报价对象 quot + * + * @author ruoyi + * @date 2024-04-01 + */ +public class QuotSecDiff extends BaseEntity +{ + private String quotCode; + + /** 业务员 */ + private String quotSalesmanName; + + /** 客户名称 */ + private String quotCustomerName; + + /** 询价日期 */ + private Date quotInquiryDate; + + /** 项目名称 */ + private String quotProject; + + /** 报价日期 */ + private Date quotQuotationDate; + + /** 明细条数 */ + private Integer quotMaterialsCount; + + /** 总价 */ + private String quotTotalPrice; + + /** 审核人 */ + private String quotCheckUserNickname; + + /** 创建人 */ + private String createName; + + /** 处理时间 */ + private String secDiff; + + public String getQuotCode() { + return quotCode; + } + + public void setQuotCode(String quotCode) { + this.quotCode = quotCode; + } + + public String getQuotSalesmanName() { + return quotSalesmanName; + } + + public void setQuotSalesmanName(String quotSalesmanName) { + this.quotSalesmanName = quotSalesmanName; + } + + public String getQuotCustomerName() { + return quotCustomerName; + } + + public void setQuotCustomerName(String quotCustomerName) { + this.quotCustomerName = quotCustomerName; + } + + public Date getQuotInquiryDate() { + return quotInquiryDate; + } + + public void setQuotInquiryDate(Date quotInquiryDate) { + this.quotInquiryDate = quotInquiryDate; + } + + public String getQuotProject() { + return quotProject; + } + + public void setQuotProject(String quotProject) { + this.quotProject = quotProject; + } + + public Date getQuotQuotationDate() { + return quotQuotationDate; + } + + public void setQuotQuotationDate(Date quotQuotationDate) { + this.quotQuotationDate = quotQuotationDate; + } + + public Integer getQuotMaterialsCount() { + return quotMaterialsCount; + } + + public void setQuotMaterialsCount(Integer quotMaterialsCount) { + this.quotMaterialsCount = quotMaterialsCount; + } + + public String getQuotTotalPrice() { + return quotTotalPrice; + } + + public void setQuotTotalPrice(String quotTotalPrice) { + this.quotTotalPrice = quotTotalPrice; + } + + public String getQuotCheckUserNickname() { + return quotCheckUserNickname; + } + + public void setQuotCheckUserNickname(String quotCheckUserNickname) { + this.quotCheckUserNickname = quotCheckUserNickname; + } + + public String getCreateName() { + return createName; + } + + public void setCreateName(String createName) { + this.createName = createName; + } + + public String getSecDiff() { + BigDecimal value = new BigDecimal(secDiff); + BigDecimal noZeros = value.stripTrailingZeros(); + String result = noZeros.toPlainString(); + return result; + } + + public void setSecDiff(String secDiff) { + this.secDiff = secDiff; + } +} 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 443c8a4..eafd6f5 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 @@ -69,6 +69,9 @@ public class SysOaQuot extends BaseEntity /** 总价 */ private String quotTotalPrice; + /** 报价员备注 */ + private String quotBjyRemark; + /** OA审批状态 */ private String state; @@ -211,6 +214,10 @@ public class SysOaQuot extends BaseEntity public void setQuotTotalPrice(String quotTotalPrice) { this.quotTotalPrice = quotTotalPrice; } + public String getQuotBjyRemark() { return quotBjyRemark; } + + public void setQuotBjyRemark(String quotBjyRemark) { this.quotBjyRemark = quotBjyRemark; } + public String getState() { return state; } public void setState(String state) { this.state = state; } diff --git a/ruoyi-system/src/main/resources/mapper/quot/QuotMapper.xml b/ruoyi-system/src/main/resources/mapper/quot/QuotMapper.xml index fa0e999..44be5d7 100644 --- a/ruoyi-system/src/main/resources/mapper/quot/QuotMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/quot/QuotMapper.xml @@ -48,6 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + @@ -122,7 +123,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" a.quot_quotation_require, a.quot_feedback_explanation, a.quot_quantity, a.quot_total_price, a.quot_check_user_name, u2.nick_name quot_check_user_nickname,a.quot_jsw_check_user_nickname,a.quot_bzr_user_nickname, a.quot_approval_status,a.quot_materials_count,a.quot_rbDateUid, a.quot_lv_price,a.quot_tong_price,a.quot_matprice_diff,a.quot_matprice_diff2,a.quot_print,a.quot_print_user_name,u3.nick_name quot_print_user_nickName, - a.create_by, a.create_time, a.update_by, a.update_time, u.nick_name create_name,a.quot_handle,a.quot_distinguish, + a.create_by, a.create_time, a.update_by, a.update_time, u.nick_name create_name,a.quot_handle,a.quot_distinguish,a.quot_bjy_remark, a.quot_jsxz_standard,a.quot_jsxz_approval_status,a.quot_jsxz_chapter, a.quot_jsxz_technical_requirement,a.quot_jsxz_group_values,a.quot_jsxz_confirm_id, @@ -260,6 +261,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" quot_print, quot_print_user_name, quot_distinguish, + quot_bjy_remark, create_by, create_time, update_by, @@ -311,6 +313,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{quotPrint}, #{quotPrintUserName}, #{quotDistinguish}, + #{quotBjyRemark}, #{createBy}, #{createTime}, #{updateBy}, @@ -356,6 +359,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" quot_matprice_diff2, quot_fk_file, quot_total_price, + quot_bjy_remark, create_time, isFinish, @@ -379,6 +383,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{quotMatpriceDiff2}, #{quotFkFile}, #{quotTotalPrice}, + #{quotBjyRemark}, #{createTime}, #{isFinish}, @@ -420,6 +425,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" quot_print_user_name = #{quotPrintUserName}, quot_jsw_check_user_nickname = #{quotJswCheckUserNickname}, quot_bzr_user_nickname = #{quotBzrUserNickname}, + quot_bjy_remark = #{quotBjyRemark}, create_by = #{createBy}, create_time = #{createTime}, update_by = #{updateBy}, @@ -547,8 +553,58 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + + + + select a.quot_code quotCode,a.quot_salesman_name quotSalesmanName,a.quot_customer_name quotCustomerName, + a.quot_project quotProject, a.quot_materials_count quotMaterialsCount, + a.quot_total_price quotTotalPrice,a.quot_inquiry_date quotInquiryDate,a.quot_quotation_date quotQuotationDate, + a.quot_check_user_nickname quotCheckUserNickname, + a.create_name createName,a.create_time createTime, + + ROUND( + + (case when a.dayDiff = 0 and a.secDiff1 =]]> 0 and a.secDiff2 =]]> 0 then a.secDiff1+a.secDiff2 + + when a.dayDiff = 0 and a.secDiff1 0 and a.secDiff3 0 and a.secDiff2 =]]> 0 then a.secDiff2 + + when a.dayDiff = 0 then a.secDiff + + when a.dayDiff = 1 then a.secDiff-14*3600 + + when a.dayDiff > 1 then a.secDiff-(a.dayDiff-1)*24*3600 + else 0 end) / 3600.00, 2) secDiff + FROM ( + select a.quot_code,a.quot_salesman_name,a.quot_customer_name,a.quot_project, a.quot_materials_count, + a.quot_total_price,a.quot_inquiry_date,a.quot_quotation_date,u2.nick_name quot_check_user_nickname, + u.nick_name create_name,a.create_time, + + datediff(second,quot_inquiry_date,CONVERT(DATETIME, CONVERT(VARCHAR(10),quot_inquiry_date,111) + ' ' + '11:30:00')) secDiff1, + + datediff(second,CONVERT(DATETIME, CONVERT(VARCHAR(10),quot_quotation_date,111) + ' ' + '13:00:00'),quot_quotation_date) secDiff2, + + datediff(second,CONVERT(DATETIME, CONVERT(VARCHAR(10),quot_inquiry_date,111) + ' ' + '13:00:00'),quot_inquiry_date) secDiff3, + datediff(day,quot_inquiry_date,quot_quotation_date) dayDiff, + datediff(second,quot_inquiry_date,quot_quotation_date) secDiff + from quot a + left join sys_user u on u.user_name=a.create_by + left join sys_user u2 on u2.user_name=a.quot_check_user_name + and quot_code like concat('%', #{quotCode}, '%') and quot_customer_name like concat('%', #{quotCustomerName}, '%') @@ -562,6 +618,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and (a.quot_approval_status = '2' or (a.quot_approval_status = '3' and a.quot_oa_approval_status = '3')) + )a order by a.quot_quotation_date desc @@ -602,7 +659,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" else 0 end secDiff from ( select quot_code,quot_inquiry_date, quot_quotation_date, - + datediff(second,quot_inquiry_date,CONVERT(DATETIME, CONVERT(VARCHAR(10),quot_inquiry_date,111) + ' ' + '11:30:00')) secDiff1, datediff(second,CONVERT(DATETIME, CONVERT(VARCHAR(10),quot_quotation_date,111) + ' ' + '13:00:00'),quot_quotation_date) secDiff2, diff --git a/ruoyi-ui/src/views/quot/quot/index.vue b/ruoyi-ui/src/views/quot/quot/index.vue index d20f9cf..be3ca05 100644 --- a/ruoyi-ui/src/views/quot/quot/index.vue +++ b/ruoyi-ui/src/views/quot/quot/index.vue @@ -426,7 +426,14 @@ - + + + + + + + + @@ -439,7 +446,6 @@ - 清单附件(先保存再上传且必须是EXCEL文件)
@@ -1291,6 +1297,7 @@ export default { quotQuotationRequire: null, quotFeedbackExplanation: null, quotOAApprovalStatusRemark: null, + quotBjyRemark: null, quotApprovalStatus: null, quotPrintUserName: null, diff --git a/ruoyi-ui/src/views/statisticsQuot/statisticsQuot/index.vue b/ruoyi-ui/src/views/statisticsQuot/statisticsQuot/index.vue index cdc8625..19cd3d9 100644 --- a/ruoyi-ui/src/views/statisticsQuot/statisticsQuot/index.vue +++ b/ruoyi-ui/src/views/statisticsQuot/statisticsQuot/index.vue @@ -87,6 +87,7 @@ {{ parseTime(scope.row.createTime) }} +