修改bug
This commit is contained in:
parent
f0d0613975
commit
aa1a428dc3
|
@ -55,11 +55,16 @@ public class SyncKcKechengbiao extends BaseSync {
|
|||
KcKechengbiao KcKechengbiaohis = new KcKechengbiao();
|
||||
KcKechengbiaohis.setTs(DateUtils.formatDate(new Date(),"yyyyMMddHHmmss"));
|
||||
kcKechengbiaoService.saveHis(KcKechengbiaohis);
|
||||
|
||||
//保留历史数据但是删除当前学期的数据
|
||||
// KcSysConfig kcSysConfig = kcSysConfigService.getById("1");
|
||||
// String bxqkssj = kcSysConfig.getBxqkssj();
|
||||
// String bxqjssj = kcSysConfig.getBxqjssj();
|
||||
//删除当前数据
|
||||
QueryWrapper<KcKechengbiao> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("xnxq","2022-2023-02");
|
||||
kcKechengbiaoService.remove(queryWrapper);
|
||||
|
||||
|
||||
// KcSysConfig kcSysConfig = kcSysConfigService.getById("1");
|
||||
KcKechengbiao kcKechengbiao = new KcKechengbiao();
|
||||
// kcKechengbiao.setStartTime(kcSysConfig.getBxqkssj());
|
||||
|
|
|
@ -51,14 +51,19 @@ public class SyncKcKetangbiao extends BaseSync {
|
|||
KcKetangbiao kcKetangbiaohis = new KcKetangbiao();
|
||||
kcKetangbiaohis.setTs(DateUtils.formatDate(new Date(),"yyyyMMddHHmmss"));
|
||||
kcKetangbiaoService.saveHis(kcKetangbiaohis);
|
||||
//删除当前数据
|
||||
|
||||
KcSysConfig kcSysConfig = kcSysConfigService.getById("1");
|
||||
String bxqkssj = kcSysConfig.getBxqkssj();
|
||||
String bxqjssj = kcSysConfig.getBxqjssj();
|
||||
//保留历史数据但是删除当前学期的数据
|
||||
QueryWrapper<KcKetangbiao> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.ge("skrq",bxqkssj);
|
||||
queryWrapper.le("skrq",bxqjssj);
|
||||
kcKetangbiaoService.remove(queryWrapper);
|
||||
|
||||
|
||||
|
||||
//插入数据
|
||||
KcSysConfig kcSysConfig = kcSysConfigService.getById("1");
|
||||
String bxqkssj = kcSysConfig.getBxqkssj();
|
||||
KcKetangbiao kcKetangbiao = new KcKetangbiao();
|
||||
List<KcKetangbiao> list = kcKetangbiaoService.selectSyncList(kcKetangbiao);
|
||||
List<KcKetangbiao> arrayList = new ArrayList<>();
|
||||
|
@ -72,7 +77,7 @@ public class SyncKcKetangbiao extends BaseSync {
|
|||
BeanUtils.copyProperties(kcKetangbiaoOld,kcKetangbiaoAddNew);
|
||||
kcKetangbiaoAddNew.setId(null);
|
||||
//skrq 生成规则,取本学开始时间(kc_sys_config.bxqkssj)+(jkzc-1)*7+week
|
||||
int addSj = (djz -1 )*7+Integer.parseInt(week);
|
||||
int addSj = (djz -1 )*7+Integer.parseInt(week)-1;
|
||||
Date date = DateUtils.parseDate(bxqkssj,"yyyy-MM-dd");
|
||||
Calendar c = Calendar.getInstance();
|
||||
c.setTime(date);
|
||||
|
@ -107,10 +112,10 @@ public class SyncKcKetangbiao extends BaseSync {
|
|||
|
||||
public static void main(String[] args) throws ParseException {
|
||||
String week = "4";
|
||||
String bxqkssj = "2023-04-25";
|
||||
int djz = 11;
|
||||
String bxqkssj = "2023-06-12";
|
||||
int djz = 2;
|
||||
//skrq 生成规则,取本学开始时间(kc_sys_config.bxqkssj)+(jkzc-1)*7+week
|
||||
int addSj = (djz -1 )*7+Integer.parseInt(week);
|
||||
int addSj = (djz -1 )*7+Integer.parseInt(week)-1;
|
||||
Date date = DateUtils.parseDate(bxqkssj,"yyyy-MM-dd");
|
||||
Calendar c = Calendar.getInstance();
|
||||
c.setTime(date);
|
||||
|
|
|
@ -75,7 +75,7 @@ public class KcKechengbiaoController extends JeecgController<KcKechengbiao, IKcK
|
|||
HttpServletRequest req) {
|
||||
QueryWrapper<KcKechengbiao> queryWrapper = QueryGenerator.initQueryWrapper(kcKechengbiao, req.getParameterMap());
|
||||
if(StringUtils.isNotBlank(kcKechengbiao.getSearchInput())){
|
||||
queryWrapper.apply(String.format("(kcmc like CONCAT('%',%s,'%') or skjs like CONCAT('%',%s,'%'))",kcKechengbiao.getSearchInput()));
|
||||
queryWrapper.apply("(kcmc like CONCAT('%','"+kcKechengbiao.getSearchInput()+"','%') or skjs like CONCAT('%','"+kcKechengbiao.getSearchInput()+"','%'))");
|
||||
}
|
||||
queryWrapper.apply(StringUtils.isNotBlank(kcKechengbiao.getYwcol())," length(kcbh)<25");
|
||||
Page<KcKechengbiao> page = new Page<KcKechengbiao>(pageNo, pageSize);
|
||||
|
|
Loading…
Reference in New Issue