From cd3460ea2c31b781cc13c35e32ecec33a30a83d0 Mon Sep 17 00:00:00 2001 From: xd <844539747@qq.com> Date: Tue, 11 Jun 2024 13:24:35 +0800 Subject: [PATCH] '123' --- .../customer/CustomerController.java | 8 +- .../web/controller/quot/QuotController.java | 65 +++++++- .../com/ruoyi/web/utils/SapHana/HanaDB.java | 157 ++++++++++++++++++ .../ruoyi/web/utils/SapHana/SapHanaUtils.java | 43 +++++ .../ruoyi/quartz/config/ScheduleConfig.java | 108 ++++++------ .../java/com/ruoyi/quartz/task/QuotTask.java | 25 +-- .../java/com/ruoyi/quartz/task/RbTask.java | 24 +-- .../com/ruoyi/quot/domain/jsw/QuotJsw.java | 16 ++ .../ruoyi/quot/domain/jsw/QuotJswFile.java | 23 +-- .../ruoyi/quot/domain/jsw/QuotJswFiles.java | 3 + .../ruoyi/quot/domain/jsw/QuotJswInfo.java | 82 +++++++++ .../quot/domain/jsw/QuotJswMaterial.java | 72 ++++++++ .../ruoyi/quot/domain/jsw/QuotJswResult.java | 18 +- .../ruoyi/quot/domain/jsw/QuotJswUser.java | 47 ++++++ .../quot/domain/jsw/QuotJswUserResult.java | 25 +++ .../quot/domain/jsw/QuotResultObject.java | 16 ++ .../quot/service/impl/QuotServiceImpl.java | 2 +- 17 files changed, 609 insertions(+), 125 deletions(-) create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/web/utils/SapHana/HanaDB.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/web/utils/SapHana/SapHanaUtils.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/quot/domain/jsw/QuotJsw.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/quot/domain/jsw/QuotJswInfo.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/quot/domain/jsw/QuotJswMaterial.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/quot/domain/jsw/QuotJswUser.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/quot/domain/jsw/QuotJswUserResult.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/quot/domain/jsw/QuotResultObject.java diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/customer/CustomerController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/customer/CustomerController.java index 8c1ac6d..2313eb6 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/customer/CustomerController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/customer/CustomerController.java @@ -22,6 +22,7 @@ import com.ruoyi.system.service.ISysConfigService; import com.ruoyi.system.service.ISysNoticeService; import com.ruoyi.web.utils.IdUtils; import com.ruoyi.web.utils.SapFunction.SapRfcUtils; +import com.ruoyi.web.utils.SapHana.SapHanaUtils; import com.ruoyi.web.utils.SendNotice.NoticeUtil; import com.ruoyi.web.utils.qcc.HttpHelper; import com.ruoyi.web.utils.qcc.QiChaChaUtil; @@ -186,8 +187,11 @@ public class CustomerController extends BaseController @Log(title = "客户信息提交", businessType = BusinessType.OTHER) @PostMapping("/commitCustomer") public AjaxResult commitCustomer(@RequestBody Customer customer) { - // TODO 校验客户名-税号 是否SAP存在 - + //校验客户名-税号 SAP是否存在 + Boolean isExist = SapHanaUtils.isExist(customer.getCusName(),customer.getCusVatNo()); + if(isExist){ + return error("已存在该客户,请勿重复提交"); + } String cus_id = customer.getCusId(); customer.setUpdateBy(getUsername()); 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 582f5d7..aa2b905 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 @@ -2,7 +2,6 @@ package com.ruoyi.web.controller.quot; import java.util.ArrayList; import java.util.List; -import java.util.concurrent.TimeUnit; import javax.servlet.http.HttpServletResponse; import com.alibaba.fastjson.JSON; @@ -13,14 +12,13 @@ import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.file.FileUploadUtils; import com.ruoyi.common.utils.file.MinioUtil; +import com.ruoyi.common.utils.http.HttpUtils; import com.ruoyi.common.utils.sign.Base64; import com.ruoyi.common.utils.uuid.UUID; import com.ruoyi.priceVerification.domain.QuotHj; import com.ruoyi.priceVerification.service.IQuotHjService; import com.ruoyi.quot.domain.*; -import com.ruoyi.quot.domain.jsw.QuotJswFile; -import com.ruoyi.quot.domain.jsw.QuotJswFiles; -import com.ruoyi.quot.domain.jsw.QuotJswResult; +import com.ruoyi.quot.domain.jsw.*; import com.ruoyi.quot.service.IQuotFileService; import com.ruoyi.system.service.ISysConfigService; import com.ruoyi.system.service.ISysNoticeService; @@ -455,7 +453,52 @@ public class QuotController extends BaseController public AjaxResult commitJswQuot(@RequestBody Quot quot) { // 对接金思维接口 - //附件对接 + //==============================账户认证================================== + QuotJswUser quotJswUser = new QuotJswUser("JNBJPT","1q2w3e","S",""); + String quotJswUserJson = JSON.toJSONString(quotJswUser); + + String QuotJswUserResultJson = HttpUtils.sendPostJson("http://price.jncable.com.cn:7778/GTHINKING/AjaxService/N_MISPRO/100208057.ashx/Login",quotJswUserJson); + QuotJswUserResult quotJswUserResult = JSON.parseObject(QuotJswUserResultJson, QuotJswUserResult.class); + if(!quotJswUserResult.getSuccess()){ + return error(quotJswUserResult.getErrorMessage()); + } + + //==============================报价单信息对接================================== + QuotJswInfo quotJswInfo = new QuotJswInfo(); + quotJswInfo.setQuotCode(quot.getQuotCode()); + quotJswInfo.setXsy(quot.getQuotSalesmanName()); + quotJswInfo.setXsyid(quot.getQuotSalesmanCode()); + quotJswInfo.setKh(quot.getQuotCustomerName()); + quotJswInfo.setKhid(quot.getQuotCustomerBm()); + quotJswInfo.setBz(quot.getQuotQuotationRequire()); + + List quotJswMaterials = new ArrayList<>(); + QuotJswMaterial quotJswMaterial = null; + for(QuotMaterial m:quot.getQuotMaterialList()){ + quotJswMaterial = new QuotJswMaterial(); + quotJswMaterial.setMatXingh(m.getMatXingh()); + quotJswMaterial.setMatGuig(m.getMatGuig()); + quotJswMaterial.setMatDiany(m.getMatDiany()); + quotJswMaterial.setMatStandard(m.getMatStandard()); + quotJswMaterial.setMatSl(m.getMatSl()); + quotJswMaterial.setMatDanw(m.getMatDanw()); + quotJswMaterial.setMatRemark(m.getMatRemark()); + quotJswMaterials.add(quotJswMaterial); + } + quotJswInfo.setQuotMaterial(quotJswMaterials); + + QuotJsw quotJsw = new QuotJsw(); + quotJsw.setRecBJDInfo(quotJswInfo); + + String quotJson = JSON.toJSONString(quotJsw); + //调用金思维接口上传报价单信息 + String QuotJswResultJson = HttpUtils.sendPostJson("http://price.jncable.com.cn:7778/GTHINKING/AjaxService/U20231485_N_XLXSBJ/100860101.ashx/RecBJDfromJN",quotJson); + QuotResultObject quotJswResultObject = JSON.parseObject(QuotJswResultJson, QuotResultObject.class); + if(!quotJswResultObject.getResultObject().getSuccess()){ + return error(quotJswResultObject.getResultObject().getErrorMessage()); + } + + //==============================附件对接================================== List files = new ArrayList<>(); QuotFile quotFile = new QuotFile(); @@ -476,16 +519,20 @@ public class QuotController extends BaseController QuotJswFiles quotJswFiles = null; QuotJswFile quotJswFile = new QuotJswFile(); - quotJswFile.setBJDID(quot.getQuotCode()); + quotJswFile.setBjdid(quot.getQuotCode()); for(QuotFile qf:files){ quotJswFiles = new QuotJswFiles(); quotJswFiles.setFileName(qf.getFileName()); quotJswFiles.setFileData(Base64.fileBase64(qf.getFileUrl())); - quotJswFile.getFJData().add(quotJswFiles); + quotJswFile.getFjdata().add(quotJswFiles); } - String json = JSON.toJSONString(quotJswFile); + String fileJson = JSON.toJSONString(quotJswFile); //调用金思维接口上传附件 - + String QuotJswResultFileJson = HttpUtils.sendPostJson("http://price.jncable.com.cn:7778/GTHINKING/AjaxService/U20231485_N_XLXSBJ/100860101.ashx/UploadFile",fileJson); + QuotResultObject quotJswResult = JSON.parseObject(QuotJswResultFileJson, QuotResultObject.class); + if(!quotJswResult.getResultObject().getSuccess()){ + return error(quotJswResult.getResultObject().getErrorMessage()); + } quot.setQuotJswApprovalStatus("1");// 更新金思维提交状态为 协助中 diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/utils/SapHana/HanaDB.java b/ruoyi-admin/src/main/java/com/ruoyi/web/utils/SapHana/HanaDB.java new file mode 100644 index 0000000..bb8dc44 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/utils/SapHana/HanaDB.java @@ -0,0 +1,157 @@ +package com.ruoyi.web.utils.SapHana; + +import java.sql.*; + +/* +* Sap Hana数据库读取配置 +* */ +public class HanaDB { + + static { + try { + Class.forName("com.sap.db.jdbc.Driver"); + } catch (ClassNotFoundException e) { + e.printStackTrace(); + } + } + + public static Connection getConn() { + Connection conn = null; + try { + conn = DriverManager.getConnection( + "jdbc:sap://172.19.1.10:30013?databaseName=EHP&reconnect=true&useServerPrepStmts=false&rewriteBatchedStatements=true", + "ABAP01", "JNdl@2022"); + } catch (SQLException e) { + e.printStackTrace(); + } + return conn; + } + + public static Statement getStmt(Connection conn) { + Statement stmt = null; + + try { + stmt = conn.createStatement(); + } catch (SQLException e) { + e.printStackTrace(); + } + return stmt; + } + + public static ResultSet executeQuery(Statement stmt, String sql) { + ResultSet rs = null; + + try { + rs = stmt.executeQuery(sql); + } catch (SQLException e) { + e.printStackTrace(); + } + return rs; + } + + public static ResultSet executeQuery(Connection conn, String sql) { + ResultSet rs = null; + + try { + rs = conn.createStatement().executeQuery(sql); + } catch (SQLException e) { + e.printStackTrace(); + } + return rs; + } + + public static int executeUpdate(Connection conn, String sql) { + int ret = 0; + Statement stmt = null; + + try { + stmt = conn.createStatement(); + ret = stmt.executeUpdate(sql); + } catch (SQLException e) { + e.printStackTrace(); + } finally { + close(stmt); + } + return ret; + } + + public static ResultSet executeQuery(PreparedStatement pstmt) { + ResultSet rs = null; + + try { + rs = pstmt.executeQuery(); + } catch (SQLException e) { + e.printStackTrace(); + } + return rs; + } + + public static PreparedStatement getPstmt(Connection conn, String sql) { + PreparedStatement pstmt = null; + + try { + pstmt = conn.prepareStatement(sql); + } catch (SQLException e) { + e.printStackTrace(); + } + + return pstmt; + } + + public static PreparedStatement getPstmt(Connection conn, String sql, boolean autoGeneratedKeys) { + PreparedStatement pstmt = null; + + try { + pstmt = conn.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS); + } catch (SQLException e) { + e.printStackTrace(); + } + + return pstmt; + } + + public static CallableStatement getCallstmt(Connection conn, String sql) { + CallableStatement cstmt = null; + + try { + cstmt = conn.prepareCall(sql); + } catch (SQLException e) { + e.printStackTrace(); + } + return cstmt; + } + + public static void close(Connection conn) { + if (conn != null) { + try { + conn.close(); + } catch (SQLException e) { + e.printStackTrace(); + } + conn = null; + } + } + + public static void close(Statement stmt) { + if (stmt != null) { + try { + stmt.close(); + } catch (SQLException e) { + e.printStackTrace(); + } + stmt = null; + } + } + + public static void close(ResultSet rs) { + if (rs != null) { + try { + rs.close(); + } catch (SQLException e) { + e.printStackTrace(); + } + rs = null; + } + } + +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/utils/SapHana/SapHanaUtils.java b/ruoyi-admin/src/main/java/com/ruoyi/web/utils/SapHana/SapHanaUtils.java new file mode 100644 index 0000000..68b7f4c --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/utils/SapHana/SapHanaUtils.java @@ -0,0 +1,43 @@ +package com.ruoyi.web.utils.SapHana; + +import java.sql.Connection; +import java.sql.ResultSet; + +/** + * SAP 直连hana数据库 工具类 + */ +public class SapHanaUtils { + + /** + * 查询SAP是否存在相同名称和税号的客户 + * @param cusName + * @param cusVatNo + * @return + */ + public static Boolean isExist(String cusName, String cusVatNo) { + Boolean flag = false; + Connection conn = null; + ResultSet rs = null; + try { + conn = HanaDB.getConn(); + StringBuffer sf = new StringBuffer(); + + sf.append(" select name1,BAHNS from SAPHANADB.KNA1 "); + sf.append(" where name1 = '" + cusName + "'" ); + sf.append(" and BAHNS = '" + cusVatNo + "'" ); + + rs = HanaDB.executeQuery(conn, String.valueOf(sf)); + if (rs.next()) { + do { + flag = true; + } while (rs.next()); + } + } catch (Exception e) { + e.printStackTrace(); + } finally { + HanaDB.close(rs); + HanaDB.close(conn); + } + return flag; + } +} diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/config/ScheduleConfig.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/config/ScheduleConfig.java index d4e065a..27d652d 100644 --- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/config/ScheduleConfig.java +++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/config/ScheduleConfig.java @@ -1,57 +1,51 @@ -//package com.ruoyi.quartz.config; -// -//import org.springframework.context.annotation.Bean; -//import org.springframework.context.annotation.Configuration; -//import org.springframework.scheduling.quartz.SchedulerFactoryBean; -//import javax.sql.DataSource; -//import java.util.Properties; -// -///** -// * 定时任务配置(单机部署建议删除此类和qrtz数据库表,默认走内存会最高效) -// * -// * @author ruoyi -// */ -//@Configuration -//public class ScheduleConfig -//{ -// @Bean -// public SchedulerFactoryBean schedulerFactoryBean(DataSource dataSource) -// { -// SchedulerFactoryBean factory = new SchedulerFactoryBean(); -// factory.setDataSource(dataSource); -// -// // quartz参数 -// Properties prop = new Properties(); -// prop.put("org.quartz.scheduler.instanceName", "RuoyiScheduler"); -// prop.put("org.quartz.scheduler.instanceId", "AUTO"); -// // 线程池配置 -// prop.put("org.quartz.threadPool.class", "org.quartz.simpl.SimpleThreadPool"); -// prop.put("org.quartz.threadPool.threadCount", "20"); -// prop.put("org.quartz.threadPool.threadPriority", "5"); -// // JobStore配置 -// prop.put("org.quartz.jobStore.class", "org.springframework.scheduling.quartz.LocalDataSourceJobStore"); -// // 集群配置 -// prop.put("org.quartz.jobStore.isClustered", "true"); -// prop.put("org.quartz.jobStore.clusterCheckinInterval", "15000"); -// prop.put("org.quartz.jobStore.maxMisfiresToHandleAtATime", "10"); -// prop.put("org.quartz.jobStore.txIsolationLevelSerializable", "true"); -// -// // sqlserver 启用 -// // prop.put("org.quartz.jobStore.selectWithLockSQL", "SELECT * FROM {0}LOCKS UPDLOCK WHERE LOCK_NAME = ?"); -// prop.put("org.quartz.jobStore.misfireThreshold", "12000"); -// prop.put("org.quartz.jobStore.tablePrefix", "QRTZ_"); -// factory.setQuartzProperties(prop); -// -// factory.setSchedulerName("RuoyiScheduler"); -// // 延时启动 -// factory.setStartupDelay(1); -// factory.setApplicationContextSchedulerContextKey("applicationContextKey"); -// // 可选,QuartzScheduler -// // 启动时更新己存在的Job,这样就不用每次修改targetObject后删除qrtz_job_details表对应记录了 -// factory.setOverwriteExistingJobs(true); -// // 设置自动启动,默认为true -// factory.setAutoStartup(true); -// -// return factory; -// } -//} +package com.ruoyi.quartz.config; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.scheduling.quartz.SchedulerFactoryBean; +import javax.sql.DataSource; +import java.util.Properties; +/** + * 定时任务配置(单机部署建议删除此类和qrtz数据库表,默认走内存会最高效) + * + * @author ruoyi + */ +@Configuration +public class ScheduleConfig +{ + @Bean + public SchedulerFactoryBean schedulerFactoryBean(DataSource dataSource) + { + SchedulerFactoryBean factory = new SchedulerFactoryBean(); + factory.setDataSource(dataSource); + // quartz参数 + Properties prop = new Properties(); + prop.put("org.quartz.scheduler.instanceName", "RuoyiScheduler"); + prop.put("org.quartz.scheduler.instanceId", "AUTO"); + // 线程池配置 + prop.put("org.quartz.threadPool.class", "org.quartz.simpl.SimpleThreadPool"); + prop.put("org.quartz.threadPool.threadCount", "20"); + prop.put("org.quartz.threadPool.threadPriority", "5"); + // JobStore配置 + prop.put("org.quartz.jobStore.class", "org.springframework.scheduling.quartz.LocalDataSourceJobStore"); + // 集群配置 + prop.put("org.quartz.jobStore.isClustered", "true"); + prop.put("org.quartz.jobStore.clusterCheckinInterval", "15000"); + prop.put("org.quartz.jobStore.maxMisfiresToHandleAtATime", "10"); + prop.put("org.quartz.jobStore.txIsolationLevelSerializable", "true"); + // sqlserver 启用 + prop.put("org.quartz.jobStore.selectWithLockSQL", "SELECT * FROM {0}LOCKS UPDLOCK WHERE LOCK_NAME = ?"); + prop.put("org.quartz.jobStore.misfireThreshold", "12000"); + prop.put("org.quartz.jobStore.tablePrefix", "QRTZ_"); + factory.setQuartzProperties(prop); + factory.setSchedulerName("RuoyiScheduler"); + // 延时启动 + factory.setStartupDelay(1); + factory.setApplicationContextSchedulerContextKey("applicationContextKey"); + // 可选,QuartzScheduler + // 启动时更新己存在的Job,这样就不用每次修改targetObject后删除qrtz_job_details表对应记录了 + factory.setOverwriteExistingJobs(true); + // 设置自动启动,默认为true + factory.setAutoStartup(true); + return factory; + } +} diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/QuotTask.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/QuotTask.java index fb2f949..547c4fd 100644 --- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/QuotTask.java +++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/QuotTask.java @@ -3,8 +3,10 @@ package com.ruoyi.quartz.task; import com.ruoyi.common.constant.CacheConstants; import com.ruoyi.common.core.redis.RedisCache; import com.ruoyi.common.core.redis.RedisLock; +import com.ruoyi.common.utils.ip.IpUtils; import com.ruoyi.quartz.domain.OASysQuot; import com.ruoyi.quartz.service.OAQuotService; +import org.redisson.api.RLock; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import javax.annotation.PostConstruct; @@ -19,12 +21,6 @@ import java.util.List; @Component("quotTask") public class QuotTask { - @Autowired - private RedisCache redisCache; - - @Autowired - private RedisLock redisLock; - @Resource private OAQuotService quotService; @@ -39,7 +35,7 @@ public class QuotTask * 检查OA报加单审批流程是否结束 */ public void OAQuot() throws Exception { - try{ + try { // 查询 报价单-OA审批状态为审批中的单号,并且在中间表显示流程已经结束的单据,根据单号更新 OA审批状态 List quots = quotService.selectOAQUOT(); for(OASysQuot sysoaquot:quots){ @@ -48,19 +44,8 @@ public class QuotTask //将中间表 根据报价单号更新 isfinish=1 表示报价流程已结束 quotService.updateOAQuotByQuotCode(sysoaquot.getQuotCode()); } - }catch (Exception e) { - throw new Exception(e.getMessage(), e); + } catch (Exception e) { + e.printStackTrace(); } } - - /** - * 定时任务缓存键名 - * - * @param jobId 任务编号 - * @return 缓存键key - */ - private String getJobKey(String jobId) - { - return CacheConstants.SYS_JOB_KEY + jobId; - } } diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RbTask.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RbTask.java index db435d7..3d9e208 100644 --- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RbTask.java +++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RbTask.java @@ -6,6 +6,7 @@ import com.ruoyi.common.core.redis.RedisCache; import com.ruoyi.common.core.redis.RedisLock; import com.ruoyi.common.enums.DataSourceType; import com.ruoyi.common.utils.StringUtils; +import com.ruoyi.quartz.domain.OASysQuot; import com.ruoyi.quartz.domain.c_rb_product_price; import com.ruoyi.quartz.domain.c_rb_productbase_price; import com.ruoyi.quartz.service.SapTjService; @@ -29,15 +30,6 @@ import java.util.List; @Component("rbTask") public class RbTask { - @Autowired - private RedisCache redisCache; - - @Autowired - private RedisLock redisLock; - - @Autowired - private Scheduler scheduler; - @Resource private SapTjService sapTjService; @@ -52,7 +44,6 @@ public class RbTask * 同步红本数据库 */ public void tongb() throws Exception { - String rbVersionUid = testUtils.sapTjService.selRbVersionUid();//红本调价记录uid //判断是否已执行调价 (6.3 redbook rb_productVersion 是否有新增uid and sta='1'、sdmdm1 调价日期今日的数据是否存在) String locVersionUid = testUtils.sapTjService.selLocVersionUid();//本地红本调价记录uid @@ -72,22 +63,9 @@ public class RbTask JDBCBatchInsert.insertRbProductBasePrice(productBasePriceList);//批量插入 testUtils.sapTjService.updateLocRbVersion(rbVersionUid);//更新本地c_rb_version表 - } - redisCache.deleteObject(getJobKey("rbTask")); }catch (Exception e) { throw new Exception(e.getMessage(), e); } } - - /** - * 定时任务缓存键名 - * - * @param jobId 任务编号 - * @return 缓存键key - */ - private String getJobKey(String jobId) - { - return CacheConstants.SYS_JOB_KEY + jobId; - } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/quot/domain/jsw/QuotJsw.java b/ruoyi-system/src/main/java/com/ruoyi/quot/domain/jsw/QuotJsw.java new file mode 100644 index 0000000..d3a861c --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/quot/domain/jsw/QuotJsw.java @@ -0,0 +1,16 @@ +package com.ruoyi.quot.domain.jsw; + +/** + * 金思维 上传报价单信息 + */ +public class QuotJsw { + private QuotJswInfo recBJDInfo; + + public QuotJswInfo getRecBJDInfo() { + return recBJDInfo; + } + + public void setRecBJDInfo(QuotJswInfo recBJDInfo) { + this.recBJDInfo = recBJDInfo; + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/quot/domain/jsw/QuotJswFile.java b/ruoyi-system/src/main/java/com/ruoyi/quot/domain/jsw/QuotJswFile.java index d22da8c..a62985c 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/quot/domain/jsw/QuotJswFile.java +++ b/ruoyi-system/src/main/java/com/ruoyi/quot/domain/jsw/QuotJswFile.java @@ -2,23 +2,26 @@ package com.ruoyi.quot.domain.jsw; import java.util.List; +/** + * 金思维 上传报价单附件信息 + */ public class QuotJswFile { - private String BJDID; - List FJData; + private String bjdid; + List fjdata; - public String getBJDID() { - return BJDID; + public String getBjdid() { + return bjdid; } - public void setBJDID(String BJDID) { - this.BJDID = BJDID; + public void setBjdid(String bjdid) { + this.bjdid = bjdid; } - public List getFJData() { - return FJData; + public List getFjdata() { + return fjdata; } - public void setFJData(List FJData) { - this.FJData = FJData; + public void setFjdata(List fjdata) { + this.fjdata = fjdata; } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/quot/domain/jsw/QuotJswFiles.java b/ruoyi-system/src/main/java/com/ruoyi/quot/domain/jsw/QuotJswFiles.java index 8e9eb0a..8978b7f 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/quot/domain/jsw/QuotJswFiles.java +++ b/ruoyi-system/src/main/java/com/ruoyi/quot/domain/jsw/QuotJswFiles.java @@ -1,5 +1,8 @@ package com.ruoyi.quot.domain.jsw; +/** + * 金思维 上传报价单附件信息 + */ public class QuotJswFiles { private String fileName; private String fileData; diff --git a/ruoyi-system/src/main/java/com/ruoyi/quot/domain/jsw/QuotJswInfo.java b/ruoyi-system/src/main/java/com/ruoyi/quot/domain/jsw/QuotJswInfo.java new file mode 100644 index 0000000..a87c5f8 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/quot/domain/jsw/QuotJswInfo.java @@ -0,0 +1,82 @@ +package com.ruoyi.quot.domain.jsw; + +import java.util.List; + +/** + * 金思维 上传报价单主体信息 + */ +public class QuotJswInfo { + private String quotCode; + private String xsy; + private String xsyid; + private String kh; + private String khid; + private String xm; + private String bz; + + private List quotMaterial; + + public String getQuotCode() { + return quotCode; + } + + public void setQuotCode(String quotCode) { + this.quotCode = quotCode; + } + + public String getXsy() { + return xsy; + } + + public void setXsy(String xsy) { + this.xsy = xsy; + } + + public String getXsyid() { + return xsyid; + } + + public void setXsyid(String xsyid) { + this.xsyid = xsyid; + } + + public String getKh() { + return kh; + } + + public void setKh(String kh) { + this.kh = kh; + } + + public String getKhid() { + return khid; + } + + public void setKhid(String khid) { + this.khid = khid; + } + + public String getXm() { + return xm; + } + + public void setXm(String xm) { + this.xm = xm; + } + + public String getBz() { + return bz; + } + + public void setBz(String bz) { + this.bz = bz; + } + + public List getQuotMaterial() { + return quotMaterial; + } + + public void setQuotMaterial(List quotMaterial) { + this.quotMaterial = quotMaterial; + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/quot/domain/jsw/QuotJswMaterial.java b/ruoyi-system/src/main/java/com/ruoyi/quot/domain/jsw/QuotJswMaterial.java new file mode 100644 index 0000000..207727c --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/quot/domain/jsw/QuotJswMaterial.java @@ -0,0 +1,72 @@ +package com.ruoyi.quot.domain.jsw; + +import java.math.BigDecimal; + +/** + * 金思维 上传报价单产品信息 + */ +public class QuotJswMaterial { + private String matXingh; + private String matGuig; + private String matDiany; + private String matStandard; + private BigDecimal matSl; + private String matDanw; + private String matRemark; + + public String getMatXingh() { + return matXingh; + } + + public void setMatXingh(String matXingh) { + this.matXingh = matXingh; + } + + public String getMatGuig() { + return matGuig; + } + + public void setMatGuig(String matGuig) { + this.matGuig = matGuig; + } + + public String getMatDiany() { + return matDiany; + } + + public void setMatDiany(String matDiany) { + this.matDiany = matDiany; + } + + public String getMatStandard() { + return matStandard; + } + + public void setMatStandard(String matStandard) { + this.matStandard = matStandard; + } + + public BigDecimal getMatSl() { + return matSl; + } + + public void setMatSl(BigDecimal matSl) { + this.matSl = matSl; + } + + public String getMatDanw() { + return matDanw; + } + + public void setMatDanw(String matDanw) { + this.matDanw = matDanw; + } + + public String getMatRemark() { + return matRemark; + } + + public void setMatRemark(String matRemark) { + this.matRemark = matRemark; + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/quot/domain/jsw/QuotJswResult.java b/ruoyi-system/src/main/java/com/ruoyi/quot/domain/jsw/QuotJswResult.java index 68cc111..ffe8f51 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/quot/domain/jsw/QuotJswResult.java +++ b/ruoyi-system/src/main/java/com/ruoyi/quot/domain/jsw/QuotJswResult.java @@ -1,15 +1,19 @@ package com.ruoyi.quot.domain.jsw; +/** + * 金思维 接口返回信息 + */ public class QuotJswResult { - private String Success; + private Boolean Success; private String Message; private String ErrorMessage; + private String Key; - public String getSuccess() { + public Boolean getSuccess() { return Success; } - public void setSuccess(String success) { + public void setSuccess(Boolean success) { Success = success; } @@ -28,4 +32,12 @@ public class QuotJswResult { public void setErrorMessage(String errorMessage) { ErrorMessage = errorMessage; } + + public String getKey() { + return Key; + } + + public void setKey(String key) { + Key = key; + } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/quot/domain/jsw/QuotJswUser.java b/ruoyi-system/src/main/java/com/ruoyi/quot/domain/jsw/QuotJswUser.java new file mode 100644 index 0000000..d077be9 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/quot/domain/jsw/QuotJswUser.java @@ -0,0 +1,47 @@ +package com.ruoyi.quot.domain.jsw; + +public class QuotJswUser { + private String userId; + private String password; + private String clientType; + private String epId; + + public QuotJswUser(String userId, String password, String clientType, String epId) { + this.userId = userId; + this.password = password; + this.clientType = clientType; + this.epId = epId; + } + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getClientType() { + return clientType; + } + + public void setClientType(String clientType) { + this.clientType = clientType; + } + + public String getEpId() { + return epId; + } + + public void setEpId(String epId) { + this.epId = epId; + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/quot/domain/jsw/QuotJswUserResult.java b/ruoyi-system/src/main/java/com/ruoyi/quot/domain/jsw/QuotJswUserResult.java new file mode 100644 index 0000000..75dffb3 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/quot/domain/jsw/QuotJswUserResult.java @@ -0,0 +1,25 @@ +package com.ruoyi.quot.domain.jsw; + +/** + * 金思维 用户认证 返回信息 + */ +public class QuotJswUserResult { + private Boolean Success; + private String ErrorMessage; + + public Boolean getSuccess() { + return Success; + } + + public void setSuccess(Boolean success) { + Success = success; + } + + public String getErrorMessage() { + return ErrorMessage; + } + + public void setErrorMessage(String errorMessage) { + ErrorMessage = errorMessage; + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/quot/domain/jsw/QuotResultObject.java b/ruoyi-system/src/main/java/com/ruoyi/quot/domain/jsw/QuotResultObject.java new file mode 100644 index 0000000..424b14b --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/quot/domain/jsw/QuotResultObject.java @@ -0,0 +1,16 @@ +package com.ruoyi.quot.domain.jsw; + +/** + * 金思维 接口返回信息 + */ +public class QuotResultObject { + private QuotJswResult ResultObject; + + public QuotJswResult getResultObject() { + return ResultObject; + } + + public void setResultObject(QuotJswResult resultObject) { + ResultObject = resultObject; + } +} 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 378871b..48c31c4 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 @@ -214,7 +214,7 @@ public class QuotServiceImpl implements IQuotService for (QuotMaterial quotMaterial : quotMaterialList) { quotMaterial.setMatId(UUID.fastUUID().toString()); - //TODO 标准 + quotMaterial.setMatStandard("国标"); quotMaterial.setQuotId(quotId); list.add(quotMaterial); }