修改软件版本功能

master
zhanghai 2 years ago
parent ad2174a673
commit 7533b76ef2

@ -81,5 +81,8 @@ public class Document {
this.dpi = 300;
}
this.rollModel = rollModel;
if(rollModel==null){
this.rollModel = "16mm规格";
}
}
}

@ -32,7 +32,9 @@ public class FenpanService {
private String zongPrefix;
public FenpanService(String rollModel,String zongPrefix){
private Integer num;
public FenpanService(String rollModel,String zongPrefix,Integer num){
if(rollModel.equals("16mm规格")){
plateSize = Integer.parseInt(Config.getParam("plate.size"));
}else{
@ -40,6 +42,7 @@ public class FenpanService {
}
this.rollModel = rollModel;
this.zongPrefix = zongPrefix;
this.num = num;
}
public void fenpan(String saveUrl, String readUrl) {
@ -48,7 +51,7 @@ public class FenpanService {
Map<Zong, List<Plate>> zongListMap = new HashMap<>();
//读取需要转宗的文件夹
Integer i = 0;
Integer i = num;
for (String key : zongMap.keySet()) {
List<Plate> plateList = new ArrayList<>();
Zong zong = zongMap.get(key);

@ -110,7 +110,7 @@ public class MyApplication {
gbc.gridy = 3;
gbc.gridwidth = 1;
gbc.anchor = GridBagConstraints.WEST;
paramPanel.add(new JLabel("16mm规格盘大小:"), gbc);
paramPanel.add(new JLabel("16mm规格画幅数量A4合计:"), gbc);
gbc.gridx = 1;
gbc.anchor = GridBagConstraints.CENTER;
JTextField plateSizeJtf = new JTextField(20);
@ -121,7 +121,7 @@ public class MyApplication {
gbc.gridy = 4;
gbc.gridwidth = 1;
gbc.anchor = GridBagConstraints.WEST;
paramPanel.add(new JLabel("33mm规格盘大小:"), gbc);
paramPanel.add(new JLabel("35mm规格画幅数量:"), gbc);
gbc.gridx = 1;
gbc.anchor = GridBagConstraints.CENTER;
JTextField plateSizeJtf33 = new JTextField(20);
@ -175,7 +175,7 @@ public class MyApplication {
leftGbc.gridx = 0;
leftGbc.gridy = 0;
leftPanel.add(new JLabel("模式选择:"));
leftPanel.add(new JLabel("规格选择:"));
String[] rollmodes = {"16mm规格", "35mm规格"};
JComboBox<String> rollmodeComboBox = new JComboBox<>(rollmodes);
leftGbc.gridx = 1;
@ -190,7 +190,7 @@ public class MyApplication {
leftGbc.gridwidth = 1;
leftPanel.add(folderField, leftGbc);
JButton folderChooserButton = new JButton("选择文件夹");
JButton folderChooserButton = new JButton("选择目录");
folderChooserButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@ -218,7 +218,7 @@ public class MyApplication {
JButton savePathChooserButton = new JButton("选择文件夹");
JButton savePathChooserButton = new JButton("选择目录");
savePathChooserButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@ -242,8 +242,18 @@ public class MyApplication {
leftGbc.gridx = 1;
leftPanel.add(zongFiled, leftGbc);
leftGbc.gridx = 0;
leftGbc.gridy = 4;
leftPanel.add(new JLabel("起始分盘号:"), leftGbc);
JTextField spiltNum = new JTextField(20);
leftGbc.gridx = 1;
leftPanel.add(spiltNum, leftGbc);
leftGbc.gridx = 0;
leftGbc.gridy = 5;
leftGbc.gridwidth = 2;
leftGbc.anchor = GridBagConstraints.CENTER;
JButton fenpanJbtn = new JButton("开始分盘");
@ -282,7 +292,7 @@ public class MyApplication {
String readUrl = folderField.getText();
String s = Objects.requireNonNull(rollmodeComboBox.getSelectedItem()).toString();
System.out.println(s);
new FenpanService(s,zongFiled.getText()).fenpan(saveUrl,readUrl);
new FenpanService(s,zongFiled.getText(),Integer.parseInt(spiltNum.getText())).fenpan(saveUrl,readUrl);
SwingUtilities.invokeLater(new Runnable() {
@Override
@ -343,7 +353,7 @@ public class MyApplication {
leftGbc.gridwidth = 1;
leftPanel.add(filePathField, leftGbc);
JButton fileChooserButton = new JButton("选择文件夹");
JButton fileChooserButton = new JButton("选择目录");
leftGbc.gridx = 2;
leftPanel.add(fileChooserButton, leftGbc);
@ -468,7 +478,7 @@ public class MyApplication {
leftIndexGbc.gridwidth = 1;
leftIndexPanel.add(filePathField, leftIndexGbc);
JButton fileChooserButton = new JButton("选择文件");
JButton fileChooserButton = new JButton("选择目录");
leftIndexGbc.gridx = 2;
leftIndexPanel.add(fileChooserButton, leftIndexGbc);

Loading…
Cancel
Save