文件题
This commit is contained in:
parent
9036b23e3f
commit
06acc58905
|
@ -80,6 +80,8 @@ public class WjxDjxx {
|
|||
@ApiModelProperty(value = "答卷用时")
|
||||
private String answerSfm;
|
||||
|
||||
private String sfxysdpy;//是否需要手动批阅
|
||||
|
||||
@ApiModelProperty(value = "学期学年")
|
||||
@TableField(exist = false)
|
||||
private String xqxn;
|
||||
|
@ -99,6 +101,7 @@ public class WjxDjxx {
|
|||
@TableField(exist = false)
|
||||
private List<WjxDjxxTmxx> wjxDjxxTmxxList;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "任务编号")
|
||||
@TableField(exist = false)
|
||||
private String rwbh;
|
||||
|
|
|
@ -49,4 +49,9 @@ public class WjxDjxxTmlbPage {
|
|||
|
||||
private String mainId;
|
||||
|
||||
private String title;
|
||||
private Double wjScore;
|
||||
private String sfxysdpy;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -49,4 +49,6 @@ public interface WjxDjxxMapper extends BaseMapper<WjxDjxx> {
|
|||
String getDjnum(@Param("vid")String vid, @Param("wjIndex")Integer wjIndex, @Param("itemIndex")Integer itemIndex);
|
||||
|
||||
String getDjnumType(@Param("vid")String vid, @Param("wjIndex")Integer wjIndex, @Param("itemIndex")Integer itemIndex, @Param("type")String type);
|
||||
|
||||
void updateTotalScore(WjxDjxx wjxDjxx);
|
||||
}
|
||||
|
|
|
@ -50,6 +50,20 @@
|
|||
and jid = #{jid}
|
||||
</update>
|
||||
|
||||
|
||||
<update id="updateTotalScore" parameterType="org.jeecg.modules.kc.wjxDjxx.entity.WjxDjxx">
|
||||
update wjx_djxx
|
||||
set
|
||||
<if test="sfxysdpy != null">
|
||||
sfxysdpy = #{sfxysdpy},
|
||||
</if>
|
||||
<if test="totalScore != null">
|
||||
total_score = ${totalScore},
|
||||
</if>
|
||||
where vid = #{vid}
|
||||
and jid = #{jid}
|
||||
</update>
|
||||
|
||||
<update id="deleteDjItem" parameterType="org.jeecg.modules.kc.wjxDjxx.entity.WjxDjxx">
|
||||
delete from wjx_djxx_tmxx
|
||||
where vid = #{vid}
|
||||
|
|
|
@ -129,12 +129,13 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
|
|||
map.put("sojumpparm",user.getUsername());//自定义链接参数,用来透传用户ID
|
||||
//调用接口,提交
|
||||
String result = wjxUtil.openapi(map,"1001001");
|
||||
String jidRes = "";
|
||||
if(!result.equals("")){
|
||||
JSONObject jsonResult = JSONObject.parseObject(result);
|
||||
if(jsonResult.getBoolean("result")){
|
||||
JSONObject dataJson = jsonResult.getJSONObject("data");
|
||||
String vidRes = dataJson.getString("vid");
|
||||
String jidRes = dataJson.getString("jid");
|
||||
jidRes = dataJson.getString("jid");
|
||||
String sojumpparmRes = dataJson.getString("sojumpparm");
|
||||
baseMapper.updateJid(sojumpparmRes,vidRes,jidRes);
|
||||
//调用接口,答卷查询
|
||||
|
@ -226,6 +227,48 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
String sfxgdjscore = "0";//是否修改答卷分数
|
||||
if(StringUtils.isNotBlank(jidRes)){
|
||||
for(WjxDjxxTmlbPage wjxDjxxTmlbPage:list){
|
||||
Integer WjIndex = wjxDjxxTmlbPage.getWjIndex();
|
||||
Integer wjType = wjxDjxxTmlbPage.getWjType();
|
||||
if(wjType == 8){
|
||||
sfxgdjscore = "1";
|
||||
String id = new DefaultIdentifierGenerator().nextId(new WjxDjxxTmxx()).toString();
|
||||
WjxDjxxTmxx wjxDjxxTmxx = new WjxDjxxTmxx();
|
||||
wjxDjxxTmxx.setVid(vid);
|
||||
wjxDjxxTmxx.setJid(jidRes);
|
||||
wjxDjxxTmxx.setUserId(user.getUsername());
|
||||
wjxDjxxTmxx.setCreateBy(user.getUsername());
|
||||
wjxDjxxTmxx.setCreateTime(new Date());
|
||||
wjxDjxxTmxx.setId(id);
|
||||
wjxDjxxTmxx.setWjTitle(wjxDjxxTmlbPage.getTitle());
|
||||
wjxDjxxTmxx.setWjIndex(WjIndex);
|
||||
wjxDjxxTmxx.setAnswerText(wjxDjxxTmlbPage.getWjAnswer());
|
||||
wjxDjxxTmxx.setItemScore(wjxDjxxTmlbPage.getWjScore());
|
||||
baseMapper.addDjTmxx(wjxDjxxTmxx);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//修改答卷信息的总分
|
||||
if(StringUtils.equals(sfxgdjscore,"1")){
|
||||
try {
|
||||
WjxDjxx wjxDjxx = new WjxDjxx();
|
||||
wjxDjxx.setVid(vid);
|
||||
wjxDjxx.setJid(jidRes);
|
||||
wjxDjxx.setTotalScore(20);
|
||||
wjxDjxx.setSfxysdpy("1");
|
||||
baseMapper.updateTotalScore(wjxDjxx);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//修改问卷状态
|
||||
|
||||
QueryWrapper<WjxWjxx> wjxWjxxQueryWrapper = new QueryWrapper<>();
|
||||
|
|
Loading…
Reference in New Issue