Merge remote-tracking branch 'origin/test' into test
| | |
| | | |
| | | @ApiOperation("详情") |
| | | @GetMapping("/detail") |
| | | public R detail(@RequestParam("id") Long id,@RequestParam("recordId") Long recordId){ |
| | | return communityService.reserveDetail(id,this.getUserId(),recordId); |
| | | public R detail(@RequestParam("id") Long id,@RequestParam("recordId") Long recordId,@RequestParam("isBack") Integer isBack){ |
| | | return communityService.reserveDetail(id,this.getUserId(),recordId,isBack); |
| | | } |
| | | |
| | | @ApiOperation("用户提交数据") |
| | |
| | | @ExcelProperty(value = "电话", index = 4) |
| | | private String phone; |
| | | |
| | | @ExcelProperty(value = "签到时间", index = 0) |
| | | @ExcelProperty(value = "签到时间(未签到就是报名时间)", index = 0) |
| | | private Date createAt; |
| | | |
| | | @ExcelProperty(value = "人群标签", index = 3) |
| | |
| | | @ExcelProperty("发生地点") |
| | | private String happenAddr; |
| | | @ExcelProperty("事件类型") |
| | | private String photoType = "其他"; |
| | | private String photoType; |
| | | @ExcelProperty("联系电话") |
| | | private String phone; |
| | | @ExcelProperty("处理人名字") |
| | | private String handlerName; |
| | | @ExcelProperty("创建时间") |
| | | private Date createAt; |
| | | } |
| | |
| | | R easyPhotoNoHandleList(@RequestParam("communityId") Long communityId); |
| | | |
| | | @GetMapping("/reserve/detail") |
| | | R reserveDetail(@RequestParam("id") Long id,@RequestParam("userId") Long userId,@RequestParam("recordId") Long recordId); |
| | | R reserveDetail(@RequestParam("id") Long id,@RequestParam("userId") Long userId,@RequestParam("recordId") Long recordId,@RequestParam("isBack") Integer isBack); |
| | | |
| | | @PostMapping("/reserve/commit") |
| | | R reserveCommit(@RequestBody ComActReserveCommitVO comActReserveCommitVO); |
| | |
| | | String name = "安全工作记录_" + comSwSafetyWorkRecordVO.getId() + ".doc"; |
| | | boolean existDir = sftp.isExistDir(ftpUrl + name); |
| | | if (!existDir) { |
| | | String fileName = property + File.separator + name; |
| | | // 这里 需要指定写用哪个class去写 |
| | | ExcelWriter excelWriter = null; |
| | | InputStream inputStream = null; |
| | |
| | | sftp.download("/mnt/data/web/", "blank.jpg", "d:/safetyWork/file/blank.jpg"); |
| | | try { |
| | | // 日期 |
| | | dataMap.put("date", |
| | | new SimpleDateFormat("yyyy-MM-dd").format(comSwSafetyWorkRecordVO.getPatrolTime())); |
| | | if (comSwSafetyWorkRecordVO.getPatrolTime() != null) { |
| | | dataMap.put("date", |
| | | new SimpleDateFormat("yyyy-MM-dd").format(comSwSafetyWorkRecordVO.getPatrolTime())); |
| | | }else { |
| | | dataMap.put("date", ""); |
| | | } |
| | | // 巡查类型 |
| | | dataMap.put("patrolType", comSwSafetyWorkRecordVO.getPatrolType()); |
| | | // 社区名称 |
| | |
| | | dataMap.put("remark", ""); |
| | | } |
| | | // 巡查时间 |
| | | dataMap.put("patrolTime", |
| | | new SimpleDateFormat("yyyy-MM-dd").format(comSwSafetyWorkRecordVO.getPatrolTime())); |
| | | if (comSwSafetyWorkRecordVO.getPatrolTime() != null) { |
| | | dataMap.put("patrolTime", |
| | | new SimpleDateFormat("yyyy-MM-dd").format(comSwSafetyWorkRecordVO.getPatrolTime())); |
| | | }else { |
| | | dataMap.put("patrolTime", ""); |
| | | } |
| | | // 工作人员 |
| | | if (StringUtils.isNotEmpty(comSwSafetyWorkRecordVO.getPersonName())) { |
| | | dataMap.put("personName", comSwSafetyWorkRecordVO.getPersonName()); |
| | |
| | | } |
| | | // 填报时间 |
| | | dataMap.put("createAt", |
| | | new SimpleDateFormat("yyyy-MM-dd").format(comSwSafetyWorkRecordVO.getCreateAt())); |
| | | new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(comSwSafetyWorkRecordVO.getCreateAt())); |
| | | // 获取请求url |
| | | String url = Constants.G_D_WEATHER_URL; |
| | | // 获取请求参数 |
| | |
| | | sftp.download("/mnt/data/web/", "blank.jpg", "d:/patrolRecord/file/blank.jpg"); |
| | | try { |
| | | // 日期 |
| | | dataMap.put("date", |
| | | new SimpleDateFormat("yyyy-MM-dd").format(comSwPatrolRecordVO.getPatrolTime())); |
| | | if (comSwPatrolRecordVO.getPatrolTime() != null) { |
| | | dataMap.put("date", |
| | | new SimpleDateFormat("yyyy-MM-dd").format(comSwPatrolRecordVO.getPatrolTime())); |
| | | }else { |
| | | dataMap.put("date", ""); |
| | | } |
| | | // 巡查类型 |
| | | if (StringUtils.isNotEmpty(comSwPatrolRecordVO.getPatrolType())) { |
| | | dataMap.put("patrolType", comSwPatrolRecordVO.getPatrolType()); |
| | |
| | | dataMap.put("personName", ""); |
| | | } |
| | | // 接班时间 |
| | | dataMap.put("successionTime", |
| | | new SimpleDateFormat("yyyy-MM-dd").format(comSwPatrolRecordVO.getSuccessionTime())); |
| | | if (comSwPatrolRecordVO.getSuccessionTime() != null) { |
| | | dataMap.put("successionTime", |
| | | new SimpleDateFormat("yyyy-MM-dd").format(comSwPatrolRecordVO.getSuccessionTime())); |
| | | }else { |
| | | dataMap.put("successionTime", ""); |
| | | } |
| | | // 接班人员 |
| | | if (StringUtils.isNotEmpty(comSwPatrolRecordVO.getSuccessionPerson())) { |
| | | dataMap.put("successionPerson", comSwPatrolRecordVO.getSuccessionPerson()); |
| | |
| | | } |
| | | // 填报时间 |
| | | dataMap.put("createAt", |
| | | new SimpleDateFormat("yyyy-MM-dd").format(comSwPatrolRecordVO.getCreateAt())); |
| | | new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(comSwPatrolRecordVO.getCreateAt())); |
| | | // 获取请求url |
| | | String url = Constants.G_D_WEATHER_URL; |
| | | // 获取请求参数 |
| | |
| | | sftp.download("/mnt/data/web/", "blank.jpg", "d:/dangerReport/file/blank.jpg"); |
| | | try { |
| | | // 日期 |
| | | dataMap.put("date", comSwDangerReportVO.getCheckTime()); |
| | | if (StringUtils.isNotEmpty(comSwDangerReportVO.getCheckTime())) { |
| | | dataMap.put("date", comSwDangerReportVO.getCheckTime()); |
| | | } else { |
| | | dataMap.put("date", ""); |
| | | } |
| | | // 巡查类型 |
| | | dataMap.put("patrolType", comSwDangerReportVO.getPatrolType()); |
| | | if (StringUtils.isNotEmpty(comSwDangerReportVO.getPatrolType())) { |
| | | dataMap.put("patrolType", comSwDangerReportVO.getPatrolType()); |
| | | }else { |
| | | dataMap.put("patrolType", ""); |
| | | } |
| | | // 地址 |
| | | if (StringUtils.isNotEmpty(comSwDangerReportVO.getAddress())) { |
| | | dataMap.put("address", comSwDangerReportVO.getAddress()); |
| | |
| | | } |
| | | // 填报时间 |
| | | dataMap.put("createAt", |
| | | new SimpleDateFormat("yyyy-MM-dd").format(comSwDangerReportVO.getCreateAt())); |
| | | new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(comSwDangerReportVO.getCreateAt())); |
| | | // 隐患编号 |
| | | dataMap.put("dangerNo", comSwDangerReportVO.getDangerNo()); |
| | | // 主体部门、单位或个人全称 |
| | |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "社区活动查询历史封面") |
| | | @ApiOperation(value = "社区活动查询历史封面", response = ComActActPictureVO.class) |
| | | @GetMapping("picture/getList") |
| | | public R getPictureList() { |
| | | Long userId = this.getLoginUserInfo().getUserId(); |
| | | return communityService.getPictureList(userId); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询当前社区标签列表") |
| | | @GetMapping("userTags/getList") |
| | | public R getUserTagsList() { |
| | | Long communityId = this.getLoginUserInfo().getCommunityId(); |
| | | return userService.listTags(communityId); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增社区动态") |
| | | @PostMapping("dynamic") |
| | | public R addDynamic(@RequestBody ComActDynVO comActDynVO) { |
| | |
| | | try { |
| | | SFTPUtil sftp = new SFTPUtil(userName, password, host, port); |
| | | sftp.login(); |
| | | boolean existDir = sftp.isExistDir(ftpUrl + name); |
| | | boolean existDir = sftp.isExistDir(ftpUrl + _name); |
| | | if (!existDir) { |
| | | String property = System.getProperty("user.dir"); |
| | | String fileName = property + File.separator + name; |
| | | String fileName = property + File.separator + _name; |
| | | // 这里 需要指定写用哪个class去写 |
| | | ExcelWriter excelWriter = null; |
| | | InputStream inputStream = null; |
| | |
| | | excelWriter.finish(); |
| | | File file = new File(fileName); |
| | | inputStream = new FileInputStream(file); |
| | | sftp.uploadMore(ftpUrl, name, inputStream); |
| | | sftp.uploadMore(ftpUrl, _name, inputStream); |
| | | sftp.logout(); |
| | | inputStream.close(); |
| | | String absolutePath = file.getAbsolutePath(); |
| | |
| | | } |
| | | } |
| | | } |
| | | return R.ok(url + name); |
| | | return R.ok(url + _name); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("文件传输失败【{}】", e.getMessage()); |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/detail") |
| | | public R detail(@RequestParam("id") Long id,@RequestParam("userId") Long userId,@RequestParam("recordId") Long recordId){ |
| | | public R detail(@RequestParam("id") Long id,@RequestParam("userId") Long userId,@RequestParam("recordId") Long recordId,@RequestParam("isBack") Integer isBack){ |
| | | if(id!=null){ |
| | | return comActReserveService.getById(id,userId,recordId); |
| | | return comActReserveService.getById(id,userId,recordId,isBack); |
| | | } |
| | | return R.fail(); |
| | | } |
| | |
| | | IPage<ComActActRegistVO> pageActivityRegists(Page page, @Param("comActActRegistVO") ComActActRegistVO comActActRegistVO); |
| | | |
| | | List<ComActActRegistExcelVO> getRegistLists(@Param("comActActRegistVO") ComActActRegistVO comActActRegistVO); |
| | | |
| | | List<ComActActRegistExcelVO> getNoRegistLists(@Param("comActActRegistVO") ComActActRegistVO comActActRegistVO); |
| | | } |
| | |
| | | * @param id |
| | | * @return |
| | | */ |
| | | R getById(Long id,Long userId,Long recordId); |
| | | R getById(Long id,Long userId,Long recordId,Integer isBack); |
| | | |
| | | } |
| | |
| | | |
| | | @Override |
| | | public R getNoRegistLists(ComActActRegistVO comActActRegistVO) { |
| | | return null; |
| | | return R.ok(comActActRegistDAO.getNoRegistLists(comActActRegistVO)); |
| | | } |
| | | |
| | | @Override |
| | |
| | | cmActEasyPhotoDO.setFeedbackAt(nowDate); |
| | | cmActEasyPhotoDO.setStatus(ComActEasyPhotoDO.status.ywc); |
| | | cmActEasyPhotoDO.setCompleteId(comActEasyPhotoVO.getUserId()); |
| | | if(comActEasyPhotoVO.getUrbanStatus()!=null&&comActEasyPhotoVO.getUrbanStatus()==2){ |
| | | cmActEasyPhotoDO.setUrbanStatus(2); |
| | | } |
| | | break; |
| | | default: |
| | | break; |
| | |
| | | ComActReserveDO comActReserveDO=comActReserveMapper.selectById(comActReserveCommitVO.getId()); |
| | | if(comActReserveDO!=null){ |
| | | //查询当前用户是否已预约并判断是否能继续预约 |
| | | if(comActReserveDO.getJoinAllCount()!=0){ |
| | | Integer count=comActReserveRecordMapper.selectCount(new QueryWrapper<ComActReserveRecordDO>().eq("reserve_id",comActReserveCommitVO.getId())); |
| | | if(count>=comActReserveDO.getJoinCount()){ |
| | | return R.fail("预约已上限"); |
| | | } |
| | | } |
| | | |
| | | |
| | | List<ComActReserveRecordDO> list=comActReserveRecordMapper.selectList(new QueryWrapper<ComActReserveRecordDO>().eq("reserve_id",comActReserveCommitVO.getId()).eq("user_id",comActReserveCommitVO.getUserId()).in("status",1,2,3)); |
| | | if(!list.isEmpty()&&list.size()>1&&comActReserveDO.getIsRepeat()==ComActReserveDO.isRepeat.no){ |
| | | return R.fail("提交失败,不可重复预约"); |
| | |
| | | comActReserveMapper.updateById(comActReserveDO); |
| | | //新增用户答题记录 |
| | | ComActReserveRecordDO userAnswerDO = new ComActReserveRecordDO(); |
| | | userAnswerDO.setCommunityId(comActReserveCommitVO.getCommunityId()); |
| | | userAnswerDO.setPhone(comActReserveCommitVO.getPhone()); |
| | | userAnswerDO.setReserveId(questId); |
| | | userAnswerDO.setReserveTime(comActReserveCommitVO.getReserveTime()); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public R getById(Long id,Long userId,Long recordId) { |
| | | public R getById(Long id,Long userId,Long recordId,Integer isBack) { |
| | | ComActReserveDO comActReserveDO=comActReserveMapper.selectById(id); |
| | | if(comActReserveDO!=null){ |
| | | ComActReserveDetailVO comActReserveDetailVO=new ComActReserveDetailVO(); |
| | | BeanUtils.copyProperties(comActReserveDO,comActReserveDetailVO); |
| | | List<ComActReserveRecordDO> list=comActReserveRecordMapper.selectList(new QueryWrapper<ComActReserveRecordDO>().eq("user_id",userId).eq("reserve_id",id).in("status",1,2).orderByDesc("reserve_time")); |
| | | List<ComActReserveRecordDO> secondlist=comActReserveRecordMapper.selectList(new QueryWrapper<ComActReserveRecordDO>().eq("user_id",userId).eq("reserve_id",id).orderByDesc("reserve_time")); |
| | | //判断当前数据是否可重复提交 |
| | | if(comActReserveDO.getIsRepeat()==ComActReserveDetailVO.isOk.y||list.isEmpty()){ |
| | | comActReserveDetailVO.setIsOk(ComActReserveDetailVO.isOk.n); |
| | | }else { |
| | | comActReserveDetailVO.setIsOk(ComActReserveDetailVO.isOk.y); |
| | | if(isBack!=1){ |
| | | BeanUtils.copyProperties(comActReserveDO,comActReserveDetailVO); |
| | | List<ComActReserveRecordDO> list=comActReserveRecordMapper.selectList(new QueryWrapper<ComActReserveRecordDO>().eq("user_id",userId).eq("reserve_id",id).in("status",1,2).orderByDesc("reserve_time")); |
| | | List<ComActReserveRecordDO> secondlist=comActReserveRecordMapper.selectList(new QueryWrapper<ComActReserveRecordDO>().eq("user_id",userId).eq("reserve_id",id).orderByDesc("reserve_time")); |
| | | //判断当前数据是否可重复提交 |
| | | if(comActReserveDO.getIsRepeat()==ComActReserveDetailVO.isOk.y||list.isEmpty()){ |
| | | comActReserveDetailVO.setIsOk(ComActReserveDetailVO.isOk.n); |
| | | }else { |
| | | comActReserveDetailVO.setIsOk(ComActReserveDetailVO.isOk.y); |
| | | } |
| | | //如果用户已提交返回最新一条记录 列表时间倒序排列 |
| | | if(!list.isEmpty()){ |
| | | comActReserveDetailVO.setJsonObject(list.get(0).getJsonObject()); |
| | | comActReserveDetailVO.setReserveTime(list.get(0).getReserveTime()); |
| | | } |
| | | if(!secondlist.isEmpty()&&recordId!=null){ |
| | | secondlist.forEach(comActReserveRecordDO -> { |
| | | if(comActReserveRecordDO.getId().equals(recordId)){ |
| | | comActReserveDetailVO.setRecordStatus(comActReserveRecordDO.getStatus()); |
| | | } |
| | | }); |
| | | } |
| | | return R.ok(comActReserveDetailVO); |
| | | } |
| | | //如果用户已提交返回最新一条记录 列表时间倒序排列 |
| | | if(!list.isEmpty()){ |
| | | comActReserveDetailVO.setJsonObject(list.get(0).getJsonObject()); |
| | | comActReserveDetailVO.setReserveTime(list.get(0).getReserveTime()); |
| | | } |
| | | if(!secondlist.isEmpty()&&recordId!=null){ |
| | | secondlist.forEach(comActReserveRecordDO -> { |
| | | if(comActReserveRecordDO.getId().equals(recordId)){ |
| | | comActReserveDetailVO.setRecordStatus(comActReserveRecordDO.getStatus()); |
| | | } |
| | | }); |
| | | ComActReserveRecordDO comActReserveRecordDO =comActReserveRecordMapper.selectById(recordId); |
| | | if(comActReserveRecordDO!=null){ |
| | | BeanUtils.copyProperties(comActReserveRecordDO,comActReserveDetailVO); |
| | | } |
| | | return R.ok(comActReserveDetailVO); |
| | | } |
| | |
| | | comSwPatrolRecordDO.setId(patrolRecordId); |
| | | if(StringUtils.isEmpty(comSwPatrolRecordAddDTO.getPatrolTime())){ |
| | | comSwPatrolRecordDO.setPatrolTime(new Date()); |
| | | }else { |
| | | comSwPatrolRecordDO.setPatrolTime( |
| | | DateUtils.stringToDate(comSwPatrolRecordAddDTO.getPatrolTime(), DateUtils.yyyyMMdd_format)); |
| | | } |
| | | // comSwPatrolRecordDO.setPatrolTime(new Date()); |
| | | comSwPatrolRecordDO.setSuccessionTime( |
| | |
| | | </if> |
| | | order by caar.create_at desc |
| | | </select> |
| | | |
| | | <select id="getNoRegistLists" resultType="com.panzhihua.common.model.vos.community.ComActActRegistExcelVO"> |
| | | SELECT |
| | | caas.create_at, |
| | | su.`name` |
| | | su.phone, |
| | | su.tags, |
| | | CASE |
| | | |
| | | WHEN su.is_partymember = 1 THEN |
| | | '党员' |
| | | WHEN caas.is_volunteer = 1 THEN |
| | | '志愿者' ELSE '居民' |
| | | END identity |
| | | FROM |
| | | `com_act_act_sign` caas |
| | | LEFT JOIN sys_user su ON caas.user_id = su.user_id |
| | | WHERE NOT EXISTS ( SELECT 1 FROM com_act_act_regist caar WHERE caas.user_id = caar.user_id ) |
| | | AND caas.activity_id = #{comActActRegistVO.activityId} |
| | | <if test="comActActRegistVO.phone != null and comActActRegistVO.phone !=''"> |
| | | AND su.phone = #{comActActRegistVO.phone} |
| | | </if> |
| | | <if test="comActActRegistVO.name != null and comActActRegistVO.name !=''"> |
| | | AND su.`name` = #{comActActRegistVO.name} |
| | | </if> |
| | | <if test="comActActRegistVO.tags != null and comActActRegistVO.tags !=''"> |
| | | AND su.tags like ('%', #{comActActRegistVO.tags}, '%') |
| | | </if> |
| | | <if test="comActActRegistVO.createAt != null"> |
| | | AND caar.create_at = #{comActActRegistVO.createAt} |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | AND (u.`name` like concat(#{comActEasyPhotoVO.keyWord},'%') or |
| | | p.happen_addr like concat(#{comActEasyPhotoVO.keyWord},'%') or |
| | | su.`name` like concat(#{comActEasyPhotoVO.keyWord},'%') or |
| | | p.detail like concat(#{comActEasyPhotoVO.keyWord},'%') |
| | | p.detail like concat(#{comActEasyPhotoVO.keyWord},'%') or u.phone like concat(#{comActEasyPhotoVO.keyWord},'%') |
| | | ) |
| | | </if> |
| | | GROUP BY |
| | |
| | | p.examine_at, |
| | | c.name communityName, |
| | | p.is_report_urban, |
| | | p.urban_status |
| | | p.urban_status, |
| | | ca.`name` as photoType |
| | | FROM |
| | | com_act_easy_photo p |
| | | LEFT JOIN sys_user u ON p.sponsor_id = u.user_id |
| | | LEFT JOIN com_act_easy_photo_user pu ON p.id = pu.easy_photo_id |
| | | LEFT JOIN sys_user su ON p.handler_id = su.user_id |
| | | left join com_act c on p.community_id =c.community_id |
| | | left join com_act_easy_photo_classify ca on ca.id = p.classify_id |
| | | WHERE |
| | | p.del_tag = 0 and p.`is_report_urban` =1 |
| | | <if test='communityId != null and communityId != 0'> |
| | |
| | | AND (u.`name` like concat(#{keyWord},'%') or |
| | | p.happen_addr like concat(#{keyWord},'%') or |
| | | su.`name` like concat(#{keyWord},'%') or |
| | | p.detail like concat(#{keyWord},'%') |
| | | p.detail like concat(#{keyWord},'%') or u.phone like concat(#{comActEasyPhotoVO.keyWord},'%') |
| | | ) |
| | | </if> |
| | | GROUP BY |
| | |
| | | p.examine_at, |
| | | c.name communityName, |
| | | p.is_report_urban, |
| | | p.urban_status |
| | | p.urban_status, |
| | | ca.`name` as photoType |
| | | FROM |
| | | com_act_easy_photo p |
| | | LEFT JOIN sys_user u ON p.sponsor_id = u.user_id |
| | | LEFT JOIN com_act_easy_photo_user pu ON p.id = pu.easy_photo_id |
| | | LEFT JOIN sys_user su ON p.handler_id = su.user_id |
| | | left join com_act c on p.community_id =c.community_id |
| | | left join com_act_easy_photo_classify ca on ca.id = p.classify_id |
| | | WHERE |
| | | p.id in |
| | | <foreach collection="list" item="ids" index="index" |