修改bug
This commit is contained in:
parent
24dfaa7529
commit
562195db36
|
@ -0,0 +1,57 @@
|
|||
package org.jeecg.modules.kc.grab.SynchronizationService;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.compress.utils.Lists;
|
||||
import org.jeecg.modules.kc.grab.SynchronizationService.base.BaseSync;
|
||||
import org.jeecg.modules.kc.grab.exports.entity.TJwKckb;
|
||||
import org.jeecg.modules.kc.grab.exports.service.ITJwKckbService;
|
||||
import org.jeecg.modules.kc.grab.imports.entity.Xxhbkckb;
|
||||
import org.jeecg.modules.kc.grab.imports.entity.Xxhbsynclog;
|
||||
import org.jeecg.modules.kc.grab.imports.service.IXxhbkckbService;
|
||||
import org.jeecg.modules.kc.kcJieci.service.IKcJieciService;
|
||||
import org.jeecg.modules.kc.kcJieciPipei.service.IKcJieciPipeiService;
|
||||
import org.jeecg.modules.kc.wjxDjxx.service.IWjxDjxxService;
|
||||
import org.jeecg.modules.kc.xxhbkckbOra.service.IXxhbkckbOraService;
|
||||
import org.quartz.JobExecutionContext;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**重新计算考试成绩*/
|
||||
@Slf4j
|
||||
public class SyncWjxScore extends BaseSync {
|
||||
|
||||
@Autowired
|
||||
private IWjxDjxxService wjxDjxxService;
|
||||
/**
|
||||
* 若参数变量名修改 QuartzJobController中也需对应修改
|
||||
*/
|
||||
|
||||
@Override
|
||||
public void execute(JobExecutionContext jobExecutionContext) {
|
||||
start();
|
||||
run(getParamMap());
|
||||
end();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 有参定时任务实现
|
||||
* @param param
|
||||
*/
|
||||
public void run(Map<String, Object> param){
|
||||
String vid = (String) param.get("vid");
|
||||
wjxDjxxService.cxjcWjxScore(vid);
|
||||
}
|
||||
|
||||
/**
|
||||
* 无参定时任务实现
|
||||
*/
|
||||
public void run(){
|
||||
run(null);
|
||||
}
|
||||
|
||||
}
|
|
@ -61,4 +61,6 @@ public interface WjxDjxxMapper extends BaseMapper<WjxDjxx> {
|
|||
void editSdpf(WjxDjxx wjxDjxx);
|
||||
|
||||
WjxDjxxTmxx getByDjxxId(@Param("djtmid")String djtmid);
|
||||
|
||||
void updateScoreByJid(WjxDjxx par2);
|
||||
}
|
||||
|
|
|
@ -418,4 +418,9 @@
|
|||
select * from wjx_djxx_tmxx where id = #{djtmid}
|
||||
</select>
|
||||
|
||||
<update id="updateScoreByJid" parameterType="org.jeecg.modules.kc.wjxDjxx.entity.WjxDjxx">
|
||||
update wjx_djxx
|
||||
set score = #{score}
|
||||
where jid = #{jid}
|
||||
</update>
|
||||
</mapper>
|
|
@ -41,4 +41,6 @@ public interface IWjxDjxxService extends IService<WjxDjxx> {
|
|||
void editSdpf(WjxDjxx wjxDjxx);
|
||||
|
||||
WjxDjxxTmxx getByDjxxId(String djtmid);
|
||||
|
||||
void cxjcWjxScore(String vid);
|
||||
}
|
||||
|
|
|
@ -364,6 +364,13 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
|
|||
zyDbtxService.update(zyDbtxQx);
|
||||
|
||||
|
||||
try {
|
||||
if(StringUtils.isNotBlank(jidRes)){
|
||||
jsscore(jidRes);
|
||||
}
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -635,4 +642,30 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
|
|||
return baseMapper.getByDjxxId(djtmid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cxjcWjxScore(String vid) {
|
||||
QueryWrapper<WjxDjxx> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("vid",vid);
|
||||
List<WjxDjxx> list = baseMapper.selectList(queryWrapper);
|
||||
for(WjxDjxx par : list){
|
||||
jsscore(par.getJid());
|
||||
}
|
||||
}
|
||||
|
||||
public void jsscore(String jid){
|
||||
try {
|
||||
WjxDjxxTmxx wjxDjxxTmxx = new WjxDjxxTmxx();
|
||||
wjxDjxxTmxx.setJid(jid);
|
||||
wjxDjxxTmxx = baseMapper.getSumScore(wjxDjxxTmxx);
|
||||
WjxDjxx par2 = new WjxDjxx();
|
||||
if(wjxDjxxTmxx.getItemScore() != null && wjxDjxxTmxx.getItemScore()>0){
|
||||
par2.setScore(wjxDjxxTmxx.getItemScore());
|
||||
par2.setJid(jid);
|
||||
baseMapper.updateScoreByJid(par2);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -306,11 +306,11 @@ jodconverter:
|
|||
# 使用本机作为转换服务器,如果使用其它主机作为转换服务器,则需要配置remote,
|
||||
# 请参考 org.jodconverter.boot.autoconfigure.JodConverterRemoteProperties
|
||||
local:
|
||||
enabled: true
|
||||
enabled: false
|
||||
# 为了避免不必要的兼容问题,需要配置本机的LibreOffice安装目录
|
||||
office-home: D:\APPLICATION\INTER\LIBREOFFICE
|
||||
# 配置LibreOffice的服务端口,以逗号分隔,每个端口为一个独立的进程
|
||||
port-numbers: 2001,2002,2003,2004,2005,2006,2007,2008,2009,2010
|
||||
port-numbers: 2001
|
||||
# 配置最大的任务队列
|
||||
max-tasks-per-process: 100
|
||||
# 媒体处理器
|
||||
|
|
Loading…
Reference in New Issue