修改考核材料信息
This commit is contained in:
parent
3eea37dbb7
commit
f200616a86
|
@ -59,6 +59,7 @@ public class WjxDjxxTmxx implements Serializable {
|
|||
@ApiModelProperty(value = "答卷人ID")
|
||||
private String userId;
|
||||
private String picPath;
|
||||
private String fwqPath;
|
||||
|
||||
@ApiModelProperty(value = "题目类型")
|
||||
@TableField(exist = false)
|
||||
|
|
|
@ -67,4 +67,9 @@ public interface WjxDjxxMapper extends BaseMapper<WjxDjxx> {
|
|||
WjxDjxx getInfoByVidUser(WjxDjxx wjxDjxx);
|
||||
|
||||
WjxDjxxTmxx getSfysj( @Param("wjxDjxxTmxx")WjxDjxxTmxx wjxDjxxTmxx);
|
||||
|
||||
List<WjxDjxxTmxx> getDjxxTmxxWjt(@Param("jid")String jid);
|
||||
|
||||
|
||||
void updateDjxxTmxxFwqpath(WjxDjxxTmxx wjxDjxxTmxx);
|
||||
}
|
||||
|
|
|
@ -408,6 +408,14 @@
|
|||
where id = #{id}
|
||||
</update>
|
||||
|
||||
|
||||
<update id="updateDjxxTmxxFwqpath" parameterType="org.jeecg.modules.kc.wjxDjxx.entity.WjxDjxxTmxx">
|
||||
update wjx_djxx_tmxx
|
||||
set
|
||||
fwq_path = #{fwqPath}
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="editSdpf" parameterType="org.jeecg.modules.kc.wjxDjxx.entity.WjxDjxx">
|
||||
update wjx_djxx
|
||||
set score = #{score},sfxysdpy = #{sfxysdpy}
|
||||
|
@ -435,4 +443,8 @@
|
|||
<select id="getSfysj" resultType="org.jeecg.modules.kc.wjxDjxx.entity.WjxDjxxTmxx">
|
||||
select * from wjx_djxx_tmxx where vid = #{wjxDjxxTmxx.vid} and jid = #{wjxDjxxTmxx.jid} and wj_index = #{wjxDjxxTmxx.wjIndex} and item_index = #{wjxDjxxTmxx.itemIndex}
|
||||
</select>
|
||||
|
||||
<select id="getDjxxTmxxWjt" resultType="org.jeecg.modules.kc.wjxDjxx.entity.WjxDjxxTmxx">
|
||||
select * from wjx_djxx_tmxx where jid = #{jid} and answer_text like concat('%','temp/','%')
|
||||
</select>
|
||||
</mapper>
|
|
@ -12,6 +12,7 @@ import org.apache.shiro.SecurityUtils;
|
|||
import org.jeecg.common.system.vo.LoginUser;
|
||||
import org.jeecg.common.util.DateUtils;
|
||||
import org.jeecg.common.util.SFTPUtil;
|
||||
import org.jeecg.common.util.SftpConfig;
|
||||
import org.jeecg.common.util.text.StringUtils;
|
||||
import org.jeecg.modules.kc.grab.imports.entity.Xxhbbks;
|
||||
import org.jeecg.modules.kc.grab.imports.service.IXxhbbksService;
|
||||
|
@ -38,6 +39,7 @@ import org.jeecg.modules.kc.zyInfoScjl.entity.ZyInfoScjl;
|
|||
import org.jeecg.modules.kc.zyInfoScjl.service.IZyInfoScjlService;
|
||||
import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudent;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
@ -79,6 +81,26 @@ public class WjxWjxxServiceImpl extends ServiceImpl<WjxWjxxMapper, WjxWjxx> impl
|
|||
@Autowired
|
||||
private IZyInfoScjlService zyInfoScjlService;
|
||||
|
||||
|
||||
@Autowired
|
||||
SftpConfig sftpConfig;
|
||||
|
||||
private static String uploadpath;
|
||||
|
||||
@Value("${jeecg.path.upload}")
|
||||
public void setUploadPath(String uploadPath) {
|
||||
this.uploadpath = uploadPath;
|
||||
}
|
||||
|
||||
@Value(value="${jeecg.uploadType}")
|
||||
private String uploadType;
|
||||
@Value(value = "${jeecg.path.webapp}")
|
||||
private String downloadpath;
|
||||
|
||||
|
||||
@Value("${jeecg.path.upload}")
|
||||
private String upLoadPath;
|
||||
|
||||
@Override
|
||||
public Page<WjxWjxx> findPage(WjxWjxx wjxWjxx, Page<WjxWjxx> page){
|
||||
List<WjxWjxx> list = baseMapper.findPage(page,wjxWjxx);
|
||||
|
@ -532,7 +554,11 @@ public class WjxWjxxServiceImpl extends ServiceImpl<WjxWjxxMapper, WjxWjxx> impl
|
|||
public void batchZyinfoKhcl(String ids) {
|
||||
try {
|
||||
String idsList[] = ids.split(",");
|
||||
|
||||
if(idsList.length>0){
|
||||
|
||||
String yyyy = DateUtils.formatDate(new Date(),"yyyy");
|
||||
String mm = DateUtils.formatDate(new Date(),"MM");
|
||||
for(String zyId:idsList){
|
||||
WjxWjxx wjxWjxx = baseMapper.selectById(zyId);
|
||||
|
||||
|
@ -549,6 +575,19 @@ public class WjxWjxxServiceImpl extends ServiceImpl<WjxWjxxMapper, WjxWjxx> impl
|
|||
queryWrapper.eq("sfsckhcl","0");
|
||||
List<WjxDjxx> list = wjxDjxxMapper.selectList(queryWrapper);
|
||||
for(WjxDjxx wjxDjxx:list){
|
||||
|
||||
|
||||
List<WjxDjxxTmxx> djxxTmxxList = wjxDjxxMapper.getDjxxTmxxWjt(wjxDjxx.getJid());
|
||||
if(djxxTmxxList!=null){
|
||||
for(WjxDjxxTmxx djxxTmxx:djxxTmxxList){
|
||||
//上传作业文件
|
||||
Map<String,String> uploadMap = SFTPUtil.upload(sftpConfig,upLoadPath+"/"+djxxTmxx.getAnswerText(),yyyy+"/"+mm+"/"+wjxWjxx.getVid()+"/"+djxxTmxx.getAnswerText().replace("temp/","/"));
|
||||
if(org.apache.commons.lang3.StringUtils.equals(uploadMap.get("code"),"0")){
|
||||
djxxTmxx.setFwqPath(uploadMap.get("data"));
|
||||
wjxDjxxMapper.updateDjxxTmxxFwqpath(djxxTmxx);
|
||||
}
|
||||
}
|
||||
}
|
||||
wjxDjxx.setSfsckhcl("1");
|
||||
wjxDjxx.setSfsckhclTime(new Date());
|
||||
wjxDjxxMapper.updateById(wjxDjxx);
|
||||
|
|
Loading…
Reference in New Issue