From bf0cadb8d47b1899414b6164cb5eacddb0105ab8 Mon Sep 17 00:00:00 2001 From: xd <844539747@qq.com> Date: Wed, 17 Apr 2024 13:47:56 +0800 Subject: [PATCH] '123' --- .../priceVerification/QuotHjController.java | 47 ++++++++++++++++ .../web/controller/quot/QuotController.java | 4 ++ .../technicalConfirm/QuotJsqrController.java | 4 +- .../priceVerification/domain/QuotHj.java | 13 +++-- .../service/impl/QuotHjServiceImpl.java | 22 +++++--- .../com/ruoyi/quot/mapper/QuotMapper.java | 9 +++- .../com/ruoyi/quot/service/IQuotService.java | 9 +++- .../quot/service/impl/QuotServiceImpl.java | 12 ++++- .../main/resources/mapper/quot/QuotMapper.xml | 13 +++-- .../priceVerification/priceVerification.js | 19 +++++++ .../priceVerification/index.vue | 54 ++++++++++--------- ruoyi-ui/src/views/quot/quot/index.vue | 17 +++--- .../technicalConfirm/index.vue | 2 +- 13 files changed, 168 insertions(+), 57 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/priceVerification/QuotHjController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/priceVerification/QuotHjController.java index 831ce20..2f01a74 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/priceVerification/QuotHjController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/priceVerification/QuotHjController.java @@ -2,6 +2,12 @@ package com.ruoyi.web.controller.priceVerification; import java.util.List; import javax.servlet.http.HttpServletResponse; + +import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.common.utils.StringUtils; +import com.ruoyi.quot.domain.Quot; +import com.ruoyi.quot.service.IQuotService; +import com.ruoyi.technicalConfirm.domain.QuotJsqr; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; @@ -34,6 +40,9 @@ public class QuotHjController extends BaseController @Autowired private IQuotHjService quotHjService; + @Autowired + private IQuotService quotService; + /** * 查询报价单-核价单列表 */ @@ -101,4 +110,42 @@ public class QuotHjController extends BaseController { return toAjax(quotHjService.deleteQuotHjByQuotHjIds(quotHjIds)); } + + /** + * 报价单-核价单 提交报价组 + */ + @PreAuthorize("@ss.hasPermi('priceVerification:priceVerification:commit')") + @Log(title = "报价单-核价单 提交报价组", businessType = BusinessType.UPDATE) + @PostMapping("/commitHj") + public AjaxResult commitHj(@RequestBody QuotHj quotHj) { + + quotHj.setUpdateBy(getUsername()); + quotHj.setQuotHjPricingDate(DateUtils.getNowDate());//报价单-核价单 核价日期设置为 当前日期 + quotHjService.updateQuotHj(quotHj); + + String quotHjId = quotHj.getQuotHjId(); + Quot quot = quotService.selectQuotByQuotHjId(quotHjId); + quot.setQuotHjApprovalStatus("2");//报价单-核价单 状态设置为 已协助 + quotService.updateQuot(quot); + + return success(); + } + + /** + * 报价单-核价单 驳回 + */ + @PreAuthorize("@ss.hasPermi('priceVerification:priceVerification:reject')") + @Log(title = "报价单-核价单 驳回", businessType = BusinessType.OTHER) + @PostMapping("/rejectHj") + public AjaxResult rejectHj(@RequestBody QuotHj quotHj) + { + quotHj.setUpdateBy(getUsername()); + quotHjService.updateQuotHj(quotHj); + + String quotHjId = quotHj.getQuotHjId(); + Quot quot = quotService.selectQuotByQuotHjId(quotHjId); + quot.setQuotHjApprovalStatus("3"); + quotService.updateQuot(quot); + return success(); + } } 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 a7c4b42..e905f2a 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 @@ -301,6 +301,7 @@ public class QuotController extends BaseController quot.setQuotHjId(quotHjId); quot.setQuotHjApprovalStatus("1");//报价单-核价单 状态设置为 协助中 + quot.setUpdateBy(getUsername()); quotService.updateQuot(quot); return success(); @@ -326,7 +327,10 @@ public class QuotController extends BaseController return error("核价还未完成"); } + info.setQuotQuotationDate(DateUtils.getNowDate());//报价单-报价日期设置为 当前日期 info.setQuotApprovalStatus("2"); + info.setQuotCheckUserName(getUsername()); + quotService.updateQuot(info); return success(); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/technicalConfirm/QuotJsqrController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/technicalConfirm/QuotJsqrController.java index f1b84c2..c315814 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/technicalConfirm/QuotJsqrController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/technicalConfirm/QuotJsqrController.java @@ -332,8 +332,10 @@ public class QuotJsqrController extends BaseController @PostMapping("/commitQuot") public AjaxResult commitQuot(@RequestBody QuotJsqr quotJsqr) { - String quotJsqrId = quotJsqr.getQuotJsqrId(); + quotJsqr.setUpdateBy(getUsername()); + quotJsqrService.updateQuotJsqr(quotJsqr); + String quotJsqrId = quotJsqr.getQuotJsqrId(); QuotJsqr info = quotJsqrService.selectQuotJsqrByQuotJsqrId(quotJsqrId); Quot quot = quotService.selectQuotByQuotJsqrId(quotJsqrId); diff --git a/ruoyi-system/src/main/java/com/ruoyi/priceVerification/domain/QuotHj.java b/ruoyi-system/src/main/java/com/ruoyi/priceVerification/domain/QuotHj.java index abdfd7b..a93a047 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/priceVerification/domain/QuotHj.java +++ b/ruoyi-system/src/main/java/com/ruoyi/priceVerification/domain/QuotHj.java @@ -5,6 +5,8 @@ import org.apache.commons.lang3.builder.ToStringStyle; import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.core.domain.BaseEntity; +import java.util.Date; + /** * 报价单-核价单对象 quot_hj * @@ -27,8 +29,8 @@ public class QuotHj extends BaseEntity private String quotHjPricingType; /** 核价日期 */ - @Excel(name = "核价日期") - private String quotHjPricingDate; + @Excel(name = "核价日期",dateFormat = "yyyy-MM-dd hh:MM:ss") + private Date quotHjPricingDate; /** 备注 */ @Excel(name = "备注") @@ -75,12 +77,9 @@ public class QuotHj extends BaseEntity { return quotHjPricingType; } - public void setQuotHjPricingDate(String quotHjPricingDate) - { - this.quotHjPricingDate = quotHjPricingDate; - } + public void setQuotHjPricingDate(Date quotHjPricingDate) { this.quotHjPricingDate = quotHjPricingDate; } - public String getQuotHjPricingDate() + public Date getQuotHjPricingDate() { return quotHjPricingDate; } diff --git a/ruoyi-system/src/main/java/com/ruoyi/priceVerification/service/impl/QuotHjServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/priceVerification/service/impl/QuotHjServiceImpl.java index 6172f0d..08a7985 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/priceVerification/service/impl/QuotHjServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/priceVerification/service/impl/QuotHjServiceImpl.java @@ -7,22 +7,23 @@ import org.springframework.stereotype.Service; import com.ruoyi.priceVerification.mapper.QuotHjMapper; import com.ruoyi.priceVerification.domain.QuotHj; import com.ruoyi.priceVerification.service.IQuotHjService; +import org.springframework.transaction.annotation.Transactional; /** * 报价单-核价单Service业务层处理 - * + * * @author ruoyi * @date 2024-04-16 */ @Service -public class QuotHjServiceImpl implements IQuotHjService +public class QuotHjServiceImpl implements IQuotHjService { @Autowired private QuotHjMapper quotHjMapper; /** * 查询报价单-核价单 - * + * * @param quotHjId 报价单-核价单主键 * @return 报价单-核价单 */ @@ -34,7 +35,7 @@ public class QuotHjServiceImpl implements IQuotHjService /** * 查询报价单-核价单列表 - * + * * @param quotHj 报价单-核价单 * @return 报价单-核价单 */ @@ -46,23 +47,26 @@ public class QuotHjServiceImpl implements IQuotHjService /** * 新增报价单-核价单 - * + * * @param quotHj 报价单-核价单 * @return 结果 */ + @Transactional @Override public int insertQuotHj(QuotHj quotHj) { quotHj.setCreateTime(DateUtils.getNowDate()); + quotHj.setUpdateTime(DateUtils.getNowDate()); return quotHjMapper.insertQuotHj(quotHj); } /** * 修改报价单-核价单 - * + * * @param quotHj 报价单-核价单 * @return 结果 */ + @Transactional @Override public int updateQuotHj(QuotHj quotHj) { @@ -72,10 +76,11 @@ public class QuotHjServiceImpl implements IQuotHjService /** * 批量删除报价单-核价单 - * + * * @param quotHjIds 需要删除的报价单-核价单主键 * @return 结果 */ + @Transactional @Override public int deleteQuotHjByQuotHjIds(String[] quotHjIds) { @@ -84,10 +89,11 @@ public class QuotHjServiceImpl implements IQuotHjService /** * 删除报价单-核价单信息 - * + * * @param quotHjId 报价单-核价单主键 * @return 结果 */ + @Transactional @Override public int deleteQuotHjByQuotHjId(String quotHjId) { diff --git a/ruoyi-system/src/main/java/com/ruoyi/quot/mapper/QuotMapper.java b/ruoyi-system/src/main/java/com/ruoyi/quot/mapper/QuotMapper.java index 00c95ea..b1ac4be 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/quot/mapper/QuotMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/quot/mapper/QuotMapper.java @@ -86,9 +86,16 @@ public interface QuotMapper public int deleteQuotMaterialByQuotId(String quotId); /** - * 技术确认单Id + * 获取报价单信息 * @param quotJsqrId * @return */ Quot selectQuotByQuotJsqrId(String quotJsqrId); + + /** + * 获取报价单信息 + * @param quotHjId + * @return + */ + Quot selectQuotByQuotHjId(String quotHjId); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/quot/service/IQuotService.java b/ruoyi-system/src/main/java/com/ruoyi/quot/service/IQuotService.java index f8a46da..eec06e1 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/quot/service/IQuotService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/quot/service/IQuotService.java @@ -60,9 +60,16 @@ public interface IQuotService public int deleteQuotByQuotId(String quotId); /** - * 技术确认单Id + * 获取报价单信息 * @param quotJsqrId * @return */ Quot selectQuotByQuotJsqrId(String quotJsqrId); + + /** + * 获取报价单信息 + * @param quotHjId + * @return + */ + Quot selectQuotByQuotHjId(String quotHjId); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/quot/service/impl/QuotServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/quot/service/impl/QuotServiceImpl.java index cc78edf..14fa645 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/quot/service/impl/QuotServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/quot/service/impl/QuotServiceImpl.java @@ -114,7 +114,7 @@ public class QuotServiceImpl implements IQuotService } /** - * 技术确认单Id + * 获取报价单信息 * @param quotJsqrId * @return */ @@ -123,6 +123,16 @@ public class QuotServiceImpl implements IQuotService return quotMapper.selectQuotByQuotJsqrId(quotJsqrId); } + /** + * 获取报价单信息 + * @param quotHjId + * @return + */ + @Override + public Quot selectQuotByQuotHjId(String quotHjId) { + return quotMapper.selectQuotByQuotHjId(quotHjId); + } + /** * 新增报价单-产品信息 * diff --git a/ruoyi-system/src/main/resources/mapper/quot/QuotMapper.xml b/ruoyi-system/src/main/resources/mapper/quot/QuotMapper.xml index 100d9ce..f3603a4 100644 --- a/ruoyi-system/src/main/resources/mapper/quot/QuotMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/quot/QuotMapper.xml @@ -73,6 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 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 left join sys_dept d on u.dept_id = d.dept_id left join quot_jsqr q on q.quot_jsqr_id = a.quot_jsxz_confirm_id left join quot_hj h on h.quot_hj_id = a.quot_ht_id @@ -83,7 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" a.quot_customer_name,a.quot_salesman_dept_id, a.quot_salesman_dept_name, a.quot_address, a.quot_phone, a.quot_inquiry_date, a.quot_project, a.quot_quotation_date, a.quot_quotation_from, a.quot_quotation_require, a.quot_feedback_explanation, a.quot_quantity, a.quot_total_price, - a.quot_check_user_name, a.quot_check_user_nickname, a.quot_approval_status, + a.quot_check_user_name, u2.nick_name quot_check_user_nickname, a.quot_approval_status, a.create_by, a.create_time, a.update_by, a.update_time, u.nick_name create_name, a.quot_jsxz_standard,a.quot_jsxz_approval_status,a.quot_jsxz_chapter, @@ -119,7 +120,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select a.quot_id, a.quot_code, a.quot_salesman_bm, a.quot_salesman_name, a.quot_customer_name, a.quot_salesman_dept_id, a.quot_salesman_dept_name, a.quot_address, a.quot_phone, a.quot_inquiry_date, a.quot_project, a.quot_quotation_date, a.quot_quotation_from, a.quot_quotation_require, a.quot_feedback_explanation, - a.quot_quantity, a.quot_total_price, a.quot_check_user_name, a.quot_check_user_nickname, a.quot_approval_status, + a.quot_quantity, a.quot_total_price, a.quot_check_user_name, u2.nick_name quot_check_user_nickname, a.quot_approval_status, a.create_by, a.create_time, a.update_by, a.update_time, a.quot_jsxz_standard,a.quot_jsxz_approval_status,a.quot_jsxz_chapter, @@ -165,7 +166,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" quot_quantity, quot_total_price, quot_check_user_name, - quot_check_user_nickname, quot_approval_status, create_by, create_time, @@ -202,7 +202,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{quotQuantity}, #{quotTotalPrice}, #{quotCheckUserName}, - #{quotCheckUserNickname}, #{quotApprovalStatus}, #{createBy}, #{createTime}, @@ -242,7 +241,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" quot_quantity = #{quotQuantity}, quot_total_price = #{quotTotalPrice}, quot_check_user_name = #{quotCheckUserName}, - quot_check_user_nickname = #{quotCheckUserNickname}, quot_approval_status = #{quotApprovalStatus}, create_by = #{createBy}, create_time = #{createTime}, @@ -296,4 +294,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where quot_jsxz_confirm_id = #{quotJsqrId} + + diff --git a/ruoyi-ui/src/api/priceVerification/priceVerification.js b/ruoyi-ui/src/api/priceVerification/priceVerification.js index 02f3be4..1cea700 100644 --- a/ruoyi-ui/src/api/priceVerification/priceVerification.js +++ b/ruoyi-ui/src/api/priceVerification/priceVerification.js @@ -42,3 +42,22 @@ export function delPriceVerification(quotHjId) { method: 'delete' }) } + +//提交报价单-核价单 至报价组 +export function commitHj(data) { + return request({ + url: '/priceVerification/priceVerification/commitHj', + method: 'post', + data: data + }) +} + +//驳回报价单-核价单 +export function rejectHj(data) { + return request({ + url: '/priceVerification/priceVerification/rejectHj', + method: 'post', + data: data + }) +} +rejectHj diff --git a/ruoyi-ui/src/views/priceVerification/priceVerification/index.vue b/ruoyi-ui/src/views/priceVerification/priceVerification/index.vue index b7442ad..3e8b123 100644 --- a/ruoyi-ui/src/views/priceVerification/priceVerification/index.vue +++ b/ruoyi-ui/src/views/priceVerification/priceVerification/index.vue @@ -170,9 +170,9 @@ - @@ -190,9 +190,10 @@ }