修改bug
This commit is contained in:
parent
039eed185a
commit
91e21dd8f6
|
@ -64,10 +64,10 @@ public class SFTPUtil {
|
||||||
channel.connect();
|
channel.connect();
|
||||||
sftp = (ChannelSftp) channel;
|
sftp = (ChannelSftp) channel;
|
||||||
logger.info("登录成功");
|
logger.info("登录成功");
|
||||||
}else{
|
// }else{
|
||||||
Channel channel = sshSession.openChannel("sftp");
|
// Channel channel = sshSession.openChannel("sftp");
|
||||||
channel.connect();
|
// channel.connect();
|
||||||
sftp = (ChannelSftp) channel;
|
// sftp = (ChannelSftp) channel;
|
||||||
}
|
}
|
||||||
} catch (Exception e){
|
} catch (Exception e){
|
||||||
try{
|
try{
|
||||||
|
|
|
@ -98,6 +98,7 @@ public class ShiroConfig {
|
||||||
filterChainDefinitionMap.put("/wxpay/**", "anon");//微信接口
|
filterChainDefinitionMap.put("/wxpay/**", "anon");//微信接口
|
||||||
filterChainDefinitionMap.put("/temp/**", "anon");//微信接口
|
filterChainDefinitionMap.put("/temp/**", "anon");//微信接口
|
||||||
filterChainDefinitionMap.put("/kczx/**", "anon");//微信接口
|
filterChainDefinitionMap.put("/kczx/**", "anon");//微信接口
|
||||||
|
filterChainDefinitionMap.put("/v3/3rd/**", "anon");//wps接口
|
||||||
|
|
||||||
filterChainDefinitionMap.put("/sys/getLoginQrcode/**", "anon"); //登录二维码
|
filterChainDefinitionMap.put("/sys/getLoginQrcode/**", "anon"); //登录二维码
|
||||||
filterChainDefinitionMap.put("/sys/getQrcodeToken/**", "anon"); //监听扫码
|
filterChainDefinitionMap.put("/sys/getQrcodeToken/**", "anon"); //监听扫码
|
||||||
|
|
|
@ -46,17 +46,6 @@ public class SyncZyCcjg extends BaseSync {
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
try {
|
|
||||||
zyInfoService.updateInfoZyStatus();
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
wjxWjxxService.updateCeyanStatus();
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -0,0 +1,64 @@
|
||||||
|
package org.jeecg.modules.kc.grab.SynchronizationService;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.jeecg.modules.kc.grab.SynchronizationService.base.BaseSync;
|
||||||
|
import org.jeecg.modules.kc.wjxWjxx.service.IWjxWjxxService;
|
||||||
|
import org.jeecg.modules.kc.zyCcjg.service.IZyCcjgService;
|
||||||
|
import org.jeecg.modules.kc.zyInfo.service.IZyInfoService;
|
||||||
|
import org.quartz.JobExecutionContext;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 作业测验定时发布
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
public class SyncZyCyFbxx extends BaseSync {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IZyCcjgService zyCcjgService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IZyInfoService zyInfoService;
|
||||||
|
@Autowired
|
||||||
|
private IWjxWjxxService wjxWjxxService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 若参数变量名修改 QuartzJobController中也需对应修改
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void execute(JobExecutionContext jobExecutionContext) {
|
||||||
|
start();
|
||||||
|
run(getParamMap());
|
||||||
|
end();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 有参定时任务实现
|
||||||
|
* @param param
|
||||||
|
*/
|
||||||
|
public void run(Map<String, Object> param){
|
||||||
|
try {
|
||||||
|
zyInfoService.updateInfoZyStatus();
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
wjxWjxxService.updateCeyanStatus();
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 无参定时任务实现
|
||||||
|
*/
|
||||||
|
public void run(){
|
||||||
|
run(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -65,4 +65,6 @@ public interface WjxDjxxMapper extends BaseMapper<WjxDjxx> {
|
||||||
void updateScoreByJid(WjxDjxx par2);
|
void updateScoreByJid(WjxDjxx par2);
|
||||||
|
|
||||||
WjxDjxx getInfoByVidUser(WjxDjxx wjxDjxx);
|
WjxDjxx getInfoByVidUser(WjxDjxx wjxDjxx);
|
||||||
|
|
||||||
|
WjxDjxxTmxx getSfysj( @Param("wjxDjxxTmxx")WjxDjxxTmxx wjxDjxxTmxx);
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,6 +74,7 @@
|
||||||
delete from wjx_djxx_tmxx
|
delete from wjx_djxx_tmxx
|
||||||
where vid = #{vid}
|
where vid = #{vid}
|
||||||
and jid = #{jid}
|
and jid = #{jid}
|
||||||
|
and item_score is not null
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<insert id="addDjTmxx" parameterType="org.jeecg.modules.kc.wjxDjxx.entity.WjxDjxxTmxx">
|
<insert id="addDjTmxx" parameterType="org.jeecg.modules.kc.wjxDjxx.entity.WjxDjxxTmxx">
|
||||||
|
@ -429,4 +430,9 @@
|
||||||
set score = #{score}
|
set score = #{score}
|
||||||
where jid = #{jid}
|
where jid = #{jid}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
<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>
|
||||||
</mapper>
|
</mapper>
|
|
@ -172,6 +172,7 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
|
||||||
baseMapper.deleteDjItem(wjxDjxx);
|
baseMapper.deleteDjItem(wjxDjxx);
|
||||||
//处理选项
|
//处理选项
|
||||||
JSONObject answerItemJson = answer.getJSONObject("answer_items");
|
JSONObject answerItemJson = answer.getJSONObject("answer_items");
|
||||||
|
if(answerItemJson!=null) {
|
||||||
for (String key2 : answerItemJson.keySet()) {
|
for (String key2 : answerItemJson.keySet()) {
|
||||||
JSONObject answerItem = answerItemJson.getJSONObject(key2);
|
JSONObject answerItem = answerItemJson.getJSONObject(key2);
|
||||||
WjxDjxxTmxx wjxDjxxTmxx = new WjxDjxxTmxx();
|
WjxDjxxTmxx wjxDjxxTmxx = new WjxDjxxTmxx();
|
||||||
|
@ -241,7 +242,8 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
wjxDjxxTmxx.setId(id);;
|
wjxDjxxTmxx.setId(id);
|
||||||
|
;
|
||||||
baseMapper.addDjTmxx(wjxDjxxTmxx);
|
baseMapper.addDjTmxx(wjxDjxxTmxx);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -261,10 +263,12 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
wjxDjxxTmxx.setId(id);;
|
wjxDjxxTmxx.setId(id);
|
||||||
|
;
|
||||||
baseMapper.addDjTmxx(wjxDjxxTmxx);
|
baseMapper.addDjTmxx(wjxDjxxTmxx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
//修改答卷信息
|
//修改答卷信息
|
||||||
baseMapper.updateAnswer(wjxDjxx);
|
baseMapper.updateAnswer(wjxDjxx);
|
||||||
}
|
}
|
||||||
|
@ -461,6 +465,7 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
|
||||||
baseMapper.deleteDjItem(wjxDjxx2);
|
baseMapper.deleteDjItem(wjxDjxx2);
|
||||||
//处理选项
|
//处理选项
|
||||||
JSONObject answerItemJson = answer.getJSONObject("answer_items");
|
JSONObject answerItemJson = answer.getJSONObject("answer_items");
|
||||||
|
if(answerItemJson!=null) {
|
||||||
for (String key2 : answerItemJson.keySet()) {
|
for (String key2 : answerItemJson.keySet()) {
|
||||||
JSONObject answerItem = answerItemJson.getJSONObject(key2);
|
JSONObject answerItem = answerItemJson.getJSONObject(key2);
|
||||||
Integer wjIndex = answerItem.getInteger("q_index");
|
Integer wjIndex = answerItem.getInteger("q_index");
|
||||||
|
@ -486,6 +491,7 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
|
||||||
baseMapper.addDjTmxx(wjxDjxxTmxx);
|
baseMapper.addDjTmxx(wjxDjxxTmxx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
//修改答卷信息
|
//修改答卷信息
|
||||||
baseMapper.updateAnswer(wjxDjxx2);
|
baseMapper.updateAnswer(wjxDjxx2);
|
||||||
}
|
}
|
||||||
|
@ -739,6 +745,7 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
|
||||||
baseMapper.deleteDjItem(wjxDjxx);
|
baseMapper.deleteDjItem(wjxDjxx);
|
||||||
//处理选项
|
//处理选项
|
||||||
JSONObject answerItemJson = answer.getJSONObject("answer_items");
|
JSONObject answerItemJson = answer.getJSONObject("answer_items");
|
||||||
|
if(answerItemJson!=null) {
|
||||||
for (String key2 : answerItemJson.keySet()) {
|
for (String key2 : answerItemJson.keySet()) {
|
||||||
JSONObject answerItem = answerItemJson.getJSONObject(key2);
|
JSONObject answerItem = answerItemJson.getJSONObject(key2);
|
||||||
WjxDjxxTmxx wjxDjxxTmxx = new WjxDjxxTmxx();
|
WjxDjxxTmxx wjxDjxxTmxx = new WjxDjxxTmxx();
|
||||||
|
@ -808,7 +815,8 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
wjxDjxxTmxx.setId(id);;
|
wjxDjxxTmxx.setId(id);
|
||||||
|
;
|
||||||
baseMapper.addDjTmxx(wjxDjxxTmxx);
|
baseMapper.addDjTmxx(wjxDjxxTmxx);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -828,10 +836,12 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
wjxDjxxTmxx.setId(id);;
|
wjxDjxxTmxx.setId(id);
|
||||||
|
;
|
||||||
baseMapper.addDjTmxx(wjxDjxxTmxx);
|
baseMapper.addDjTmxx(wjxDjxxTmxx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
//修改答卷信息
|
//修改答卷信息
|
||||||
baseMapper.updateAnswer(wjxDjxx);
|
baseMapper.updateAnswer(wjxDjxx);
|
||||||
}
|
}
|
||||||
|
@ -895,9 +905,10 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
|
||||||
wjxDjxx.setScore(score);
|
wjxDjxx.setScore(score);
|
||||||
wjxDjxx.setTotalScore(totalScore);
|
wjxDjxx.setTotalScore(totalScore);
|
||||||
//删除选项信息
|
//删除选项信息
|
||||||
baseMapper.deleteDjItem(wjxDjxx);
|
// baseMapper.deleteDjItem(wjxDjxx);
|
||||||
//处理选项
|
//处理选项
|
||||||
JSONObject answerItemJson = answer.getJSONObject("answer_items");
|
JSONObject answerItemJson = answer.getJSONObject("answer_items");
|
||||||
|
if(answerItemJson!=null){
|
||||||
for (String key2 : answerItemJson.keySet()) {
|
for (String key2 : answerItemJson.keySet()) {
|
||||||
JSONObject answerItem = answerItemJson.getJSONObject(key2);
|
JSONObject answerItem = answerItemJson.getJSONObject(key2);
|
||||||
WjxDjxxTmxx wjxDjxxTmxx = new WjxDjxxTmxx();
|
WjxDjxxTmxx wjxDjxxTmxx = new WjxDjxxTmxx();
|
||||||
|
@ -952,8 +963,13 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
WjxDjxxTmxx djxxTmxx = baseMapper.getSfysj(wjxDjxxTmxx);
|
||||||
|
if(djxxTmxx==null){
|
||||||
baseMapper.addDjTmxx(wjxDjxxTmxx);
|
baseMapper.addDjTmxx(wjxDjxxTmxx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
String id = new DefaultIdentifierGenerator().nextId(new WjxDjxxTmxx()).toString();
|
String id = new DefaultIdentifierGenerator().nextId(new WjxDjxxTmxx()).toString();
|
||||||
|
|
||||||
|
@ -968,9 +984,11 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
wjxDjxxTmxx.setId(id);
|
wjxDjxxTmxx.setId(id);
|
||||||
;
|
WjxDjxxTmxx djxxTmxx = baseMapper.getSfysj(wjxDjxxTmxx);
|
||||||
|
if(djxxTmxx==null){
|
||||||
baseMapper.addDjTmxx(wjxDjxxTmxx);
|
baseMapper.addDjTmxx(wjxDjxxTmxx);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
String id = new DefaultIdentifierGenerator().nextId(new WjxDjxxTmxx()).toString();
|
String id = new DefaultIdentifierGenerator().nextId(new WjxDjxxTmxx()).toString();
|
||||||
|
|
||||||
|
@ -989,10 +1007,14 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
wjxDjxxTmxx.setId(id);
|
wjxDjxxTmxx.setId(id);
|
||||||
;
|
WjxDjxxTmxx djxxTmxx = baseMapper.getSfysj(wjxDjxxTmxx);
|
||||||
|
if(djxxTmxx==null){
|
||||||
baseMapper.addDjTmxx(wjxDjxxTmxx);
|
baseMapper.addDjTmxx(wjxDjxxTmxx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//修改答卷信息
|
//修改答卷信息
|
||||||
baseMapper.updateAnswer(wjxDjxx);
|
baseMapper.updateAnswer(wjxDjxx);
|
||||||
}
|
}
|
||||||
|
@ -1012,7 +1034,7 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return "提交成功!";
|
return "获取成功!";
|
||||||
}
|
}
|
||||||
|
|
||||||
public void jsscore(String jid){
|
public void jsscore(String jid){
|
||||||
|
|
|
@ -268,7 +268,7 @@ public class WjxWjxxServiceImpl extends ServiceImpl<WjxWjxxMapper, WjxWjxx> impl
|
||||||
if(wWjxWjxxTmlb.getWjScore()!=null){
|
if(wWjxWjxxTmlb.getWjScore()!=null){
|
||||||
map.put("q_score",wWjxWjxxTmlb.getWjScore());
|
map.put("q_score",wWjxWjxxTmlb.getWjScore());
|
||||||
}
|
}
|
||||||
map.put("is_requir",true);
|
map.put("is_requir",false);
|
||||||
map.put("q_ceshi",true);
|
map.put("q_ceshi",true);
|
||||||
map.put("is_toupiao",3);
|
map.put("is_toupiao",3);
|
||||||
}else{
|
}else{
|
||||||
|
|
Loading…
Reference in New Issue