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 a3499200..ffccb3ed 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 @@ -380,6 +380,10 @@ public class KcExportConfigTpkwcqkjzglxController extends JeecgController clazz, String title) { // Step.1 组装查询条件 QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(object, request.getParameterMap()); @@ -445,6 +449,71 @@ public class KcExportConfigTpkwcqkjzglxController extends JeecgController clazz, String title) { + // Step.1 组装查询条件 + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(object, request.getParameterMap()); + LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + if(object.isFindByDwmc()){ + QueryWrapper uqw = new QueryWrapper<>(); + //LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + uqw.eq("gh",object.getFindGh()); + uqw.last("limit 1"); + Xxhbuser xxhbUser = xxhbuserService.getOne(uqw); + if(xxhbUser == null) { + queryWrapper.eq("dwmc ",-1); + } + queryWrapper.eq("dwmc ",xxhbUser.getDwmc()); + } + // 过滤选中数据 + String selections = request.getParameter("selections"); + if (oConvertUtils.isNotEmpty(selections)) { + List selectionList = Arrays.asList(selections.split(",")); + queryWrapper.in("id",selectionList); + } +// queryWrapper.eq("zt","在职"); +// queryWrapper.apply("(zt = '在职' or (zt= '退休' and ytkcs-0 >0))"); +// queryWrapper.apply("dwmc in (select kkdw from kc_kkdw21_view)"); + // Step.2 获取导出数据 + List exportList = service.list(queryWrapper); + + Set xqxnSet = exportList.stream().filter(x -> StringUtils.isNotBlank(x.getXqxn())).map(KcExportConfigTpkwcqkjzglx::getXqxn).collect(Collectors.toSet()); + //根据当前学期学年,硬合并出来一个数据 + QueryWrapper tjQw = new QueryWrapper<>(); + if(xqxnSet.isEmpty()){ + tjQw.eq("xnxq",-1); + }else{ + tjQw.in("xnxq",xqxnSet); + } + List tjList = kcTkcstjService.list(tjQw); + Map tjMap = Maps.newHashMap(); + tjList.forEach(x -> { + tjMap.put(x.getXnxq() + "-" + x.getJgh(),x); + }); + + //根据当前学期学年,硬合并出来一个数据 + exportList.forEach(x -> { + x.setTkxttj("0"); + x.setYskcs("0"); + if(tjMap.containsKey(x.getXqxn() + "-" + x.getGh())){ + KcTkcstj tkcstj = tjMap.get(x.getXqxn() + "-" + x.getGh()); + x.setTkxttj(StringUtils.defaultString(tkcstj.getTkxttj(),"0")); + x.setYskcs(StringUtils.defaultString(tkcstj.getYskcs(),"0")); + //x.setXqxn(kcXqxnHistory.getTitle()); + } + }); + // Step.3 AutoPoi 导出Excel + ModelAndView mv = new ModelAndView(new JeecgEntityExcelView()); + //此处设置的filename无效 ,前端会重更新设置一下 + mv.addObject(NormalExcelConstants.FILE_NAME, title); + mv.addObject(NormalExcelConstants.CLASS, clazz); + //update-begin--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置-------------------- + ExportParams exportParams=new ExportParams(title + "报表", "导出人:" + sysUser.getRealname(), title); + exportParams.setImageBasePath(upLoadPath); + //update-end--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置---------------------- + mv.addObject(NormalExcelConstants.PARAMS,exportParams); + mv.addObject(NormalExcelConstants.DATA_LIST, exportList); + return mv; + } /** * 通过excel导入数据 diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/SynchronizationService/SyncTJwJxljbxxb.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/SynchronizationService/SyncTJwJxljbxxb.java index 86d75840..84c189c0 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/SynchronizationService/SyncTJwJxljbxxb.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/SynchronizationService/SyncTJwJxljbxxb.java @@ -1,6 +1,7 @@ package org.jeecg.modules.kc.grab.SynchronizationService; import cn.hutool.core.bean.BeanUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import lombok.extern.slf4j.Slf4j; import org.apache.commons.compress.utils.Lists; import org.jeecg.modules.kc.grab.SynchronizationService.base.BaseSync; @@ -58,6 +59,22 @@ public class SyncTJwJxljbxxb extends BaseSync { e.printStackTrace(); errorMessage = e.getMessage(); } + Xxhbjxljbxx xxhbjxljbxxUp = new Xxhbjxljbxx(); + xxhbjxljbxxUp.setSort("4"); + impService.updateSort(xxhbjxljbxxUp); + xxhbjxljbxxUp = new Xxhbjxljbxx(); + xxhbjxljbxxUp.setSort("1"); + xxhbjxljbxxUp.setJzwh("0106"); + impService.updateSort(xxhbjxljbxxUp); + xxhbjxljbxxUp = new Xxhbjxljbxx(); + xxhbjxljbxxUp.setSort("2"); + xxhbjxljbxxUp.setJzwh("0108"); + impService.updateSort(xxhbjxljbxxUp); + xxhbjxljbxxUp = new Xxhbjxljbxx(); + xxhbjxljbxxUp.setSort("3"); + xxhbjxljbxxUp.setJzwh("0295"); + impService.updateSort(xxhbjxljbxxUp); + Xxhbjxljbxx Xxhbjxljbxx = impService.getSumnum(); int mysqlnum=Xxhbjxljbxx.getMysqlnum(); Xxhbsynclog xxhbsynclog = new Xxhbsynclog(); diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/entity/Xxhbjxljbxx.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/entity/Xxhbjxljbxx.java index 13059f81..171e0f9e 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/entity/Xxhbjxljbxx.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/entity/Xxhbjxljbxx.java @@ -77,6 +77,8 @@ public class Xxhbjxljbxx implements Serializable { @ApiModelProperty(value = "时间戳") private java.util.Date timestamps; + private String sort; + @TableField(exist = false) private Integer mysqlnum; } diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/mapper/XxhbjxljbxxMapper.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/mapper/XxhbjxljbxxMapper.java index 4bd145a5..00e980f4 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/mapper/XxhbjxljbxxMapper.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/mapper/XxhbjxljbxxMapper.java @@ -15,4 +15,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; public interface XxhbjxljbxxMapper extends BaseMapper { Xxhbjxljbxx getSumnum(); + + void updateSort(Xxhbjxljbxx xxhbjxljbxxUp); } diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/mapper/xml/XxhbjxljbxxMapper.xml b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/mapper/xml/XxhbjxljbxxMapper.xml index 5c23180d..81bbead3 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/mapper/xml/XxhbjxljbxxMapper.xml +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/mapper/xml/XxhbjxljbxxMapper.xml @@ -5,4 +5,13 @@ + + + update xxhbjxljbxx set sort =#{sort} + + + and jzwh = #{jzwh} + + + \ No newline at end of file diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/service/IXxhbjxljbxxService.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/service/IXxhbjxljbxxService.java index d5abfa81..072ea213 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/service/IXxhbjxljbxxService.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/service/IXxhbjxljbxxService.java @@ -20,4 +20,6 @@ public interface IXxhbjxljbxxService extends IService { boolean syncList(Collection entityList, boolean isDelete); Xxhbjxljbxx getSumnum(); + + void updateSort(Xxhbjxljbxx xxhbjxljbxxUp); } diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/service/impl/XxhbjxljbxxServiceImpl.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/service/impl/XxhbjxljbxxServiceImpl.java index bc9e8897..090edc79 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/service/impl/XxhbjxljbxxServiceImpl.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/service/impl/XxhbjxljbxxServiceImpl.java @@ -38,4 +38,9 @@ public class XxhbjxljbxxServiceImpl extends ServiceImpl sendBody = new HashMap<>(); sendBody.put("touser", openId); // openId sendBody.put("url", domainTo); // 点击模板信息跳转地址 - sendBody.put("topcolor", "#FF0000"); // 顶色 +// sendBody.put("topcolor", "#FF0000"); // 顶色 sendBody.put("data", sendMag); // 模板参数 - sendBody.put("template_id", "ijrjginJ4RJGBMO0i1g0Ml-kO2bfDNXCchw1j_viJGE"); // 模板Id + sendBody.put("template_id", "PDS1hf6s8P5Ce-SFa9J95XvHhMIGlyhITAGq_CIoNMM"); // 模板Id ResponseEntity forEntity = restTemplate.postForEntity(url, sendBody, String.class); JSONObject jsonObject2 = JSONObject.parseObject(forEntity.getBody()); System.out.println("jsonObject2 : " + jsonObject2); diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/qa/service/impl/KcEvaluationServiceImpl.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/qa/service/impl/KcEvaluationServiceImpl.java index 0828e780..76309922 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/qa/service/impl/KcEvaluationServiceImpl.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/qa/service/impl/KcEvaluationServiceImpl.java @@ -186,8 +186,8 @@ public class KcEvaluationServiceImpl extends ServiceImpl sendBody = new HashMap<>(); sendBody.put("touser", openId); // openId sendBody.put("url", domainTo); // 点击模板信息跳转地址 - sendBody.put("topcolor", "#FF0000"); // 顶色 +// sendBody.put("topcolor", "#FF0000"); // 顶色 sendBody.put("data", sendMag); // 模板参数 - sendBody.put("template_id", "-XCApC7nfBDmwEqP8b1WC1BfF3mXjtSTRPwUTJRtz2I"); // 模板Id + sendBody.put("template_id", "PDS1hf6s8P5Ce-SFa9J95XvHhMIGlyhITAGq_CIoNMM"); // 模板Id ResponseEntity forEntity = restTemplate.postForEntity(url, sendBody, String.class); JSONObject jsonObject2 = JSONObject.parseObject(forEntity.getBody()); System.out.println("jsonObject2 : " + jsonObject2);