Merge remote-tracking branch 'origin/haucheng_panzhihua' into haucheng_panzhihua
1 文件已重命名
1 文件已复制
1个文件已添加
8个文件已修改
File was renamed from springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ExcelDO.java |
| | |
| | | package com.panzhihua.service_community.model.dos; |
| | | package com.panzhihua.common.model.dtos; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.alibaba.excel.annotation.write.style.ColumnWidth; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | public class ExcelDO { |
| | | public class ExcelDO implements Serializable { |
| | | |
| | | @ColumnWidth(10) // 定义列宽 |
| | | @ExcelProperty(value = {"单位归属"}, index = 0) |
copy from springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ExcelDO.java
copy to springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/PartyExcelDO.java
File was copied from springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ExcelDO.java |
| | |
| | | package com.panzhihua.service_community.model.dos; |
| | | package com.panzhihua.common.model.dtos; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.alibaba.excel.annotation.write.style.ColumnWidth; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class ExcelDO { |
| | | public class PartyExcelDO { |
| | | |
| | | @ColumnWidth(10) // 定义列宽 |
| | | @ExcelProperty(value = {"单位归属"}, index = 0) |
| | |
| | | @ExcelProperty(value = {"单位名称"}, index = 2) |
| | | private String unitName; |
| | | |
| | | @ColumnWidth(20) // 定义列宽 |
| | | @ExcelProperty(value = {"报道社区名称"}, index = 3) |
| | | private String communityName; |
| | | @ColumnWidth(26) // 定义列宽 |
| | | @ExcelProperty(value = {"姓名"}, index = 3) |
| | | private String memberName; |
| | | |
| | | @ColumnWidth(20) // 定义列宽 |
| | | @ExcelProperty(value = {"服务次数"}, index = 4) |
| | | @ExcelProperty(value = {"报道社区名称"}, index = 4) |
| | | private String belongCommunity; |
| | | |
| | | @ColumnWidth(20) // 定义列宽 |
| | | @ExcelProperty(value = {"服务次数"}, index = 5) |
| | | private Integer serviceTimes; |
| | | |
| | | @ColumnWidth(20) // 定义列宽 |
| | | @ExcelProperty(value = {"服务时长"}, index = 5) |
| | | @ExcelProperty(value = {"服务时长"}, index = 6) |
| | | private Integer serviceTime; |
| | | |
| | | @ColumnWidth(20) // 定义列宽 |
| | | @ExcelProperty(value = {"累计积分"}, index = 6) |
| | | private Long awardSum; |
| | | @ExcelProperty(value = {"累计积分"}, index = 7) |
| | | private Long partyCount; |
| | | } |
| | |
| | | @ApiModelProperty("党员服务总时长") |
| | | private Integer partyMemberServiceTotalTime; |
| | | |
| | | @ApiModelProperty("累计总积分") |
| | | @ApiModelProperty("报道单位累计总积分") |
| | | private Long awardSumCount; |
| | | |
| | | @ApiModelProperty("报道党员累计总积分") |
| | | private Long partySumCount; |
| | | } |
| | |
| | | @ApiModelProperty("所属社区") |
| | | private String belongCommunity; |
| | | |
| | | @ApiModelProperty("单位归属") |
| | | private String belongTo; |
| | | |
| | | @ApiModelProperty("所属党组织") |
| | | private String orgName; |
| | | |
| | | @ApiModelProperty("单位名称") |
| | | private String unitName; |
| | | |
| | | @ApiModelProperty("服务次数") |
| | | private Integer serviceTimes; |
| | | |
| | |
| | | @ApiModelProperty("党员id") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long memberId; |
| | | |
| | | @ApiModelProperty("党员积分") |
| | | private Long partyCount; |
| | | } |
| | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import com.panzhihua.common.model.dtos.PageBaseDTO; |
| | | import com.panzhihua.common.model.dtos.*; |
| | | import com.panzhihua.common.model.dtos.community.*; |
| | | import com.panzhihua.common.model.dtos.community.acid.*; |
| | | import com.panzhihua.common.model.dtos.community.building.BuildingDto; |
| | |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | import com.panzhihua.common.model.dtos.AppletesBackstageConfigDTO; |
| | | import com.panzhihua.common.model.dtos.PageDTO; |
| | | import com.panzhihua.common.model.dtos.advertisement.ComOpsAdvDTO; |
| | | import com.panzhihua.common.model.dtos.advertisement.PageComOpsAdvDTO; |
| | | import com.panzhihua.common.model.dtos.civil.ComActSocialWorkerAddDTO; |
| | |
| | | @RequestParam(value = "unitId",required = false) Long unitId,@RequestParam(value = "loginAccount",required = false) String loginAccount); |
| | | |
| | | @GetMapping("/neighbor/export") |
| | | public R export(@RequestParam("year") Integer year, @RequestParam("belongTo") String belongTo, @RequestParam("communityId") Long communityId, HttpServletResponse response); |
| | | public List<ExcelDO> export(@RequestParam(value = "year",required = false) Integer year, |
| | | @RequestParam(value = "belongTo",required = false) String belongTo, |
| | | @RequestParam(value = "communityId",required = false) Long communityId); |
| | | |
| | | @GetMapping("/neighbor/partyExcel") |
| | | public List<PartyExcelDO> partyExcel(@RequestParam(value = "year",required = false) Integer year, |
| | | @RequestParam(value = "belongTo",required = false) String belongTo, |
| | | @RequestParam(value = "communityId",required = false) Long communityId, |
| | | @RequestParam(value = "unitId",required = false) Long unitId); |
| | | |
| | | /** |
| | | * 批量删除活动 |
New file |
| | |
| | | package com.panzhihua.common.utlis; |
| | | |
| | | import com.alibaba.excel.support.ExcelTypeEnum; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.io.IOUtils; |
| | | |
| | | import javax.servlet.ServletOutputStream; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.net.URLEncoder; |
| | | import java.util.List; |
| | | |
| | | @Slf4j |
| | | public class EasyExcel { |
| | | |
| | | /** |
| | | * 导出Excel(07版.xlsx)到指定路径下 |
| | | * |
| | | * @param path 路径 |
| | | * @param excelName Excel名称 |
| | | * @param sheetName sheet页名称 |
| | | * @param clazz Excel要转换的类型 |
| | | * @param data 要导出的数据 |
| | | */ |
| | | public static void export2File(String path, String excelName, String sheetName, Class clazz, List data) { |
| | | String fileName = path.concat(excelName).concat(ExcelTypeEnum.XLSX.getValue()); |
| | | com.alibaba.excel.EasyExcel.write(fileName, clazz).sheet(sheetName).doWrite(data); |
| | | } |
| | | |
| | | /** |
| | | * 导出Excel(07版.xlsx)到web |
| | | * |
| | | * @param response 响应 |
| | | * @param excelName Excel名称 |
| | | * @param sheetName sheet页名称 |
| | | * @param clazz Excel要转换的类型 |
| | | * @param data 要导出的数据 |
| | | * @throws Exception |
| | | */ |
| | | public static void export2Web(HttpServletResponse response, String excelName, String sheetName, Class clazz, List data) throws Exception { |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setCharacterEncoding("utf-8"); |
| | | // 这里URLEncoder.encode可以防止中文乱码 |
| | | excelName = URLEncoder.encode(excelName, "UTF-8"); |
| | | response.setHeader("Content-disposition", "attachment;filename=" + excelName + ExcelTypeEnum.XLSX.getValue()); |
| | | com.alibaba.excel.EasyExcel.write(response.getOutputStream(), clazz).sheet(sheetName).doWrite(data); |
| | | } |
| | | |
| | | /** |
| | | * 将指定位置指定名称的Excel导出到web |
| | | * |
| | | * @param response 响应 |
| | | * @param path 文件路径 |
| | | * @param excelName 文件名称 |
| | | * @return |
| | | * @throws UnsupportedEncodingException |
| | | */ |
| | | public static String export2Web4File(HttpServletResponse response, String path, String excelName) throws UnsupportedEncodingException { |
| | | File file = new File(path.concat(excelName).concat(ExcelTypeEnum.XLSX.getValue())); |
| | | if (!file.exists()) { |
| | | return "文件不存在!"; |
| | | } |
| | | |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setCharacterEncoding("utf-8"); |
| | | // 这里URLEncoder.encode可以防止中文乱码 |
| | | excelName = URLEncoder.encode(excelName, "UTF-8"); |
| | | response.setHeader("Content-disposition", "attachment;filename=" + excelName + ExcelTypeEnum.XLSX.getValue()); |
| | | |
| | | try ( |
| | | FileInputStream in = new FileInputStream(file); |
| | | ServletOutputStream out = response.getOutputStream(); |
| | | ) { |
| | | IOUtils.copy(in, out); |
| | | return "导出成功!"; |
| | | } catch (Exception e) { |
| | | log.error("导出文件异常:", e); |
| | | } |
| | | |
| | | return "导出失败!"; |
| | | } |
| | | } |
| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.Valid; |
| | | |
| | | import com.panzhihua.common.model.dtos.ExcelDO; |
| | | import com.panzhihua.common.model.dtos.PartyExcelDO; |
| | | import com.panzhihua.common.model.dtos.partybuilding.NewFightIntegral; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | |
| | | } |
| | | |
| | | @GetMapping("/exportExcel") |
| | | public R exportExcel(@RequestParam(value = "year",required = false) Integer year, |
| | | public void exportExcel(@RequestParam(value = "year",required = false) Integer year, |
| | | @RequestParam(value = "type",required = false) Integer type, |
| | | @RequestParam(value = "communityId",required = false) Long communityId, |
| | | @RequestParam(value = "belongTo",required = false) String belongTo, |
| | | HttpServletResponse response){ |
| | | communityService.export(year,belongTo,communityId,response); |
| | | return R.ok(); |
| | | HttpServletResponse response) throws Exception { |
| | | List<ExcelDO> excelDOList = communityService.export(year, belongTo, communityId); |
| | | com.panzhihua.common.utlis.EasyExcel.export2Web(response,"报道单位","sheet",ExcelDO.class,excelDOList); |
| | | } |
| | | |
| | | @GetMapping("/partyExcel") |
| | | public void partyExcel(@RequestParam(value = "year",required = false) Integer year, |
| | | @RequestParam(value = "belongTo",required = false) String belongTo, |
| | | @RequestParam(value = "communityId",required = false) Long communityId, |
| | | @RequestParam(value = "unitId",required = false) Long unitId, |
| | | HttpServletResponse response) throws Exception { |
| | | List<PartyExcelDO> list = communityService.partyExcel(year, belongTo, communityId, unitId); |
| | | com.panzhihua.common.utlis.EasyExcel.export2Web(response,"报道党员","sheet", PartyExcelDO.class,list); |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.panzhihua.service_community.model.dos.ComActNeighborCircleDO; |
| | | import org.springframework.beans.BeanUtils; |
| | | import com.panzhihua.common.model.dtos.ExcelDO; |
| | | import com.panzhihua.common.model.dtos.PartyExcelDO; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | import com.panzhihua.service_community.service.ComActNeighborCircleTopicService; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | |
| | | * 导出 |
| | | */ |
| | | @GetMapping("/export") |
| | | public R export(@RequestParam("year") Integer year, @RequestParam("belongTo") String belongTo, @RequestParam("communityId") Long communityId, HttpServletResponse response) throws Exception { |
| | | return this.comActNeighborCircleService.export(year,belongTo,communityId,response); |
| | | public List<ExcelDO> export(@RequestParam(value = "year",required = false) Integer year, |
| | | @RequestParam(value = "belongTo",required = false) String belongTo, |
| | | @RequestParam(value = "communityId",required = false) Long communityId) throws Exception { |
| | | return this.comActNeighborCircleService.export(year,belongTo,communityId); |
| | | } |
| | | |
| | | @GetMapping("/partyExcel") |
| | | public List<PartyExcelDO> partyExcel(@RequestParam(value = "year",required = false) Integer year, |
| | | @RequestParam(value = "belongTo",required = false) String belongTo, |
| | | @RequestParam(value = "communityId",required = false) Long communityId, |
| | | @RequestParam(value = "unitId",required = false) Long unitId){ |
| | | return this.comActNeighborCircleService.partyExcel(year,belongTo,communityId,unitId); |
| | | } |
| | | |
| | | /** |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.ExcelDO; |
| | | import com.panzhihua.common.model.dtos.PartyExcelDO; |
| | | import com.panzhihua.common.model.dtos.neighbor.*; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.neighbor.AddNeighborCircleAdminVO; |
| | |
| | | import com.panzhihua.service_community.model.dos.ComActNeighborCircleDO; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @auther lyq |
| | |
| | | /** |
| | | * 导出 |
| | | */ |
| | | R export(Integer year,String belongTo,Long communityId, HttpServletResponse response) throws Exception; |
| | | List<ExcelDO> export(Integer year, String belongTo, Long communityId) throws Exception; |
| | | |
| | | List<PartyExcelDO> partyExcel(Integer year, String belongTo, Long communityId, Long unitId); |
| | | |
| | | /** |
| | | * 后台服务统计 |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.constants.NeighborCircleConstants; |
| | | import com.panzhihua.common.model.dtos.ExcelDO; |
| | | import com.panzhihua.common.model.dtos.PartyExcelDO; |
| | | import com.panzhihua.common.model.dtos.neighbor.*; |
| | | import com.panzhihua.common.model.vos.PageVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | |
| | | } |
| | | } |
| | | } |
| | | //统计积分 |
| | | //报道单位统计积分 |
| | | List<NewFightNeedProblemInventory> allList = newFightNeedProblemInventoryMapper.selectAll(); |
| | | Map<Long, String> awardMap = allList.stream().filter(Objects::nonNull).collect(Collectors.toMap(NewFightNeedProblemInventory::getId, NewFightNeedProblemInventory::getAward)); |
| | | for (UnitActivityAnalysisVO unitVO : unitActivityAnalysisVOS) { |
| | |
| | | unitVO.setAwardSum(sum); |
| | | } |
| | | |
| | | //报道党员统计积分 |
| | | for (PartyMemberAnalysisVO memberAnalysisVO : partyMemberAnalysisVOS) { |
| | | Long userId = memberAnalysisVO.getMemberId(); |
| | | LambdaQueryWrapper<NewFightNeedProblemClaim> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(NewFightNeedProblemClaim::getUserId,userId); |
| | | List<NewFightNeedProblemClaim> newFightNeedProblemInventories = newFightNeedProblemClaimMapper.selectList(wrapper); |
| | | long sumAward = 0L; |
| | | for (NewFightNeedProblemClaim inventory : newFightNeedProblemInventories) { |
| | | String taskId = inventory.getTaskId(); |
| | | NewFightNeedProblemInventory newFightNeedProblemInventory = newFightNeedProblemInventoryMapper.selectById(taskId); |
| | | String award = newFightNeedProblemInventory.getAward(); |
| | | sumAward = Long.parseLong(award) + sumAward; |
| | | } |
| | | memberAnalysisVO.setPartyCount(sumAward); |
| | | } |
| | | |
| | | //统计总时长和总次数 |
| | | Integer unitServiceCount=0; |
| | | Integer unitServiceTotalTime=0; |
| | | Integer memberServiceCount=0; |
| | | Integer memberServiceTotalTome=0; |
| | | long awardSumCount=0L; |
| | | long partySumCount=0L; |
| | | for (UnitActivityAnalysisVO vo : unitActivityAnalysisVOS) { |
| | | //避免空指针 |
| | | if (ObjectUtils.isNotEmpty(vo)){ |
| | |
| | | } |
| | | } |
| | | } |
| | | for (PartyMemberAnalysisVO memberAnalysisVO : partyMemberAnalysisVOS) { |
| | | if(ObjectUtils.isNotEmpty(memberAnalysisVO)){ |
| | | if(ObjectUtils.isNotEmpty(memberAnalysisVO.getPartyCount())){ |
| | | partySumCount += memberAnalysisVO.getPartyCount(); |
| | | } |
| | | } |
| | | } |
| | | activityVO.setAwardSumCount(awardSumCount); |
| | | activityVO.setPartySumCount(partySumCount); |
| | | activityVO.setUnitServiceTotalCount(unitServiceCount); |
| | | activityVO.setUnitServiceTotalTime(unitServiceTotalTime); |
| | | activityVO.setPartyMemberServiceTotalCount(memberServiceCount); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public R export(Integer year,String belongTo,Long communityId, HttpServletResponse response) throws Exception { |
| | | public List<ExcelDO> export(Integer year, String belongTo, Long communityId) throws Exception { |
| | | List<ExcelDO> excelDOList = new ArrayList<>(); |
| | | String beginTime=null; |
| | | String endTime=null; |
| | |
| | | excelDO.setAwardSum(vo.getAwardSum()); |
| | | excelDOList.add(excelDO); |
| | | } |
| | | ExcelUtils.export2Web(response,"双争双评","sheet",ExcelDO.class,excelDOList); |
| | | return R.ok(); |
| | | return excelDOList; |
| | | } |
| | | |
| | | @Override |
| | | public List<PartyExcelDO> partyExcel(Integer year, String belongTo, Long communityId,Long unitId) { |
| | | String beginTime=null; |
| | | String endTime=null; |
| | | if (null != year){ |
| | | //设置开始,截止时间 |
| | | beginTime=year.toString().concat("-01-01"); |
| | | endTime=year.toString().concat("-12-31"); |
| | | } |
| | | //获取党员活动统计数据 |
| | | List<PartyMemberAnalysisVO> partyMemberAnalysisVOS = comActNeighborCircleDAO.institutionalPartyMemberServiceAnalysis(beginTime, endTime, belongTo,communityId,unitId); |
| | | List<PartyMemberAnalysisVO> partyMemberAnalysisVOS1 = comActNeighborCircleDAO.institutionalPartyMemberActAnalysis(beginTime, endTime, belongTo,communityId,unitId); |
| | | if (partyMemberAnalysisVOS1.size()>0){ |
| | | for (PartyMemberAnalysisVO vo : partyMemberAnalysisVOS1) { |
| | | if (ObjectUtils.isNotEmpty(vo)){ |
| | | if (ObjectUtils.isNotEmpty(vo.getMemberId())){ |
| | | Map<String, Integer> param = memberAlreadyAnalysis(vo.getMemberId(), partyMemberAnalysisVOS); |
| | | if (param.get("flag")==1){ |
| | | Integer serviceTime = vo.getServiceTime(); |
| | | Integer serviceTimes = vo.getServiceTimes(); |
| | | partyMemberAnalysisVOS.get(param.get("index")).setServiceTime(partyMemberAnalysisVOS.get(param.get("index")).getServiceTime()+serviceTime); |
| | | partyMemberAnalysisVOS.get(param.get("index")).setServiceTimes(partyMemberAnalysisVOS.get(param.get("index")).getServiceTimes()+serviceTimes); |
| | | }else{ |
| | | partyMemberAnalysisVOS.add(vo); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | //报道党员统计积分 |
| | | for (PartyMemberAnalysisVO memberAnalysisVO : partyMemberAnalysisVOS) { |
| | | Long userId = memberAnalysisVO.getMemberId(); |
| | | LambdaQueryWrapper<NewFightNeedProblemClaim> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(NewFightNeedProblemClaim::getUserId,userId); |
| | | List<NewFightNeedProblemClaim> newFightNeedProblemInventories = newFightNeedProblemClaimMapper.selectList(wrapper); |
| | | long sumAward = 0L; |
| | | for (NewFightNeedProblemClaim inventory : newFightNeedProblemInventories) { |
| | | String taskId = inventory.getTaskId(); |
| | | NewFightNeedProblemInventory newFightNeedProblemInventory = newFightNeedProblemInventoryMapper.selectById(taskId); |
| | | String award = newFightNeedProblemInventory.getAward(); |
| | | sumAward = Long.parseLong(award) + sumAward; |
| | | } |
| | | memberAnalysisVO.setPartyCount(sumAward); |
| | | } |
| | | List<PartyExcelDO> list = new ArrayList<>(); |
| | | for (PartyMemberAnalysisVO memberAnalysisVO : partyMemberAnalysisVOS) { |
| | | PartyExcelDO partyExcelDO = new PartyExcelDO(); |
| | | partyExcelDO.setBelongTo(memberAnalysisVO.getBelongTo()); |
| | | partyExcelDO.setOrgName(memberAnalysisVO.getOrgName()); |
| | | partyExcelDO.setUnitName(memberAnalysisVO.getUnitName()); |
| | | partyExcelDO.setMemberName(memberAnalysisVO.getMemberName()); |
| | | partyExcelDO.setBelongCommunity(memberAnalysisVO.getBelongCommunity()); |
| | | partyExcelDO.setServiceTimes(memberAnalysisVO.getServiceTimes()); |
| | | partyExcelDO.setServiceTime(memberAnalysisVO.getServiceTime()); |
| | | partyExcelDO.setPartyCount(memberAnalysisVO.getPartyCount()); |
| | | list.add(partyExcelDO); |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | |
| | |
| | | </select> |
| | | <select id="institutionalPartyMemberServiceAnalysis" |
| | | resultType="com.panzhihua.common.model.vos.neighbor.PartyMemberAnalysisVO"> |
| | | SELECT count(id) as serviceTimes, sum(duration) as serviceTime, unitId, |
| | | communityId, memberId, memberName, belongUnit, belongCommunity, belong_to FROM ( |
| | | SELECT caa.id, caa.duration, cpcu.id as unitId, cpcu.community_id as communityId, su.user_id as |
| | | memberId, su.name as memberName, su.relation_name as belongUnit, ca.name as belongCommunity, cpcu.belong_to |
| | | SELECT count(id) as serviceTimes, sum(duration) as serviceTime, unitId,unitName,orgName, |
| | | communityId, memberId, memberName, belongUnit, belongCommunity, belongTo FROM ( |
| | | SELECT caa.id, caa.duration, cpcu.id as unitId,cpcu.name as unitName,cpcu.org_name as orgName, cpcu.community_id as communityId, su.user_id as |
| | | memberId, su.name as memberName, su.relation_name as belongUnit, ca.name as belongCommunity, cpcu.belong_to belongTo |
| | | FROM `com_act_activity` as caa |
| | | left join com_act_act_regist as caar on caa.id=caar.activity_id |
| | | left join sys_user as su on caar.user_id=su.user_id |