删除文件 gatedge
This commit is contained in:
parent
e422441212
commit
a5c3c16037
33
gatedge/.gitignore
vendored
33
gatedge/.gitignore
vendored
@ -1,33 +0,0 @@
|
||||
HELP.md
|
||||
target/
|
||||
!.mvn/wrapper/maven-wrapper.jar
|
||||
!**/src/main/**/target/
|
||||
!**/src/test/**/target/
|
||||
|
||||
### STS ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
build/
|
||||
!**/src/main/**/build/
|
||||
!**/src/test/**/build/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
108
gatedge/pom.xml
108
gatedge/pom.xml
@ -1,108 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.gatedge</groupId>
|
||||
<artifactId>gatedge</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>gatedge</name>
|
||||
<description>Demo project for Spring Boot</description>
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<spring-boot.version>2.6.13</spring-boot.version>
|
||||
<fastjson.version>2.0.2</fastjson.version>
|
||||
<maven-compiler-source.version>1.8</maven-compiler-source.version>
|
||||
<maven-compiler-target.version>1.8</maven-compiler-target.version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>${fastjson.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-dependencies</artifactId>
|
||||
<version>${spring-boot.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>2.2.6.RELEASE</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-enforcer-plugin</artifactId>
|
||||
<version>3.0.0-M3</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>enforce-no-snapshots</id>
|
||||
<goals>
|
||||
<goal>enforce</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<rules>
|
||||
<requireReleaseDeps>
|
||||
<message>No Snapshots Allowed!</message>
|
||||
</requireReleaseDeps>
|
||||
</rules>
|
||||
<fail>true</fail>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<configuration>
|
||||
<source>${maven-compiler-source.version}</source>
|
||||
<target>${maven-compiler-target.version}</target>
|
||||
<encoding>UTF-8</encoding>
|
||||
<compilerArgs>
|
||||
<arg>-parameters</arg>
|
||||
</compilerArgs>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<configuration>
|
||||
<encoding>UTF-8</encoding>
|
||||
<overwrite>true</overwrite>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
@ -1,13 +0,0 @@
|
||||
package com.gatedge;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
public class GatedgeApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(GatedgeApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
package com.gatedge.jindie.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
/**
|
||||
* @param
|
||||
* @Author: 王康
|
||||
* @return
|
||||
* @DateTime: 2023/7/13 10:12
|
||||
* 描述:
|
||||
**/
|
||||
@Configuration
|
||||
public class Restful {
|
||||
@Bean
|
||||
public RestTemplate getRestTemplate(){
|
||||
return new RestTemplate();
|
||||
}
|
||||
}
|
@ -1,64 +0,0 @@
|
||||
package com.gatedge.jindie.controller;
|
||||
|
||||
import com.gatedge.jindie.entity.Entity;
|
||||
import com.gatedge.jindie.entity.EntityItem;
|
||||
import com.gatedge.jindie.entity.EntityVO;
|
||||
import com.gatedge.jindie.result.ActionResult;
|
||||
import com.gatedge.jindie.result.ListResult;
|
||||
import com.gatedge.jindie.result.ResultBuilder;
|
||||
import com.gatedge.jindie.service.SealedQuotationService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @param
|
||||
* @Author: 王康
|
||||
* @Description: TODO
|
||||
* @return
|
||||
* @DateTime: 2023/8/24 15:49
|
||||
* 描述:
|
||||
**/
|
||||
@RestController
|
||||
@RequestMapping("/admin/")
|
||||
public class SealedQuotationController {
|
||||
|
||||
@Autowired
|
||||
private SealedQuotationService sealedQuotationService;
|
||||
|
||||
@GetMapping("login")
|
||||
public ActionResult login(@RequestParam("FBILLNO") String FBILLNO, @RequestParam("Username") String username, @RequestParam("Password") String password) {
|
||||
sealedQuotationService.login(FBILLNO, username, password);
|
||||
return ResultBuilder.buildActionSuccess();
|
||||
}
|
||||
|
||||
@PostMapping("queryData")
|
||||
public ListResult queryData(@RequestBody Map<String, String> map) {
|
||||
String FBILLNO = map.get("FBILLNO");
|
||||
List<Entity> data = null;
|
||||
if (sealedQuotationService.loginChack(map)) {
|
||||
data= sealedQuotationService.queryData(FBILLNO);
|
||||
}
|
||||
return ResultBuilder.buildEntitySuccess(data);
|
||||
}
|
||||
|
||||
@PostMapping("queryDataItem")
|
||||
public ListResult queryDataItem(@RequestBody Map<String, String> map) {
|
||||
String FBILLNO = map.get("FBILLNO");
|
||||
List<EntityItem> data = null;
|
||||
if (sealedQuotationService.loginChack(map)) {
|
||||
data= sealedQuotationService.queryDataItem(FBILLNO);
|
||||
}
|
||||
return ResultBuilder.buildEntitySuccess(data);
|
||||
}
|
||||
|
||||
@PostMapping("saveData")
|
||||
public ListResult saveData(@RequestBody Map<String, Object> params) {
|
||||
Map<String, Object> map = sealedQuotationService.saveData(params);
|
||||
return ResultBuilder.buildEntitySuccess(map);
|
||||
}
|
||||
}
|
@ -1,313 +0,0 @@
|
||||
package com.gatedge.jindie.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @param
|
||||
* @Author: 王康
|
||||
* @Description: TODO
|
||||
* @return
|
||||
* @StringTime: 2023/9/6 11:47
|
||||
* 描述:
|
||||
**/
|
||||
public class Entity {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@JsonProperty("FID")
|
||||
private String FID;
|
||||
/**
|
||||
* 报价编号
|
||||
*/
|
||||
@JsonProperty("FBILLNO")
|
||||
private String FBILLNO;
|
||||
/**
|
||||
* 询价名称
|
||||
*/
|
||||
@JsonProperty("FProjectName")
|
||||
private String FProjectName;
|
||||
/**
|
||||
* 询价单号
|
||||
*/
|
||||
@JsonProperty("FSrcBillNo")
|
||||
private String FSrcBillNo;
|
||||
/**
|
||||
* 供应商编码
|
||||
*/
|
||||
@JsonProperty("FSupplierId")
|
||||
private String FSupplierId; // 必填项
|
||||
/**
|
||||
* 供应商名称
|
||||
*/
|
||||
@JsonProperty("FSupplierName")
|
||||
private String FSupplierName;
|
||||
/**
|
||||
* 开标日期
|
||||
*/
|
||||
@JsonProperty("FOpenDate")
|
||||
private String FOpenDate; // 必填项
|
||||
/**
|
||||
* 报价状态
|
||||
*/
|
||||
@JsonProperty("FPriceStatus")
|
||||
private String FPriceStatus;
|
||||
|
||||
/**
|
||||
* 报价日期
|
||||
*/
|
||||
@JsonProperty("FQuoteDate")
|
||||
private String FQuoteDate;
|
||||
|
||||
/**
|
||||
* 报价截止日期
|
||||
*/
|
||||
@JsonProperty("FExpiryDate")
|
||||
private String FExpiryDate; // 必填项
|
||||
|
||||
/**
|
||||
* 联系人
|
||||
*/
|
||||
@JsonProperty("FContact")
|
||||
private String FContact;
|
||||
|
||||
/**
|
||||
* 电话
|
||||
*/
|
||||
@JsonProperty("FPhone")
|
||||
private String FPhone;
|
||||
|
||||
/**
|
||||
* 邮箱
|
||||
*/
|
||||
@JsonProperty("FMail")
|
||||
private String FMail;
|
||||
|
||||
/**
|
||||
* 币别
|
||||
*/
|
||||
@JsonProperty("FCurrId")
|
||||
private String FCurrId;
|
||||
|
||||
/**
|
||||
* 含税
|
||||
*/
|
||||
@JsonProperty("FIsIncludedTax")
|
||||
private String FIsIncludedTax;
|
||||
|
||||
/*
|
||||
* 询价日期
|
||||
* */
|
||||
@JsonProperty("FDate")
|
||||
private String FDate;
|
||||
/*
|
||||
* 询价员
|
||||
* */
|
||||
@JsonProperty("FBuyer")
|
||||
private String FBuyer;
|
||||
|
||||
/*
|
||||
* 审核人
|
||||
* */
|
||||
@JsonProperty("FCheckerId")
|
||||
private String FCheckerId;
|
||||
|
||||
/*
|
||||
* 数据状态 C为审核
|
||||
* */
|
||||
@JsonProperty("FDocumentStatus")
|
||||
private String FDocumentStatus;
|
||||
|
||||
/*
|
||||
* 状态
|
||||
* */
|
||||
@JsonProperty("Status")
|
||||
private boolean Status;
|
||||
|
||||
public Entity() {
|
||||
}
|
||||
|
||||
public Entity(String FID, String FBILLNO, String FProjectName, String FSrcBillNo, String FSupplierId, String FSupplierName, String FOpenDate, String FPriceStatus, String FQuoteDate, String FExpiryDate, String FContact, String FPhone, String FMail, String FCurrId, String FIsIncludedTax,String FDate,String FBuyer,String FCheckerId,String FDocumentStatus) {
|
||||
this.FID = FID;
|
||||
this.FBILLNO = FBILLNO;
|
||||
this.FProjectName = FProjectName;
|
||||
this.FSrcBillNo = FSrcBillNo;
|
||||
this.FSupplierId = FSupplierId;
|
||||
this.FSupplierName = FSupplierName;
|
||||
this.FOpenDate = FOpenDate;
|
||||
this.FPriceStatus = FPriceStatus;
|
||||
this.FQuoteDate = FQuoteDate;
|
||||
this.FExpiryDate = FExpiryDate;
|
||||
this.FContact = FContact;
|
||||
this.FPhone = FPhone;
|
||||
this.FMail = FMail;
|
||||
this.FCurrId = FCurrId;
|
||||
this.FIsIncludedTax = FIsIncludedTax;
|
||||
this.FDate = FDate;
|
||||
this.FBuyer = FBuyer;
|
||||
this.FCheckerId = FCheckerId;
|
||||
this.FDocumentStatus = FDocumentStatus;
|
||||
}
|
||||
|
||||
|
||||
public String getFID() {
|
||||
return FID;
|
||||
}
|
||||
|
||||
public void setFID(String FID) {
|
||||
this.FID = FID;
|
||||
}
|
||||
|
||||
public String getFBILLNO() {
|
||||
return FBILLNO;
|
||||
}
|
||||
|
||||
public void setFBILLNO(String FBILLNO) {
|
||||
this.FBILLNO = FBILLNO;
|
||||
}
|
||||
|
||||
public String getFProjectName() {
|
||||
return FProjectName;
|
||||
}
|
||||
|
||||
public void setFProjectName(String FProjectName) {
|
||||
this.FProjectName = FProjectName;
|
||||
}
|
||||
|
||||
public String getFSrcBillNo() {
|
||||
return FSrcBillNo;
|
||||
}
|
||||
|
||||
public void setFSrcBillNo(String FSrcBillNo) {
|
||||
this.FSrcBillNo = FSrcBillNo;
|
||||
}
|
||||
|
||||
public String getFSupplierId() {
|
||||
return FSupplierId;
|
||||
}
|
||||
|
||||
public void setFSupplierId(String FSupplierId) {
|
||||
this.FSupplierId = FSupplierId;
|
||||
}
|
||||
|
||||
public String getFSupplierName() {
|
||||
return FSupplierName;
|
||||
}
|
||||
|
||||
public void setFSupplierName(String FSupplierName) {
|
||||
this.FSupplierName = FSupplierName;
|
||||
}
|
||||
|
||||
public String getFOpenDate() {
|
||||
return FOpenDate;
|
||||
}
|
||||
|
||||
public void setFOpenDate(String FOpenDate) {
|
||||
this.FOpenDate = FOpenDate;
|
||||
}
|
||||
|
||||
public String getFPriceStatus() {
|
||||
return FPriceStatus;
|
||||
}
|
||||
|
||||
public void setFPriceStatus(String FPriceStatus) {
|
||||
this.FPriceStatus = FPriceStatus;
|
||||
}
|
||||
|
||||
public String getFQuoteDate() {
|
||||
return FQuoteDate;
|
||||
}
|
||||
|
||||
public void setFQuoteDate(String FQuoteDate) {
|
||||
this.FQuoteDate = FQuoteDate;
|
||||
}
|
||||
|
||||
public String getFExpiryDate() {
|
||||
return FExpiryDate;
|
||||
}
|
||||
|
||||
public void setFExpiryDate(String FExpiryDate) {
|
||||
this.FExpiryDate = FExpiryDate;
|
||||
}
|
||||
|
||||
public String getFContact() {
|
||||
return FContact;
|
||||
}
|
||||
|
||||
public void setFContact(String FContact) {
|
||||
this.FContact = FContact;
|
||||
}
|
||||
|
||||
public String getFPhone() {
|
||||
return FPhone;
|
||||
}
|
||||
|
||||
public void setFPhone(String FPhone) {
|
||||
this.FPhone = FPhone;
|
||||
}
|
||||
|
||||
public String getFMail() {
|
||||
return FMail;
|
||||
}
|
||||
|
||||
public void setFMail(String FMail) {
|
||||
this.FMail = FMail;
|
||||
}
|
||||
|
||||
public String getFCurrId() {
|
||||
return FCurrId;
|
||||
}
|
||||
|
||||
public void setFCurrId(String FCurrId) {
|
||||
this.FCurrId = FCurrId;
|
||||
}
|
||||
|
||||
public String getFIsIncludedTax() {
|
||||
return FIsIncludedTax;
|
||||
}
|
||||
|
||||
public void setFIsIncludedTax(String FIsIncludedTax) {
|
||||
this.FIsIncludedTax = FIsIncludedTax;
|
||||
}
|
||||
|
||||
public boolean isStatus() {
|
||||
return Status;
|
||||
}
|
||||
|
||||
public void setStatus(boolean status) {
|
||||
Status = status;
|
||||
}
|
||||
|
||||
public String getFDate() {
|
||||
return FDate;
|
||||
}
|
||||
|
||||
public void setFDate(String FDate) {
|
||||
this.FDate = FDate;
|
||||
}
|
||||
|
||||
public String getFBuyer() {
|
||||
return FBuyer;
|
||||
}
|
||||
|
||||
public void setFBuyer(String FBuyer) {
|
||||
this.FBuyer = FBuyer;
|
||||
}
|
||||
|
||||
public String getFCheckerId() {
|
||||
return FCheckerId;
|
||||
}
|
||||
|
||||
public void setFCheckerId(String FCheckerId) {
|
||||
this.FCheckerId = FCheckerId;
|
||||
}
|
||||
|
||||
public String getFDocumentStatus() {
|
||||
return FDocumentStatus;
|
||||
}
|
||||
|
||||
public void setFDocumentStatus(String FDocumentStatus) {
|
||||
this.FDocumentStatus = FDocumentStatus;
|
||||
}
|
||||
}
|
@ -1,197 +0,0 @@
|
||||
package com.gatedge.jindie.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @param
|
||||
* @Author: 王康
|
||||
* @Description: TODO
|
||||
* @return
|
||||
* @DateTime: 2023/9/6 13:54
|
||||
* 描述:
|
||||
**/
|
||||
public class EntityItem {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@JsonProperty("FEntryID")
|
||||
private String FEntryID;
|
||||
/**
|
||||
* 物料代码
|
||||
*/
|
||||
@JsonProperty("FMaterialId")
|
||||
private String FMaterialId; // 必填项
|
||||
|
||||
/*
|
||||
* 物料名称
|
||||
* */
|
||||
@JsonProperty("FMaterialName")
|
||||
private String FMaterialName;
|
||||
|
||||
/**
|
||||
* 规格型号
|
||||
*/
|
||||
@JsonProperty("FMaterialModel")
|
||||
private String FMaterialModel;
|
||||
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
@JsonProperty("FUnitID")
|
||||
private String FUnitID;
|
||||
|
||||
/**
|
||||
* 询价数量
|
||||
*/
|
||||
@JsonProperty("FQty")
|
||||
private String FQty;
|
||||
/**
|
||||
* 单价
|
||||
*/
|
||||
@JsonProperty("FPrice")
|
||||
private String FPrice;
|
||||
/**
|
||||
* 税率%
|
||||
*/
|
||||
@JsonProperty("FTaxRate")
|
||||
private String FTaxRate;
|
||||
/**
|
||||
* 含税单价
|
||||
*/
|
||||
@JsonProperty("FTaxPrice")
|
||||
private String FTaxPrice;
|
||||
|
||||
/*
|
||||
* 备注
|
||||
* */
|
||||
@JsonProperty("FNote")
|
||||
private String FNote;
|
||||
/**
|
||||
* 付款方式
|
||||
*/
|
||||
@JsonProperty("FPayConditionId")
|
||||
private String FPayConditionId;
|
||||
/*
|
||||
* 序号
|
||||
* */
|
||||
@JsonProperty("FSEQ")
|
||||
private String FSEQ;
|
||||
|
||||
public EntityItem() {
|
||||
|
||||
}
|
||||
|
||||
public EntityItem(String FEntryID, String FMaterialId,String FMaterialName, String FUnitID, String FQty, String FPrice, String FTaxRate, String FTaxPrice, String FNote, String FPayConditionId) {
|
||||
this.FEntryID = FEntryID;
|
||||
this.FMaterialId = FMaterialId;
|
||||
this.FMaterialName = FMaterialName;
|
||||
// this.FMaterialModel = FMaterialModel;
|
||||
this.FUnitID = FUnitID;
|
||||
this.FQty = FQty;
|
||||
this.FPrice = FPrice;
|
||||
this.FTaxRate = FTaxRate;
|
||||
this.FTaxPrice = FTaxPrice;
|
||||
this.FNote = FNote;
|
||||
this.FPayConditionId = FPayConditionId;
|
||||
}
|
||||
|
||||
public String getFEntryID() {
|
||||
return FEntryID;
|
||||
}
|
||||
|
||||
public void setFEntryID(String FEntryID) {
|
||||
this.FEntryID = FEntryID;
|
||||
}
|
||||
|
||||
public String getFMaterialId() {
|
||||
return FMaterialId;
|
||||
}
|
||||
|
||||
public void setFMaterialId(String FMaterialId) {
|
||||
this.FMaterialId = FMaterialId;
|
||||
}
|
||||
|
||||
public String getFMaterialModel() {
|
||||
return FMaterialModel;
|
||||
}
|
||||
|
||||
public void setFMaterialModel(String FMaterialModel) {
|
||||
this.FMaterialModel = FMaterialModel;
|
||||
}
|
||||
|
||||
public String getFUnitID() {
|
||||
return FUnitID;
|
||||
}
|
||||
|
||||
public void setFUnitID(String FUnitID) {
|
||||
this.FUnitID = FUnitID;
|
||||
}
|
||||
|
||||
public String getFQty() {
|
||||
return FQty;
|
||||
}
|
||||
|
||||
public void setFQty(String FQty) {
|
||||
this.FQty = FQty;
|
||||
}
|
||||
|
||||
public String getFPrice() {
|
||||
return FPrice;
|
||||
}
|
||||
|
||||
public void setFPrice(String FPrice) {
|
||||
this.FPrice = FPrice;
|
||||
}
|
||||
|
||||
public String getFTaxRate() {
|
||||
return FTaxRate;
|
||||
}
|
||||
|
||||
public void setFTaxRate(String FTaxRate) {
|
||||
this.FTaxRate = FTaxRate;
|
||||
}
|
||||
|
||||
public String getFTaxPrice() {
|
||||
return FTaxPrice;
|
||||
}
|
||||
|
||||
public void setFTaxPrice(String FTaxPrice) {
|
||||
this.FTaxPrice = FTaxPrice;
|
||||
}
|
||||
|
||||
public String getFPayConditionId() {
|
||||
return FPayConditionId;
|
||||
}
|
||||
|
||||
public void setFPayConditionId(String FPayConditionId) {
|
||||
this.FPayConditionId = FPayConditionId;
|
||||
}
|
||||
|
||||
public String getFMaterialName() {
|
||||
return FMaterialName;
|
||||
}
|
||||
|
||||
public void setFMaterialName(String FMaterialName) {
|
||||
this.FMaterialName = FMaterialName;
|
||||
}
|
||||
|
||||
public String getFNote() {
|
||||
return FNote;
|
||||
}
|
||||
|
||||
public void setFNote(String FNote) {
|
||||
this.FNote = FNote;
|
||||
}
|
||||
|
||||
public String getFSEQ() {
|
||||
return FSEQ;
|
||||
}
|
||||
|
||||
public void setFSEQ(String FSEQ) {
|
||||
this.FSEQ = FSEQ;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
package com.gatedge.jindie.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @param
|
||||
* @Author: 王康
|
||||
* @Description: TODO
|
||||
* @return
|
||||
* @DateTime: 2023/9/6 14:17
|
||||
* 描述:
|
||||
**/
|
||||
public class EntityVO implements Serializable {
|
||||
private Map<String, Object> fields = new HashMap<>();
|
||||
|
||||
public void setField(String fieldName, Object value) {
|
||||
fields.put(fieldName, value);
|
||||
}
|
||||
|
||||
public Object getField(String fieldName) {
|
||||
return fields.get(fieldName);
|
||||
}
|
||||
}
|
@ -1,42 +0,0 @@
|
||||
package com.gatedge.jindie.result;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* HTTP的返回响应类
|
||||
*
|
||||
* @版权所有 珠海格致软件有限公司 www.gatedge.cn
|
||||
*/
|
||||
public class ActionResult implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -8041820346732720877L;
|
||||
private int status;// 状态编码
|
||||
private String message;// 消息
|
||||
|
||||
public ActionResult() {
|
||||
super();
|
||||
}
|
||||
|
||||
public ActionResult(int status, String message) {
|
||||
super();
|
||||
this.status = status;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public int getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(int status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
}
|
@ -1,52 +0,0 @@
|
||||
package com.gatedge.jindie.result;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* HTTP的返回响应类
|
||||
*
|
||||
* @版权所有 珠海格致软件有限公司 www.gatedge.cn
|
||||
*/
|
||||
public class ListResult<T> implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -3755143195269176337L;
|
||||
private int status;// 状态编码
|
||||
private T data;// 数据 NOSONAR
|
||||
private String message;// 消息
|
||||
|
||||
public ListResult() {
|
||||
super();
|
||||
}
|
||||
|
||||
public ListResult(int status, T data, String message) {
|
||||
super();
|
||||
this.status = status;
|
||||
this.data = data;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public int getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(int status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public T getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(T data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
package com.gatedge.jindie.result;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 构建分页信息
|
||||
*
|
||||
* @版权所有 珠海格致软件有限公司 www.gatedge.cn
|
||||
*/
|
||||
public class PaginationBuilder {
|
||||
|
||||
private PaginationBuilder() {
|
||||
|
||||
}
|
||||
|
||||
public static synchronized Map<String, Object> buildResult(List<LinkedHashMap<String, Object>> resultList, long total, Integer currentPage,
|
||||
Integer pageSize) {
|
||||
LinkedHashMap<String, Object> resultMap = new LinkedHashMap<>();
|
||||
resultMap.put("list", resultList);
|
||||
LinkedHashMap<String, Long> paginationMap = new LinkedHashMap<>();
|
||||
paginationMap.put("total", total);
|
||||
paginationMap.put("pageSize", (long) pageSize);
|
||||
paginationMap.put("current", (long) currentPage);
|
||||
resultMap.put("pagination", paginationMap);
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
}
|
@ -1,105 +0,0 @@
|
||||
package com.gatedge.jindie.result;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.http.HttpStatus;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 构建结果返回信息
|
||||
*
|
||||
* @版权所有 珠海格致软件有限公司 www.gatedge.cn
|
||||
*/
|
||||
public class ResultBuilder {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(ResultBuilder.class);
|
||||
private static final String SUCCESS = "success";
|
||||
|
||||
private ResultBuilder() {
|
||||
|
||||
}
|
||||
|
||||
public static synchronized ListResult<Object> buildListSuccess(String data) {
|
||||
ListResult<Object> listResult = new ListResult<>();
|
||||
try {
|
||||
listResult.setData(data);
|
||||
listResult.setStatus(HttpStatus.OK.value());
|
||||
listResult.setMessage(SUCCESS);
|
||||
} catch (Exception e) {
|
||||
ResultBuilder.buildListWarn(listResult, e);
|
||||
}
|
||||
return listResult;
|
||||
}
|
||||
|
||||
public static synchronized ListResult<Object> buildListSuccess(Map<String, Object> data) {
|
||||
ListResult<Object> listResult = new ListResult<>();
|
||||
try {
|
||||
listResult.setData(data);
|
||||
listResult.setStatus(HttpStatus.OK.value());
|
||||
listResult.setMessage(SUCCESS);
|
||||
} catch (Exception e) {
|
||||
ResultBuilder.buildListWarn(listResult, e);
|
||||
}
|
||||
return listResult;
|
||||
}
|
||||
|
||||
/** added by Hunter on 2022-8-3
|
||||
* @return
|
||||
*/
|
||||
public static synchronized ListResult<Object> buildEntitySuccess(Object entity) {
|
||||
ListResult<Object> listResult = new ListResult<>();
|
||||
try {
|
||||
listResult.setData(entity);
|
||||
listResult.setStatus(HttpStatus.OK.value());
|
||||
listResult.setMessage(SUCCESS);
|
||||
} catch (Exception e) {
|
||||
ResultBuilder.buildListWarn(listResult, e);
|
||||
}
|
||||
return listResult;
|
||||
}
|
||||
|
||||
|
||||
public static synchronized ListResult<Object> buildListSuccess(List<?> data) {
|
||||
ListResult<Object> listResult = new ListResult<>();
|
||||
try {
|
||||
listResult.setData(data);
|
||||
listResult.setStatus(HttpStatus.OK.value());
|
||||
listResult.setMessage(SUCCESS);
|
||||
} catch (Exception e) {
|
||||
ResultBuilder.buildListWarn(listResult, e);
|
||||
}
|
||||
return listResult;
|
||||
}
|
||||
|
||||
public static synchronized void buildListWarn(ListResult<Object> result, Exception e) {
|
||||
result.setData(Collections.emptyMap());
|
||||
result.setStatus(HttpStatus.INTERNAL_SERVER_ERROR.value());
|
||||
result.setMessage(e.getMessage());
|
||||
if (LOGGER.isWarnEnabled()) {
|
||||
LOGGER.warn(e.toString());
|
||||
}
|
||||
}
|
||||
|
||||
public static synchronized ActionResult buildActionSuccess() {
|
||||
ActionResult actionResult = new ActionResult();
|
||||
try {
|
||||
actionResult.setStatus(HttpStatus.OK.value());
|
||||
actionResult.setMessage(SUCCESS);
|
||||
} catch (Exception e) {
|
||||
ResultBuilder.buildActionWarn(actionResult, e);
|
||||
}
|
||||
return actionResult;
|
||||
}
|
||||
|
||||
public static synchronized void buildActionWarn(ActionResult result, Exception e) {
|
||||
result.setStatus(HttpStatus.INTERNAL_SERVER_ERROR.value());
|
||||
result.setMessage(e.getMessage());
|
||||
if (LOGGER.isWarnEnabled()) {
|
||||
LOGGER.warn(e.toString());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,52 +0,0 @@
|
||||
package com.gatedge.jindie.service;
|
||||
|
||||
import com.gatedge.jindie.entity.Entity;
|
||||
import com.gatedge.jindie.entity.EntityItem;
|
||||
import com.gatedge.jindie.entity.EntityVO;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @param
|
||||
* @Author: 王康
|
||||
* @Description: TODO
|
||||
* @return
|
||||
* @DateTime: 2023/8/24 15:49
|
||||
* 描述:
|
||||
**/
|
||||
public interface SealedQuotationService {
|
||||
|
||||
/**
|
||||
* @param FBILLNO
|
||||
* @param username
|
||||
* @param password
|
||||
* deprecated:供应商登录验证
|
||||
* DateTime: 2023/9/6
|
||||
**/
|
||||
void login(String FBILLNO,String username, String password);
|
||||
|
||||
/**
|
||||
* @param FBILLNO
|
||||
* deprecated:获取数据
|
||||
* DateTime: 2023/9/6
|
||||
**/
|
||||
List<Entity> queryData(String FBILLNO);
|
||||
|
||||
/**
|
||||
* @param FBILLNO
|
||||
* deprecated:获取明细数据
|
||||
* DateTime: 2023/9/6
|
||||
**/
|
||||
List<EntityItem> queryDataItem(String FBILLNO);
|
||||
|
||||
/**
|
||||
* @param params
|
||||
* deprecated:保存
|
||||
* DateTime: 2023/9/7
|
||||
**/
|
||||
Map<String, Object> saveData(Map<String, Object> params);
|
||||
|
||||
|
||||
Boolean loginChack(Map<String, String> params);
|
||||
}
|
@ -1,304 +0,0 @@
|
||||
package com.gatedge.jindie.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.gatedge.jindie.entity.Entity;
|
||||
import com.gatedge.jindie.entity.EntityItem;
|
||||
import com.gatedge.jindie.entity.EntityVO;
|
||||
import com.gatedge.jindie.service.SealedQuotationService;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpEntity;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.HttpMethod;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
/**
|
||||
* @param
|
||||
* @Author: 王康
|
||||
* @Description: TODO
|
||||
* @return
|
||||
* @DateTime: 2023/8/24 15:53
|
||||
* 描述:
|
||||
**/
|
||||
@Service
|
||||
public class SealedQuotationServiceImpl implements SealedQuotationService {
|
||||
|
||||
@Autowired
|
||||
private RestTemplate restTemplate;
|
||||
//主表
|
||||
private String Primary_Meter="Fid,FBILLNO,FProjectName,FSrcBillNo,FSupplierId.FNumber,FSupplierName,FOpenDate,FPriceStatus,FQuoteDate,FExpiryDate,FContact,FPhone,FMail,FCurrId.FName,FIsIncludedTax,FDATE,FBuyer.FName,FCheckerId,FDocumentStatus";
|
||||
private String Detailed_List="FEntity_FEntryID, FMATERIALID.FNumber,FMaterialId.FName, FUnitID.FName,FQty, FPrice, FTaxRate, FTaxPrice,FNote,FPayConditionId.FName";
|
||||
|
||||
private String QUERY_DATA_URL="http://1.14.142.111:9090/K3CLOUD/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.ExecuteBillQuery.common.kdsvc";
|
||||
private String SAVA_DATA_URL="http://1.14.142.111:9090/k3cloud/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Save.common.kdsvc";
|
||||
|
||||
|
||||
@Override
|
||||
public void login(String FBILLNO, String username, String password) {
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("FormId", "kafe2f22a0498441f9109c31cf5586da5");
|
||||
params.put("FieldKeys", "FSupplierName,FSupplierId.FNumber");
|
||||
params.put("FilterString", "FBILLNO like'%" + FBILLNO + "'");
|
||||
params.put("OrderString", "");
|
||||
params.put("TopRowCount", "0");
|
||||
params.put("StartRow", "0");
|
||||
params.put("Limit", "100");
|
||||
data.put("data", params);
|
||||
String api = loginAPI(null);
|
||||
loginAPI(api);
|
||||
String input = API(api, data,QUERY_DATA_URL);
|
||||
if (input != null) {
|
||||
input = input.substring(2, input.length() - 2); // 截取字符串,去掉 "[[" 和 "]]"
|
||||
String[] parts = input.split(",");
|
||||
List<String> list = new ArrayList<>();
|
||||
for (String part : parts) {
|
||||
String cleanedPart = part.replaceAll("[\"\\s+]", ""); // 去掉多余的双引号和空格
|
||||
list.add(cleanedPart);
|
||||
}
|
||||
if (!list.get(0).equals(username)) {
|
||||
throw new IllegalArgumentException("供应商名称有误");
|
||||
}
|
||||
if (!list.get(1).equals(password)) {
|
||||
throw new IllegalArgumentException("供应商编号有误");
|
||||
}
|
||||
} else {
|
||||
throw new IllegalArgumentException("未找到供应商相关数据");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Entity> queryData(String FBILLNO) {
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("FormId", "kafe2f22a0498441f9109c31cf5586da5");
|
||||
params.put("FieldKeys", Primary_Meter);
|
||||
params.put("FilterString", "FBILLNO like'%" + FBILLNO + "'");
|
||||
params.put("OrderString", "");
|
||||
params.put("TopRowCount", "0");
|
||||
params.put("StartRow", "0");
|
||||
params.put("Limit", "100");
|
||||
data.put("data", params);
|
||||
String api = loginAPI(null);
|
||||
loginAPI(api);
|
||||
String input = API(api, data,QUERY_DATA_URL);
|
||||
List<Entity> result = new ArrayList<>();
|
||||
if (input != null) {
|
||||
input = input.substring(2, input.length() - 2); // 截取字符串,去掉 "[[" 和 "]]"
|
||||
String[] parts = input.split(",");
|
||||
List<String> list = new ArrayList<>();
|
||||
for (String part : parts) {
|
||||
String cleanedPart = part.replaceAll("[\"\\s+]", ""); // 去掉多余的双引号和空格
|
||||
list.add(cleanedPart);
|
||||
}
|
||||
Entity entity = new Entity(list.get(0),list.get(1),list.get(2),list.get(3),list.get(4),list.get(5),list.get(6),list.get(7),list.get(8),list.get(9),list.get(10),list.get(11),list.get(12),list.get(13),list.get(14),list.get(15),list.get(16),list.get(17),list.get(18));
|
||||
if (!entity.getFCheckerId().equals("0") && entity.getFDocumentStatus().equals("C")){
|
||||
entity.setStatus(false);
|
||||
}else {
|
||||
entity.setStatus(true);
|
||||
}
|
||||
result.add(entity);
|
||||
}
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<EntityItem> queryDataItem(String FBILLNO) {
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("FormId", "kafe2f22a0498441f9109c31cf5586da5");
|
||||
params.put("FieldKeys", Detailed_List);
|
||||
params.put("FilterString", "FBILLNO like'%" + FBILLNO + "'");
|
||||
params.put("OrderString", "");
|
||||
params.put("TopRowCount", "0");
|
||||
params.put("StartRow", "0");
|
||||
params.put("Limit", "100");
|
||||
data.put("data",params);
|
||||
String api = loginAPI(null);
|
||||
loginAPI(api);
|
||||
//业务API
|
||||
String json = API(api, data,QUERY_DATA_URL);
|
||||
List<EntityItem> result = new ArrayList<>();
|
||||
if (json != null) {
|
||||
//可能返回的是个集合,需要处理一下
|
||||
try {
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
JsonNode jsonArray = objectMapper.readTree(json);
|
||||
if (jsonArray.isArray()) {
|
||||
int FSEQ=1;
|
||||
for (JsonNode jsonItem : jsonArray) {
|
||||
String input = jsonItem.toString();
|
||||
input = input.substring(1, input.length() - 1); // 截取字符串,去掉 "[[" 和 "]]"
|
||||
String[] parts = input.split(",");
|
||||
List<String> list = new ArrayList<>();
|
||||
for (String part : parts) {
|
||||
String cleanedPart = part.replaceAll("[\"\\s+]", ""); // 去掉多余的双引号和空格
|
||||
list.add(cleanedPart);
|
||||
}
|
||||
EntityItem entityItem = new EntityItem(list.get(0),list.get(1),list.get(2),list.get(3),list.get(4),list.get(5),list.get(6),list.get(7),list.get(8),list.get(9));
|
||||
entityItem.setFSEQ(String.valueOf(FSEQ));
|
||||
FSEQ++;
|
||||
result.add(entityItem);
|
||||
|
||||
}
|
||||
} else {
|
||||
System.err.println("Invalid JSON array format.");
|
||||
}
|
||||
} catch (JsonProcessingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> saveData(Map<String, Object> params) {
|
||||
String isAutoAdjustField = params.get("IsAutoAdjustField").toString();
|
||||
params.remove("IsAutoAdjustField");
|
||||
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
data.put("Creator","String");
|
||||
data.put("NeedUpDateFields",new ArrayList<>());
|
||||
data.put("IsAutoSubmitAndAudit",isAutoAdjustField);
|
||||
SimpleDateFormat simpleDateFormat=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
String format = simpleDateFormat.format(new Date());
|
||||
params.put("FQuoteDate",format);
|
||||
if (isAutoAdjustField.equals("true")) {
|
||||
data.put("FIsConfirm",true);
|
||||
params.put("FConfirmDate",format);
|
||||
}
|
||||
data.put("Model",params);
|
||||
|
||||
Map<String, Object> data1 = new HashMap<>();
|
||||
data1.put("FormId", "kafe2f22a0498441f9109c31cf5586da5");
|
||||
data1.put("data",data);
|
||||
String api = loginAPI(null);
|
||||
loginAPI(api);
|
||||
//业务API
|
||||
String json = API(api, data1,SAVA_DATA_URL);
|
||||
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
Map<String, Object> map = null;
|
||||
try {
|
||||
map = objectMapper.readValue(json, new TypeReference<Map<String, Object>>(){});
|
||||
} catch (JsonProcessingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
public String API(String apiCookie, Map<String, Object> data,String url) {
|
||||
// 设置请求头信息
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
headers.set("Content-Type", "application/json");
|
||||
headers.set("kdservice-sessionid", apiCookie);
|
||||
|
||||
// 设置请求参数
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
String jsonData = null;
|
||||
try {
|
||||
jsonData = objectMapper.writeValueAsString(data);
|
||||
} catch (JsonProcessingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
// String url = "http://1.14.142.111:9090/K3CLOUD/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.ExecuteBillQuery.common.kdsvc";
|
||||
HttpEntity<String> requestEntity = new HttpEntity<>(jsonData, headers);
|
||||
System.out.println(jsonData);
|
||||
// 发送POST请求
|
||||
ResponseEntity<String> responseEntity = restTemplate.exchange(url, HttpMethod.POST, requestEntity, String.class);
|
||||
|
||||
// 获取返回信息
|
||||
String response = responseEntity.getBody();
|
||||
if (Objects.equals(response, "[]")) {
|
||||
return null;
|
||||
} else {
|
||||
return response;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public String loginAPI(String apiCookie) {
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("acctID", "63e200975197e2");
|
||||
params.put("Username", "王扶民");
|
||||
params.put("Password", "888888");
|
||||
params.put("Lcid", "2052");
|
||||
// 设置请求头信息
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
headers.set("Content-Type", "application/json");
|
||||
if (apiCookie != null) {
|
||||
headers.set("kdservice-sessionid", "54f0d8ff-00a7-4db0-992b-cfe9abed566e");
|
||||
}
|
||||
// 设置请求参数
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
String jsonData = null;
|
||||
try {
|
||||
jsonData = objectMapper.writeValueAsString(params);
|
||||
} catch (JsonProcessingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
String url = "http://1.14.142.111:9090/K3Cloud/Kingdee.BOS.WebApi.ServicesStub.AuthService.ValidateUser.common.kdsvc";
|
||||
HttpEntity<String> requestEntity = new HttpEntity<>(jsonData, headers);
|
||||
|
||||
// 发送POST请求
|
||||
ResponseEntity<String> responseEntity = restTemplate.exchange(url, HttpMethod.POST, requestEntity, String.class);
|
||||
|
||||
// 获取返回信息
|
||||
String response = responseEntity.getBody();
|
||||
Map<String, Object> resultMap = JSON.parseObject(response);
|
||||
return resultMap.get("KDSVCSessionId").toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean loginChack(Map<String, String> paramsData) {
|
||||
String username = paramsData.get("username");
|
||||
String password = paramsData.get("password");
|
||||
String FBILLNO = paramsData.get("FBILLNO");
|
||||
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("FormId", "kafe2f22a0498441f9109c31cf5586da5");
|
||||
params.put("FieldKeys", "FSupplierName,FSupplierId.FNumber");
|
||||
params.put("FilterString", "FBILLNO like'%" + FBILLNO + "'");
|
||||
params.put("OrderString", "");
|
||||
params.put("TopRowCount", "0");
|
||||
params.put("StartRow", "0");
|
||||
params.put("Limit", "100");
|
||||
data.put("data", params);
|
||||
String api = loginAPI(null);
|
||||
loginAPI(api);
|
||||
String input = API(api, data,QUERY_DATA_URL);
|
||||
if (input != null) {
|
||||
input = input.substring(2, input.length() - 2); // 截取字符串,去掉 "[[" 和 "]]"
|
||||
String[] parts = input.split(",");
|
||||
List<String> list = new ArrayList<>();
|
||||
for (String part : parts) {
|
||||
String cleanedPart = part.replaceAll("[\"\\s+]", ""); // 去掉多余的双引号和空格
|
||||
list.add(cleanedPart);
|
||||
}
|
||||
if (!list.get(0).equals(username)) {
|
||||
return false;
|
||||
}
|
||||
if (!list.get(1).equals(password)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,61 +0,0 @@
|
||||
package com.gatedge.jindie;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.gatedge.jindie.entity.EntityItem;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @param
|
||||
* @Author: 王康
|
||||
* @Description: TODO
|
||||
* @return
|
||||
* @DateTime: 2023/9/6 10:50
|
||||
* 描述:
|
||||
**/
|
||||
public class test {
|
||||
|
||||
public static void main(String[] args) {
|
||||
// String jsonString = "[[100046,\"1.01.001.0057\",\"侧板-50KW系列\",\"Pcs\",100,0,16,0,\" \",\"先收30%,70%在应收单后30天收\"],[100047,\"1.01.001.0055\",\"接板-A系列\",\"Pcs\",200,0,16,0,\" \",\"先收30%,70%在应收单后30天收\"]]";
|
||||
// String jsonString1 = "[[100007,\"BJ23060006\",\"测试密封报价\",\"XJ23060001\",101643,\"手机事业部\",\"2023-06-28T00:00:00\",\"A\",\"2023-06-22T00:00:00\",\"2023-06-26T00:00:00\",\" \",\" \",\" \",1,true,\"156628\",\"C\"]]";
|
||||
// t1(jsonString);
|
||||
// t1(jsonString1);
|
||||
SimpleDateFormat simpleDateFormat=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
String format = simpleDateFormat.format(new Date());
|
||||
System.out.println(new Date());
|
||||
System.out.println(format);
|
||||
}
|
||||
static void t1(String jsonString){
|
||||
try {
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
JsonNode jsonArray = objectMapper.readTree(jsonString);
|
||||
if (jsonArray.isArray()) {
|
||||
int FSEQ=1;
|
||||
for (JsonNode jsonItem : jsonArray) {
|
||||
String input = jsonItem.toString();
|
||||
String substring = input.substring(0, 2);
|
||||
input = input.substring(1, input.length() - 1); // 截取字符串,去掉 "[[" 和 "]]"
|
||||
String[] parts = input.split(",");
|
||||
List<String> list = new ArrayList<>();
|
||||
for (String part : parts) {
|
||||
String cleanedPart = part.replaceAll("[\"\\s+]", ""); // 去掉多余的双引号和空格
|
||||
list.add(cleanedPart);
|
||||
}
|
||||
EntityItem entityItem = new EntityItem(list.get(0),list.get(1),list.get(2),list.get(3),list.get(4),list.get(5),list.get(6),list.get(7),list.get(8),list.get(9));
|
||||
entityItem.setFSEQ(String.valueOf(FSEQ));
|
||||
FSEQ++;
|
||||
}
|
||||
} else {
|
||||
System.err.println("Invalid JSON array format.");
|
||||
}
|
||||
} catch (JsonProcessingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,3 +0,0 @@
|
||||
server:
|
||||
port: 10002
|
||||
|
@ -1,6 +0,0 @@
|
||||
<html>
|
||||
<body>
|
||||
<h1>hello word!!!</h1>
|
||||
<p>this is a html page</p>
|
||||
</body>
|
||||
</html>
|
@ -1,13 +0,0 @@
|
||||
package com.gatedge;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
@SpringBootTest
|
||||
class GatedgeApplicationTests {
|
||||
|
||||
@Test
|
||||
void contextLoads() {
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user