2024年1月7日 新增其他教室查询

This commit is contained in:
bai 2024-01-07 20:38:39 +08:00
parent 29154c3901
commit 6cbc7151fb
7 changed files with 62 additions and 1 deletions

View File

@ -132,4 +132,8 @@ public class Xxhbjsjbxx implements Serializable {
@TableField(exist = false)
private Integer mysqlnum;
@TableField(exist = false)
private String jzwmc;
}

View File

@ -2,6 +2,8 @@ package org.jeecg.modules.kc.grab.imports.mapper;
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.jeecg.modules.kc.grab.imports.entity.Xxhbjsjbxx;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@ -15,4 +17,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
public interface XxhbjsjbxxMapper extends BaseMapper<Xxhbjsjbxx> {
Xxhbjsjbxx getSumnum();
List<Xxhbjsjbxx> queryOtherList(@Param(Constants.WRAPPER) QueryWrapper<Xxhbjsjbxx> qw);
}

View File

@ -5,4 +5,10 @@
<select id="getSumnum" resultType="org.jeecg.modules.kc.grab.imports.entity.Xxhbjsjbxx">
select count(*) as mysqlnum from xxhbjsjbxx
</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>

View File

@ -1,5 +1,6 @@
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 com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.transaction.annotation.Transactional;
@ -20,4 +21,6 @@ public interface IXxhbjsjbxxService extends IService<Xxhbjsjbxx> {
boolean syncList(Collection<Xxhbjsjbxx> entityList, boolean isDelete);
Xxhbjsjbxx getSumnum();
List<Xxhbjsjbxx> queryOtherList(QueryWrapper<Xxhbjsjbxx> qw);
}

View File

@ -40,4 +40,9 @@ public class XxhbjsjbxxServiceImpl extends ServiceImpl<XxhbjsjbxxMapper, Xxhbjsj
public Xxhbjsjbxx getSumnum() {
return baseMapper.getSumnum();
}
@Override
public List<Xxhbjsjbxx> queryOtherList(QueryWrapper<Xxhbjsjbxx> qw) {
return baseMapper.queryOtherList(qw);
}
}

View File

@ -21,6 +21,8 @@ import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.RedisUtil;
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.KcZhihuijiaoshi;
import org.jeecg.modules.kc.jiaoshi.service.IKcJiaoxuelouInfoService;
@ -82,6 +84,10 @@ public class KcZhihuijiaoshiController extends JeecgController<KcZhihuijiaoshi,
@Autowired
private IKcZhihuijiaoshiStateLogService kcZhihuijiaoshiStateLogService;//直播状态日志
@Autowired
private IXxhbjsjbxxService xxhbjsjbxxService;
@Autowired
private DictUtils dictUtils;
@ -218,13 +224,15 @@ public class KcZhihuijiaoshiController extends JeecgController<KcZhihuijiaoshi,
//计算哪节在时间范围内
Map<String, KcZhihuijiaoshi> jxlMap = Maps.newHashMap();
//装填到数据里
pageList.getRecords().forEach(x -> {
//jsbh 教室编号
//sksj 上课时间
//hh 节次
//kcJieciMap.containsKey(x.getHh)
jxlMap.put(x.getJxlName(),x);
//nowTimeNum
if(kcKetangbiaoNowSet.containsKey(x.getJsbh())){
KcKetangbiao ketangbiao = kcKetangbiaoNowSet.get(x.getJsbh());
@ -245,6 +253,33 @@ public class KcZhihuijiaoshiController extends JeecgController<KcZhihuijiaoshi,
}
});
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;
}

View File

@ -160,4 +160,8 @@ public class KcZhihuijiaoshi implements Serializable {
@TableField(exist = false)
private java.lang.String jsNum;
/**是否查询非智慧教室内容*/
@TableField(exist = false)
private Boolean queryNoZhiHuiJiaoShi;
}