From 67010d58ebb8f70058153e5270e64fc5d4e22a6a Mon Sep 17 00:00:00 2001 From: xd <844539747@qq.com> Date: Tue, 4 Jun 2024 08:52:22 +0800 Subject: [PATCH] '123' --- ABAP_AS_WITH_POOL.jcoDestination | 4 ++-- .../ruoyi/web/controller/quot/QuotController.java | 10 +++++++++- .../web/controller/tool/quot/quotJswController.java | 13 +++++++++++++ .../src/main/java/com/ruoyi/quot/domain/Quot.java | 5 +++++ .../src/main/resources/mapper/quot/QuotMapper.xml | 11 +++++++---- 5 files changed, 36 insertions(+), 7 deletions(-) diff --git a/ABAP_AS_WITH_POOL.jcoDestination b/ABAP_AS_WITH_POOL.jcoDestination index 7d5af67..54b7363 100644 --- a/ABAP_AS_WITH_POOL.jcoDestination +++ b/ABAP_AS_WITH_POOL.jcoDestination @@ -1,5 +1,5 @@ #for tests only ! -#Mon Jun 03 14:49:50 CST 2024 +#Tue Jun 04 08:13:25 CST 2024 jco.destination.pool_capacity=10 jco.client.lang=ZH jco.client.ashost=172.19.0.120 @@ -7,5 +7,5 @@ jco.client.saprouter= jco.client.user=RFC jco.client.sysnr=00 jco.destination.peak_limit=10 -jco.client.passwd=654321 +jco.client.passwd=d8I=KV+!D[+D!pL4TCjb[F!d9%S3gJ+,yj85yHvb$hqgCGl` jco.client.client=300 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 c52f97b..6f3b3b5 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 @@ -425,8 +425,9 @@ public class QuotController extends BaseController @PostMapping("/commitJswQuot") public AjaxResult commitJswQuot(@RequestBody Quot quot) { - // TODO 对接金思维接口 + quot.setQuotJswApprovalStatus("1");// 更新金思维提交状态为 协助中 + quotService.updateQuot(quot); return success(); } @@ -440,6 +441,8 @@ public class QuotController extends BaseController { // TODO 对接OA + quot.setQuotOAApprovalStatus("1");// 更新OA提交状态为 审批中 + quotService.updateQuot(quot); return success(); } @@ -471,6 +474,8 @@ public class QuotController extends BaseController String quot_jsxz_approval_status = quot.getQuotJsxzApprovalStatus(); String quot_hj_approval_status = quot.getQuotHjApprovalStatus(); String quot_jsw_approval_status = quot.getQuotJswApprovalStatus(); + String quot_oa_approval_status = quot.getQuotOAApprovalStatus(); + if("1".equals(quot_jsxz_approval_status)){ return error("技术协助还未完成"); } @@ -480,6 +485,9 @@ public class QuotController extends BaseController if("1".equals(quot_jsw_approval_status)){ return error("金思维协助还未完成"); } + if("1".equals(quot_oa_approval_status)){ + return error("OA审批流程还未完成"); + } quot.setQuotQuotationDate(DateUtils.getNowDate());//报价单-报价日期设置为 当前日期 quot.setQuotApprovalStatus("2"); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/quot/quotJswController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/quot/quotJswController.java index 847d455..1994d96 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/quot/quotJswController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/quot/quotJswController.java @@ -1,12 +1,16 @@ package com.ruoyi.web.controller.tool.quot; import com.alibaba.fastjson2.JSON; +import com.ruoyi.common.annotation.Log; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.R; +import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.quot.domain.Quot; import com.ruoyi.quot.domain.QuotMaterial; import com.ruoyi.quot.service.IQuotService; +import com.ruoyi.system.domain.SysOperLog; +import com.ruoyi.system.service.ISysOperLogService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; @@ -26,11 +30,20 @@ public class quotJswController extends BaseController { @Autowired private IQuotService quotService; + @Autowired + private ISysOperLogService iSysOperLogService; + @ApiOperation("同步报价数据") @PostMapping("/updateQuot") public R updateQuot(@RequestBody String quotJson) { try{ + // 记录接口日志 + SysOperLog sysOperLog = new SysOperLog(); + sysOperLog.setTitle("金思维返回报价数据"); + sysOperLog.setOperParam(quotJson); + iSysOperLogService.insertOperlog(sysOperLog); + quotModel quot = JSON.parseObject(quotJson, quotModel.class); if(quot==null){ return R.fail("参数异常为空"); 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 9fe2bb4..6f95fe7 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 @@ -149,6 +149,8 @@ public class Quot extends BaseEntity /** 金思维 **/ private String quotJswApprovalStatus; + /** OA **/ + private String quotOAApprovalStatus; /** 报价单-产品信息 */ private List quotMaterialList; @@ -422,4 +424,7 @@ public class Quot extends BaseEntity public String getQuotJswApprovalStatus() { return quotJswApprovalStatus; } public void setQuotJswApprovalStatus(String quotJswApprovalStatus) { this.quotJswApprovalStatus = quotJswApprovalStatus; } + public String getQuotOAApprovalStatus() { return quotOAApprovalStatus; } + + public void setQuotOAApprovalStatus(String quotOAApprovalStatus) { this.quotOAApprovalStatus = quotOAApprovalStatus; } } diff --git a/ruoyi-system/src/main/resources/mapper/quot/QuotMapper.xml b/ruoyi-system/src/main/resources/mapper/quot/QuotMapper.xml index 58a0d68..7c935a7 100644 --- a/ruoyi-system/src/main/resources/mapper/quot/QuotMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/quot/QuotMapper.xml @@ -63,7 +63,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + @@ -119,7 +119,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" h.quot_hj_code,h.quot_hj_pricing_date, h.quot_hj_remark, - a.quot_jsw_approval_status + a.quot_jsw_approval_status,a.quot_oa_approval_status from quot a @@ -159,7 +159,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" h.quot_hj_code,h.quot_hj_pricing_date, h.quot_hj_remark, - a.quot_jsw_approval_status, + a.quot_jsw_approval_status,a.quot_oa_approval_status, b.mat_id as sub_mat_id, b.mat_xingh as sub_mat_xingh, b.mat_guig as sub_mat_guig, b.mat_diany as sub_mat_diany, b.mat_standard as sub_mat_standard, b.mat_danw as sub_mat_danw, b.mat_sl as sub_mat_sl, @@ -235,6 +235,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" quot_hj_approval_status, quot_jsw_approval_status, + quot_oa_approval_status, #{quotId}, @@ -280,6 +281,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{quotHjApprovalStatus}, #{quotJswApprovalStatus}, + #{quotOAApprovalStatus}, @@ -328,7 +330,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" quot_hj_approval_status = #{quotHjApprovalStatus}, quot_jsw_approval_status = #{quotJswApprovalStatus}, - + quot_oa_approval_status = #{quotOAApprovalStatus}, + where quot_id = #{quotId}