修改
This commit is contained in:
@@ -342,7 +342,7 @@ public class OfficeProxy{
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if(files == null || files.size() < 2)
|
if(files == null )
|
||||||
return false;
|
return false;
|
||||||
File file = new File(files.get(0));
|
File file = new File(files.get(0));
|
||||||
if(!file.exists())
|
if(!file.exists())
|
||||||
|
|||||||
@@ -514,23 +514,23 @@ public class ProjectServiceImpl implements ProjectService {
|
|||||||
}
|
}
|
||||||
List<String> result = new ArrayList<>();
|
List<String> result = new ArrayList<>();
|
||||||
String[] cmdParams = commands.split(" ");
|
String[] cmdParams = commands.split(" ");
|
||||||
if(cmdParams.length != 4)
|
if(cmdParams.length != 5)
|
||||||
{
|
{
|
||||||
return SdmResponse.failed("param size error");
|
return SdmResponse.failed("param size error");
|
||||||
}
|
}
|
||||||
OfficeProxy officeProxy = new OfficeProxy();
|
OfficeProxy officeProxy = new OfficeProxy();
|
||||||
if(commands.contains("excelToJson.py")) //excel转为json库
|
if(commands.contains("excelToJson.py")) //excel转为json库
|
||||||
{
|
{
|
||||||
String excelPath = cmdParams[1];
|
String excelPath = cmdParams[2];
|
||||||
String dictPath = cmdParams[3];
|
String dictPath = cmdParams[4];
|
||||||
String jsonContents = officeProxy.excelToJson(excelPath,dictPath);
|
String jsonContents = officeProxy.excelToJson(excelPath,dictPath);
|
||||||
result.add(jsonContents);
|
result.add(jsonContents);
|
||||||
}
|
}
|
||||||
else if(commands.contains("jsonToExcel.py"))//json库导出excel
|
else if(commands.contains("jsonToExcel.py"))//json库导出excel
|
||||||
{
|
{
|
||||||
String jsonPath = cmdParams[1];
|
String jsonPath = cmdParams[2];
|
||||||
int type = Integer.parseInt(cmdParams[2]);
|
int type = Integer.parseInt(cmdParams[3]);
|
||||||
String dictPath = cmdParams[3];
|
String dictPath = cmdParams[4];
|
||||||
int index = dictPath.lastIndexOf(File.separator);
|
int index = dictPath.lastIndexOf(File.separator);
|
||||||
if(index > 0) {
|
if(index > 0) {
|
||||||
String savePath = dictPath.substring(0, index);
|
String savePath = dictPath.substring(0, index);
|
||||||
|
|||||||
Reference in New Issue
Block a user