修改bug
This commit is contained in:
parent
98e02eaf25
commit
816e496a39
|
@ -69,23 +69,27 @@ public class SyncKcKetangbiao extends BaseSync {
|
|||
List<KcKetangbiao> arrayList = new ArrayList<>();
|
||||
for(int i=0;i<list.size();i++){
|
||||
KcKetangbiao kcKetangbiaoOld = list.get(i);
|
||||
String jkzc[] = kcKetangbiaoOld.getJkzc().split(",");
|
||||
String week = kcKetangbiaoOld.getWeek();
|
||||
for(int j=0;j<jkzc.length;j++){
|
||||
KcKetangbiao kcKetangbiaoAddNew = new KcKetangbiao();
|
||||
int djz = Integer.parseInt(jkzc[j]);
|
||||
BeanUtils.copyProperties(kcKetangbiaoOld,kcKetangbiaoAddNew);
|
||||
kcKetangbiaoAddNew.setId(null);
|
||||
//skrq 生成规则,取本学开始时间(kc_sys_config.bxqkssj)+(jkzc-1)*7+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);
|
||||
c.add(Calendar.DAY_OF_MONTH, addSj);
|
||||
String skrq = DateUtils.formatDate(c,"yyyy-MM-dd");
|
||||
kcKetangbiaoAddNew.setSkrq(skrq);
|
||||
kcKetangbiaoAddNew.setDijizhou(djz);
|
||||
arrayList.add(kcKetangbiaoAddNew);
|
||||
try {
|
||||
String jkzc[] = kcKetangbiaoOld.getJkzc().split(",");
|
||||
String week = kcKetangbiaoOld.getWeek();
|
||||
for(int j=0;j<jkzc.length;j++){
|
||||
KcKetangbiao kcKetangbiaoAddNew = new KcKetangbiao();
|
||||
int djz = Integer.parseInt(jkzc[j]);
|
||||
BeanUtils.copyProperties(kcKetangbiaoOld,kcKetangbiaoAddNew);
|
||||
kcKetangbiaoAddNew.setId(null);
|
||||
//skrq 生成规则,取本学开始时间(kc_sys_config.bxqkssj)+(jkzc-1)*7+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);
|
||||
c.add(Calendar.DAY_OF_MONTH, addSj);
|
||||
String skrq = DateUtils.formatDate(c,"yyyy-MM-dd");
|
||||
kcKetangbiaoAddNew.setSkrq(skrq);
|
||||
kcKetangbiaoAddNew.setDijizhou(djz);
|
||||
arrayList.add(kcKetangbiaoAddNew);
|
||||
}
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
kcKetangbiaoService.saveBatch(arrayList);
|
||||
|
|
|
@ -58,4 +58,12 @@
|
|||
|
||||
</select>
|
||||
|
||||
<select id="selectPage" resultType="org.jeecg.modules.kc.ktgl.entity.KcKechengbiao">
|
||||
select * from (
|
||||
select * from kc_kechengbiao where id in (select min(id) from kc_kechengbiao GROUP BY kcmc ,skjs,hh,skdd)
|
||||
and ( kcdl not like '%实习%' or kcdl not like '%实训%' or kcdl not like '%实践%')
|
||||
) a
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
|
||||
</mapper>
|
Loading…
Reference in New Issue