修改bug

This commit is contained in:
yangjun 2024-05-25 14:25:46 +08:00
parent 9876f909c5
commit e8a2b1e0d7
4 changed files with 35 additions and 4 deletions

View File

@ -286,7 +286,7 @@ public class ZyInfoStudentController extends JeecgController<ZyInfoStudent, IZyI
return Result.OK("编辑成功!"); return Result.OK("提交成功!");
} }

View File

@ -25,6 +25,9 @@ import org.jeecg.modules.kc.zyJxdg.entity.ZyJxdg;
import org.jeecg.modules.kc.zyJxdg.service.IZyJxdgService; import org.jeecg.modules.kc.zyJxdg.service.IZyJxdgService;
import org.jeecg.modules.tools.Global; import org.jeecg.modules.tools.Global;
import org.jeecg.modules.tools.pdf.PDFUtil; import org.jeecg.modules.tools.pdf.PDFUtil;
import org.jeecg.modules.zyk.entity.ZykInfo;
import org.jeecg.modules.zyk.service.IZykService;
import org.jeecg.modules.zyk.utils.WjlxEnum;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@ -35,6 +38,7 @@ import javax.servlet.http.HttpServletResponse;
import java.io.File; import java.io.File;
import java.util.Arrays; import java.util.Arrays;
import java.util.Date; import java.util.Date;
import java.util.Map;
/** /**
* @Description: 教学大纲 * @Description: 教学大纲
@ -55,7 +59,8 @@ public class ZyJxdgController extends JeecgController<ZyJxdg, IZyJxdgService> {
@Value("${jeecg.path.upload}") @Value("${jeecg.path.upload}")
private String upLoadPath; private String upLoadPath;
@Autowired
private IZykService zykService;
/** /**
* 分页列表查询 * 分页列表查询
* *
@ -324,6 +329,24 @@ public class ZyJxdgController extends JeecgController<ZyJxdg, IZyJxdgService> {
}else{ }else{
zyJxdg.setPdfPath(null); zyJxdg.setPdfPath(null);
} }
//--------上传ftp工具---------------
// Map<String,String> saveToZyk(ZykInfo zykInfo);
ZykInfo zykInfo = new ZykInfo();
zykInfo.setBizId(zyJxdg.getId());
zykInfo.setBizTable("zy_jxdg");
zykInfo.setWjlx(WjlxEnum.JXDG.getType());
zykInfo.setRwbh(zyJxdg.getRwbh());
zykInfo.setFileName(zyJxdg.getFilePath());
zykInfo.setPdfName(zyJxdg.getPdfPath());
Map<String,String> map = zykService.saveToZyk(zykInfo);
String fileName = map.get("fileName");
String pdfName = map.get("pdfName");
zyJxdg.setFilePath(fileName);
zyJxdg.setPdfPath(pdfName);
//--------上传ftp工具---------------
if(StringUtils.isEmpty(zyJxdg.getId())){ if(StringUtils.isEmpty(zyJxdg.getId())){
zyJxdgService.save(zyJxdg); zyJxdgService.save(zyJxdg);
}else{ }else{
@ -333,6 +356,7 @@ public class ZyJxdgController extends JeecgController<ZyJxdg, IZyJxdgService> {
updateWrapper.eq("id",zyJxdg.getId()); updateWrapper.eq("id",zyJxdg.getId());
zyJxdgService.update(updateWrapper); zyJxdgService.update(updateWrapper);
} }
return Result.OK(zyJxdg); return Result.OK(zyJxdg);
} }

View File

@ -60,6 +60,12 @@ public class ZykInfo implements Serializable {
/**PDF文件名称*/ /**PDF文件名称*/
@ApiModelProperty(value = "PDF文件名称") @ApiModelProperty(value = "PDF文件名称")
private String pdfName; private String pdfName;
private String rwbh;
/**学号*/ /**学号*/
@TableField(exist = false) @TableField(exist = false)
private String xh; private String xh;
@ -73,6 +79,7 @@ public class ZykInfo implements Serializable {
@TableField(exist = false) @TableField(exist = false)
private String section; private String section;
@TableField(exist = false) @TableField(exist = false)
private List<ZykInfo> xqxnList; private List<ZykInfo> xqxnList;

View File

@ -175,8 +175,8 @@ jeecg:
# 签名拦截接口 # 签名拦截接口
signUrls: /sys/dict/getDictItems/*,/sys/dict/loadDict/*,/sys/dict/loadDictOrderByValue/*,/sys/dict/loadDictItem/*,/sys/dict/loadTreeData,/sys/api/queryTableDictItemsByCode,/sys/api/queryFilterTableDictInfo,/sys/api/queryTableDictByKeys,/sys/api/translateDictFromTable,/sys/api/translateDictFromTableByKeys signUrls: /sys/dict/getDictItems/*,/sys/dict/loadDict/*,/sys/dict/loadDictOrderByValue/*,/sys/dict/loadDictItem/*,/sys/dict/loadTreeData,/sys/api/queryTableDictItemsByCode,/sys/api/queryFilterTableDictInfo,/sys/api/queryTableDictByKeys,/sys/api/translateDictFromTable,/sys/api/translateDictFromTableByKeys
#local\minio\alioss #local\minio\alioss
uploadType: local # uploadType: local
# uploadType: sftp uploadType: sftp
# 前端访问地址 # 前端访问地址
domainUrl: domainUrl:
pc: http://210.47.17.166 pc: http://210.47.17.166