Merge branch 'test' of http://gitlab.nhys.cdnhxx.com/root/zhihuishequ into test
| | |
| | | @ApiOperation(value = "根据日期查询值班人员") |
| | | @GetMapping("/app/getRotaPersonByDate") |
| | | public R getRotaPersonByDate(@RequestParam(value = "rotaDate") String rotaDate) { |
| | | return communityService.getRotaPersonByDate(rotaDate); |
| | | return communityService.getRotaPersonByDate(rotaDate,this.getCommunityId()); |
| | | } |
| | | |
| | | /** |
| | |
| | | @ApiOperation(value = "根据日期查询值班领导") |
| | | @GetMapping("/app/getRotaLeaderByDate") |
| | | public R getRotaLeaderByDate(@RequestParam(value = "rotaDate") String rotaDate) { |
| | | return communityService.getRotaLeaderByDate(rotaDate); |
| | | return communityService.getRotaLeaderByDate(rotaDate,this.getCommunityId()); |
| | | } |
| | | |
| | | /** |
New file |
| | |
| | | package com.panzhihua.common.enums; |
| | | |
| | | /** |
| | | * @title: PresetPictureType |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 预设图片类型 |
| | | * @author: hans |
| | | * @date: 2021/11/23 17:31 |
| | | */ |
| | | public class PresetPictureType { |
| | | /** |
| | | * 物业宣传 |
| | | */ |
| | | public static Integer PROPERTY_PUBLICITY = 1; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import java.util.List; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: ComActPictureLibraryVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 公共预设图库信息 |
| | | * @author: hans |
| | | * @date: 2021/11/23 17:16 |
| | | */ |
| | | @Data |
| | | @ApiModel("公共预设图库信息") |
| | | public class ComActPictureLibraryVO { |
| | | |
| | | @ApiModelProperty("操作内容") |
| | | private List<String> presetPictures; |
| | | } |
| | |
| | | * @return 查询结果 |
| | | */ |
| | | @GetMapping("/patrolRecord/rota/getRotaPersonByDate") |
| | | R getRotaPersonByDate(@RequestParam(value = "rotaDate") String rotaDate); |
| | | R getRotaPersonByDate(@RequestParam(value = "rotaDate") String rotaDate,@RequestParam("communityId")Long communityId); |
| | | |
| | | /** |
| | | * 根据日期查询值班领导 |
| | |
| | | * @return 查询结果 |
| | | */ |
| | | @GetMapping("/patrolRecord/rota/getRotaLeaderByDate") |
| | | R getRotaLeaderByDate(@RequestParam(value = "rotaDate") String rotaDate); |
| | | R getRotaLeaderByDate(@RequestParam(value = "rotaDate") String rotaDate,@RequestParam("communityId")Long communityId); |
| | | |
| | | /** |
| | | * 批量导入值班表 |
| | |
| | | */ |
| | | @PostMapping("/reserve/admin/homeQuarantine/export") |
| | | R exportHomeQuarantine(@RequestBody PageReserveRegisterDetailedAdminDTO pageReserveRegisterDetailedAdminDTO); |
| | | |
| | | /** |
| | | * 获取预设图片 |
| | | * @param type |
| | | * @param subtype |
| | | * @return |
| | | */ |
| | | @GetMapping("/picture/library/get") |
| | | R getPresetPictureLibrary(@RequestParam("type") Integer type, @RequestParam("subtype") Integer subtype); |
| | | } |
| | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.enums.PresetPictureType; |
| | | import com.panzhihua.common.model.dtos.community.ComPropertyPublicityDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComPropertyPublicityDTO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComMngVillageVO; |
| | | import com.panzhihua.common.model.vos.community.ComActPictureLibraryVO; |
| | | import com.panzhihua.common.model.vos.community.ComPropertyPublicityVO; |
| | | import com.panzhihua.common.model.vos.community.ComPropertyVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | |
| | | public R listProperty(@RequestParam(value = "villageId", required = false) Long villageId) { |
| | | return communityService.listProperty(villageId, getCommunityId()); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取预设图库",response = ComActPictureLibraryVO.class) |
| | | @GetMapping("/picture/library") |
| | | @ApiImplicitParam(name = "publicityType", value = "宣传类型(1.停水通知 2.停电通知 3.停气通知 4.物业公告 5.优秀业主)", required = true) |
| | | public R getPresetPictureLibrary(@RequestParam("publicityType") Integer publicityType) { |
| | | return communityService.getPresetPictureLibrary(PresetPictureType.PROPERTY_PUBLICITY, publicityType); |
| | | } |
| | | } |
| | |
| | | @ApiOperation(value = "根据日期查询值班人员") |
| | | @GetMapping("/getRotaPersonByDate") |
| | | public R getRotaPersonByDate(@RequestParam(value = "rotaDate") String rotaDate) { |
| | | return communityService.getRotaPersonByDate(rotaDate); |
| | | return communityService.getRotaPersonByDate(rotaDate,this.getCommunityId()); |
| | | } |
| | | |
| | | /** |
| | |
| | | @ApiOperation(value = "根据日期查询值班领导") |
| | | @GetMapping("/getRotaLeaderByDate") |
| | | public R getRotaLeaderByDate(@RequestParam(value = "rotaDate") String rotaDate) { |
| | | return communityService.getRotaLeaderByDate(rotaDate); |
| | | return communityService.getRotaLeaderByDate(rotaDate,this.getCommunityId()); |
| | | } |
| | | |
| | | /** |
| | |
| | | // 这里 需要指定写用哪个class去写 |
| | | ExcelWriter excelWriter = null; |
| | | InputStream inputStream = null; |
| | | File file0=new File("d:/safetyWork/file"); |
| | | File file0=new File("/mnt/data/web/file"); |
| | | if(!file0.isDirectory()&&!file0.exists()){ |
| | | file0.mkdirs(); |
| | | } |
| | |
| | | if(!file0.isDirectory()&&!file0.exists()){ |
| | | file0.mkdirs(); |
| | | } |
| | | sftp.download("/mnt/data/web/excel/", "安全工作记录.ftl", "d:/safetyWork/file/安全工作记录.ftl"); |
| | | sftp.download("/mnt/data/web/excel/", "blank.jpg", "d:/safetyWork/file/blank.jpg"); |
| | | sftp.download("/mnt/data/web/excel/", "安全工作记录.ftl", "/mnt/data/web/file/安全工作记录.ftl"); |
| | | sftp.download("/mnt/data/web/excel/", "blank.jpg", "/mnt/data/web/file/blank.jpg"); |
| | | try { |
| | | // 日期 |
| | | if (comSwSafetyWorkRecordVO.getPatrolTime() != null) { |
| | |
| | | if (photo.size() != 0 && null != photo) { |
| | | List<Object> list=new ArrayList<>(); |
| | | for (int i = 0; i < photo.size(); i++) { |
| | | downloadPicture(photo.get(i), comSwSafetyWorkRecordVO.getId() + "_find_" + i, "d:/dangerReport/file/"); |
| | | list.add(getImageStr("d:/dangerReport/file/" + comSwSafetyWorkRecordVO.getId() + "_find_" + i + ".jpg")); |
| | | downloadPicture(photo.get(i), comSwSafetyWorkRecordVO.getId() + "_find_" + i, "/mnt/data/web/file/"); |
| | | list.add(getImageStr("/mnt/data/web/file/" + comSwSafetyWorkRecordVO.getId() + "_find_" + i + ".jpg")); |
| | | } |
| | | dataMap.put("imgList",list); |
| | | } |
| | |
| | | // configuration.setClassForTemplateLoading(this.getClass(), ""); |
| | | |
| | | // 指定路径的第二种方式,我的路径是C:/a.ftl |
| | | configuration.setDirectoryForTemplateLoading(new File("d:/safetyWork/file/")); |
| | | configuration.setDirectoryForTemplateLoading(new File("/mnt/data/web/file/")); |
| | | |
| | | // 输出文档路径及名称 |
| | | // File outFile = new File("mnt/data/web/excel/安全工作记录_" + comSwSafetyWorkRecordVO.getId() + |
| | |
| | | // 这里 需要指定写用哪个class去写 |
| | | ExcelWriter excelWriter = null; |
| | | InputStream inputStream = null; |
| | | File file0=new File("d:/patrolRecord/file"); |
| | | File file0=new File("/mnt/data/web/file"); |
| | | if(!file0.isDirectory()&&!file0.exists()){ |
| | | file0.mkdirs(); |
| | | } |
| | |
| | | if(!file0.isDirectory()&&!file0.exists()){ |
| | | file0.mkdirs(); |
| | | } |
| | | sftp.download("/mnt/data/web/excel/", "巡查记录.ftl", "d:/patrolRecord/file/巡查记录.ftl"); |
| | | sftp.download("/mnt/data/web/excel/", "blank.jpg", "d:/patrolRecord/file/blank.jpg"); |
| | | sftp.download("/mnt/data/web/excel/", "巡查记录.ftl", "/mnt/data/web/file/巡查记录.ftl"); |
| | | sftp.download("/mnt/data/web/excel/", "blank.jpg", "/mnt/data/web/file/blank.jpg"); |
| | | try { |
| | | // 日期 |
| | | if (comSwPatrolRecordVO.getPatrolTime() != null) { |
| | |
| | | if (photo.size() != 0 && null != photo) { |
| | | List<Object> list=new ArrayList<>(); |
| | | for (int i = 0; i < photo.size(); i++) { |
| | | downloadPicture(photo.get(i), comSwPatrolRecordVO.getId() + "_find_" + i, "d:/dangerReport/file/"); |
| | | list.add(getImageStr("d:/dangerReport/file/" + comSwPatrolRecordVO.getId() + "_find_" + i + ".jpg")); |
| | | downloadPicture(photo.get(i), comSwPatrolRecordVO.getId() + "_find_" + i, "/mnt/data/web/file/"); |
| | | list.add(getImageStr("/mnt/data/web/file/" + comSwPatrolRecordVO.getId() + "_find_" + i + ".jpg")); |
| | | } |
| | | dataMap.put("imgList",list); |
| | | } |
| | |
| | | // configuration.setClassForTemplateLoading(this.getClass(), ""); |
| | | |
| | | // 指定路径的第二种方式,我的路径是C:/a.ftl |
| | | configuration.setDirectoryForTemplateLoading(new File("d:/patrolRecord/file/")); |
| | | configuration.setDirectoryForTemplateLoading(new File("/mnt/data/web/file/")); |
| | | |
| | | // 输出文档路径及名称 |
| | | // File outFile = new File("mnt/data/web/excel/安全工作记录_" + comSwSafetyWorkRecordVO.getId() + |
| | |
| | | // 这里 需要指定写用哪个class去写 |
| | | ExcelWriter excelWriter = null; |
| | | InputStream inputStream = null; |
| | | File file0=new File("d:/dangerReport/file"); |
| | | File file0=new File("/mnt/data/web/file"); |
| | | if(!file0.isDirectory()&&!file0.exists()){ |
| | | file0.mkdirs(); |
| | | } |
| | |
| | | if(!file0.isDirectory()&&!file0.exists()){ |
| | | file0.mkdirs(); |
| | | } |
| | | sftp.download("/mnt/data/web/excel/", "隐患报告.ftl", "d:/dangerReport/file/隐患报告.ftl"); |
| | | sftp.download("/mnt/data/web/excel/", "blank.jpg", "d:/dangerReport/file/blank.jpg"); |
| | | sftp.download("/mnt/data/web/excel/", "隐患报告.ftl", "/mnt/data/web/file/隐患报告.ftl"); |
| | | sftp.download("/mnt/data/web/excel/", "blank.jpg", "/mnt/data/web/file/blank.jpg"); |
| | | try { |
| | | // 日期 |
| | | if (StringUtils.isNotEmpty(comSwDangerReportVO.getCheckTime())) { |
| | |
| | | if (photo1.size() != 0 && null != photo1) { |
| | | List<Object> list=new ArrayList<>(); |
| | | for (int i = 0; i < photo1.size(); i++) { |
| | | downloadPicture(photo1.get(i), comSwDangerReportVO.getId() + "_find_" + i, "d:/dangerReport/file/"); |
| | | list.add(getImageStr("d:/dangerReport/file/" + comSwDangerReportVO.getId() + "_find_" + i + ".jpg")); |
| | | downloadPicture(photo1.get(i), comSwDangerReportVO.getId() + "_step_" + i, "/mnt/data/web/file/"); |
| | | list.add(getImageStr("/mnt/data/web/file/" + comSwDangerReportVO.getId() + "_step_" + i + ".jpg")); |
| | | } |
| | | dataMap.put("imgList",list); |
| | | } |
| | |
| | | if (photo2.size() != 0 && null != photo2) { |
| | | List<Object> list=new ArrayList<>(); |
| | | for (int i = 0; i < photo2.size(); i++) { |
| | | downloadPicture(photo2.get(i), comSwDangerReportVO.getId() + "_find_" + i, "d:/dangerReport/file/"); |
| | | list.add(getImageStr("d:/dangerReport/file/" + comSwDangerReportVO.getId() + "_find_" + i + ".jpg")); |
| | | downloadPicture(photo2.get(i), comSwDangerReportVO.getId() + "_find_" + i, "/mnt/data/web/file/"); |
| | | list.add(getImageStr("/mnt/data/web/file/" + comSwDangerReportVO.getId() + "_find_" + i + ".jpg")); |
| | | } |
| | | dataMap.put("imgList2",list); |
| | | } |
| | |
| | | // configuration.setClassForTemplateLoading(this.getClass(), ""); |
| | | |
| | | // 指定路径的第二种方式,我的路径是C:/a.ftl |
| | | configuration.setDirectoryForTemplateLoading(new File("d:/dangerReport/file/")); |
| | | configuration.setDirectoryForTemplateLoading(new File("/mnt/data/web/file/")); |
| | | |
| | | // 输出文档路径及名称 |
| | | // File outFile = new File("mnt/data/web/excel/安全工作记录_" + comSwSafetyWorkRecordVO.getId() + |
New file |
| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.service.ComActPictureLibraryService; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * @title: ComActPictureLibraryApi |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 公共图库 |
| | | * @author: hans |
| | | * @date: 2021/11/23 16:54 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/picture/library") |
| | | public class ComActPictureLibraryApi { |
| | | |
| | | @Resource |
| | | private ComActPictureLibraryService comActPictureLibraryService; |
| | | |
| | | @GetMapping("/get") |
| | | @ApiOperation("获取预设图库") |
| | | public R getPresetPictureLibrary(@RequestParam("type") Integer type, @RequestParam("subtype") Integer subtype) { |
| | | return comActPictureLibraryService.getPresetPictureLibrary(type, subtype); |
| | | } |
| | | } |
| | |
| | | * @return 查询结果 |
| | | */ |
| | | @GetMapping("/rota/getRotaPersonByDate") |
| | | public R getRotaPersonByDate(@RequestParam(value = "rotaDate") String rotaDate) { |
| | | return comSwRotaService.getRotaPersonByDate(rotaDate); |
| | | public R getRotaPersonByDate(@RequestParam(value = "rotaDate") String rotaDate,@RequestParam("communityId")Long communityId) { |
| | | return comSwRotaService.getRotaPersonByDate(rotaDate,communityId); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return 查询结果 |
| | | */ |
| | | @GetMapping("/rota/getRotaLeaderByDate") |
| | | public R getRotaLeaderByDate(@RequestParam(value = "rotaDate") String rotaDate) { |
| | | return comSwRotaService.getRotaLeaderByDate(rotaDate); |
| | | public R getRotaLeaderByDate(@RequestParam(value = "rotaDate") String rotaDate,@RequestParam("communityId")Long communityId) { |
| | | return comSwRotaService.getRotaLeaderByDate(rotaDate,communityId); |
| | | } |
| | | |
| | | /** |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @title: ComActPictureLibraryDAO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 图库预设mapper |
| | | * @author: hans |
| | | * @date: 2021/11/23 17:05 |
| | | */ |
| | | @Mapper |
| | | public interface ComActPictureLibraryDAO { |
| | | |
| | | /** |
| | | * 获取预设图库 |
| | | * @param type |
| | | * @param subtype |
| | | * @return |
| | | */ |
| | | List<String> getPresetPictureLibrary(@Param("type") Integer type, @Param("subtype") Integer subtype); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.panzhihua.common.model.vos.R; |
| | | |
| | | /** |
| | | * @title: ComActPictureLibraryService |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 公共预设图库服务类 |
| | | * @author: hans |
| | | * @date: 2021/11/23 17:01 |
| | | */ |
| | | public interface ComActPictureLibraryService { |
| | | |
| | | /** |
| | | * 获取预设图库 |
| | | * @param type |
| | | * @param subtype |
| | | * @return |
| | | */ |
| | | R getPresetPictureLibrary(Integer type, Integer subtype); |
| | | } |
| | |
| | | * |
| | | * @return 查询结果 |
| | | */ |
| | | R getRotaPersonByDate(String rotaDate); |
| | | R getRotaPersonByDate(String rotaDate,Long communityId); |
| | | |
| | | /** |
| | | * 查询当天值班领导 |
| | | * |
| | | * @return 查询结果 |
| | | */ |
| | | R getRotaLeaderByDate(String rotaDate); |
| | | R getRotaLeaderByDate(String rotaDate,Long communityId); |
| | | |
| | | /** |
| | | * 选择人员 |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.vos.community.ComActPictureLibraryVO; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.dao.ComActPictureLibraryDAO; |
| | | import com.panzhihua.service_community.service.ComActPictureLibraryService; |
| | | |
| | | /** |
| | | * @title: ComActPictureLibraryServiceImpl |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 公共预设图库服务实现类 |
| | | * @author: hans |
| | | * @date: 2021/11/23 17:03 |
| | | */ |
| | | @Service |
| | | public class ComActPictureLibraryServiceImpl implements ComActPictureLibraryService { |
| | | |
| | | @Resource |
| | | private ComActPictureLibraryDAO comActPictureLibraryDAO; |
| | | |
| | | |
| | | /** |
| | | * 获取预设图库 |
| | | * @param type |
| | | * @param subtype |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R getPresetPictureLibrary(Integer type, Integer subtype) { |
| | | ComActPictureLibraryVO libraryVO = new ComActPictureLibraryVO(); |
| | | libraryVO.setPresetPictures(comActPictureLibraryDAO.getPresetPictureLibrary(type, subtype)); |
| | | return R.ok(libraryVO); |
| | | } |
| | | } |
| | |
| | | statisticsList.forEach(e -> { |
| | | String reserveSubContent = e.getReserveSubContent(); |
| | | String dateString = dateFormat.format(e.getCreateAt()); |
| | | if (reserveSubContent.contains("上午体温")) { |
| | | if (reserveSubContent.contains("今日上午体温(℃)")) { |
| | | int index = conditions.indexOf(dateString + " " + "上午体温"); |
| | | if (index == -1) { |
| | | conditions.append(dateString + " " + "上午体温:" + e.getAnswerContent() + "℃" + "\n"); |
| | |
| | | conditions.replace(index, conditions.indexOf("℃", index), |
| | | dateString + " " + "上午体温:" + e.getAnswerContent()); |
| | | } |
| | | } else if (reserveSubContent.contains("下午体温")) { |
| | | } else if (reserveSubContent.contains("今日下午体温(℃)")) { |
| | | int index = conditions.indexOf(dateString + " " + "下午体温"); |
| | | if (index == -1) { |
| | | conditions.append(dateString + " " + "下午体温:" + e.getAnswerContent() + "℃" + "\n"); |
| | |
| | | statisticsList.forEach(e -> { |
| | | String reserveSubContent = e.getReserveSubContent(); |
| | | String dateString = dateFormat.format(e.getCreateAt()); |
| | | if (reserveSubContent.contains("上午体温")) { |
| | | if (reserveSubContent.contains("今日上午体温(℃)")) { |
| | | int index = conditions.indexOf(dateString + " " + "上午体温"); |
| | | if (index == -1) { |
| | | conditions.append(dateString + " " + "上午体温:" + e.getAnswerContent() + "℃" + "\n"); |
| | |
| | | conditions.replace(index, conditions.indexOf("℃", index), |
| | | dateString + " " + "上午体温:" + e.getAnswerContent()); |
| | | } |
| | | } else if (reserveSubContent.contains("下午体温")) { |
| | | } else if (reserveSubContent.contains("今日下午体温(℃)")) { |
| | | int index = conditions.indexOf(dateString + " " + "下午体温"); |
| | | if (index == -1) { |
| | | conditions.append(dateString + " " + "下午体温:" + e.getAnswerContent() + "℃" + "\n"); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public R getRotaPersonByDate(String rotaDate) { |
| | | public R getRotaPersonByDate(String rotaDate,Long communityId) { |
| | | ComSwRotaDO comSwRotaDO = new ComSwRotaDO(); |
| | | try { |
| | | comSwRotaDO = comSwRotaDAO.selectOne(new QueryWrapper<ComSwRotaDO>().lambda().eq(ComSwRotaDO::getRotaDate, |
| | | new SimpleDateFormat("yyyy-MM-dd").parse(rotaDate))); |
| | | new SimpleDateFormat("yyyy-MM-dd").parse(rotaDate)).eq(ComSwRotaDO::getCommunityId,communityId)); |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public R getRotaLeaderByDate(String rotaDate) { |
| | | public R getRotaLeaderByDate(String rotaDate,Long communityId) { |
| | | ComSwRotaDO comSwRotaDO = new ComSwRotaDO(); |
| | | try { |
| | | comSwRotaDO = comSwRotaDAO.selectOne(new QueryWrapper<ComSwRotaDO>().lambda().eq(ComSwRotaDO::getRotaDate, |
| | | new SimpleDateFormat("yyyy-MM-dd").parse(rotaDate))); |
| | | new SimpleDateFormat("yyyy-MM-dd").parse(rotaDate)).eq(ComSwRotaDO::getCommunityId,communityId)); |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.panzhihua.service_community.dao.ComActPictureLibraryDAO"> |
| | | |
| | | <select id="getPresetPictureLibrary" resultType="java.lang.String"> |
| | | SELECT upload_picture FROM com_act_picture_library t1 |
| | | LEFT JOIN com_act_library_type t2 ON t1.library_type_id = t2.id |
| | | WHERE t2.type = #{type} AND t2.subtype = #{subtype} |
| | | </select> |
| | | </mapper> |
| | |
| | | |
| | | <select id="patrolRecordStatistics" resultType="com.panzhihua.common.model.vos.community.ComSwPatrolRecordStatisticsVO"> |
| | | select count(id) as patrolRecordTotal |
| | | ,(select count(id) from com_sw_patrol_record where community_id = #{communityId} and patrol_type LIKE concat('%','1','%')) as huoTotal |
| | | ,(select count(id) from com_sw_patrol_record where community_id = #{communityId} and patrol_type LIKE concat('%','2','%')) as xunTotal |
| | | ,(select count(id) from com_sw_patrol_record where community_id = #{communityId} and patrol_type LIKE concat('%','3','%')) as yiTotal |
| | | ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1 on t.id = t1.patrol_record_id INNER JOIN com_sw_safety_work_record t2 on t1.report_id = t2.id where t.community_id = #{communityId}) as safetyWorkTotal |
| | | ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1 on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where t.community_id = #{communityId}) as dangerTotal |
| | | ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1 on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where t.community_id = #{communityId} and status = '3') as handledDangerTotal |
| | | ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1 on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where t.community_id = #{communityId} and danger_type like CONCAT('%','1','%')) as huoDangerTotal |
| | | ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1 on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where t.community_id = #{communityId} and danger_type like CONCAT('%','2','%')) as xunDangerTotal |
| | | ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1 on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where t.community_id = #{communityId} and danger_type like CONCAT('%','3','%')) as yiDangerTotal |
| | | ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1 on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where t.community_id = #{communityId} and danger_type like CONCAT('%','1','%') and status = '3' ) as huoHandledDangerTotal |
| | | ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1 on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where t.community_id = #{communityId} and danger_type like CONCAT('%','1','%') and status in ('1','2')) as huoHandlingDangerTotal |
| | | ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1 on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where t.community_id = #{communityId} and danger_type like CONCAT('%','2','%') and status = '3' ) as xunHandledDangerTotal |
| | | ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1 on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where t.community_id = #{communityId} and danger_type like CONCAT('%','2','%') and status in ('1','2')) as xunHandlingDangerTotal |
| | | ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1 on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where t.community_id = #{communityId} and danger_type like CONCAT('%','3','%') and status = '3' ) as yiHandledDangerTotal |
| | | ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1 on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where t.community_id = #{communityId} and danger_type like CONCAT('%','3','%') and status in ('1','2')) as yiHandlingDangerTotal |
| | | from com_sw_patrol_record as cmp where community_id = #{communityId} |
| | | ,(select count(id) from com_sw_patrol_record where 1=1 <if test="communityId !=null and communityId !=0"> and community_id = #{communityId} </if> and patrol_type LIKE concat('%','1','%')) as huoTotal |
| | | ,(select count(id) from com_sw_patrol_record where 1=1 <if test="communityId !=null and communityId !=0"> and community_id = #{communityId} </if> and patrol_type LIKE concat('%','2','%')) as xunTotal |
| | | ,(select count(id) from com_sw_patrol_record where 1=1 <if test="communityId !=null and communityId !=0"> and community_id = #{communityId} </if> and patrol_type LIKE concat('%','3','%')) as yiTotal |
| | | ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1 on t.id = t1.patrol_record_id INNER JOIN com_sw_safety_work_record t2 on t1.report_id = t2.id where 1=1 <if test="communityId !=null and communityId !=0"> and t.community_id = #{communityId} </if>) as safetyWorkTotal |
| | | ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1 on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where 1=1 <if test="communityId !=null and communityId !=0"> and t.community_id = #{communityId} </if>) as dangerTotal |
| | | ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1 on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where 1=1 <if test="communityId !=null and communityId !=0"> and t.community_id = #{communityId} </if> and status = '3') as handledDangerTotal |
| | | ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1 on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where 1=1 <if test="communityId !=null and communityId !=0"> and t.community_id = #{communityId} </if> and danger_type like CONCAT('%','1','%')) as huoDangerTotal |
| | | ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1 on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where 1=1 <if test="communityId !=null and communityId !=0"> and t.community_id = #{communityId} </if> and danger_type like CONCAT('%','2','%')) as xunDangerTotal |
| | | ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1 on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where 1=1 <if test="communityId !=null and communityId !=0"> and t.community_id = #{communityId} </if> and danger_type like CONCAT('%','3','%')) as yiDangerTotal |
| | | ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1 on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where 1=1 <if test="communityId !=null and communityId !=0"> and t.community_id = #{communityId} </if> and danger_type like CONCAT('%','1','%') and status = '3' ) as huoHandledDangerTotal |
| | | ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1 on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where 1=1 <if test="communityId !=null and communityId !=0"> and t.community_id = #{communityId} </if> and danger_type like CONCAT('%','1','%') and status in ('1','2')) as huoHandlingDangerTotal |
| | | ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1 on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where 1=1 <if test="communityId !=null and communityId !=0"> and t.community_id = #{communityId} </if> and danger_type like CONCAT('%','2','%') and status = '3' ) as xunHandledDangerTotal |
| | | ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1 on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where 1=1 <if test="communityId !=null and communityId !=0"> and t.community_id = #{communityId} </if> and danger_type like CONCAT('%','2','%') and status in ('1','2')) as xunHandlingDangerTotal |
| | | ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1 on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where 1=1 <if test="communityId !=null and communityId !=0"> and t.community_id = #{communityId} </if> and danger_type like CONCAT('%','3','%') and status = '3' ) as yiHandledDangerTotal |
| | | ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1 on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where 1=1 <if test="communityId !=null and communityId !=0"> and t.community_id = #{communityId} </if> and danger_type like CONCAT('%','3','%') and status in ('1','2')) as yiHandlingDangerTotal |
| | | from com_sw_patrol_record as cmp where 1=1 <if test="communityId !=null and communityId !=0"> and community_id = #{communityId} </if> |
| | | </select> |
| | | |
| | | </mapper> |