Merge branch 'zhaozhengjie1104' into test
# Conflicts:
# springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActColumnVO.java
# springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActDynVO.java
# springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/partybuilding/PartyBuildingComPbDynVO.java
# springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
# springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/AssemblyUtils.java
# springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComActColumnApi.java
# springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComActColumn.java
# springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActDynDO.java
# springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActAnnouncementMapper.xml
# springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActColumnMapper.xml
# springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActEasyPhotoDOMapper.xml
# springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/model/dos/ComPbDynDO.java
| | |
| | | required = true) @RequestParam(value = "provinceAdcode") Integer provinceAdcode) { |
| | | return communityService.getCityTreeByProvinceCode(provinceAdcode); |
| | | } |
| | | @ApiOperation(value = "社区详情", response = ComActVO.class) |
| | | @GetMapping("community") |
| | | public R detailCommunity() { |
| | | return communityService.detailCommunity(this.getCommunityId()); |
| | | } |
| | | } |
| | |
| | | @ApiModelProperty(value = "分类类型 1服务类型分类 2技能分类 3通知公告") |
| | | private Integer type; |
| | | |
| | | private Long communityId; |
| | | |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "社区动态跳转链接") |
| | | private String jumpUrl; |
| | | |
| | | @ApiModelProperty("跳转状态") |
| | | private Integer jumpType; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty("跳转链接") |
| | | private String jumpUrl; |
| | | |
| | | @ApiModelProperty("跳转状态") |
| | | private Integer jumpType; |
| | | } |
| | |
| | | * 用户参加的所有社区活动 |
| | | * |
| | | * @param userId 用户id |
| | | * @param status |
| | | * @return 活动列表 |
| | | */ |
| | | @PostMapping("listactivity") |
| | | R listActivity(@RequestParam("userId") Long userId, |
| | | @RequestParam(value = "status", required = false) Integer status); |
| | | R listActivity(@RequestParam("userId") Long userId); |
| | | |
| | | /** |
| | | * 用户确认心愿 |
| | |
| | | */ |
| | | @PostMapping("/village/grid/list") |
| | | R getGridVillageList(@RequestBody ComMngVillageListAppDTO villageListAppDTO); |
| | | |
| | | /** |
| | | * 综治app-小区列表 |
| | | * @param villageListAppDTO 请求参数 |
| | | * @return 小区列表 |
| | | */ |
| | | @PostMapping("/village/grid/list/app") |
| | | R getGridVillageListApp(@RequestBody ComMngVillageListAppDTO villageListAppDTO); |
| | | |
| | | /** |
| | | * 综治app-根据小区id查询小区下楼栋列表 |
| | |
| | | import com.panzhihua.common.model.vos.community.ComActQuestnaireAnswerContentVO; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import javax.imageio.ImageIO; |
| | | import javax.xml.bind.DatatypeConverter; |
| | | import java.io.ByteArrayInputStream; |
| | | import java.awt.image.BufferedImage; |
| | | import java.io.*; |
| | | import java.net.URL; |
| | | import java.nio.file.Files; |
| | | import java.util.ArrayList; |
| | | import java.util.Base64; |
| | | import java.util.List; |
| | | import java.util.UUID; |
| | | |
| | | /** |
| | | * @author lyq |
| | |
| | | if(userAnswers.getOptionType().equals(12)){ |
| | | reserveSubId = userAnswers.getReserveSubId(); |
| | | try { |
| | | userData.add(new ByteArrayInputStream(DatatypeConverter.parseBase64Binary(userAnswers.getAnswerContent().substring(userAnswers.getAnswerContent().indexOf(",")+ 1)))); |
| | | userData.add(DatatypeConverter.parseBase64Binary(userAnswers.getAnswerContent().substring(userAnswers.getAnswerContent().indexOf(",") + 1))); |
| | | }catch (Exception e){ |
| | | userData.add(" "); |
| | | log.error("导出转换图片失败!"); |
| | |
| | | if(userAnswers.getOptionType().equals(12)){ |
| | | reserveSubId = userAnswers.getReserveSubId(); |
| | | try { |
| | | userData.add(new ByteArrayInputStream(DatatypeConverter.parseBase64Binary(userAnswers.getAnswerContent().substring(userAnswers.getAnswerContent().indexOf(",")+ 1)))); |
| | | //userData.add(new URL("http://image.panzhihua.nhys.cdnhxx.com//idcard/967dbdef3ef3465a9169fbea204f9aa7.jpg")); |
| | | userData.add(DatatypeConverter.parseBase64Binary(userAnswers.getAnswerContent().substring(userAnswers.getAnswerContent().indexOf(",") + 1))); |
| | | }catch (Exception e){ |
| | | userData.add(" "); |
| | | log.error("导出转换图片失败!"); |
| | |
| | | @ApiOperation(value = "分页查询所有数据",response = ComActColumnVO.class) |
| | | @PostMapping("queryAll") |
| | | public R selectAll(@RequestBody CommonPage commonPage) { |
| | | commonPage.setCommunityId(this.getCommunityId()); |
| | | return this.communityService.comActColumnSelectAll(commonPage); |
| | | } |
| | | |
| | |
| | | @ApiOperation("新增数据") |
| | | @PostMapping |
| | | public R insert(@RequestBody ComActColumnVO comActColumnVO) { |
| | | comActColumnVO.setCommunityId(this.getCommunityId()); |
| | | comActColumnVO.setStatus(1); |
| | | comActColumnVO.setCreateTime(new Date()); |
| | | if(StringUtils.isNotEmpty(this.getLoginUserInfo().getName())){ |
| | |
| | | HorizontalCellStyleStrategy horizontalCellStyleStrategy = |
| | | new HorizontalCellStyleStrategy(headWriteCellStyle, contentWriteCellStyle); |
| | | |
| | | excelWriter = EasyExcel.write(fileName, ComMngPopulationExcelVo.class) |
| | | |
| | | excelWriter = EasyExcel.write(fileName) |
| | | .registerWriteHandler(horizontalCellStyleStrategy).registerWriteHandler(new Custemhandler()) |
| | | .registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet("登记明细导出数据").head(headList).build(); |
| | |
| | | @Mapper |
| | | public interface ComActDynDAO extends BaseMapper<ComActDynDO> { |
| | | @Select("<script> " + "SELECT " + "d.id, " + "d.title, " + "COUNT(u.id)readNum, " + "d.`status`, " |
| | | + "d.`content`, " + "d.`cover`, " + "d.`type`, " + "d.`cover_mode`, " + "d.is_topping, " + "d.publish_at, " |
| | | + "d.`content`, " + "d.`cover`, " + "d.`type`, " + "d.`cover_mode`, d.jump_url,d.jump_type, " + "d.is_topping, " + "d.publish_at, " |
| | | + "d.create_at, " + "cadt.`name` as typeName, " + "cadt.color as typeColor, " + "ca.name as communityName " |
| | | + "FROM " + "com_act_dyn d " + "LEFT JOIN com_act_dyn_user u ON d.id = u.dyn_id " |
| | | + "LEFT JOIN com_act_dyn_type as cadt ON cadt.id = d.type " |
| | |
| | | @ApiModelProperty(value = "描述") |
| | | private String description; |
| | | |
| | | |
| | | private Long communityId; |
| | | |
| | | } |
| | |
| | | * 跳转链接 |
| | | */ |
| | | private String jumpUrl; |
| | | |
| | | /** |
| | | * 跳转状态 |
| | | */ |
| | | private Integer jumpType; |
| | | } |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.BufferedOutputStream; |
| | | import java.io.File; |
| | | import java.io.FileOutputStream; |
| | | import java.io.IOException; |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.util.ArrayList; |
| | |
| | | public R reserveListApplets(Long communityId){ |
| | | return R.ok(this.baseMapper.getReserveIndexList(communityId)); |
| | | } |
| | | |
| | | |
| | | public static void getFileByBytes(byte[] bytes, String filePath, String fileName) { |
| | | BufferedOutputStream bos = null; |
| | | FileOutputStream fos = null; |
| | | File file = null; |
| | | try { |
| | | File dir = new File(filePath); |
| | | if (!dir.exists()) {// 判断文件目录是否存在 |
| | | dir.mkdirs(); |
| | | } |
| | | file = new File(filePath + fileName); |
| | | fos = new FileOutputStream(file); |
| | | bos = new BufferedOutputStream(fos); |
| | | bos.write(bytes); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } finally { |
| | | if (bos != null) { |
| | | try { |
| | | bos.close(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | if (fos != null) { |
| | | try { |
| | | fos.close(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | <if test="commonPage.paramId!=null"> |
| | | and t.column_id =#{commonPage.paramId} |
| | | </if> |
| | | <if test="commonPage.keyword!=null"> |
| | | and t.content =#{commonPage.keyword} |
| | | </if> |
| | | </where> |
| | | order by t.create_time desc |
| | | </select> |
| | |
| | | <if test="commonPage.type!=null"> |
| | | and type = #{commonPage.type} |
| | | </if> |
| | | <if test="commonPage.communityId!=null"> |
| | | and community_id = #{commonPage.communityId} |
| | | </if> |
| | | <if test="commonPage.status!=null"> |
| | | and status =#{commonPage.status} |
| | | </if> |
| | | <if test="commonPage.keyword!=null and commonPage.keyword!=''"> |
| | | and name like concat('%',#{commonPage.status},'%') |
| | | and name like concat('%',#{commonPage.keyword},'%') |
| | | </if> |
| | | </where> |
| | | order by create_time desc |
| | |
| | | UNION ALL |
| | | select id,"" as cover,publish_time as show_time,4 as type,"" as jump_url from com_act_questnaire where state =2 and community_id =#{communityId} |
| | | UNION ALL |
| | | select id,cover,publish_at as show_time,5 as type,jump_url from com_pb_dyn where status =2 and type =1 and cover is not null and community_id =#{communityId} |
| | | select id,cover,publish_at as show_time,5 as type,jump_url from com_pb_dyn where status =2 and cover is not null and community_id =#{communityId} |
| | | UNION ALL |
| | | select id,img_url,publish_time as show_time,6 as type,"" as jump_url from com_act_reserve where status =2 and community_id =#{communityId} |
| | | UNION ALL |
| | |
| | | // " </where>" + |
| | | // "</script>") |
| | | |
| | | @Select("<script> " + "SELECT\n" + "d.id,\n" + "d.title,\n" + "COUNT( u.id ) readingVolume,\n" + "d.`status`,\n" |
| | | @Select("<script> " + "SELECT\n" + "d.id,\n" + "d.title, d.jump_url, d.jump_type,\n" + "COUNT( u.id ) readingVolume,\n" + "d.`status`,\n" |
| | | + "d.publish_at,\n" + "d.content,\n" + "d.cover,\n" + "d.cover_mode,\n" + "d.dyn_type,\n" + "d.create_at \n" |
| | | + "FROM\n" + "com_pb_dyn d\n" + "LEFT JOIN com_pb_dyn_user u ON d.id = u.dyn_id \n" |
| | | + "where d.type=#{partyBuildingComPbDynVO.type} \n" |
| | |
| | | * 跳转链接 |
| | | */ |
| | | private String jumpUrl; |
| | | /** |
| | | * 跳转状态 |
| | | */ |
| | | |
| | | private Integer jumpType; |
| | | } |