解决大小计算不正确问题

master
zhanghai 2 years ago
parent 46020ff26e
commit c5405964f0

@ -1,13 +1,13 @@
file.mode=图片 file.mode=图片
file.read.url=C:\jiahsi-saomiao\缩微\ddd_0001\ file.read.url=C:\jiahsi-saomiao\缩微\ddd_0001\
plate.size=200 plate.size=200
a3.width=300 a3.width=17
file.save.url=C:\jiahsi-saomiao\缩微\分盘结果\档案图\ file.save.url=C:\jiahsi-saomiao\缩微\分盘结果\档案图\
zong.name.prefix=南方医院 zong.name.prefix=南方医院
Split.mode=copy/cut Split.mode=copy/cut
a3.length=300 a3.length=17
a0.length=200 a0.length=47
a4.width=200 a4.width=13
a4.length=200 a4.length=13
plate33.size=300 plate33.size=300
a0.width=200 a0.width=47

@ -46,12 +46,12 @@ public class Document {
public String toSize() { public String toSize() {
if(width / dpi > Integer.parseInt(Config.getParam("a4.width")) if (width / dpi > Integer.parseInt(Config.getParam("a3.width"))
|| longTh / dpi > Integer.parseInt(Config.getParam("a4.length"))){
return "A3";
}else if(width / dpi > Integer.parseInt(Config.getParam("a3.width"))
|| longTh / dpi > Integer.parseInt(Config.getParam("a3.length"))) { || longTh / dpi > Integer.parseInt(Config.getParam("a3.length"))) {
return "A3以上"; return "A3以上";
} else if (width / dpi > Integer.parseInt(Config.getParam("a4.width"))
|| longTh / dpi > Integer.parseInt(Config.getParam("a4.length"))) {
return "A3";
} else { } else {
return "A4"; return "A4";
} }
@ -59,12 +59,12 @@ public class Document {
public Double useStore() { public Double useStore() {
if(width / dpi > Integer.parseInt(Config.getParam("a4.width")) if (width / dpi > Integer.parseInt(Config.getParam("a3.width"))
|| longTh / dpi > Integer.parseInt(Config.getParam("a4.length"))){
return 2d;
}else if(width / dpi > Integer.parseInt(Config.getParam("a3.width"))
|| longTh / dpi > Integer.parseInt(Config.getParam("a3.length"))) { || longTh / dpi > Integer.parseInt(Config.getParam("a3.length"))) {
return 4.2d; return 4.2d;
} else if (width / dpi > Integer.parseInt(Config.getParam("a4.width"))
|| longTh / dpi > Integer.parseInt(Config.getParam("a4.length"))) {
return 2d;
} else { } else {
return 1d; return 1d;
} }

@ -28,7 +28,7 @@ public class Plate {
//是否还可以放下新的卷 //是否还可以放下新的卷
public Boolean put(Roll roll) { public Boolean put(Roll roll) {
if(already + roll.getSize() - totalLength >= 0){ if(already + roll.getSize() - totalLength > 0){
return false; return false;
} }
this.already = already+roll.getSize(); this.already = already+roll.getSize();

@ -139,7 +139,7 @@ public class CheckService {
if(levelType==LevelType.THREE){ if(levelType==LevelType.THREE){
Pieces pieces = new Pieces(FileTypeEnum.JPG, piece.getAbsolutePath(), piece.getName(),LevelType.THREE); Pieces pieces = new Pieces(FileTypeEnum.JPG, piece.getAbsolutePath(), piece.getName(),LevelType.THREE);
File[] listFiles = piece.getParentFile().listFiles(); //就是自己本身 File[] listFiles = new File[]{new File(piece.getAbsolutePath())};
genPieces(pieces, listFiles, FileTypeEnum.JPG); genPieces(pieces, listFiles, FileTypeEnum.JPG);
pieceList.add(pieces); pieceList.add(pieces);
}else{ }else{

Loading…
Cancel
Save