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