暴炳林 2024-05-29 10:06:12 +08:00
parent c9e6d8627a
commit b2bc686b6d
3 changed files with 15 additions and 8 deletions

View File

@ -86,7 +86,7 @@ public class HttpPostUtil {
} }
str = ResponseString; str = ResponseString;
} catch (Exception e) { } catch (Exception e) {
log.info("接口异常"); log.info(api_url+"接口异常");
} }
return str; return str;
} }

View File

@ -23,6 +23,9 @@ import lombok.Data;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions; import cn.hutool.core.bean.copier.CopyOptions;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
import javax.persistence.*; import javax.persistence.*;
import javax.validation.constraints.*; import javax.validation.constraints.*;
import java.sql.Timestamp; import java.sql.Timestamp;
@ -108,6 +111,7 @@ public class InventoryLog extends BaseEntity implements Serializable {
@OneToOne @OneToOne
@JoinColumn(name = "`src_point_id`") @JoinColumn(name = "`src_point_id`")
@ApiModelProperty(value = "源点位") @ApiModelProperty(value = "源点位")
@NotFound(action= NotFoundAction.IGNORE)
private Point srcPoint; private Point srcPoint;
@Column(name = "`src_point_code`") @Column(name = "`src_point_code`")
@ -117,6 +121,7 @@ public class InventoryLog extends BaseEntity implements Serializable {
@OneToOne @OneToOne
@JoinColumn(name = "`src_stock_id`") @JoinColumn(name = "`src_stock_id`")
@ApiModelProperty(value = "源容器") @ApiModelProperty(value = "源容器")
@NotFound(action= NotFoundAction.IGNORE)
private Stock srcStock; private Stock srcStock;
@Column(name = "`src_stock_code`") @Column(name = "`src_stock_code`")
@ -125,6 +130,7 @@ public class InventoryLog extends BaseEntity implements Serializable {
@OneToOne @OneToOne
@JoinColumn(name = "`dst_point_id`") @JoinColumn(name = "`dst_point_id`")
@NotFound(action= NotFoundAction.IGNORE)
@ApiModelProperty(value = "点位") @ApiModelProperty(value = "点位")
private Point dstPoint; private Point dstPoint;
@ -135,6 +141,7 @@ public class InventoryLog extends BaseEntity implements Serializable {
@OneToOne @OneToOne
@JoinColumn(name = "`dst_stock_id`") @JoinColumn(name = "`dst_stock_id`")
@ApiModelProperty(value = "目标容器") @ApiModelProperty(value = "目标容器")
@NotFound(action= NotFoundAction.IGNORE)
private Stock dstStock; private Stock dstStock;
@Column(name = "`dst_stock_code`") @Column(name = "`dst_stock_code`")

View File

@ -23,7 +23,7 @@ public class LicenseValidate {
public static void validate() throws Exception{ public static void validate() throws Exception{
//读取本地文件 //读取本地文件
FileProperties properties= SpringContextHolder.getBean(FileProperties.class); /*FileProperties properties= SpringContextHolder.getBean(FileProperties.class);
log.info(properties.getPath().getPath()); log.info(properties.getPath().getPath());
String result=""; String result="";
try{ try{
@ -67,7 +67,7 @@ public class LicenseValidate {
} }
}catch (Exception e){ }catch (Exception e){
throw new BadRequestException("无效的License,请重新生成"); throw new BadRequestException("无效的License,请重新生成");
} }*/
} }
@ -124,7 +124,7 @@ public class LicenseValidate {
public static void saveCode(String license_code) throws Exception{ public static void saveCode(String license_code) throws Exception{
//读取本地文件 //读取本地文件
log.error(license_code); /*log.error(license_code);
String rsaResult=""; String rsaResult="";
try{ try{
rsaResult= RsaUtils.decryptByPublicKey(RsaProperties.licenseKey,license_code); rsaResult= RsaUtils.decryptByPublicKey(RsaProperties.licenseKey,license_code);
@ -170,7 +170,7 @@ public class LicenseValidate {
log.info(properties.getPath().getPath()); log.info(properties.getPath().getPath());
FileWriter writer = new FileWriter(properties.getPath().getPath()+"key/"+"license.key"); FileWriter writer = new FileWriter(properties.getPath().getPath()+"key/"+"license.key");
writer.write(license_code); writer.write(license_code);*/
@ -179,7 +179,7 @@ public class LicenseValidate {
} }
public static LicenseCheck getDeviceInfo(){ public static LicenseCheck getDeviceInfo(){
String osName = System.getProperty("os.name"); /*String osName = System.getProperty("os.name");
osName = osName.toLowerCase(); osName = osName.toLowerCase();
AGxServerInfos abstractServerInfos; AGxServerInfos abstractServerInfos;
//根据不同操作系统类型选择不同的数据获取方法 //根据不同操作系统类型选择不同的数据获取方法
@ -190,7 +190,7 @@ public class LicenseValidate {
}else{//其他服务器类型 }else{//其他服务器类型
abstractServerInfos = new LinuxServerInfos(); abstractServerInfos = new LinuxServerInfos();
} }
return abstractServerInfos.getServerInfos(); return abstractServerInfos.getServerInfos();*/
return null;
} }
} }