2024年1月7日 新增其他教室查询
This commit is contained in:
parent
29154c3901
commit
6cbc7151fb
|
@ -132,4 +132,8 @@ public class Xxhbjsjbxx implements Serializable {
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private Integer mysqlnum;
|
private Integer mysqlnum;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String jzwmc;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,8 @@ package org.jeecg.modules.kc.grab.imports.mapper;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.jeecg.modules.kc.grab.imports.entity.Xxhbjsjbxx;
|
import org.jeecg.modules.kc.grab.imports.entity.Xxhbjsjbxx;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
@ -15,4 +17,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
public interface XxhbjsjbxxMapper extends BaseMapper<Xxhbjsjbxx> {
|
public interface XxhbjsjbxxMapper extends BaseMapper<Xxhbjsjbxx> {
|
||||||
|
|
||||||
Xxhbjsjbxx getSumnum();
|
Xxhbjsjbxx getSumnum();
|
||||||
|
|
||||||
|
List<Xxhbjsjbxx> queryOtherList(@Param(Constants.WRAPPER) QueryWrapper<Xxhbjsjbxx> qw);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,4 +5,10 @@
|
||||||
<select id="getSumnum" resultType="org.jeecg.modules.kc.grab.imports.entity.Xxhbjsjbxx">
|
<select id="getSumnum" resultType="org.jeecg.modules.kc.grab.imports.entity.Xxhbjsjbxx">
|
||||||
select count(*) as mysqlnum from xxhbjsjbxx
|
select count(*) as mysqlnum from xxhbjsjbxx
|
||||||
</select>
|
</select>
|
||||||
|
<select id="queryOtherList" resultType="org.jeecg.modules.kc.grab.imports.entity.Xxhbjsjbxx">
|
||||||
|
select
|
||||||
|
a.*, jxl.*
|
||||||
|
from xxhbjsjbxx a left join xxhbjxljbxx jxl on a.jxlh = jxl.JZWH
|
||||||
|
${ew.customSqlSegment}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
|
@ -1,5 +1,6 @@
|
||||||
package org.jeecg.modules.kc.grab.imports.service;
|
package org.jeecg.modules.kc.grab.imports.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import org.jeecg.modules.kc.grab.imports.entity.Xxhbjsjbxx;
|
import org.jeecg.modules.kc.grab.imports.entity.Xxhbjsjbxx;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
@ -20,4 +21,6 @@ public interface IXxhbjsjbxxService extends IService<Xxhbjsjbxx> {
|
||||||
boolean syncList(Collection<Xxhbjsjbxx> entityList, boolean isDelete);
|
boolean syncList(Collection<Xxhbjsjbxx> entityList, boolean isDelete);
|
||||||
|
|
||||||
Xxhbjsjbxx getSumnum();
|
Xxhbjsjbxx getSumnum();
|
||||||
|
|
||||||
|
List<Xxhbjsjbxx> queryOtherList(QueryWrapper<Xxhbjsjbxx> qw);
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,4 +40,9 @@ public class XxhbjsjbxxServiceImpl extends ServiceImpl<XxhbjsjbxxMapper, Xxhbjsj
|
||||||
public Xxhbjsjbxx getSumnum() {
|
public Xxhbjsjbxx getSumnum() {
|
||||||
return baseMapper.getSumnum();
|
return baseMapper.getSumnum();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Xxhbjsjbxx> queryOtherList(QueryWrapper<Xxhbjsjbxx> qw) {
|
||||||
|
return baseMapper.queryOtherList(qw);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,8 @@ import org.jeecg.common.api.vo.Result;
|
||||||
import org.jeecg.common.system.query.QueryGenerator;
|
import org.jeecg.common.system.query.QueryGenerator;
|
||||||
import org.jeecg.common.util.RedisUtil;
|
import org.jeecg.common.util.RedisUtil;
|
||||||
import org.jeecg.modules.kc.grab.SynchronizationService.RefreshLiveServer;
|
import org.jeecg.modules.kc.grab.SynchronizationService.RefreshLiveServer;
|
||||||
|
import org.jeecg.modules.kc.grab.imports.entity.Xxhbjsjbxx;
|
||||||
|
import org.jeecg.modules.kc.grab.imports.service.IXxhbjsjbxxService;
|
||||||
import org.jeecg.modules.kc.jiaoshi.entity.KcJiaoxuelouInfo;
|
import org.jeecg.modules.kc.jiaoshi.entity.KcJiaoxuelouInfo;
|
||||||
import org.jeecg.modules.kc.jiaoshi.entity.KcZhihuijiaoshi;
|
import org.jeecg.modules.kc.jiaoshi.entity.KcZhihuijiaoshi;
|
||||||
import org.jeecg.modules.kc.jiaoshi.service.IKcJiaoxuelouInfoService;
|
import org.jeecg.modules.kc.jiaoshi.service.IKcJiaoxuelouInfoService;
|
||||||
|
@ -82,6 +84,10 @@ public class KcZhihuijiaoshiController extends JeecgController<KcZhihuijiaoshi,
|
||||||
@Autowired
|
@Autowired
|
||||||
private IKcZhihuijiaoshiStateLogService kcZhihuijiaoshiStateLogService;//直播状态日志
|
private IKcZhihuijiaoshiStateLogService kcZhihuijiaoshiStateLogService;//直播状态日志
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IXxhbjsjbxxService xxhbjsjbxxService;
|
||||||
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private DictUtils dictUtils;
|
private DictUtils dictUtils;
|
||||||
|
|
||||||
|
@ -218,13 +224,15 @@ public class KcZhihuijiaoshiController extends JeecgController<KcZhihuijiaoshi,
|
||||||
|
|
||||||
//计算哪节在时间范围内
|
//计算哪节在时间范围内
|
||||||
|
|
||||||
|
Map<String, KcZhihuijiaoshi> jxlMap = Maps.newHashMap();
|
||||||
|
|
||||||
//装填到数据里
|
//装填到数据里
|
||||||
pageList.getRecords().forEach(x -> {
|
pageList.getRecords().forEach(x -> {
|
||||||
//jsbh 教室编号
|
//jsbh 教室编号
|
||||||
//sksj 上课时间
|
//sksj 上课时间
|
||||||
//hh 节次
|
//hh 节次
|
||||||
//kcJieciMap.containsKey(x.getHh)
|
//kcJieciMap.containsKey(x.getHh)
|
||||||
|
jxlMap.put(x.getJxlName(),x);
|
||||||
//nowTimeNum
|
//nowTimeNum
|
||||||
if(kcKetangbiaoNowSet.containsKey(x.getJsbh())){
|
if(kcKetangbiaoNowSet.containsKey(x.getJsbh())){
|
||||||
KcKetangbiao ketangbiao = kcKetangbiaoNowSet.get(x.getJsbh());
|
KcKetangbiao ketangbiao = kcKetangbiaoNowSet.get(x.getJsbh());
|
||||||
|
@ -245,6 +253,33 @@ public class KcZhihuijiaoshiController extends JeecgController<KcZhihuijiaoshi,
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
log.info("09: {}",timer.intervalRestart());
|
log.info("09: {}",timer.intervalRestart());
|
||||||
|
//查询多余的数据
|
||||||
|
if(kcZhihuijiaoshi.getQueryNoZhiHuiJiaoShi() != null && kcZhihuijiaoshi.getQueryNoZhiHuiJiaoShi()){
|
||||||
|
QueryWrapper<Xxhbjsjbxx> qw = new QueryWrapper<>();
|
||||||
|
qw.in(!jxlMap.keySet().isEmpty(),"jxl.JZWMC",jxlMap.keySet());
|
||||||
|
qw.apply("a.jsh not in (select jsbh from kc_zhihuijiaoshi)");
|
||||||
|
List<Xxhbjsjbxx> otherList = xxhbjsjbxxService.queryOtherList(qw);
|
||||||
|
//转换类型
|
||||||
|
for (Xxhbjsjbxx x:otherList){
|
||||||
|
KcZhihuijiaoshi jiaoshi = new KcZhihuijiaoshi();
|
||||||
|
//jiaoshi.setId(x.getBh());// a.bh as id
|
||||||
|
//获取教学楼ID
|
||||||
|
KcZhihuijiaoshi jxl = jxlMap.get(x.getJzwmc());
|
||||||
|
String jxlId = "";
|
||||||
|
if(jxl != null){
|
||||||
|
jxlId = jxl.getJxlId();
|
||||||
|
}
|
||||||
|
jiaoshi.setXq(x.getJsmc());//
|
||||||
|
jiaoshi.setJxlId(jxlId);
|
||||||
|
jiaoshi.setJxlName(x.getJzwmc());
|
||||||
|
jiaoshi.setJsbh(x.getJsh());
|
||||||
|
jiaoshi.setJsmc(x.getJsmc());
|
||||||
|
//jiaoshi.setXm()
|
||||||
|
pageList.getRecords().add(jiaoshi);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
log.info("10: {}",timer.intervalRestart());
|
||||||
|
|
||||||
return pageList;
|
return pageList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -160,4 +160,8 @@ public class KcZhihuijiaoshi implements Serializable {
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private java.lang.String jsNum;
|
private java.lang.String jsNum;
|
||||||
|
|
||||||
|
/**是否查询非智慧教室内容*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Boolean queryNoZhiHuiJiaoShi;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue