diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/blZycc/controller/BlZyccController.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/blZycc/controller/BlZyccController.java index 1f3d8200..6e04a763 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/blZycc/controller/BlZyccController.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/blZycc/controller/BlZyccController.java @@ -292,4 +292,20 @@ public class BlZyccController extends JeecgController { } + @AutoLog(value = "获取图片比对人数接口") + @ApiOperation(value="获取图片比对人数接口", notes="获取图片比对人数接口") + @PostMapping(value = "/getRlltj") + public Result> getRlltj(@RequestBody BlZycc blZycc) { + Map map = new HashMap<>(); +// String sign = authService.getAuth(); +// System.out.println("sign:--->"+sign); + String filePath = uploadpath+"/"+blZycc.getRllfilePath(); + String ret = authService.body_num(filePath); + map.put("ret--->",ret); + JSONObject object= JSONObject.parseObject(ret); +// JSONObject object2= JSONObject.parseObject(object.get("result").toString()); + map.put("personnum",object.getString("person_num")); + return Result.OK(map); + } + } diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/blZycc/entity/BlZycc.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/blZycc/entity/BlZycc.java index 5d308fbe..1d34f8f5 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/blZycc/entity/BlZycc.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/blZycc/entity/BlZycc.java @@ -73,6 +73,8 @@ public class BlZycc implements Serializable { private String message; @TableField(exist = false) private String facefilePath; + @TableField(exist = false) + private String rllfilePath; } diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/config/controller/KcExportConfigTpkwcqkjzglxController.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/config/controller/KcExportConfigTpkwcqkjzglxController.java index d4c0bcb4..2d34d6e6 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/config/controller/KcExportConfigTpkwcqkjzglxController.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/config/controller/KcExportConfigTpkwcqkjzglxController.java @@ -499,10 +499,21 @@ public class KcExportConfigTpkwcqkjzglxController extends JeecgController kcEvaluationQueryWrapper = new QueryWrapper<>(); - kcEvaluationQueryWrapper.in("kt.xnxq",xqxnSet); - kcEvaluationQueryWrapper.groupBy("concat(xnxq,'-',upuserid)"); - kcEvaluationQueryWrapper.orderByDesc("kt.skrq"); - List pktjList = kcEvaluationService.findTj(kcEvaluationQueryWrapper); + kcEvaluationQueryWrapper.eq("xqxn",object.getXqxn()); + kcEvaluationQueryWrapper.eq(StringUtils.isNotBlank(object.getDwmc()),"dwmc",object.getDwmc()); + kcEvaluationQueryWrapper.apply("(zt = '在职' or (zt= '退休' and ytkcs-0 >0))"); + kcEvaluationQueryWrapper.groupBy("a.gh"); + +// where xqxn = #{xqxn} and (zt = '在职' or (zt= '退休' and ytkcs-0 >0)) +// +// and tklx in (${code}) +// +// +// and dwmc = #{dwmc} +// +// GROUP BY a.tklx,a.gh,a.xm,a.dwmc,a.ytkcs,a.rjzy + + List pktjList = kcEvaluationService.findTkcsTj(kcEvaluationQueryWrapper); Map pktjMap = Maps.newHashMap(); pktjList.forEach(x -> { pktjMap.put(x.getXnxq() + "-" + x.getUpuserid(),x); diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/config/mapper/xml/KcExportConfigTpkwcqkjzglxMapper.xml b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/config/mapper/xml/KcExportConfigTpkwcqkjzglxMapper.xml index 5a872f8b..1da281b8 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/config/mapper/xml/KcExportConfigTpkwcqkjzglxMapper.xml +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/config/mapper/xml/KcExportConfigTpkwcqkjzglxMapper.xml @@ -236,7 +236,10 @@ select a.tklx,a.gh,a.xm,a.dwmc,a.ytkcs,a.rjzy,count(c.upuserid) as sjtkcs from kc_export_config_tpkwcqkjzglx a LEFT JOIN kc_xqxn_history b on a.xqxn = b.title LEFT JOIN kc_evaluation c on a.gh = c.upuserid and c.up_date BETWEEN b.start_time and b.end_time - where xqxn = #{xqxn} and (zt = '在职' or (zt= '退休' and ytkcs-0 >0)) and tklx in (${code}) + where xqxn = #{xqxn} and (zt = '在职' or (zt= '退休' and ytkcs-0 >0)) + + and tklx in (${code}) + and dwmc = #{dwmc} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/config/service/impl/KcExportConfigTpkwcqkjzglxServiceImpl.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/config/service/impl/KcExportConfigTpkwcqkjzglxServiceImpl.java index 941fc823..a5708ef9 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/config/service/impl/KcExportConfigTpkwcqkjzglxServiceImpl.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/config/service/impl/KcExportConfigTpkwcqkjzglxServiceImpl.java @@ -251,8 +251,11 @@ public class KcExportConfigTpkwcqkjzglxServiceImpl extends ServiceImpl infolist = baseMapper.getListByCode(page,kcExportConfigTpkwcqkjzglx); return infolist; @@ -336,9 +339,13 @@ public class KcExportConfigTpkwcqkjzglxServiceImpl extends ServiceImpl infolist = baseMapper.getListByCodeXytktj(kcExportConfigTpkwcqkjzglxXytktj); return infolist; } diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/SynchronizationService/SyncEvaluationsYbtkbStat.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/SynchronizationService/SyncEvaluationsYbtkbStat.java index 38da8746..93ea5bdf 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/SynchronizationService/SyncEvaluationsYbtkbStat.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/SynchronizationService/SyncEvaluationsYbtkbStat.java @@ -107,6 +107,73 @@ public class SyncEvaluationsYbtkbStat extends BaseSync { } } + + + List ybtkb2list = kcEvaluationsStatService.getYbtkbTwoSyncList(); + for(KcEvaluationsStat KcEvaluationsStat:ybtkb2list){ + KcEvaluationsStat.setXqxn(kcSysConfig.getFlag1()); + List entityList = kcEvaluationsStatService.getYbtkbJxsjSyncList(KcEvaluationsStat); + if(entityList!=null && entityList.size()>0){ + KcEvaluationsStat entity = entityList.get(0); + String col1726 = entity.getCol1726(); + if(col1726.length()>0){ + System.out.println("ybtkb----"+entity.getCol00()); + String arr[] = col1726.split("@"); + try { + entity.setCol18(arr[1]); + }catch (Exception e){ + entity.setCol18(""); + } + try { + entity.setCol19(arr[2]); + }catch (Exception e){ + entity.setCol19(""); + } + try { + entity.setCol20(arr[3]); + }catch (Exception e){ + entity.setCol20(""); + } + try { + entity.setCol21(arr[4]); + }catch (Exception e){ + entity.setCol21(""); + } + try { + entity.setCol22(arr[5]); + }catch (Exception e){ + entity.setCol22(""); + } + try { + entity.setCol23(arr[6]); + }catch (Exception e){ + entity.setCol23(""); + } + try { + entity.setCol24(arr[7]); + }catch (Exception e){ + entity.setCol24(""); + } + try { + entity.setCol25(arr[8]); + }catch (Exception e){ + entity.setCol25(""); + } + try { + entity.setCol26(arr[9]); + }catch (Exception e){ + entity.setCol26(""); + } + try { + entity.setCol1726(arr[0]); + }catch (Exception e){ + entity.setCol1726(""); + } + kcEvaluationsStatService.save(entity); + } + } + } + //最后的保存 // kcEvaluationsStatService.saveBatch(inslist); diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/SynchronizationService/SyncKcktStat.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/SynchronizationService/SyncKcktStat.java index b6c2baae..2aca32ad 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/SynchronizationService/SyncKcktStat.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/SynchronizationService/SyncKcktStat.java @@ -79,131 +79,130 @@ public class SyncKcktStat extends BaseSync { //-----------------修改课程表数据------------------------ KcKechengbiao kcKechengbiao = new KcKechengbiao(); kcKechengbiao.setXqxn(kcSysConfig.getFlag1()); -// kcKechengbiao.setSkjs("刘婷"); - List kckblist = kcKechengbiaoService.getKechengbiaoList(kcKechengbiao); - for(KcKechengbiao KcKechengbiaoPar:kckblist){ - QueryWrapper kcKechengbiaoQueryWrapper = new QueryWrapper<>(); - kcKechengbiaoQueryWrapper.eq("kcbh",KcKechengbiaoPar.getKcbh()); - kcKechengbiaoQueryWrapper.eq("kcmc",KcKechengbiaoPar.getKcmc()); - kcKechengbiaoQueryWrapper.eq("jgh",KcKechengbiaoPar.getJgh()); - kcKechengbiaoQueryWrapper.eq("skjs",KcKechengbiaoPar.getSkjs()); - kcKechengbiaoQueryWrapper.eq("rwbh",KcKechengbiaoPar.getRwbh()); - kcKechengbiaoQueryWrapper.eq("kkdwid",KcKechengbiaoPar.getKkdwid()); - kcKechengbiaoQueryWrapper.eq("kcxz",KcKechengbiaoPar.getKcxz()); -// kcKechengbiaoQueryWrapper.eq("skdd",KcKechengbiaoPar.getSkdd()); - kcKechengbiaoQueryWrapper.eq("sksj",KcKechengbiaoPar.getSksj()); - kcKechengbiaoQueryWrapper.eq("jkzc",KcKechengbiaoPar.getJkzc()); - kcKechengbiaoQueryWrapper.eq("xf",KcKechengbiaoPar.getXf()); - kcKechengbiaoQueryWrapper.eq("xnxq",KcKechengbiaoPar.getXnxq()); - kcKechengbiaoQueryWrapper.eq("kcdl",KcKechengbiaoPar.getKcdl()); - List KcKechengbiaoInsList = kcKechengbiaoService.list(kcKechengbiaoQueryWrapper); - if(KcKechengbiaoInsList!=null&&KcKechengbiaoInsList.size()>0){ - for(KcKechengbiao KcKechengbiao : KcKechengbiaoInsList){ - String id = KcKechengbiao.getId(); - BeanUtils.copyProperties(KcKechengbiaoPar,KcKechengbiao); - KcKechengbiao.setId(id); - kcKechengbiaoService.updateById(KcKechengbiao); - } - }else{ - kcKechengbiaoService.saveOne(KcKechengbiaoPar); - } - } - //-----------------初始化数据------------------------ - - //------------------去除课程表重复数据 20231024新增----------------- - KcKechengbiao KcKechengbiao = new KcKechengbiao(); - KcKechengbiao.setXqxn(kcSysConfig.getFlag1()); - kcKechengbiaoService.removeCfsj(KcKechengbiao); - //------------------去除课程表重复数据 20231024新增----------------- - - - - //-----------------所有的数据都变成无效 20240321------------ - KcKechengbiao kcbAll = new KcKechengbiao(); - kcbAll.setXnxq(kcSysConfig.getFlag1()); - kcKechengbiaoService.updateAllFlag(kcbAll);//所有的数据都变成无效 - kcKechengbiaoService.updateYxByXxhbkckb(kcbAll);//根据条件变成有效数据 - - //-----------------所有的数据都变成无效 20240321------------ - - - - //------------------刨除指定表的数据 20240314新增 修改flag标志位---------------- - KcKechengbiao ktbExculde = new KcKechengbiao(); - ktbExculde.setXnxq(kcSysConfig.getFlag1()); - kcKechengbiaoService.updateKechengExculde(ktbExculde); - //------------------刨除指定表的数据 20240314新增 修改flag标志位---------------- - - - - - //-------------------删除本年的课程数据冰倩是当天及以后的---------------------- - QueryWrapper KcKetangbiaoQueryWrapper = new QueryWrapper<>(); - KcKetangbiaoQueryWrapper.eq("xnxq",kcSysConfig.getFlag1()); - KcKetangbiaoQueryWrapper.ge("skrq",DateUtils.formatDate(dateNow,"yyyy-MM-dd")); - kcKetangbiaoService.remove(KcKetangbiaoQueryWrapper); - //-------------------删除本年的课程数据冰倩是当天及以后的---------------------- - - String bxqkssj = kcSysConfig.getBxqkssj(); - //插入数据 - KcKetangbiao kcKetangbiao = new KcKetangbiao(); - kcKetangbiao.setXnxq(kcSysConfig.getFlag1()); - kcKetangbiao.setFlag("0"); - List list = kcKetangbiaoService.selectSyncList(kcKetangbiao); - List arrayList = new ArrayList<>(); - for(int i=0;i=DateUtils.parseDate(dasj,"yyyy-MM-dd").getTime()){ - kcKetangbiaoAddNew.setSkrq(skrq); - kcKetangbiaoAddNew.setDijizhou(djz); - kcKetangbiaoAddNew.setXnxq(kcSysConfig.getFlag1()); - arrayList.add(kcKetangbiaoAddNew); - } - } - }catch (Exception e){ - e.printStackTrace(); - } - } - kcKetangbiaoService.saveBatch(arrayList); - - //修改智慧教室关联的课堂表id-- 清洗智慧教室数据 - kcKetangbiaoService.updateJsbh(); - - //修改智慧教室关联的课堂表id-- 清洗智慧教室数据 - KcKetangbiao kcKetangbiaoup = new KcKetangbiao(); - kcKetangbiaoup.setSkxs(1); - kcKetangbiaoup.setXnxq(kcSysConfig.getFlag1()); - kcKetangbiaoService.updateSkxs(kcKetangbiaoup); - - //修改调停课时间 - String dasj = DateUtils.formatDate(dateNow,"yyyy-MM-dd"); - - QueryWrapper kcKetangbiaoSkrqLogQueryWrapper = new QueryWrapper<>(); - kcKetangbiaoSkrqLogQueryWrapper.ge("jsrq",dasj); - List list1 = kcKetangbiaoSkrqLogService.list(kcKetangbiaoSkrqLogQueryWrapper); - for(KcKetangbiaoSkrqLog KcKetangbiaoSkrqLog:list1){ - UpdateWrapper KcKetangbiaoUpdateWrapper = new UpdateWrapper<>(); - KcKetangbiaoUpdateWrapper.set("skrq",KcKetangbiaoSkrqLog.getTzrq()); - KcKetangbiaoUpdateWrapper.eq("skrq",KcKetangbiaoSkrqLog.getSkrq()); - kcKetangbiaoService.update(KcKetangbiaoUpdateWrapper); - } +// List kckblist = kcKechengbiaoService.getKechengbiaoList(kcKechengbiao); +// for(KcKechengbiao KcKechengbiaoPar:kckblist){ +// QueryWrapper kcKechengbiaoQueryWrapper = new QueryWrapper<>(); +// kcKechengbiaoQueryWrapper.eq("kcbh",KcKechengbiaoPar.getKcbh()); +// kcKechengbiaoQueryWrapper.eq("kcmc",KcKechengbiaoPar.getKcmc()); +// kcKechengbiaoQueryWrapper.eq("jgh",KcKechengbiaoPar.getJgh()); +// kcKechengbiaoQueryWrapper.eq("skjs",KcKechengbiaoPar.getSkjs()); +// kcKechengbiaoQueryWrapper.eq("rwbh",KcKechengbiaoPar.getRwbh()); +// kcKechengbiaoQueryWrapper.eq("kkdwid",KcKechengbiaoPar.getKkdwid()); +// kcKechengbiaoQueryWrapper.eq("kcxz",KcKechengbiaoPar.getKcxz()); +//// kcKechengbiaoQueryWrapper.eq("skdd",KcKechengbiaoPar.getSkdd()); +// kcKechengbiaoQueryWrapper.eq("sksj",KcKechengbiaoPar.getSksj()); +// kcKechengbiaoQueryWrapper.eq("jkzc",KcKechengbiaoPar.getJkzc()); +// kcKechengbiaoQueryWrapper.eq("xf",KcKechengbiaoPar.getXf()); +// kcKechengbiaoQueryWrapper.eq("xnxq",KcKechengbiaoPar.getXnxq()); +// kcKechengbiaoQueryWrapper.eq("kcdl",KcKechengbiaoPar.getKcdl()); +// List KcKechengbiaoInsList = kcKechengbiaoService.list(kcKechengbiaoQueryWrapper); +// if(KcKechengbiaoInsList!=null&&KcKechengbiaoInsList.size()>0){ +// for(KcKechengbiao KcKechengbiao : KcKechengbiaoInsList){ +// String id = KcKechengbiao.getId(); +// BeanUtils.copyProperties(KcKechengbiaoPar,KcKechengbiao); +// KcKechengbiao.setId(id); +// kcKechengbiaoService.updateById(KcKechengbiao); +// } +// }else{ +// kcKechengbiaoService.saveOne(KcKechengbiaoPar); +// } +// } +// //-----------------初始化数据------------------------ +// +// //------------------去除课程表重复数据 20231024新增----------------- +// KcKechengbiao KcKechengbiao = new KcKechengbiao(); +// KcKechengbiao.setXqxn(kcSysConfig.getFlag1()); +// kcKechengbiaoService.removeCfsj(KcKechengbiao); +// //------------------去除课程表重复数据 20231024新增----------------- +// +// +// +// //-----------------所有的数据都变成无效 20240321------------ +// KcKechengbiao kcbAll = new KcKechengbiao(); +// kcbAll.setXnxq(kcSysConfig.getFlag1()); +// kcKechengbiaoService.updateAllFlag(kcbAll);//所有的数据都变成无效 +// kcKechengbiaoService.updateYxByXxhbkckb(kcbAll);//根据条件变成有效数据 +// +// //-----------------所有的数据都变成无效 20240321------------ +// +// +// +// //------------------刨除指定表的数据 20240314新增 修改flag标志位---------------- +// KcKechengbiao ktbExculde = new KcKechengbiao(); +// ktbExculde.setXnxq(kcSysConfig.getFlag1()); +// kcKechengbiaoService.updateKechengExculde(ktbExculde); +// //------------------刨除指定表的数据 20240314新增 修改flag标志位---------------- +// +// +// +// +// //-------------------删除本年的课程数据冰倩是当天及以后的---------------------- +// QueryWrapper KcKetangbiaoQueryWrapper = new QueryWrapper<>(); +// KcKetangbiaoQueryWrapper.eq("xnxq",kcSysConfig.getFlag1()); +// KcKetangbiaoQueryWrapper.ge("skrq",DateUtils.formatDate(dateNow,"yyyy-MM-dd")); +// kcKetangbiaoService.remove(KcKetangbiaoQueryWrapper); +// //-------------------删除本年的课程数据冰倩是当天及以后的---------------------- +// +// String bxqkssj = kcSysConfig.getBxqkssj(); +// //插入数据 +// KcKetangbiao kcKetangbiao = new KcKetangbiao(); +// kcKetangbiao.setXnxq(kcSysConfig.getFlag1()); +// kcKetangbiao.setFlag("0"); +// List list = kcKetangbiaoService.selectSyncList(kcKetangbiao); +// List arrayList = new ArrayList<>(); +// for(int i=0;i=DateUtils.parseDate(dasj,"yyyy-MM-dd").getTime()){ +// kcKetangbiaoAddNew.setSkrq(skrq); +// kcKetangbiaoAddNew.setDijizhou(djz); +// kcKetangbiaoAddNew.setXnxq(kcSysConfig.getFlag1()); +// arrayList.add(kcKetangbiaoAddNew); +// } +// } +// }catch (Exception e){ +// e.printStackTrace(); +// } +// } +// kcKetangbiaoService.saveBatch(arrayList); +// +// //修改智慧教室关联的课堂表id-- 清洗智慧教室数据 +// kcKetangbiaoService.updateJsbh(); +// +// //修改智慧教室关联的课堂表id-- 清洗智慧教室数据 +// KcKetangbiao kcKetangbiaoup = new KcKetangbiao(); +// kcKetangbiaoup.setSkxs(1); +// kcKetangbiaoup.setXnxq(kcSysConfig.getFlag1()); +// kcKetangbiaoService.updateSkxs(kcKetangbiaoup); +// +// //修改调停课时间 +// String dasj = DateUtils.formatDate(dateNow,"yyyy-MM-dd"); +// +// QueryWrapper kcKetangbiaoSkrqLogQueryWrapper = new QueryWrapper<>(); +// kcKetangbiaoSkrqLogQueryWrapper.ge("jsrq",dasj); +// List list1 = kcKetangbiaoSkrqLogService.list(kcKetangbiaoSkrqLogQueryWrapper); +// for(KcKetangbiaoSkrqLog KcKetangbiaoSkrqLog:list1){ +// UpdateWrapper KcKetangbiaoUpdateWrapper = new UpdateWrapper<>(); +// KcKetangbiaoUpdateWrapper.set("skrq",KcKetangbiaoSkrqLog.getTzrq()); +// KcKetangbiaoUpdateWrapper.eq("skrq",KcKetangbiaoSkrqLog.getSkrq()); +// kcKetangbiaoService.update(KcKetangbiaoUpdateWrapper); +// } @@ -217,7 +216,7 @@ public class SyncKcktStat extends BaseSync { // 调课:放假时间上调课时间内的课程 for(KcTtksdpz kcTtksdpz:sdpzList){ String tklx = kcTtksdpz.getTklx(); - if(StringUtils.equals("1",tklx)){//调课 + if(StringUtils.equals("0",tklx)){//调课 String fjsj = DateUtils.formatDate(kcTtksdpz.getFjsj(),"yyyy-MM-dd");//放假时间 String tksj = DateUtils.formatDate(kcTtksdpz.getTksj(),"yyyy-MM-dd");//调课时间 @@ -231,7 +230,7 @@ public class SyncKcktStat extends BaseSync { kcTtksdpz.setZxsj(dateNow); kcTtksdpz.setZxsql1("update kc_ketangbiao set skrq = '"+fjsj+"' , is_delete = '0' where skrq = '"+tksj+"'"); kcTtksdpzService.updateById(kcTtksdpz); - }else if(StringUtils.equals("0",tklx)){//停课 + }else if(StringUtils.equals("1",tklx)){//停课 String fjsj = DateUtils.formatDate(kcTtksdpz.getFjsj(),"yyyy-MM-dd");//放假时间 //更具调课时间修改成放假时间 diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/kcEvaluationsStat/mapper/KcEvaluationsStatMapper.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/kcEvaluationsStat/mapper/KcEvaluationsStatMapper.java index d58e54ee..4d392aae 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/kcEvaluationsStat/mapper/KcEvaluationsStatMapper.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/kcEvaluationsStat/mapper/KcEvaluationsStatMapper.java @@ -31,4 +31,6 @@ public interface KcEvaluationsStatMapper extends BaseMapper { List getLbpjbSyncList(); List getLbpjbJxsjSyncList(KcEvaluationsStat kcEvaluationsStat); + + List getYbtkbTwoSyncList(); } diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/kcEvaluationsStat/mapper/xml/KcEvaluationsStatMapper.xml b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/kcEvaluationsStat/mapper/xml/KcEvaluationsStatMapper.xml index e1cab340..ad78029b 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/kcEvaluationsStat/mapper/xml/KcEvaluationsStatMapper.xml +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/kcEvaluationsStat/mapper/xml/KcEvaluationsStatMapper.xml @@ -8,6 +8,17 @@ FROM kc_evaluation EV, KC_EVALUATIONS EVS WHERE ev.id = evs.evaluationid AND ev.evaluationver = '3' + and ev.source != '2' + and ev.up_date > '2024-02-01' + + + + + + SELECT * + FROM wjx_wjxx_tmxx + WHERE + main_id = #{mainId} + diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxxTmlb/service/IWjxWjxxTmlbService.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxxTmlb/service/IWjxWjxxTmlbService.java new file mode 100644 index 00000000..09a234e2 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxxTmlb/service/IWjxWjxxTmlbService.java @@ -0,0 +1,51 @@ +package org.jeecg.modules.kc.wjxWjxxTmlb.service; + +import org.jeecg.modules.kc.wjxWjxxTmlb.entity.WjxWjxxTmxx; +import org.jeecg.modules.kc.wjxWjxxTmlb.entity.WjxWjxxTmlb; +import com.baomidou.mybatisplus.extension.service.IService; +import java.io.Serializable; +import java.util.Collection; +import java.util.List; + +/** + * @Description: 题目信息 + * @Author: jeecg-boot + * @Date: 2024-04-26 + * @Version: V1.0 + */ +public interface IWjxWjxxTmlbService extends IService { + + /** + * 添加一对多 + * + * @param wjxWjxxTmlb + * @param wjxWjxxTmxxList + */ + public void saveMain(WjxWjxxTmlb wjxWjxxTmlb,List wjxWjxxTmxxList) ; + + /** + * 修改一对多 + * + * @param wjxWjxxTmlb + * @param wjxWjxxTmxxList + */ + public void updateMain(WjxWjxxTmlb wjxWjxxTmlb,List wjxWjxxTmxxList); + + /** + * 删除一对多 + * + * @param id + */ + public void delMain (String id); + + /** + * 批量删除一对多 + * + * @param idList + */ + public void delBatchMain (Collection idList); + + void removeByMainId(String id); + + List queryByMainId(String id); +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxxTmlb/service/IWjxWjxxTmxxService.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxxTmlb/service/IWjxWjxxTmxxService.java new file mode 100644 index 00000000..57c25c3f --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxxTmlb/service/IWjxWjxxTmxxService.java @@ -0,0 +1,23 @@ +package org.jeecg.modules.kc.wjxWjxxTmlb.service; + +import org.jeecg.modules.kc.wjxWjxxTmlb.entity.WjxWjxxTmlb; +import org.jeecg.modules.kc.wjxWjxxTmlb.entity.WjxWjxxTmxx; +import com.baomidou.mybatisplus.extension.service.IService; +import java.util.List; + +/** + * @Description: 选项信息 + * @Author: jeecg-boot + * @Date: 2024-04-26 + * @Version: V1.0 + */ +public interface IWjxWjxxTmxxService extends IService { + + /** + * 通过主表id查询子表数据 + * + * @param mainId 主表id + * @return List + */ + public List selectByMainId(String mainId); +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxxTmlb/service/impl/WjxWjxxTmlbServiceImpl.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxxTmlb/service/impl/WjxWjxxTmlbServiceImpl.java new file mode 100644 index 00000000..90a0a946 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxxTmlb/service/impl/WjxWjxxTmlbServiceImpl.java @@ -0,0 +1,119 @@ +package org.jeecg.modules.kc.wjxWjxxTmlb.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import org.apache.commons.lang3.StringUtils; +import org.jeecg.modules.kc.wjxWjxxTmlb.entity.WjxWjxxTmlb; +import org.jeecg.modules.kc.wjxWjxxTmlb.entity.WjxWjxxTmxx; +import org.jeecg.modules.kc.wjxWjxxTmlb.mapper.WjxWjxxTmxxMapper; +import org.jeecg.modules.kc.wjxWjxxTmlb.mapper.WjxWjxxTmlbMapper; +import org.jeecg.modules.kc.wjxWjxxTmlb.service.IWjxWjxxTmlbService; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.transaction.annotation.Transactional; + +import javax.management.Query; +import java.io.Serializable; +import java.util.List; +import java.util.Collection; + +/** + * @Description: 题目信息 + * @Author: jeecg-boot + * @Date: 2024-04-26 + * @Version: V1.0 + */ +@Service +public class WjxWjxxTmlbServiceImpl extends ServiceImpl implements IWjxWjxxTmlbService { + + @Autowired + private WjxWjxxTmlbMapper wjxWjxxTmlbMapper; + @Autowired + private WjxWjxxTmxxMapper wjxWjxxTmxxMapper; + + @Override + @Transactional(rollbackFor = Exception.class) + public void saveMain(WjxWjxxTmlb wjxWjxxTmlb, List wjxWjxxTmxxList) { + wjxWjxxTmlbMapper.insert(wjxWjxxTmlb); + if(wjxWjxxTmxxList!=null && wjxWjxxTmxxList.size()>0) { + for(WjxWjxxTmxx entity:wjxWjxxTmxxList) { + //外键设置 + entity.setMainId(wjxWjxxTmlb.getId()); + entity.setWjIndex(wjxWjxxTmlb.getWjIndex()); + String itemSelected[] = wjxWjxxTmlb.getItemSelected().split(","); + String sfxz = "false"; + for(String par:itemSelected){ + if(StringUtils.equals(par, entity.getItemIndex().toString())){ + sfxz = "true"; + } + } + entity.setItemSelected(sfxz); + wjxWjxxTmxxMapper.insert(entity); + } + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void updateMain(WjxWjxxTmlb wjxWjxxTmlb,List wjxWjxxTmxxList) { + wjxWjxxTmlbMapper.updateById(wjxWjxxTmlb); + + //1.先删除子表数据 + wjxWjxxTmxxMapper.deleteByMainId(wjxWjxxTmlb.getId()); + + //2.子表数据重新插入 + if(wjxWjxxTmxxList!=null && wjxWjxxTmxxList.size()>0) { + for(WjxWjxxTmxx entity:wjxWjxxTmxxList) { + //外键设置 + entity.setWjIndex(wjxWjxxTmlb.getWjIndex()); + wjxWjxxTmxxMapper.insert(entity); + } + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delMain(String id) { + wjxWjxxTmxxMapper.deleteByMainId(id); + wjxWjxxTmlbMapper.deleteById(id); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delBatchMain(Collection idList) { + for(Serializable id:idList) { + wjxWjxxTmxxMapper.deleteByMainId(id.toString()); + wjxWjxxTmlbMapper.deleteById(id); + } + } + + @Override + public void removeByMainId(String id) { + wjxWjxxTmxxMapper.deleteByMainId(id); + wjxWjxxTmlbMapper.deleteById(id); + } + + @Override + public List queryByMainId(String id) { + + QueryWrapper wjxWjxxTmlbQueryWrapper = new QueryWrapper(); + wjxWjxxTmlbQueryWrapper.eq("main_id",id); + List list = wjxWjxxTmlbMapper.selectList(wjxWjxxTmlbQueryWrapper); + for(WjxWjxxTmlb WjxWjxxTmlb:list){ + List list2= wjxWjxxTmxxMapper.selectByMainId(WjxWjxxTmlb.getId()); + String itemSelected = ""; + for(WjxWjxxTmxx WjxWjxxTmxx:list2){ + if(StringUtils.equals(WjxWjxxTmxx.getItemSelected(),"true")){ + itemSelected = itemSelected+WjxWjxxTmxx.getItemIndex()+","; + } + } + if(StringUtils.isNotBlank(itemSelected)){ + itemSelected = itemSelected.substring(0, itemSelected.length()-1); + } + WjxWjxxTmlb.setItemSelected(itemSelected); + WjxWjxxTmlb.setWjxWjxxTmxxList(list2); + } + return list; + } + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxxTmlb/service/impl/WjxWjxxTmxxServiceImpl.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxxTmlb/service/impl/WjxWjxxTmxxServiceImpl.java new file mode 100644 index 00000000..b6877fb1 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxxTmlb/service/impl/WjxWjxxTmxxServiceImpl.java @@ -0,0 +1,27 @@ +package org.jeecg.modules.kc.wjxWjxxTmlb.service.impl; + +import org.jeecg.modules.kc.wjxWjxxTmlb.entity.WjxWjxxTmxx; +import org.jeecg.modules.kc.wjxWjxxTmlb.mapper.WjxWjxxTmxxMapper; +import org.jeecg.modules.kc.wjxWjxxTmlb.service.IWjxWjxxTmxxService; +import org.springframework.stereotype.Service; +import java.util.List; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.beans.factory.annotation.Autowired; + +/** + * @Description: 选项信息 + * @Author: jeecg-boot + * @Date: 2024-04-26 + * @Version: V1.0 + */ +@Service +public class WjxWjxxTmxxServiceImpl extends ServiceImpl implements IWjxWjxxTmxxService { + + @Autowired + private WjxWjxxTmxxMapper wjxWjxxTmxxMapper; + + @Override + public List selectByMainId(String mainId) { + return wjxWjxxTmxxMapper.selectByMainId(mainId); + } +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxxTmlb/vo/WjxWjxxTmlbNewPage.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxxTmlb/vo/WjxWjxxTmlbNewPage.java new file mode 100644 index 00000000..5e63af9e --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxxTmlb/vo/WjxWjxxTmlbNewPage.java @@ -0,0 +1,26 @@ +package org.jeecg.modules.kc.wjxWjxxTmlb.vo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.jeecg.modules.kc.wjxWjxxTmlb.entity.WjxWjxxTmxx; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.jeecgframework.poi.excel.annotation.ExcelCollection; +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.Date; +import java.util.List; + +/** + * @Description: 题目信息 + * @Author: jeecg-boot + * @Date: 2024-04-26 + * @Version: V1.0 + */ +@Data +public class WjxWjxxTmlbNewPage { + + private List WjxWjxxTmlbPageList; + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxxTmlb/vo/WjxWjxxTmlbPage.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxxTmlb/vo/WjxWjxxTmlbPage.java new file mode 100644 index 00000000..7526d942 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxxTmlb/vo/WjxWjxxTmlbPage.java @@ -0,0 +1,93 @@ +package org.jeecg.modules.kc.wjxWjxxTmlb.vo; + +import java.util.List; +import org.jeecg.modules.kc.wjxWjxxTmlb.entity.WjxWjxxTmlb; +import org.jeecg.modules.kc.wjxWjxxTmlb.entity.WjxWjxxTmxx; +import lombok.Data; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.jeecgframework.poi.excel.annotation.ExcelEntity; +import org.jeecgframework.poi.excel.annotation.ExcelCollection; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import java.util.Date; +import org.jeecg.common.aspect.annotation.Dict; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * @Description: 题目信息 + * @Author: jeecg-boot + * @Date: 2024-04-26 + * @Version: V1.0 + */ +@Data +@ApiModel(value="wjx_wjxx_tmlbPage对象", description="题目信息") +public class WjxWjxxTmlbPage { + + /**id*/ + @ApiModelProperty(value = "id") + private java.lang.String id; + /**创建人*/ + @ApiModelProperty(value = "创建人") + private java.lang.String createBy; + /**创建时间*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "创建时间") + private java.util.Date createTime; + /**修改人*/ + @ApiModelProperty(value = "修改人") + private java.lang.String updateBy; + /**修改时间*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "修改时间") + private java.util.Date updateTime; + /**问卷id*/ + @Excel(name = "问卷id", width = 15) + @ApiModelProperty(value = "问卷id") + private java.lang.String mainId; + /**题目编号*/ + @Excel(name = "题目编号", width = 15) + @ApiModelProperty(value = "题目编号") + private java.lang.Integer wjIndex; + /**题目类型*/ + @Excel(name = "题目类型", width = 15) + @ApiModelProperty(value = "题目类型") + private java.lang.Integer wjType; + /**题目细分类*/ + @Excel(name = "题目细分类", width = 15) + @ApiModelProperty(value = "题目细分类") + private java.lang.Integer wjSubtype; + /**问题标题*/ + @Excel(name = "问题标题", width = 15) + @ApiModelProperty(value = "问题标题") + private java.lang.String wjTitle; + /**是否必填*/ + @Excel(name = "是否必填", width = 15) + @ApiModelProperty(value = "是否必填") + private java.lang.String isRequir; + /**是否是考试*/ + @Excel(name = "是否是考试", width = 15) + @ApiModelProperty(value = "是否是考试") + private java.lang.String wjCeshi; + /**问题分值*/ + @Excel(name = "问题分值", width = 15) + @ApiModelProperty(value = "问题分值") + private java.lang.Double wjScore; + /**题目解析*/ + @Excel(name = "题目解析", width = 15) + @ApiModelProperty(value = "题目解析") + private java.lang.String wjParsing; + /**填写提示*/ + @Excel(name = "填写提示", width = 15) + @ApiModelProperty(value = "填写提示") + private java.lang.String prompt; + + private String itemSelected; + + @ExcelCollection(name="选项信息") + @ApiModelProperty(value = "选项信息") + private List wjxWjxxTmxxList; + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/tools/AuthService.java b/jeecg-module-main/src/main/java/org/jeecg/modules/tools/AuthService.java index 72fc0992..5f297778 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/tools/AuthService.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/tools/AuthService.java @@ -11,10 +11,10 @@ import org.springframework.stereotype.Component; import java.io.*; import java.net.HttpURLConnection; import java.net.URL; -import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.net.URLEncoder; /** * 获取token类 @@ -118,4 +118,28 @@ public class AuthService { } return null; } + + + public String body_num(String filePath) { + // 请求url + String url = "https://aip.baidubce.com/rest/2.0/image-classify/v1/body_num"; + try { + // 本地文件路径 + byte[] imgData = FileUtil.readFileByBytes(filePath); + String imgStr = Base64Util.encode(imgData); + String imgParam = URLEncoder.encode(imgStr, "UTF-8"); + + String param = "image=" + imgParam; + + // 注意这里仅为了简化编码每一次请求都去获取access_token,线上环境access_token有过期时间, 客户端可自行缓存,过期后重新获取。 + String accessToken = getAuth(); + + String result = HttpUtil.post(url, accessToken, param); + System.out.println(result); + return result; + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } } \ No newline at end of file diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/tools/URLEncoder.java b/jeecg-module-main/src/main/java/org/jeecg/modules/tools/URLEncoder.java index 233eba4a..4053bb40 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/tools/URLEncoder.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/tools/URLEncoder.java @@ -54,6 +54,7 @@ public class URLEncoder implements Serializable { this.safeCharacters = safeCharacters; } + public void addSafeCharacter(char c) { this.safeCharacters.set(c); } diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/tools/WjxAuthService.java b/jeecg-module-main/src/main/java/org/jeecg/modules/tools/WjxAuthService.java new file mode 100644 index 00000000..60a11de4 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/tools/WjxAuthService.java @@ -0,0 +1,101 @@ +package org.jeecg.modules.tools; + + +import com.alibaba.fastjson.JSONObject; +import org.jeecg.modules.tools.baidu.Base64Util; +import org.jeecg.modules.tools.baidu.FileUtil; +import org.jeecg.modules.tools.baidu.GsonUtils; +import org.jeecg.modules.tools.baidu.HttpUtil; +import org.jeewx.api.core.util.DateUtils; +import org.springframework.stereotype.Component; + +import java.io.BufferedReader; +import java.io.InputStreamReader; +import java.net.HttpURLConnection; +import java.net.URL; +import java.net.URLEncoder; +import java.time.Instant; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import static cn.hutool.crypto.SecureUtil.sha1; +import static org.apache.poi.poifs.crypt.HashAlgorithm.sha1; + +/** + * 获取token类 + */ +@Component +public class WjxAuthService { + + /** + * 获取权限token + * @return 返回示例: + * { + * "access_token": "24.460da4889caad24cccdb1fea17221975.2592000.1491995545.282335-1234567", + * "expires_in": 2592000 + * } + */ + public static String getAuth() { + String appid = "1321039"; + String appkey = "55328ebd11964fc8b40c10011bcb425d"; + String subuser = "jwctest"; + String mobile = "15844013241"; + String email = ""; + String roleId = "2"; + Long unixTimestamp = Instant.now().getEpochSecond(); + String ts = unixTimestamp.toString(); + String sign = sha1(appid+appkey+subuser+mobile+roleId+ts); + return getAuth(appid, subuser,ts,sign); + } + + /** + * 获取API访问token + * 该token有一定的有效期,需要自行管理,当失效时需重新获取. + */ + public static String getAuth(String appid, String subuser,String ts,String sign) { + // 获取token地址 + String authHost = "https://www.wjx.cn/openapi/default.aspx?"; + String getAccessTokenUrl = authHost + + "appid="+appid + + "&subuser=" + subuser + + "&ts=" + ts + + "&sign=" + sign; + System.out.println("----------------------------------------------------"); + System.out.println(getAccessTokenUrl); + System.out.println("----------------------------------------------------"); + try { + URL realUrl = new URL(getAccessTokenUrl); + // 打开和URL之间的连接 + HttpURLConnection connection = (HttpURLConnection) realUrl.openConnection(); + connection.setRequestMethod("GET"); + connection.connect(); + // 获取所有响应头字段 + Map> map = connection.getHeaderFields(); + // 遍历所有的响应头字段 + for (String key : map.keySet()) { + System.err.println(key + "--->" + map.get(key)); + } + // 定义 BufferedReader输入流来读取URL的响应 + BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream())); + String result = ""; + String line; + while ((line = in.readLine()) != null) { + result += line; + } + /** + * 返回结果示例 + */ + System.err.println("result:" + result); + JSONObject jsonObject = JSONObject.parseObject(result); + String access_token = jsonObject.getString("access_token"); + return access_token; + } catch (Exception e) { + System.err.printf("获取token失败!"); + e.printStackTrace(System.err); + } + return null; + } + +} \ No newline at end of file diff --git a/jeecg-module-system/jeecg-system-start/src/main/resources/application-prod.yml b/jeecg-module-system/jeecg-system-start/src/main/resources/application-prod.yml index 0a61aed1..181ac82d 100644 --- a/jeecg-module-system/jeecg-system-start/src/main/resources/application-prod.yml +++ b/jeecg-module-system/jeecg-system-start/src/main/resources/application-prod.yml @@ -326,3 +326,7 @@ ffmpeg: isDeleteSourceFile: true # 压缩文件扩展名范围 extensionFilter: png,jpg,jpeg +# 维普检测接口 +weipu: + userId: 765996 + userKey: 330ed91f6c7e4600a454a6a5216723bf \ No newline at end of file