SFTP上传,输入参数优化,增加任务编号字段获取学期、单位、课程、教师

This commit is contained in:
曹磊 2024-05-25 14:38:55 +08:00
parent e8a2b1e0d7
commit 003c6a1fb5
2 changed files with 18 additions and 2 deletions

View File

@ -188,10 +188,12 @@
</select> </select>
<select id="getKcbhByRwbh" resultType="org.jeecg.modules.kc.ktgl.entity.KcKechengbiao"> <select id="getKcbhByRwbh" resultType="org.jeecg.modules.kc.ktgl.entity.KcKechengbiao">
select distinct kcbh,rwbh,xqxn,skjs select distinct rwbh,xqxn,kkdw,kcmc,skjs
from kc_kechengbiao from kc_kechengbiao
where rwbh = #{rwbh} where rwbh = #{rwbh}
<if test="xqxn!=null and xqxn!=''">
and xqxn = #{xqxn} and xqxn = #{xqxn}
</if>
</select> </select>
</mapper> </mapper>

View File

@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.shiro.SecurityUtils; import org.apache.shiro.SecurityUtils;
import org.jeecg.common.system.vo.LoginUser; import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.common.util.text.StringUtils; import org.jeecg.common.util.text.StringUtils;
import org.jeecg.modules.kc.ktgl.entity.KcKechengbiao;
import org.jeecg.modules.kc.ktgl.service.IKcKechengbiaoService;
import org.jeecg.modules.zyk.entity.ZykInfo; import org.jeecg.modules.zyk.entity.ZykInfo;
import org.jeecg.modules.zyk.mapper.ZykMapper; import org.jeecg.modules.zyk.mapper.ZykMapper;
import org.jeecg.modules.zyk.service.IZykService; import org.jeecg.modules.zyk.service.IZykService;
@ -32,9 +34,14 @@ public class ZykServiceImpl extends ServiceImpl<ZykMapper, ZykInfo> implements I
@Autowired @Autowired
private FileHandleUtil fileHandleUtil; private FileHandleUtil fileHandleUtil;
@Autowired
IKcKechengbiaoService kcKechengbiaoService;
@Autowired @Autowired
private ZykMapper zykMapper; private ZykMapper zykMapper;
@Override @Override
public Page<ZykInfo> findPage(ZykInfo zykInfo, Page<ZykInfo> page){ public Page<ZykInfo> findPage(ZykInfo zykInfo, Page<ZykInfo> page){
List<ZykInfo> list = zykMapper.findPage(page,zykInfo); List<ZykInfo> list = zykMapper.findPage(page,zykInfo);
@ -189,6 +196,13 @@ public class ZykServiceImpl extends ServiceImpl<ZykMapper, ZykInfo> implements I
*/ */
@Override @Override
public Map<String,String> saveToZyk(ZykInfo zykInfo){ public Map<String,String> saveToZyk(ZykInfo zykInfo){
KcKechengbiao kcb = new KcKechengbiao();
kcb.setRwbh(zykInfo.getRwbh());
kcb = kcKechengbiaoService.getKcbhByRwbh(kcb);
zykInfo.setXqxn(kcb.getXqxn());
zykInfo.setKkdw(kcb.getKkdw());
zykInfo.setKcmc(kcb.getKcmc());
zykInfo.setSkjs(kcb.getSkjs());
// Map<String,String> map = fileHandleUtil.uploadFile(zykInfo); // Map<String,String> map = fileHandleUtil.uploadFile(zykInfo);
Map<String,String> map = fileHandleUtil.moveFiles(zykInfo); Map<String,String> map = fileHandleUtil.moveFiles(zykInfo);
if(!map.get("code").equals("0")){ if(!map.get("code").equals("0")){