修改bug
This commit is contained in:
parent
d4c15124d5
commit
2670bb44be
|
@ -265,6 +265,21 @@ public class KcExportConfigTpkwcqkjzglxController extends JeecgController<KcExpo
|
||||||
return Result.OK(pageList);
|
return Result.OK(pageList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value="kc_export_config_tpkwcqkjzglx-分页列表查询", notes="kc_export_config_tpkwcqkjzglx-分页列表查询")
|
||||||
|
@GetMapping(value = "/list3")
|
||||||
|
public Result<IPage<KcExportConfigTpkwcqkjzglx>> list3(KcExportConfigTpkwcqkjzglx kcExportConfigTpkwcqkjzglx,
|
||||||
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
QueryWrapper<KcExportConfigTpkwcqkjzglx> queryWrapper = QueryGenerator.initQueryWrapper(kcExportConfigTpkwcqkjzglx, req.getParameterMap());
|
||||||
|
queryWrapper.apply("(zt = '在职' or (zt= '退休' and ytkcs-0 >0) or (zt= '离职' and ytkcs-0 >0))");
|
||||||
|
Page<KcExportConfigTpkwcqkjzglx> page = new Page<>(pageNo, pageSize);
|
||||||
|
IPage<KcExportConfigTpkwcqkjzglx> pageList = kcExportConfigTpkwcqkjzglxService.list3(page, queryWrapper);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加
|
* 添加
|
||||||
*
|
*
|
||||||
|
|
|
@ -46,4 +46,6 @@ public interface KcExportConfigTpkwcqkjzglxMapper extends BaseMapper<KcExportCon
|
||||||
List<KcExportConfigTpkwcqkjzglx> getBxqSaveList(KcExportConfigTpkwcqkjzglx kcExportConfigTpkwcqkjzglx);
|
List<KcExportConfigTpkwcqkjzglx> getBxqSaveList(KcExportConfigTpkwcqkjzglx kcExportConfigTpkwcqkjzglx);
|
||||||
|
|
||||||
List<KcExportConfigTpkwcqkjzglx> groupTklxList(@Param(Constants.WRAPPER) QueryWrapper<KcExportConfigTpkwcqkjzglx> queryWrapper);
|
List<KcExportConfigTpkwcqkjzglx> groupTklxList(@Param(Constants.WRAPPER) QueryWrapper<KcExportConfigTpkwcqkjzglx> queryWrapper);
|
||||||
|
|
||||||
|
IPage<KcExportConfigTpkwcqkjzglx> list3(Page<KcExportConfigTpkwcqkjzglx> page, @Param(Constants.WRAPPER) QueryWrapper<KcExportConfigTpkwcqkjzglx> queryWrapper);
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,6 +32,19 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="list3" resultType="org.jeecg.modules.kc.config.entity.KcExportConfigTpkwcqkjzglx">
|
||||||
|
SELECT
|
||||||
|
distinct
|
||||||
|
gh as id,
|
||||||
|
xqxn,
|
||||||
|
dwmc,
|
||||||
|
gh,
|
||||||
|
xm
|
||||||
|
FROM
|
||||||
|
kc_export_config_tpkwcqkjzglx
|
||||||
|
${ew.customSqlSegment}
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="getByGh" resultType="org.jeecg.modules.kc.config.entity.KcExportConfigTpkwcqkjzglx">
|
<select id="getByGh" resultType="org.jeecg.modules.kc.config.entity.KcExportConfigTpkwcqkjzglx">
|
||||||
select * from kc_export_config_tpkwcqkjzglx
|
select * from kc_export_config_tpkwcqkjzglx
|
||||||
where gh = #{gh} order by create_time desc limit 1
|
where gh = #{gh} order by create_time desc limit 1
|
||||||
|
|
|
@ -44,4 +44,6 @@ public interface IKcExportConfigTpkwcqkjzglxService extends IService<KcExportCon
|
||||||
List<KcExportConfigTpkwcqkjzglx> getSfybxqsj();
|
List<KcExportConfigTpkwcqkjzglx> getSfybxqsj();
|
||||||
|
|
||||||
List<KcExportConfigTpkwcqkjzglx> groupTklxList(QueryWrapper<KcExportConfigTpkwcqkjzglx> queryWrapper);
|
List<KcExportConfigTpkwcqkjzglx> groupTklxList(QueryWrapper<KcExportConfigTpkwcqkjzglx> queryWrapper);
|
||||||
|
|
||||||
|
IPage<KcExportConfigTpkwcqkjzglx> list3(Page<KcExportConfigTpkwcqkjzglx> page, QueryWrapper<KcExportConfigTpkwcqkjzglx> queryWrapper);
|
||||||
}
|
}
|
||||||
|
|
|
@ -379,4 +379,9 @@ public class KcExportConfigTpkwcqkjzglxServiceImpl extends ServiceImpl<KcExportC
|
||||||
public List<KcExportConfigTpkwcqkjzglx> groupTklxList(QueryWrapper<KcExportConfigTpkwcqkjzglx> queryWrapper) {
|
public List<KcExportConfigTpkwcqkjzglx> groupTklxList(QueryWrapper<KcExportConfigTpkwcqkjzglx> queryWrapper) {
|
||||||
return baseMapper.groupTklxList(queryWrapper);
|
return baseMapper.groupTklxList(queryWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPage<KcExportConfigTpkwcqkjzglx> list3(Page<KcExportConfigTpkwcqkjzglx> page, QueryWrapper<KcExportConfigTpkwcqkjzglx> queryWrapper) {
|
||||||
|
return baseMapper.list3(page,queryWrapper);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -275,7 +275,8 @@ public class ZyInfoStudentServiceImpl extends ServiceImpl<ZyInfoStudentMapper, Z
|
||||||
String url = "https://vims.fanyu.com/toole/smallcheck/submitData";
|
String url = "https://vims.fanyu.com/toole/smallcheck/submitData";
|
||||||
//文件路径,文件存在,不存在的话需要先下载下来
|
//文件路径,文件存在,不存在的话需要先下载下来
|
||||||
// String fileName = uploadpath+"/"+ zyInfoStudent.getFilePath();
|
// String fileName = uploadpath+"/"+ zyInfoStudent.getFilePath();
|
||||||
String fileName = getFileName(zyInfoStudent.getFilePath(),response);
|
String filePath = zyInfoStudent.getFilePath();
|
||||||
|
String fileName = getFileName(filePath,response);
|
||||||
Map<String, String> textMap = new HashMap<String, String>();
|
Map<String, String> textMap = new HashMap<String, String>();
|
||||||
String titlePar =fileName.substring(fileName.lastIndexOf("/")+1,fileName.length());
|
String titlePar =fileName.substring(fileName.lastIndexOf("/")+1,fileName.length());
|
||||||
String title = titlePar.split("_")[0];
|
String title = titlePar.split("_")[0];
|
||||||
|
@ -293,6 +294,9 @@ public class ZyInfoStudentServiceImpl extends ServiceImpl<ZyInfoStudentMapper, Z
|
||||||
Map<String, String> fileMap = new HashMap<String, String>();
|
Map<String, String> fileMap = new HashMap<String, String>();
|
||||||
fileMap.put("file", fileName);
|
fileMap.put("file", fileName);
|
||||||
String contentType = "";//image/png
|
String contentType = "";//image/png
|
||||||
|
System.out.println("url--->"+url);
|
||||||
|
System.out.println("textMap--->"+textMap);
|
||||||
|
System.out.println("fileMap--->"+fileMap);
|
||||||
String ret = formUpload(url, textMap, fileMap,contentType);
|
String ret = formUpload(url, textMap, fileMap,contentType);
|
||||||
JSONObject object= JSONObject.parseObject(ret);
|
JSONObject object= JSONObject.parseObject(ret);
|
||||||
if("true".equals(object.getString("success"))){
|
if("true".equals(object.getString("success"))){
|
||||||
|
@ -360,6 +364,7 @@ public class ZyInfoStudentServiceImpl extends ServiceImpl<ZyInfoStudentMapper, Z
|
||||||
Map<String, String> fileMap = new HashMap<String, String>();
|
Map<String, String> fileMap = new HashMap<String, String>();
|
||||||
fileMap.put("file", fileName);
|
fileMap.put("file", fileName);
|
||||||
String contentType = "";//image/png
|
String contentType = "";//image/png
|
||||||
|
System.out.println("fileMap-------->"+fileMap);
|
||||||
String ret = formUpload(url, textMap, fileMap,contentType);
|
String ret = formUpload(url, textMap, fileMap,contentType);
|
||||||
System.out.println("1-------->"+ret);
|
System.out.println("1-------->"+ret);
|
||||||
JSONObject object= JSONObject.parseObject(ret);
|
JSONObject object= JSONObject.parseObject(ret);
|
||||||
|
@ -410,17 +415,22 @@ public class ZyInfoStudentServiceImpl extends ServiceImpl<ZyInfoStudentMapper, Z
|
||||||
String fileName = "";
|
String fileName = "";
|
||||||
if(CommonConstant.UPLOAD_TYPE_LOCAL.equals(uploadType)) {
|
if(CommonConstant.UPLOAD_TYPE_LOCAL.equals(uploadType)) {
|
||||||
fileName = uploadpath+"/"+ imgPath;
|
fileName = uploadpath+"/"+ imgPath;
|
||||||
|
System.out.println("1111111111111111----------->");
|
||||||
}else if(CommonConstant.UPLOAD_TYPE_SFTP.equals(uploadType)){
|
}else if(CommonConstant.UPLOAD_TYPE_SFTP.equals(uploadType)){
|
||||||
|
System.out.println("22222222222222----------->");
|
||||||
InputStream inputStream = null;
|
InputStream inputStream = null;
|
||||||
OutputStream outputStream = null;
|
OutputStream outputStream = null;
|
||||||
try{
|
try{
|
||||||
|
System.out.println("getFileName----------->");
|
||||||
int index = imgPath.lastIndexOf("/");
|
int index = imgPath.lastIndexOf("/");
|
||||||
String path = "temp";
|
String path = "temp";
|
||||||
if(index != -1){
|
if(index != -1){
|
||||||
path = imgPath.substring(0,index);
|
path = imgPath.substring(0,index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
System.out.println("path----------->"+path);
|
||||||
Map<String,String> map = SFTPUtil.download(sftpConfig,imgPath,getDownloadPath(path));
|
Map<String,String> map = SFTPUtil.download(sftpConfig,imgPath,getDownloadPath(path));
|
||||||
|
System.out.println("map----------->"+map);
|
||||||
if(!map.get("code").equals("0")){
|
if(!map.get("code").equals("0")){
|
||||||
response.setStatus(404);
|
response.setStatus(404);
|
||||||
throw new RuntimeException(map.get("msg"));
|
throw new RuntimeException(map.get("msg"));
|
||||||
|
@ -431,6 +441,7 @@ public class ZyInfoStudentServiceImpl extends ServiceImpl<ZyInfoStudentMapper, Z
|
||||||
response.setStatus(404);
|
response.setStatus(404);
|
||||||
throw new RuntimeException("文件["+imgPath+"]不存在..");
|
throw new RuntimeException("文件["+imgPath+"]不存在..");
|
||||||
}
|
}
|
||||||
|
System.out.println("localFilePath----------->"+localFilePath);
|
||||||
// 设置强制下载不打开
|
// 设置强制下载不打开
|
||||||
response.setContentType("application/force-download");
|
response.setContentType("application/force-download");
|
||||||
response.addHeader("Content-Disposition", "attachment;fileName=" + new String(file.getName().getBytes("UTF-8"),"iso-8859-1"));
|
response.addHeader("Content-Disposition", "attachment;fileName=" + new String(file.getName().getBytes("UTF-8"),"iso-8859-1"));
|
||||||
|
@ -443,7 +454,9 @@ public class ZyInfoStudentServiceImpl extends ServiceImpl<ZyInfoStudentMapper, Z
|
||||||
}
|
}
|
||||||
response.flushBuffer();
|
response.flushBuffer();
|
||||||
fileName = localFilePath;
|
fileName = localFilePath;
|
||||||
|
System.out.println("fileName----------->"+fileName);
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
|
System.out.println("catch----------->"+e);
|
||||||
// e.printStackTrace();
|
// e.printStackTrace();
|
||||||
}finally {
|
}finally {
|
||||||
SFTPUtil.disChannel();
|
SFTPUtil.disChannel();
|
||||||
|
@ -463,6 +476,8 @@ public class ZyInfoStudentServiceImpl extends ServiceImpl<ZyInfoStudentMapper, Z
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
System.out.println("333333333333333----------->");
|
||||||
}
|
}
|
||||||
return fileName;
|
return fileName;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue