Merge branch 'test' of http://gitlab.nhys.cdnhxx.com/root/zhihuishequ into test
New file |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.validation.Valid; |
| | | |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | 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.controller.BaseController; |
| | | 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.ComPropertyPublicityVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import static java.util.Objects.isNull; |
| | | import static java.util.Objects.nonNull; |
| | | |
| | | /** |
| | | * @title: ComPropertyPublicityApi |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 物业宣传相关接口 |
| | | * @author: hans |
| | | * @date: 2021/11/11 10:08 |
| | | */ |
| | | @Slf4j |
| | | @Api(tags = {"物业宣传相关接口"}) |
| | | @RestController |
| | | @RequestMapping("/property/publicity") |
| | | public class ComPropertyPublicityApi extends BaseController { |
| | | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | @ApiOperation(value = "分页物业宣传信息", response = ComPropertyPublicityVO.class) |
| | | @PostMapping("/page") |
| | | public R pageComPropertyPublicity(@RequestBody @Valid PageComPropertyPublicityDTO pageComPropertyPublicityDTO) { |
| | | if (isNull(pageComPropertyPublicityDTO.getCommunityId())) { |
| | | return R.fail("社区id不能为空"); |
| | | } |
| | | LoginUserInfoVO loginUserInfoSureNoLogin = getLoginUserInfoSureNoLogin(); |
| | | if (nonNull(loginUserInfoSureNoLogin)) { |
| | | pageComPropertyPublicityDTO.setCommunityId(loginUserInfoSureNoLogin.getCommunityId()); |
| | | } |
| | | return communityService.pageComPropertyPublicityApplet(pageComPropertyPublicityDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "查看物业宣传信息", response = ComPropertyPublicityVO.class) |
| | | @GetMapping("/get") |
| | | @ApiImplicitParam(name = "id", value = "物业宣传id", required = true) |
| | | public R getComPropertyPublicity(@RequestParam("id") Long id) { |
| | | return communityService.getComPropertyPublicity(id); |
| | | } |
| | | |
| | | @ApiOperation(value = "增加物业宣传浏览量") |
| | | @GetMapping("/incr-view") |
| | | @ApiImplicitParam(name = "id", value = "物业宣传id", required = true) |
| | | public R incrPropertyPublicityView(@RequestParam("id") Long id) { |
| | | return communityService.incrPropertyPublicityView(id); |
| | | } |
| | | } |
| | |
| | | if (!ObjectUtils.isEmpty(data)) { |
| | | LoginUserInfoVO loginUserInfoVO = (LoginUserInfoVO)data; |
| | | R r1 = communityService.detailHouse(userId); |
| | | R r4=communityService.selectByIdCard(loginUserInfoVO.getIdCard()); |
| | | if(StringUtils.isNotEmpty(loginUserInfoVO.getIdCard())){ |
| | | //查询实名用户绑定的实有人口地址 |
| | | R r4=communityService.selectByIdCard(loginUserInfoVO.getIdCard()); |
| | | if(R.isOk(r4)){ |
| | | String address= (String) r4.getData(); |
| | | if(StringUtils.isNotEmpty(address)){ |
| | | loginUserInfoVO.setAddress(address); |
| | | r.setData(loginUserInfoVO); |
| | | } |
| | | } |
| | | } |
| | | if (null != communityId && 0 != communityId) { |
| | | R r2 = communityService.detailCommunity(communityId); |
| | | if (R.isOk(r2)) { |
| | |
| | | Object data1 = r1.getData(); |
| | | if (!ObjectUtils.isEmpty(data1)) { |
| | | loginUserInfoVO.setComMngStructHouseVOS((List<ComMngStructHouseVO>)data1); |
| | | r.setData(loginUserInfoVO); |
| | | } |
| | | } |
| | | if(R.isOk(r4)){ |
| | | String address= (String) r4.getData(); |
| | | if(StringUtils.isNotEmpty(address)){ |
| | | loginUserInfoVO.setAddress(address); |
| | | r.setData(loginUserInfoVO); |
| | | } |
| | | } |
| | |
| | | <orderEntry type="library" name="Maven: org.javassist:javassist:3.20.0-GA" level="project" /> |
| | | <orderEntry type="library" name="Maven: javax.validation:validation-api:2.0.1.Final" level="project" /> |
| | | <orderEntry type="library" name="Maven: cn.afterturn:easypoi-annotation:4.1.0" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.google.zxing:core:3.1.0" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.google.zxing:javase:3.1.0" level="project" /> |
| | | </component> |
| | | </module> |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | import com.panzhihua.common.validated.PutGroup; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: ComPropertyPublicityDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 新增/编辑物业宣传 |
| | | * @author: hans |
| | | * @date: 2021/11/11 10:55 |
| | | */ |
| | | @Data |
| | | @ApiModel("新增/编辑物业宣传") |
| | | public class ComPropertyPublicityDTO { |
| | | |
| | | @ApiModelProperty("物业宣传id") |
| | | @NotNull(groups = PutGroup.class, message = "物业宣传id不能为空") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("宣传标题") |
| | | @NotBlank(groups = AddGroup.class, message = "宣传标题不能为空") |
| | | private String title; |
| | | |
| | | @ApiModelProperty("宣传类型(0.其他 1.停水通知 2.停电通知 3.停气通知 4.物业公告 5.优秀业主)") |
| | | @NotNull(groups = AddGroup.class, message = "宣传类型不能为空") |
| | | private Integer publicityType; |
| | | |
| | | @ApiModelProperty("其他类型自定义名称") |
| | | private String other; |
| | | |
| | | @ApiModelProperty("封面") |
| | | @NotBlank(groups = AddGroup.class, message = "封面不能为空") |
| | | private String cover; |
| | | |
| | | @ApiModelProperty("内容形式(1.文章链接 2.自定义内容)") |
| | | @NotNull(groups = AddGroup.class, message = "内容形式不能为空") |
| | | private Integer contentType; |
| | | |
| | | @ApiModelProperty("文章链接") |
| | | private String articleUrl; |
| | | |
| | | @ApiModelProperty("自定义内容") |
| | | private String diyContent; |
| | | |
| | | @ApiModelProperty(value = "物业公司id", hidden = true) |
| | | private Long propertyId; |
| | | |
| | | @ApiModelProperty(value = "社区id", hidden = true) |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty(value = "用户id", hidden = true) |
| | | private Long userId; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.dtos.community; |
| | | |
| | | import javax.validation.constraints.Min; |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: PageComPropertyPublicityDTO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 分页查询物业宣传信息请求参数 |
| | | * @author: hans |
| | | * @date: 2021/11/11 10:32 |
| | | */ |
| | | @Data |
| | | @ApiModel("分页查询物业宣传信息请求参数") |
| | | public class PageComPropertyPublicityDTO { |
| | | |
| | | @ApiModelProperty("关键词") |
| | | private String keyword; |
| | | |
| | | @ApiModelProperty("物业公司id") |
| | | private Long propertyId; |
| | | |
| | | @ApiModelProperty("小区id") |
| | | private Long villageId; |
| | | |
| | | @ApiModelProperty("宣传类型(0.其他 1.停水通知 2.停电通知 3.停气通知 4.物业公告 5.优秀业主)") |
| | | private Integer publicityType; |
| | | |
| | | @ApiModelProperty(value = "分页-当前页数", example = "1") |
| | | @NotNull(message = "分页参数不能为空") |
| | | @Min(value = 1) |
| | | private Long pageNum; |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数", example = "10") |
| | | @NotNull(message = "分页参数不能为空") |
| | | @Min(value = 1) |
| | | private Long pageSize; |
| | | |
| | | @ApiModelProperty(value = "社区id") |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty(value = "用户id", hidden = true) |
| | | private Long userId; |
| | | } |
| | |
| | | @ApiModelProperty("实名认证地址") |
| | | private String address; |
| | | |
| | | @ApiModelProperty("是否物业工作人员 1.是 2.否") |
| | | private Integer isPropertyWorker; |
| | | } |
| | |
| | | @ApiModelProperty("题目id") |
| | | private Long reserveSubId; |
| | | @ApiModelProperty("填报时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date time; |
| | | @ApiModelProperty("用户昵称") |
| | | private String nickName; |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: ComPropertyPublicityVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 物业宣传信息 |
| | | * @author: hans |
| | | * @date: 2021/11/11 10:15 |
| | | */ |
| | | @Data |
| | | @ApiModel("物业宣传信息") |
| | | public class ComPropertyPublicityVO { |
| | | |
| | | @ApiModelProperty("物业宣传id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("宣传标题") |
| | | private String title; |
| | | |
| | | @ApiModelProperty("宣传类型(0.其他 1.停水通知 2.停电通知 3.停气通知 4.物业公告 5.优秀业主)") |
| | | private Integer publicityType; |
| | | |
| | | @ApiModelProperty("其他类型自定义名称") |
| | | private String other; |
| | | |
| | | @ApiModelProperty("封面") |
| | | private String cover; |
| | | |
| | | @ApiModelProperty("内容形式(1.文章链接 2.自定义内容)") |
| | | private Integer contentType; |
| | | |
| | | @ApiModelProperty("文章链接") |
| | | private String articleUrl; |
| | | |
| | | @ApiModelProperty("自定义内容") |
| | | private String diyContent; |
| | | |
| | | @ApiModelProperty("物业公司id") |
| | | private Long propertyId; |
| | | |
| | | @ApiModelProperty("物业公司名称") |
| | | private String propertyName; |
| | | |
| | | @ApiModelProperty("所属小区") |
| | | private String villageName; |
| | | |
| | | @ApiModelProperty("社区id") |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty("浏览量") |
| | | private Integer viewNum; |
| | | |
| | | @ApiModelProperty("发布时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createdAt; |
| | | |
| | | @ApiModelProperty("更新时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date updatedAt; |
| | | } |
| | |
| | | @ApiModelProperty("社区名字") |
| | | private String communityName; |
| | | |
| | | @ApiModelProperty("隐患编号") |
| | | private Integer dagerNo; |
| | | |
| | | /** |
| | | * 巡查类型 |
| | | */ |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.reserve; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.panzhihua.common.model.vos.community.ComActQuestnaireSubVO; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: HomeQuarantineRegisterExportVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 居家隔离统计导出信息 |
| | | * @author: hans |
| | | * @date: 2021/11/18 14:54 |
| | | */ |
| | | @Data |
| | | @ApiModel("居家隔离统计导出信息") |
| | | public class HomeQuarantineRegisterExportVO { |
| | | |
| | | @ApiModelProperty("题目列表") |
| | | private List<ComActQuestnaireSubVO> subs; |
| | | |
| | | @ApiModelProperty("数据集") |
| | | private List<List<Object>> dataList; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.reserve; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: HomeQuarantineRegisterStatisticsVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 居家隔离统计信息 |
| | | * @author: hans |
| | | * @date: 2021/11/17 15:25 |
| | | */ |
| | | @Data |
| | | @ApiModel("居家隔离统计信息") |
| | | public class HomeQuarantineRegisterStatisticsVO { |
| | | |
| | | @ApiModelProperty("记录id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("用户id") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty("开始登记时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | @ApiModelProperty("用户昵称") |
| | | private String nickName; |
| | | |
| | | @ApiModelProperty("题目") |
| | | private String reserveSubContent; |
| | | |
| | | @ApiModelProperty("答案") |
| | | private String answerContent; |
| | | |
| | | @ApiModelProperty("题目id") |
| | | private Long reserveSubId; |
| | | |
| | | @ApiModelProperty("选项类型(0 单选 1 多选 2 输入框 3 手机号 4 身份证 5 文字描述 6 日期选择 7 时间选择 8 可换行的输入框 9姓名输入框 10图片选择 11文件上传 12签名)") |
| | | private Integer optionType; |
| | | } |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.warehouse.ComActWarehouseApplyDTO; |
| | | import com.panzhihua.common.model.dtos.community.GetIdentityEidTokenDTO; |
| | | import com.panzhihua.common.model.dtos.community.*; |
| | | import com.panzhihua.common.model.dtos.community.building.admin.*; |
| | | import com.panzhihua.common.model.dtos.community.cluster.PageClusterMemberDto; |
| | | import com.panzhihua.common.model.dtos.community.cluster.admin.*; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.dtos.community.discuss.ComActDiscussDetailDTO; |
| | | import com.panzhihua.common.model.dtos.community.discuss.ComActDiscussPublishResultDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.ElderAuthStatisticHeaderDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.PageElderAuthStatisticDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.PagePensionAuthStatisticDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.SignElderAuthStatisticDTO; |
| | | import com.panzhihua.common.model.dtos.neighbor.*; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.common.model.vos.community.cluster.admin.ComClusterMemberExcelVO; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | |
| | | import com.panzhihua.common.model.dtos.community.ComMngPopulationTagDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComMngRealCompanyBelongsDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComOpsHouseDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComPropertyPublicityDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComSwDangerReportEditDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComSwDangerReportHandleDTO; |
| | | import com.panzhihua.common.model.dtos.community.ComSwDangerReportRectifyDTO; |
| | |
| | | import com.panzhihua.common.model.dtos.community.PageComMngRealCompanyDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComMngVillageDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComOpsHouseDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComPropertyPublicityDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComStreetDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageElderAuthRecordsDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageEldersAuthDTO; |
| | |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenActActivityPeopleListDTO; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenDiscussListDTO; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenMicroListDTO; |
| | | import com.panzhihua.common.model.dtos.community.building.admin.AddBuildingHouseDto; |
| | | import com.panzhihua.common.model.dtos.community.building.admin.AddBuildingUnitDto; |
| | | import com.panzhihua.common.model.dtos.community.building.admin.DeleteBuildingHousePopulationDto; |
| | | import com.panzhihua.common.model.dtos.community.building.admin.EditBuildingHouseDto; |
| | | import com.panzhihua.common.model.dtos.community.building.admin.EditBuildingUnitDto; |
| | | import com.panzhihua.common.model.dtos.community.building.admin.PageBuildingListDto; |
| | | import com.panzhihua.common.model.dtos.community.building.admin.PageBuildingUnitHouseListDto; |
| | | import com.panzhihua.common.model.dtos.community.cluster.PageClusterMemberDto; |
| | | import com.panzhihua.common.model.dtos.community.cluster.admin.AddClusterAdminDto; |
| | | import com.panzhihua.common.model.dtos.community.cluster.admin.AddClusterMemberAdminDto; |
| | |
| | | import com.panzhihua.common.model.dtos.community.wallet.PageComActWalletAdminDTO; |
| | | import com.panzhihua.common.model.dtos.community.wallet.PageComActWalletTradeAdminDTO; |
| | | import com.panzhihua.common.model.dtos.community.wallet.PageComActWalletTradeDTO; |
| | | import com.panzhihua.common.model.dtos.community.warehouse.ComActWarehouseApplyDTO; |
| | | import com.panzhihua.common.model.dtos.community.warehouse.ComActWarehouseDonatesDTO; |
| | | import com.panzhihua.common.model.dtos.community.warehouse.ExportDonatesDTO; |
| | | import com.panzhihua.common.model.dtos.community.warehouse.PageDonatesDTO; |
| | |
| | | import com.panzhihua.common.model.vos.community.BatchhouseVO; |
| | | import com.panzhihua.common.model.vos.community.ComActActEvaluateVO; |
| | | import com.panzhihua.common.model.vos.community.ComActActRegistVO; |
| | | import com.panzhihua.common.model.vos.community.ComActActivityTypeVO; |
| | | import com.panzhihua.common.model.vos.community.ComActActivityVO; |
| | | import com.panzhihua.common.model.vos.community.ComActAnnouncementVO; |
| | | import com.panzhihua.common.model.vos.community.ComActColumnVO; |
| | | import com.panzhihua.common.model.vos.community.ComActCommiteeVO; |
| | | import com.panzhihua.common.model.vos.community.ComActDynVO; |
| | | import com.panzhihua.common.model.vos.community.ComActEasyPhotoVO; |
| | |
| | | import com.panzhihua.common.model.vos.community.ComSwRotaExcelVO; |
| | | import com.panzhihua.common.model.vos.community.EldersAuthDetailsVO; |
| | | import com.panzhihua.common.model.vos.community.EldersAuthElderlyExcelVO; |
| | | import com.panzhihua.common.model.vos.community.QRActivityCodeVO; |
| | | import com.panzhihua.common.model.vos.community.ResetComActMessageVO; |
| | | import com.panzhihua.common.model.vos.community.SignactivityVO; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenStatisticAgeGender; |
| | |
| | | @PostMapping("/reserve/commit") |
| | | R reserveCommit(@RequestBody ComActReserveCommitVO comActReserveCommitVO); |
| | | |
| | | @PostMapping("/reserve/commitNoToken") |
| | | R reserveCommitNoToken(@RequestBody ComActReserveCommitVO comActReserveCommitVO); |
| | | /** |
| | | * 我的预约/登记 |
| | | * @param pageUserReserveDTO |
| | |
| | | */ |
| | | @GetMapping("/activity/my-evaluate") |
| | | R listMyActivityEvaluate(@RequestParam("userId") Long userId, @RequestParam("activityId") Long activityId); |
| | | |
| | | /** |
| | | * 分页查询居家隔离统计 |
| | | * @param detailedAdminDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/reserve/admin/register/homeQuarantine/page") |
| | | R pageRegisterHomeQuarantine(PageReserveRegisterDetailedAdminDTO detailedAdminDTO); |
| | | |
| | | /** |
| | | * 分页查询物业宣传 |
| | | * @param pageComPropertyPublicityDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/property/publicity/page") |
| | | R pageComPropertyPublicity(@RequestBody PageComPropertyPublicityDTO pageComPropertyPublicityDTO); |
| | | |
| | | /** |
| | | * 新增物业宣传 |
| | | * @param comPropertyPublicityDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/property/publicity/add") |
| | | R addComPropertyPublicity(@RequestBody ComPropertyPublicityDTO comPropertyPublicityDTO); |
| | | |
| | | /** |
| | | * 修改物业宣传 |
| | | * @param comPropertyPublicityDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/property/publicity/update") |
| | | R updateComPropertyPublicity(@RequestBody ComPropertyPublicityDTO comPropertyPublicityDTO); |
| | | |
| | | /** |
| | | * 查看物业宣传信息 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/property/publicity/get") |
| | | R getComPropertyPublicity(@RequestParam("id") Long id); |
| | | |
| | | /** |
| | | * 删除物业宣传 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/property/publicity/delete") |
| | | R deleteComPropertyPublicity(@RequestParam("id") Long id); |
| | | |
| | | /** |
| | | * 物业公司列表 |
| | | * |
| | | * @param villageId |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @GetMapping("/property/publicity/list/property") |
| | | R listProperty(@RequestParam(value = "villageId", required = false) Long villageId, @RequestParam("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 分页查询物业宣传-小程序 |
| | | * @param pageComPropertyPublicityDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/property/publicity/page/applet") |
| | | R pageComPropertyPublicityApplet(@RequestBody PageComPropertyPublicityDTO pageComPropertyPublicityDTO); |
| | | |
| | | /** |
| | | * 增加物业宣传浏览量 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/property/publicity/incr-view") |
| | | R incrPropertyPublicityView(@RequestParam("id") Long id); |
| | | |
| | | /** |
| | | * 居家隔离导出 |
| | | * @param pageReserveRegisterDetailedAdminDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/reserve/admin/homeQuarantine/export") |
| | | R exportHomeQuarantine(@RequestBody PageReserveRegisterDetailedAdminDTO pageReserveRegisterDetailedAdminDTO); |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.utlis; |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.panzhihua.common.model.vos.community.ComActQuestnaireAnswerContentVO; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import javax.xml.bind.DatatypeConverter; |
| | | import java.net.URL; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zzj |
| | | */ |
| | | @Slf4j |
| | | public class HomeQuarantineUtil { |
| | | /** |
| | | * 数据转换--登记明细用户填写答案导出数据格式转换 |
| | | * |
| | | * @param answerContentVOList 用户答题记录 |
| | | * @return 用户填写答案数据 |
| | | */ |
| | | public static List<List<Object>> ReserveData(List<ComActQuestnaireAnswerContentVO> answerContentVOList) { |
| | | //结果数据集合 |
| | | List<List<Object>> resultList = new ArrayList<>(); |
| | | //构建单个用户数据 |
| | | List<Object> userData = new ArrayList<>(); |
| | | |
| | | String noExport = "以上信息仅用于"; |
| | | //遍历答案列表 |
| | | Long reserveRecordId = 0L; |
| | | Long reserveSubId = 0L; |
| | | Integer count=0; |
| | | StringBuffer conditions=new StringBuffer(); |
| | | Boolean isOldDuo = false; |
| | | StringBuffer sb = new StringBuffer(); |
| | | if (answerContentVOList != null && answerContentVOList.size() > 0) { |
| | | for (ComActQuestnaireAnswerContentVO userAnswers : answerContentVOList) { |
| | | if(count%16==0){ |
| | | conditions.append(DateUtils.format(userAnswers.getTime(),new SimpleDateFormat("yyyy-MM-dd")) +" "+"上午体温"+userAnswers.getAnswerContent()+"℃"+"\n"); |
| | | count++; |
| | | continue; |
| | | } |
| | | if(count%16==1){ |
| | | conditions.append(DateUtils.format(userAnswers.getTime(),new SimpleDateFormat("yyyy-MM-dd"))+" "+"下午体温"+userAnswers.getAnswerContent()+"℃"+"\n"); |
| | | count++; |
| | | continue; |
| | | } |
| | | if(count%16==2){ |
| | | conditions.append(DateUtils.format(userAnswers.getTime(),new SimpleDateFormat("yyyy-MM-dd"))+" "+"当日隔离情况:"+userAnswers.getAnswerContent()+"\n"); |
| | | conditions.append("————————"+"\n"); |
| | | count++; |
| | | continue; |
| | | } |
| | | count++; |
| | | //判断是文字描述直接跳过 |
| | | if (userAnswers.getOptionType().equals(5) || userAnswers.getOptionType().equals(11) |
| | | || (StringUtils.isNotEmpty(userAnswers.getAnswerContent()) && userAnswers.getAnswerContent().contains(noExport))) { |
| | | continue; |
| | | } |
| | | //判断reserveRecordId为空则为第一条记录,默认加上昵称和灯谜是 |
| | | if (reserveRecordId.equals(0L)) { |
| | | reserveRecordId = userAnswers.getReserveRecordId(); |
| | | userData.add(userAnswers.getNickName()); |
| | | userData.add(DateUtils.format(userAnswers.getTime(), DateUtils.ymdhms_format)); |
| | | } |
| | | //根据reserveRecordId判断是否是第二条填报记录 |
| | | if (!reserveRecordId.equals(userAnswers.getReserveRecordId())) { |
| | | reserveSubId = 0L; |
| | | |
| | | if(isOldDuo){ |
| | | String answer = sb.toString(); |
| | | userData.add(answer.substring(0, answer.length() - 1)); |
| | | sb = new StringBuffer(); |
| | | isOldDuo = false; |
| | | } |
| | | for(List<Object> result:resultList){ |
| | | if(result.get(4).equals(userData.get(4))){ |
| | | String condition=result.get(result.size()-1)+userData.get(userData.size()-1).toString(); |
| | | result.set(result.size()-1,condition); |
| | | userData.set(userData.size()-1,null); |
| | | break; |
| | | } |
| | | } |
| | | if(userData.get(userData.size()-1)!=null){ |
| | | resultList.add(userData); |
| | | } |
| | | userData = new ArrayList<>(); |
| | | reserveRecordId = userAnswers.getReserveRecordId(); |
| | | userData.add(userAnswers.getNickName()); |
| | | userData.add(DateUtils.format(userAnswers.getTime(), DateUtils.ymdhms_format)); |
| | | if(StringUtils.isNotEmpty(userAnswers.getAnswerContent())){ |
| | | userData.add(userAnswers.getAnswerContent()); |
| | | }else{ |
| | | userData.add(" "); |
| | | } |
| | | |
| | | }else{ |
| | | if(reserveSubId.equals(0L)){ |
| | | reserveSubId = userAnswers.getReserveSubId(); |
| | | } |
| | | |
| | | if(!reserveSubId.equals(userAnswers.getReserveSubId())){ |
| | | reserveSubId = userAnswers.getReserveSubId(); |
| | | |
| | | //如果是承诺字段则不导出 |
| | | if(StringUtils.isNotEmpty(userAnswers.getAnswerContent()) && userAnswers.getAnswerContent().contains(noExport)){ |
| | | continue; |
| | | } |
| | | |
| | | //判断当前的组件类型是否是图片上传,导出时需要导出图片 |
| | | if(userAnswers.getOptionType().equals(11)){ |
| | | reserveSubId = userAnswers.getReserveSubId(); |
| | | try { |
| | | userData.add(new URL(userAnswers.getAnswerContent())); |
| | | }catch (Exception e){ |
| | | userData.add(" "); |
| | | log.error("导出转换图片失败!"); |
| | | } |
| | | continue; |
| | | } |
| | | //判断当前组件类型是否签名 |
| | | if(userAnswers.getOptionType().equals(12)){ |
| | | reserveSubId = userAnswers.getReserveSubId(); |
| | | try { |
| | | userData.add(DatatypeConverter.parseBase64Binary(userAnswers.getAnswerContent().substring(userAnswers.getAnswerContent().indexOf(",") + 1))); |
| | | }catch (Exception e){ |
| | | userData.add(" "); |
| | | log.error("导出转换图片失败!"); |
| | | } |
| | | continue; |
| | | } |
| | | |
| | | if(userAnswers.getOptionType().equals(1)){ |
| | | isOldDuo = true; |
| | | sb.append(userAnswers.getAnswerContent()==null?"无":userAnswers.getAnswerContent() + ","); |
| | | continue; |
| | | }else{ |
| | | if(isOldDuo){ |
| | | String answer = sb.toString(); |
| | | userData.add(answer.substring(0, answer.length() - 1)); |
| | | sb = new StringBuffer(); |
| | | } |
| | | isOldDuo = false; |
| | | } |
| | | sb.append(userAnswers.getAnswerContent()==null?"无":userAnswers.getAnswerContent() + ","); |
| | | String answer = sb.toString(); |
| | | userData.add(answer.substring(0, answer.length() - 1)); |
| | | sb = new StringBuffer(); |
| | | }else{ |
| | | //如果是承诺字段则不导出 |
| | | if(StringUtils.isNotEmpty(userAnswers.getAnswerContent()) && userAnswers.getAnswerContent().contains(noExport)){ |
| | | continue; |
| | | } |
| | | //判断当前的组件类型是否是图片上传,导出时需要导出图片 |
| | | if(userAnswers.getOptionType().equals(11)){ |
| | | reserveSubId = userAnswers.getReserveSubId(); |
| | | try { |
| | | userData.add(new URL(userAnswers.getAnswerContent())); |
| | | }catch (Exception e){ |
| | | userData.add(" "); |
| | | log.error("导出转换图片失败!"); |
| | | } |
| | | continue; |
| | | } |
| | | //判断当前组件类型是否签名 |
| | | if(userAnswers.getOptionType().equals(12)){ |
| | | reserveSubId = userAnswers.getReserveSubId(); |
| | | try { |
| | | //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("导出转换图片失败!"); |
| | | } |
| | | continue; |
| | | } |
| | | if(userAnswers.getOptionType().equals(1)){ |
| | | isOldDuo = true; |
| | | sb.append(userAnswers.getAnswerContent()==null?"无":userAnswers.getAnswerContent() + ","); |
| | | continue; |
| | | }else{ |
| | | if(isOldDuo){ |
| | | String answer = sb.toString(); |
| | | userData.add(answer.substring(0, answer.length() - 1)); |
| | | sb = new StringBuffer(); |
| | | } |
| | | isOldDuo = false; |
| | | } |
| | | sb.append(userAnswers.getAnswerContent()==null?"无":userAnswers.getAnswerContent() + ","); |
| | | String answer = sb.toString(); |
| | | userData.add(answer.substring(0, answer.length() - 1)); |
| | | sb = new StringBuffer(); |
| | | } |
| | | } |
| | | if(count%16==0){ |
| | | userData.add(conditions.toString()); |
| | | conditions=new StringBuffer(); |
| | | } |
| | | } |
| | | if(isOldDuo){ |
| | | String answer = sb.toString(); |
| | | userData.add(answer.substring(0, answer.length() - 1)); |
| | | } |
| | | for(List<Object> result:resultList){ |
| | | if(result.get(4).equals(userData.get(4))){ |
| | | String condition=result.get(result.size()-1)+userData.get(userData.size()-1).toString(); |
| | | result.set(result.size()-1,condition); |
| | | userData.set(userData.size()-1,null); |
| | | break; |
| | | } |
| | | } |
| | | if(userData.get(userData.size()-1)!=null){ |
| | | resultList.add(userData); |
| | | } |
| | | } |
| | | return resultList; |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.community_backstage.api; |
| | | |
| | | import java.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.io.InputStream; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.vos.community.ComActReserveCommitVO; |
| | | import com.panzhihua.common.model.vos.community.reserve.HomeQuarantineRegisterExportVO; |
| | | import com.panzhihua.community_backstage.util.MyAESUtil; |
| | | import org.apache.poi.ss.usermodel.HorizontalAlignment; |
| | | import org.apache.poi.ss.usermodel.VerticalAlignment; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.ExcelWriter; |
| | | import com.alibaba.excel.write.metadata.WriteSheet; |
| | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.enums.ReserveRecordStatusEnum; |
| | | import com.panzhihua.common.model.dtos.community.QuestnaireAnswersDTO; |
| | | import com.panzhihua.common.model.dtos.community.reserve.*; |
| | | import com.panzhihua.common.model.dtos.community.reserve.AddReserveAdminDTO; |
| | | import com.panzhihua.common.model.dtos.community.reserve.CancelReserveRecordDTO; |
| | | import com.panzhihua.common.model.dtos.community.reserve.ComActReserveMakeStatisticsDTO; |
| | | import com.panzhihua.common.model.dtos.community.reserve.ComActReserveRegisterStatisticsDTO; |
| | | import com.panzhihua.common.model.dtos.community.reserve.EditComActReserveInfoDTO; |
| | | import com.panzhihua.common.model.dtos.community.reserve.EditComActReserveStatusDTO; |
| | | import com.panzhihua.common.model.dtos.community.reserve.EditReserveAdminDTO; |
| | | import com.panzhihua.common.model.dtos.community.reserve.MakeHandleAdminDTO; |
| | | import com.panzhihua.common.model.dtos.community.reserve.PageReserveAdminDTO; |
| | | import com.panzhihua.common.model.dtos.community.reserve.PageReserveMakeAdminDTO; |
| | | import com.panzhihua.common.model.dtos.community.reserve.PageReserveMakeHandleAdminDTO; |
| | | import com.panzhihua.common.model.dtos.community.reserve.PageReserveRegisterDetailedAdminDTO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActQuestnaireAnswerContentVO; |
| | | import com.panzhihua.common.model.vos.community.ComActQuestnaireSubVO; |
| | | import com.panzhihua.common.model.vos.community.ComCvtBusinessVO; |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationExcelVo; |
| | | import com.panzhihua.common.model.vos.community.questnaire.QuestnaireStatisticsSummaryExcelAdminVO; |
| | | import com.panzhihua.common.model.vos.community.reserve.*; |
| | | import com.panzhihua.common.model.vos.community.reserve.ComActReserveListAdminVO; |
| | | import com.panzhihua.common.model.vos.community.reserve.ComActReserveMakeDetailAdminVO; |
| | | import com.panzhihua.common.model.vos.community.reserve.ComActReserveMakeDetailedExcelAdminVO; |
| | | import com.panzhihua.common.model.vos.community.reserve.ComActReserveMakeHandleExcelAdminVO; |
| | | import com.panzhihua.common.model.vos.community.reserve.ComActReserveMakeHandleListAdminVO; |
| | | import com.panzhihua.common.model.vos.community.reserve.ComActReserveMakeListAdminVO; |
| | | import com.panzhihua.common.model.vos.community.reserve.ComActReserveMakeRightExcelAdminVO; |
| | | import com.panzhihua.common.model.vos.community.reserve.ComActReserveMakeRightStatisticsAdminVO; |
| | | import com.panzhihua.common.model.vos.community.reserve.ComActReserveMakeStatisticsAdminVO; |
| | | import com.panzhihua.common.model.vos.community.reserve.ComActReserveRegisterDetailedVO; |
| | | import com.panzhihua.common.model.vos.community.reserve.ComActReserveRegisterExcelAdminVO; |
| | | import com.panzhihua.common.model.vos.community.reserve.ComActReserveRegisterStatisticsAdminVO; |
| | | import com.panzhihua.common.model.vos.community.reserve.ComActReserveSubListVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.utlis.AssemblyUtils; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.common.utlis.HomeQuarantineUtil; |
| | | import com.panzhihua.common.utlis.SFTPUtil; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.community_backstage.config.SFTPConfig; |
| | | import com.panzhihua.community_backstage.excel.CustemSecondhandler; |
| | | import com.panzhihua.community_backstage.excel.Custemhandler; |
| | | import com.panzhihua.community_backstage.excel.CustomSheetWriteHandler; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.poi.ss.usermodel.HorizontalAlignment; |
| | | import org.apache.poi.ss.usermodel.VerticalAlignment; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.io.InputStream; |
| | | import java.net.URL; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * @description: 预约登记接口 |
| | |
| | | @RestController |
| | | @RequestMapping("/reserve") |
| | | public class ComActReserveApi extends BaseController { |
| | | private static final String key="nahankeji1234567"; |
| | | |
| | | @Resource |
| | | private CommunityService communityService; |
| | |
| | | @ApiOperation(value = "导出登记明细") |
| | | @PostMapping("/register/list/export") |
| | | public R exportRegister(@RequestBody PageReserveRegisterDetailedAdminDTO pageReserveRegisterDetailedAdminDTO) { |
| | | |
| | | String ftpUrl = "/mnt/data/web/excel/"; |
| | | String name = "登记明细导出数据.xlsx"; |
| | | String noHaed = "承诺"; |
| | |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "导出居家隔离统计") |
| | | @PostMapping("/register/list/export/homeQuarantine") |
| | | public R exportRegisterHomeQuarantineStatistics(@RequestBody PageReserveRegisterDetailedAdminDTO pageReserveRegisterDetailedAdminDTO) { |
| | | String name= "居家隔离统计表.xlsx"; |
| | | String ftpUrl = "/mnt/data/web/excel/"; |
| | | String noHaed = "承诺"; |
| | | List<List<Object>> datalist = new ArrayList<>(); |
| | | try { |
| | | SFTPUtil sftp = new SFTPUtil(sftpConfig.getUserName(), sftpConfig.getPassword(), sftpConfig.getHost(), sftpConfig.getPort()); |
| | | sftp.login(); |
| | | boolean existDir = sftp.isExistDir(ftpUrl + name); |
| | | if (!existDir) { |
| | | String property = System.getProperty("user.dir"); |
| | | String fileName = property + File.separator + name; |
| | | ExcelWriter excelWriter = null; |
| | | InputStream inputStream = null; |
| | | try { |
| | | /** |
| | | * 组合导出数据 |
| | | * 用户问卷答案 |
| | | */ |
| | | R exportResultR = communityService.exportHomeQuarantine(pageReserveRegisterDetailedAdminDTO); |
| | | HomeQuarantineRegisterExportVO exportVO = JSON.parseObject(JSON.toJSONString(exportResultR.getData()), HomeQuarantineRegisterExportVO.class); |
| | | List<ComActQuestnaireSubVO> subVOList = exportVO.getSubs(); |
| | | //构造表头 |
| | | List<List<String>> headList = new ArrayList<List<String>>(); |
| | | String firstRowContent = "重点地区或高风险地区来攀返攀人员信息统计表(居家隔离表)"; |
| | | List<String> head0 = new ArrayList<>(); |
| | | head0.add(firstRowContent); |
| | | head0.add("登记人昵称"); |
| | | headList.add(head0); |
| | | List<String> head1 = new ArrayList<>(); |
| | | head1.add(firstRowContent); |
| | | head1.add("登记时间"); |
| | | headList.add(head1); |
| | | subVOList.forEach(sub -> { |
| | | if (sub.getType() != 5 && sub.getType() != 11 && !sub.getContent().contains("今日上午") && |
| | | !sub.getContent().contains("今日下午") && !sub.getContent().contains("今日隔离情况")) { |
| | | List<String> headn = new ArrayList<>(); |
| | | headn.add(firstRowContent); |
| | | if(!sub.getContent().equals(noHaed)){ |
| | | if(sub.getType() == 11){ |
| | | headn.add(sub.getContent().substring(0, sub.getContent().indexOf("("))); |
| | | }else{ |
| | | headn.add(sub.getContent()); |
| | | } |
| | | headList.add(headn); |
| | | } |
| | | } |
| | | }); |
| | | List<String> head2 = new ArrayList<>(); |
| | | head2.add(firstRowContent); |
| | | head2.add("隔离体温情况"); |
| | | headList.add(head2); |
| | | //数据转换 |
| | | datalist = exportVO.getDataList(); |
| | | WriteCellStyle headWriteCellStyle = new WriteCellStyle(); |
| | | //设置头居中 |
| | | headWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.CENTER); |
| | | //设置头字体 |
| | | WriteFont headWriteFont = new WriteFont(); |
| | | headWriteFont.setFontHeightInPoints((short)6); |
| | | headWriteFont.setBold(true); |
| | | headWriteCellStyle.setWriteFont(headWriteFont); |
| | | |
| | | |
| | | WriteCellStyle contentWriteCellStyle = new WriteCellStyle(); |
| | | //设置表格内容字体 |
| | | WriteFont writeFont = new WriteFont(); |
| | | writeFont.setFontHeightInPoints((short)6); |
| | | //设置 水平居中 |
| | | contentWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.LEFT); |
| | | //设置 垂直居中 |
| | | contentWriteCellStyle.setVerticalAlignment(VerticalAlignment.CENTER); |
| | | contentWriteCellStyle.setWriteFont(writeFont); |
| | | |
| | | contentWriteCellStyle.setWrapped(true); |
| | | HorizontalCellStyleStrategy horizontalCellStyleStrategy = |
| | | new HorizontalCellStyleStrategy(headWriteCellStyle, contentWriteCellStyle); |
| | | |
| | | |
| | | excelWriter = EasyExcel.write(fileName) |
| | | .registerWriteHandler(horizontalCellStyleStrategy).registerWriteHandler(new CustemSecondhandler()) |
| | | .build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet("居家隔离统计表").head(headList).build(); |
| | | excelWriter.write(datalist, writeSheet); |
| | | excelWriter.finish(); |
| | | File file = new File(fileName); |
| | | inputStream = new FileInputStream(file); |
| | | sftp.uploadMore(ftpUrl, name, inputStream); |
| | | sftp.logout(); |
| | | inputStream.close(); |
| | | String absolutePath = file.getAbsolutePath(); |
| | | boolean delete = file.delete(); |
| | | log.info("删除excel【{}】结果【{}】", absolutePath, delete); |
| | | } finally { |
| | | // 千万别忘记finish 会帮忙关闭流 |
| | | if (inputStream != null) { |
| | | inputStream.close(); |
| | | } |
| | | if (excelWriter != null) { |
| | | excelWriter.finish(); |
| | | } |
| | | } |
| | | } |
| | | return R.ok(sftpConfig.getExcelUrl() + name); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("文件传输失败【{}】", e.getMessage()); |
| | | return R.fail(); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "分页查询居家隔离统计", response = ComActReserveRegisterDetailedVO.class) |
| | | @PostMapping("/register/homeQuarantine/page") |
| | | public R pageRegisterHomeQuarantine(@RequestBody PageReserveRegisterDetailedAdminDTO detailedAdminDTO) { |
| | | return communityService.pageRegisterHomeQuarantine(detailedAdminDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询题目列表", response = ComActReserveSubListVO.class) |
| | | @GetMapping("/subject/list") |
| | | public R subjectList(@RequestParam("reserveId") Long reserveId) { |
| | |
| | | return communityService.registerDetailedDetailAdmin(reserveRecordId); |
| | | } |
| | | |
| | | @ApiOperation("对外用户提交数据") |
| | | @PostMapping("/commit/noToken") |
| | | public R commitNoToken(@RequestBody ComActReserveCommitVO comActReserveCommitVO){ |
| | | return communityService.reserveCommitNoToken(comActReserveCommitVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询西区社区列表") |
| | | @GetMapping("/westList/noToken") |
| | | public R getWestCommunityLists() { |
| | | return communityService.getWestCommunityLists(); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.community_backstage.api; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.validation.Valid; |
| | | |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | 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.controller.BaseController; |
| | | 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.ComPropertyPublicityVO; |
| | | import com.panzhihua.common.model.vos.community.ComPropertyVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | import com.panzhihua.common.validated.PutGroup; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * @title: ComPropertyPublicityApi |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 物业宣传相关接口 |
| | | * @author: hans |
| | | * @date: 2021/11/11 10:08 |
| | | */ |
| | | @Slf4j |
| | | @Api(tags = {"物业宣传相关接口"}) |
| | | @RestController |
| | | @RequestMapping("/property/publicity") |
| | | public class ComPropertyPublicityApi extends BaseController { |
| | | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | @ApiOperation(value = "分页物业宣传信息", response = ComPropertyPublicityVO.class) |
| | | @PostMapping("/page") |
| | | public R pageComPropertyPublicity(@RequestBody @Valid PageComPropertyPublicityDTO pageComPropertyPublicityDTO) { |
| | | LoginUserInfoVO loginUserInfo = getLoginUserInfo(); |
| | | pageComPropertyPublicityDTO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | pageComPropertyPublicityDTO.setUserId(loginUserInfo.getUserId()); |
| | | return communityService.pageComPropertyPublicity(pageComPropertyPublicityDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增物业宣传") |
| | | @PostMapping("/add") |
| | | public R addComPropertyPublicity(@RequestBody @Validated(AddGroup.class) ComPropertyPublicityDTO comPropertyPublicityDTO) { |
| | | LoginUserInfoVO loginUserInfo = getLoginUserInfo(); |
| | | comPropertyPublicityDTO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | comPropertyPublicityDTO.setUserId(loginUserInfo.getUserId()); |
| | | return communityService.addComPropertyPublicity(comPropertyPublicityDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "修改物业宣传") |
| | | @PostMapping("/update") |
| | | public R updateComPropertyPublicity(@RequestBody @Validated(PutGroup.class) ComPropertyPublicityDTO comPropertyPublicityDTO) { |
| | | LoginUserInfoVO loginUserInfo = getLoginUserInfo(); |
| | | comPropertyPublicityDTO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | comPropertyPublicityDTO.setUserId(loginUserInfo.getUserId()); |
| | | return communityService.updateComPropertyPublicity(comPropertyPublicityDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "查看物业宣传信息", response = ComPropertyPublicityVO.class) |
| | | @GetMapping("/get") |
| | | @ApiImplicitParam(name = "id", value = "物业宣传id", required = true) |
| | | public R getComPropertyPublicity(@RequestParam("id") Long id) { |
| | | return communityService.getComPropertyPublicity(id); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除物业宣传") |
| | | @DeleteMapping("/delete") |
| | | @ApiImplicitParam(name = "id", value = "物业宣传id", required = true) |
| | | public R deleteComPropertyPublicity(@RequestParam("id") Long id) { |
| | | return communityService.deleteComPropertyPublicity(id); |
| | | } |
| | | |
| | | @ApiOperation(value = "物业公司列表",response = ComPropertyVO.class) |
| | | @GetMapping("/list/property") |
| | | @ApiImplicitParam(name = "villageId", value = "小区id", required = false) |
| | | public R listProperty(@RequestParam(value = "villageId", required = false) Long villageId) { |
| | | return communityService.listProperty(villageId, getCommunityId()); |
| | | } |
| | | } |
| | |
| | | photo = Arrays.asList(comSwSafetyWorkRecordVO.getRecordPhoto().split(",")); |
| | | } |
| | | if (photo.size() != 0 && null != photo) { |
| | | if (photo.size() == 1) { |
| | | for (int i = 0; i < 9; i++) { |
| | | if (i < 1) { |
| | | downloadPicture(photo.get(i), comSwSafetyWorkRecordVO.getId() + "_" + i, "d:/safetyWork/file/"); |
| | | dataMap.put("imgStr" + (i + 1), |
| | | getImageStr("d:/safetyWork/file/" + comSwSafetyWorkRecordVO.getId() + "_" + i + ".jpg")); |
| | | } else { |
| | | dataMap.put("imgStr" + (i + 1), getImageStr("d:/safetyWork/file/blank.jpg")); |
| | | } |
| | | } |
| | | 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")); |
| | | } |
| | | if (photo.size() == 2) { |
| | | for (int i = 0; i < 9; i++) { |
| | | if (i < 2) { |
| | | downloadPicture(photo.get(i), comSwSafetyWorkRecordVO.getId() + "_" + i, "d:/safetyWork/file/"); |
| | | dataMap.put("imgStr" + (i + 1), |
| | | getImageStr("d:/safetyWork/file/" + comSwSafetyWorkRecordVO.getId() + "_" + i + ".jpg")); |
| | | } else { |
| | | dataMap.put("imgStr" + (i + 1), getImageStr("d:/safetyWork/file/blank.jpg")); |
| | | } |
| | | } |
| | | } |
| | | if (photo.size() == 3) { |
| | | for (int i = 0; i < 9; i++) { |
| | | if (i < 3) { |
| | | downloadPicture(photo.get(i), comSwSafetyWorkRecordVO.getId() + "_" + i, "d:/safetyWork/file/"); |
| | | dataMap.put("imgStr" + (i + 1), |
| | | getImageStr("d:/safetyWork/file/" + comSwSafetyWorkRecordVO.getId() + "_" + i + ".jpg")); |
| | | } else { |
| | | dataMap.put("imgStr" + (i + 1), getImageStr("d:/safetyWork/file/blank.jpg")); |
| | | } |
| | | } |
| | | } |
| | | if (photo.size() == 4) { |
| | | for (int i = 0; i < 9; i++) { |
| | | if (i < 4) { |
| | | downloadPicture(photo.get(i), comSwSafetyWorkRecordVO.getId() + "_" + i, "d:/safetyWork/file/"); |
| | | dataMap.put("imgStr" + (i + 1), |
| | | getImageStr("d:/safetyWork/file/" + comSwSafetyWorkRecordVO.getId() + "_" + i + ".jpg")); |
| | | } else { |
| | | dataMap.put("imgStr" + (i + 1), getImageStr("d:/safetyWork/file/blank.jpg")); |
| | | } |
| | | } |
| | | } |
| | | if (photo.size() == 5) { |
| | | for (int i = 0; i < 9; i++) { |
| | | if (i < 5) { |
| | | downloadPicture(photo.get(i), comSwSafetyWorkRecordVO.getId() + "_" + i, "d:/safetyWork/file/"); |
| | | dataMap.put("imgStr" + (i + 1), |
| | | getImageStr("d:/safetyWork/file/" + comSwSafetyWorkRecordVO.getId() + "_" + i + ".jpg")); |
| | | } else { |
| | | dataMap.put("imgStr" + (i + 1), getImageStr("d:/safetyWork/file/blank.jpg")); |
| | | } |
| | | } |
| | | } |
| | | if (photo.size() == 6) { |
| | | for (int i = 0; i < 9; i++) { |
| | | if (i < 6) { |
| | | downloadPicture(photo.get(i), comSwSafetyWorkRecordVO.getId() + "_" + i, "d:/safetyWork/file/"); |
| | | dataMap.put("imgStr" + (i + 1), |
| | | getImageStr("d:/safetyWork/file/" + comSwSafetyWorkRecordVO.getId() + "_" + i + ".jpg")); |
| | | } else { |
| | | dataMap.put("imgStr" + (i + 1), getImageStr("d:/safetyWork/file/blank.jpg")); |
| | | } |
| | | } |
| | | } |
| | | if (photo.size() == 7) { |
| | | for (int i = 0; i < 9; i++) { |
| | | if (i < 7) { |
| | | downloadPicture(photo.get(i), comSwSafetyWorkRecordVO.getId() + "_" + i, "d:/safetyWork/file/"); |
| | | dataMap.put("imgStr" + (i + 1), |
| | | getImageStr("d:/safetyWork/file/" + comSwSafetyWorkRecordVO.getId() + "_" + i + ".jpg")); |
| | | } else { |
| | | dataMap.put("imgStr" + (i + 1), getImageStr("d:/safetyWork/file/blank.jpg")); |
| | | } |
| | | } |
| | | } |
| | | if (photo.size() == 8) { |
| | | for (int i = 0; i < 9; i++) { |
| | | if (i < 8) { |
| | | downloadPicture(photo.get(i), comSwSafetyWorkRecordVO.getId() + "_" + i, "d:/safetyWork/file/"); |
| | | dataMap.put("imgStr" + (i + 1), |
| | | getImageStr("d:/safetyWork/file/" + comSwSafetyWorkRecordVO.getId() + "_" + i + ".jpg")); |
| | | } else { |
| | | dataMap.put("imgStr" + (i + 1), getImageStr("d:/safetyWork/file/blank.jpg")); |
| | | } |
| | | } |
| | | } |
| | | if (photo.size() == 9) { |
| | | for (int i = 0; i < 9; i++) { |
| | | downloadPicture(photo.get(i), comSwSafetyWorkRecordVO.getId() + "_" + i, "d:/safetyWork/file/"); |
| | | dataMap.put("imgStr" + (i + 1), |
| | | getImageStr("d:/safetyWork/file/" + comSwSafetyWorkRecordVO.getId() + "_" + i + ".jpg")); |
| | | } |
| | | } |
| | | } else { |
| | | for (int i = 0; i < 9; i++) { |
| | | dataMap.put("imgStr" + (i + 1), getImageStr("d:/safetyWork/file/blank.jpg")); |
| | | } |
| | | dataMap.put("imgList",list); |
| | | } |
| | | // 备注 |
| | | if (StringUtils.isNotEmpty(comSwSafetyWorkRecordVO.getRemark())) { |
| | |
| | | sftp.uploadMore(ftpUrl, name , inputStream); |
| | | sftp.logout(); |
| | | inputStream.close(); |
| | | FileUtils.deleteDirectory(new File(property+File.separator+"word"+File.separator)); |
| | | FileUtils.deleteDirectory(new File(zipFile)); |
| | | FileUtils.deleteDirectory(new File("d:/safetyWork/file/")); |
| | | } catch (FileNotFoundException e) { |
| | | e.printStackTrace(); |
| | | } catch (SftpException e) { |
| | |
| | | dataMap.put("patrolType", ""); |
| | | } |
| | | // 社区名称 |
| | | // dataMap.put("communityName", comSwPatrolRecordVO.getCommunityName()); |
| | | dataMap.put("communityName", comSwPatrolRecordVO.getCommunityName()); |
| | | // 地址 |
| | | if (StringUtils.isNotEmpty(comSwPatrolRecordVO.getAddress())) { |
| | | dataMap.put("address", comSwPatrolRecordVO.getAddress()); |
| | |
| | | photo = Arrays.asList(comSwPatrolRecordVO.getRecordPhoto().split(",")); |
| | | } |
| | | if (photo.size() != 0 && null != photo) { |
| | | if (photo.size() == 1) { |
| | | for (int i = 0; i < 9; i++) { |
| | | if (i < 1) { |
| | | downloadPicture(photo.get(i), comSwPatrolRecordVO.getId() + "_" + i, "d:/patrolRecord/file/"); |
| | | dataMap.put("imgStr" + (i + 1), |
| | | getImageStr("d:/patrolRecord/file/" + comSwPatrolRecordVO.getId() + "_" + i + ".jpg")); |
| | | } else { |
| | | dataMap.put("imgStr" + (i + 1), getImageStr("d:/patrolRecord/file/blank.jpg")); |
| | | } |
| | | } |
| | | 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")); |
| | | } |
| | | if (photo.size() == 2) { |
| | | for (int i = 0; i < 9; i++) { |
| | | if (i < 2) { |
| | | downloadPicture(photo.get(i), comSwPatrolRecordVO.getId() + "_" + i, "d:/patrolRecord/file/"); |
| | | dataMap.put("imgStr" + (i + 1), |
| | | getImageStr("d:/patrolRecord/file/" + comSwPatrolRecordVO.getId() + "_" + i + ".jpg")); |
| | | } else { |
| | | dataMap.put("imgStr" + (i + 1), getImageStr("d:/patrolRecord/file/blank.jpg")); |
| | | } |
| | | } |
| | | } |
| | | if (photo.size() == 3) { |
| | | for (int i = 0; i < 9; i++) { |
| | | if (i < 3) { |
| | | downloadPicture(photo.get(i), comSwPatrolRecordVO.getId() + "_" + i, "d:/patrolRecord/file/"); |
| | | dataMap.put("imgStr" + (i + 1), |
| | | getImageStr("d:/patrolRecord/file/" + comSwPatrolRecordVO.getId() + "_" + i + ".jpg")); |
| | | } else { |
| | | dataMap.put("imgStr" + (i + 1), getImageStr("d:/patrolRecord/file/blank.jpg")); |
| | | } |
| | | } |
| | | } |
| | | if (photo.size() == 4) { |
| | | for (int i = 0; i < 9; i++) { |
| | | if (i < 4) { |
| | | downloadPicture(photo.get(i), comSwPatrolRecordVO.getId() + "_" + i, "d:/patrolRecord/file/"); |
| | | dataMap.put("imgStr" + (i + 1), |
| | | getImageStr("d:/patrolRecord/file/" + comSwPatrolRecordVO.getId() + "_" + i + ".jpg")); |
| | | } else { |
| | | dataMap.put("imgStr" + (i + 1), getImageStr("d:/patrolRecord/file/blank.jpg")); |
| | | } |
| | | } |
| | | } |
| | | if (photo.size() == 5) { |
| | | for (int i = 0; i < 9; i++) { |
| | | if (i < 5) { |
| | | downloadPicture(photo.get(i), comSwPatrolRecordVO.getId() + "_" + i, "d:/patrolRecord/file/"); |
| | | dataMap.put("imgStr" + (i + 1), |
| | | getImageStr("d:/patrolRecord/file/" + comSwPatrolRecordVO.getId() + "_" + i + ".jpg")); |
| | | } else { |
| | | dataMap.put("imgStr" + (i + 1), getImageStr("d:/patrolRecord/file/blank.jpg")); |
| | | } |
| | | } |
| | | } |
| | | if (photo.size() == 6) { |
| | | for (int i = 0; i < 9; i++) { |
| | | if (i < 6) { |
| | | downloadPicture(photo.get(i), comSwPatrolRecordVO.getId() + "_" + i, "d:/patrolRecord/file/"); |
| | | dataMap.put("imgStr" + (i + 1), |
| | | getImageStr("d:/patrolRecord/file/" + comSwPatrolRecordVO.getId() + "_" + i + ".jpg")); |
| | | } else { |
| | | dataMap.put("imgStr" + (i + 1), getImageStr("d:/patrolRecord/file/blank.jpg")); |
| | | } |
| | | } |
| | | } |
| | | if (photo.size() == 7) { |
| | | for (int i = 0; i < 9; i++) { |
| | | if (i < 7) { |
| | | downloadPicture(photo.get(i), comSwPatrolRecordVO.getId() + "_" + i, "d:/patrolRecord/file/"); |
| | | dataMap.put("imgStr" + (i + 1), |
| | | getImageStr("d:/patrolRecord/file/" + comSwPatrolRecordVO.getId() + "_" + i + ".jpg")); |
| | | } else { |
| | | dataMap.put("imgStr" + (i + 1), getImageStr("d:/patrolRecord/file/blank.jpg")); |
| | | } |
| | | } |
| | | } |
| | | if (photo.size() == 8) { |
| | | for (int i = 0; i < 9; i++) { |
| | | if (i < 8) { |
| | | downloadPicture(photo.get(i), comSwPatrolRecordVO.getId() + "_" + i, "d:/patrolRecord/file/"); |
| | | dataMap.put("imgStr" + (i + 1), |
| | | getImageStr("d:/patrolRecord/file/" + comSwPatrolRecordVO.getId() + "_" + i + ".jpg")); |
| | | } else { |
| | | dataMap.put("imgStr" + (i + 1), getImageStr("d:/patrolRecord/file/blank.jpg")); |
| | | } |
| | | } |
| | | } |
| | | if (photo.size() == 9) { |
| | | for (int i = 0; i < 9; i++) { |
| | | downloadPicture(photo.get(i), comSwPatrolRecordVO.getId() + "_" + i, "d:/patrolRecord/file/"); |
| | | dataMap.put("imgStr" + (i + 1), |
| | | getImageStr("d:/patrolRecord/file/" + comSwPatrolRecordVO.getId() + "_" + i + ".jpg")); |
| | | } |
| | | } |
| | | } else { |
| | | for (int i = 0; i < 9; i++) { |
| | | dataMap.put("imgStr" + (i + 1), getImageStr("d:/patrolRecord/file/blank.jpg")); |
| | | } |
| | | dataMap.put("imgList",list); |
| | | } |
| | | // 备注 |
| | | if (StringUtils.isNotEmpty(comSwPatrolRecordVO.getRemark())) { |
| | |
| | | sftp.uploadMore(ftpUrl, name , inputStream); |
| | | sftp.logout(); |
| | | inputStream.close(); |
| | | FileUtils.deleteDirectory(new File(property+File.separator+"word"+File.separator)); |
| | | FileUtils.deleteDirectory(new File(zipFile)); |
| | | FileUtils.deleteDirectory(new File("d:/patrolRecord/file/")); |
| | | } catch (FileNotFoundException e) { |
| | | e.printStackTrace(); |
| | | } catch (SftpException e) { |
| | |
| | | } else { |
| | | dataMap.put("date", ""); |
| | | } |
| | | dataMap.put("communityName",comSwDangerReportVO.getCommunityName()); |
| | | // 巡查类型 |
| | | if (StringUtils.isNotEmpty(comSwDangerReportVO.getPatrolType())) { |
| | | dataMap.put("patrolType", comSwDangerReportVO.getPatrolType()); |
| | |
| | | dataMap.put("takeSteps", ""); |
| | | } |
| | | // 措施照片 |
| | | List<String> stepsPhoto = new ArrayList<>(); |
| | | List<String> photo1 = new ArrayList<>(); |
| | | if (StringUtils.isNotEmpty(comSwDangerReportVO.getStepsPhoto())) { |
| | | stepsPhoto = Arrays.asList(comSwDangerReportVO.getStepsPhoto().split(",")); |
| | | photo1 = Arrays.asList(comSwDangerReportVO.getStepsPhoto().split(",")); |
| | | } |
| | | if (stepsPhoto.size() != 0 && null != stepsPhoto) { |
| | | if (stepsPhoto.size() == 1) { |
| | | for (int i = 0; i < 9; i++) { |
| | | if (i < 1) { |
| | | downloadPicture(stepsPhoto.get(i), comSwDangerReportVO.getId() + "_steps_" + i, "d:/dangerReport/file/"); |
| | | dataMap.put("imgStr" + (i + 1), |
| | | getImageStr("d:/dangerReport/file/" + comSwDangerReportVO.getId() + "_steps_" + i + ".jpg")); |
| | | } else { |
| | | dataMap.put("imgStr" + (i + 1), getImageStr("d:/dangerReport/file/blank.jpg")); |
| | | } |
| | | } |
| | | for (int i = 0; i < 9; i++) { |
| | | if (i < 1) { |
| | | dataMap.put("imgStr" + (i + 19), |
| | | getImageStr("d:/dangerReport/file/" + comSwDangerReportVO.getId() + "_steps_" + i + ".jpg")); |
| | | } else { |
| | | dataMap.put("imgStr" + (i + 19), getImageStr("d:/dangerReport/file/blank.jpg")); |
| | | } |
| | | } |
| | | 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")); |
| | | } |
| | | if (stepsPhoto.size() == 2) { |
| | | for (int i = 0; i < 9; i++) { |
| | | if (i < 2) { |
| | | downloadPicture(stepsPhoto.get(i), comSwDangerReportVO.getId() + "_steps_" + i, "d:/dangerReport/file/"); |
| | | dataMap.put("imgStr" + (i + 1), |
| | | getImageStr("d:/dangerReport/file/" + comSwDangerReportVO.getId() + "_steps_" + i + ".jpg")); |
| | | } else { |
| | | dataMap.put("imgStr" + (i + 1), getImageStr("d:/dangerReport/file/blank.jpg")); |
| | | } |
| | | } |
| | | for (int i = 0; i < 9; i++) { |
| | | if (i < 2) { |
| | | dataMap.put("imgStr" + (i + 19), |
| | | getImageStr("d:/dangerReport/file/" + comSwDangerReportVO.getId() + "_steps_" + i + ".jpg")); |
| | | } else { |
| | | dataMap.put("imgStr" + (i + 19), getImageStr("d:/dangerReport/file/blank.jpg")); |
| | | } |
| | | } |
| | | } |
| | | if (stepsPhoto.size() == 3) { |
| | | for (int i = 0; i < 9; i++) { |
| | | if (i < 3) { |
| | | downloadPicture(stepsPhoto.get(i), comSwDangerReportVO.getId() + "_steps_" + i, "d:/dangerReport/file/"); |
| | | dataMap.put("imgStr" + (i + 1), |
| | | getImageStr("d:/dangerReport/file/" + comSwDangerReportVO.getId() + "_steps_" + i + ".jpg")); |
| | | } else { |
| | | dataMap.put("imgStr" + (i + 1), getImageStr("d:/dangerReport/file/blank.jpg")); |
| | | } |
| | | } |
| | | for (int i = 0; i < 9; i++) { |
| | | if (i < 3) { |
| | | dataMap.put("imgStr" + (i + 19), |
| | | getImageStr("d:/dangerReport/file/" + comSwDangerReportVO.getId() + "_steps_" + i + ".jpg")); |
| | | } else { |
| | | dataMap.put("imgStr" + (i + 19), getImageStr("d:/dangerReport/file/blank.jpg")); |
| | | } |
| | | } |
| | | } |
| | | if (stepsPhoto.size() == 4) { |
| | | for (int i = 0; i < 9; i++) { |
| | | if (i < 4) { |
| | | downloadPicture(stepsPhoto.get(i), comSwDangerReportVO.getId() + "_steps_" + i, "d:/dangerReport/file/"); |
| | | dataMap.put("imgStr" + (i + 1), |
| | | getImageStr("d:/dangerReport/file/" + comSwDangerReportVO.getId() + "_steps_" + i + ".jpg")); |
| | | } else { |
| | | dataMap.put("imgStr" + (i + 1), getImageStr("d:/dangerReport/file/blank.jpg")); |
| | | } |
| | | } |
| | | for (int i = 0; i < 9; i++) { |
| | | if (i < 4) { |
| | | dataMap.put("imgStr" + (i + 19), |
| | | getImageStr("d:/dangerReport/file/" + comSwDangerReportVO.getId() + "_steps_" + i + ".jpg")); |
| | | } else { |
| | | dataMap.put("imgStr" + (i + 19), getImageStr("d:/dangerReport/file/blank.jpg")); |
| | | } |
| | | } |
| | | } |
| | | if (stepsPhoto.size() == 5) { |
| | | for (int i = 0; i < 9; i++) { |
| | | if (i < 5) { |
| | | downloadPicture(stepsPhoto.get(i), comSwDangerReportVO.getId() + "_steps_" + i, "d:/dangerReport/file/"); |
| | | dataMap.put("imgStr" + (i + 1), |
| | | getImageStr("d:/dangerReport/file/" + comSwDangerReportVO.getId() + "_steps_" + i + ".jpg")); |
| | | } else { |
| | | dataMap.put("imgStr" + (i + 1), getImageStr("d:/dangerReport/file/blank.jpg")); |
| | | } |
| | | } |
| | | for (int i = 0; i < 9; i++) { |
| | | if (i < 5) { |
| | | dataMap.put("imgStr" + (i + 19), |
| | | getImageStr("d:/dangerReport/file/" + comSwDangerReportVO.getId() + "_steps_" + i + ".jpg")); |
| | | } else { |
| | | dataMap.put("imgStr" + (i + 19), getImageStr("d:/dangerReport/file/blank.jpg")); |
| | | } |
| | | } |
| | | } |
| | | if (stepsPhoto.size() == 6) { |
| | | for (int i = 0; i < 9; i++) { |
| | | if (i < 6) { |
| | | downloadPicture(stepsPhoto.get(i), comSwDangerReportVO.getId() + "_steps_" + i, "d:/dangerReport/file/"); |
| | | dataMap.put("imgStr" + (i + 1), |
| | | getImageStr("d:/dangerReport/file/" + comSwDangerReportVO.getId() + "_steps_" + i + ".jpg")); |
| | | } else { |
| | | dataMap.put("imgStr" + (i + 1), getImageStr("d:/dangerReport/file/blank.jpg")); |
| | | } |
| | | } |
| | | for (int i = 0; i < 9; i++) { |
| | | if (i < 6) { |
| | | dataMap.put("imgStr" + (i + 19), |
| | | getImageStr("d:/dangerReport/file/" + comSwDangerReportVO.getId() + "_steps_" + i + ".jpg")); |
| | | } else { |
| | | dataMap.put("imgStr" + (i + 19), getImageStr("d:/dangerReport/file/blank.jpg")); |
| | | } |
| | | } |
| | | } |
| | | if (stepsPhoto.size() == 7) { |
| | | for (int i = 0; i < 9; i++) { |
| | | if (i < 7) { |
| | | downloadPicture(stepsPhoto.get(i), comSwDangerReportVO.getId() + "_steps_" + i, "d:/dangerReport/file/"); |
| | | dataMap.put("imgStr" + (i + 1), |
| | | getImageStr("d:/dangerReport/file/" + comSwDangerReportVO.getId() + "_steps_" + i + ".jpg")); |
| | | } else { |
| | | dataMap.put("imgStr" + (i + 1), getImageStr("d:/dangerReport/file/blank.jpg")); |
| | | } |
| | | } |
| | | for (int i = 0; i < 9; i++) { |
| | | if (i < 7) { |
| | | dataMap.put("imgStr" + (i + 19), |
| | | getImageStr("d:/dangerReport/file/" + comSwDangerReportVO.getId() + "_steps_" + i + ".jpg")); |
| | | } else { |
| | | dataMap.put("imgStr" + (i + 19), getImageStr("d:/dangerReport/file/blank.jpg")); |
| | | } |
| | | } |
| | | } |
| | | if (stepsPhoto.size() == 8) { |
| | | for (int i = 0; i < 9; i++) { |
| | | if (i < 8) { |
| | | downloadPicture(stepsPhoto.get(i), comSwDangerReportVO.getId() + "_steps_" + i, "d:/dangerReport/file/"); |
| | | dataMap.put("imgStr" + (i + 1), |
| | | getImageStr("d:/dangerReport/file/" + comSwDangerReportVO.getId() + "_steps_" + i + ".jpg")); |
| | | } else { |
| | | dataMap.put("imgStr" + (i + 1), getImageStr("d:/dangerReport/file/blank.jpg")); |
| | | } |
| | | } |
| | | for (int i = 0; i < 9; i++) { |
| | | if (i < 8) { |
| | | dataMap.put("imgStr" + (i + 19), |
| | | getImageStr("d:/dangerReport/file/" + comSwDangerReportVO.getId() + "_steps_" + i + ".jpg")); |
| | | } else { |
| | | dataMap.put("imgStr" + (i + 19), getImageStr("d:/dangerReport/file/blank.jpg")); |
| | | } |
| | | } |
| | | } |
| | | if (stepsPhoto.size() == 9) { |
| | | for (int i = 0; i < 9; i++) { |
| | | downloadPicture(stepsPhoto.get(i), comSwDangerReportVO.getId() + "_steps_" + i, "d:/dangerReport/file/"); |
| | | dataMap.put("imgStr" + (i + 19), |
| | | getImageStr("d:/dangerReport/file/" + comSwDangerReportVO.getId() + "_steps_" + i + ".jpg")); |
| | | } |
| | | for (int i = 0; i < 9; i++) { |
| | | downloadPicture(stepsPhoto.get(i), comSwDangerReportVO.getId() + "_steps_" + i, "d:/dangerReport/file/"); |
| | | dataMap.put("imgStr" + (i + 1), |
| | | getImageStr("d:/dangerReport/file/" + comSwDangerReportVO.getId() + "_steps_" + i + ".jpg")); |
| | | } |
| | | } |
| | | } else { |
| | | for (int i = 0; i < 9; i++) { |
| | | dataMap.put("imgStr" + (i + 1), getImageStr("d:/dangerReport/file/blank.jpg")); |
| | | } |
| | | for (int i = 0; i < 9; i++) { |
| | | dataMap.put("imgStr" + (i + 19), getImageStr("d:/dangerReport/file/blank.jpg")); |
| | | } |
| | | dataMap.put("imgList",list); |
| | | } |
| | | // 社区处理建议 |
| | | if (StringUtils.isNotEmpty(comSwDangerReportVO.getCommunitySuggestion())) { |
| | |
| | | dataMap.put("findRecord", ""); |
| | | } |
| | | // 记录照片 |
| | | List<String> photo = new ArrayList<>(); |
| | | List<String> photo2 = new ArrayList<>(); |
| | | if (StringUtils.isNotEmpty(comSwDangerReportVO.getRecordPhoto())) { |
| | | photo = Arrays.asList(comSwDangerReportVO.getRecordPhoto().split(",")); |
| | | photo2 = Arrays.asList(comSwDangerReportVO.getRecordPhoto().split(",")); |
| | | } |
| | | if (photo.size() != 0 && null != photo) { |
| | | if (photo.size() == 1) { |
| | | for (int i = 0; i < 9; i++) { |
| | | if (i < 1) { |
| | | downloadPicture(photo.get(i), comSwDangerReportVO.getId() + "_find_" + i, "d:/dangerReport/file/"); |
| | | dataMap.put("imgStr" + (i + 10), |
| | | getImageStr("d:/dangerReport/file/" + comSwDangerReportVO.getId() + "_find_" + i + ".jpg")); |
| | | } else { |
| | | dataMap.put("imgStr" + (i + 10), getImageStr("d:/dangerReport/file/blank.jpg")); |
| | | } |
| | | } |
| | | 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")); |
| | | } |
| | | if (photo.size() == 2) { |
| | | for (int i = 0; i < 9; i++) { |
| | | if (i < 2) { |
| | | downloadPicture(photo.get(i), comSwDangerReportVO.getId() + "_find_" + i, "d:/dangerReport/file/"); |
| | | dataMap.put("imgStr" + (i + 10), |
| | | getImageStr("d:/dangerReport/file/" + comSwDangerReportVO.getId() + "_find_" + i + ".jpg")); |
| | | } else { |
| | | dataMap.put("imgStr" + (i + 10), getImageStr("d:/dangerReport/file/blank.jpg")); |
| | | } |
| | | } |
| | | } |
| | | if (photo.size() == 3) { |
| | | for (int i = 0; i < 9; i++) { |
| | | if (i < 3) { |
| | | downloadPicture(photo.get(i), comSwDangerReportVO.getId() + "_find_" + i, "d:/dangerReport/file/"); |
| | | dataMap.put("imgStr" + (i + 10), |
| | | getImageStr("d:/dangerReport/file/" + comSwDangerReportVO.getId() + "_find_" + i + ".jpg")); |
| | | } else { |
| | | dataMap.put("imgStr" + (i + 10), getImageStr("d:/dangerReport/file/blank.jpg")); |
| | | } |
| | | } |
| | | } |
| | | if (photo.size() == 4) { |
| | | for (int i = 0; i < 9; i++) { |
| | | if (i < 4) { |
| | | downloadPicture(photo.get(i), comSwDangerReportVO.getId() + "_find_" + i, "d:/dangerReport/file/"); |
| | | dataMap.put("imgStr" + (i + 10), |
| | | getImageStr("d:/dangerReport/file/" + comSwDangerReportVO.getId() + "_find_" + i + ".jpg")); |
| | | } else { |
| | | dataMap.put("imgStr" + (i + 10), getImageStr("d:/dangerReport/file/blank.jpg")); |
| | | } |
| | | } |
| | | } |
| | | if (photo.size() == 5) { |
| | | for (int i = 0; i < 9; i++) { |
| | | if (i < 5) { |
| | | downloadPicture(photo.get(i), comSwDangerReportVO.getId() + "_find_" + i, "d:/dangerReport/file/"); |
| | | dataMap.put("imgStr" + (i + 10), |
| | | getImageStr("d:/dangerReport/file/" + comSwDangerReportVO.getId() + "_find_" + i + ".jpg")); |
| | | } else { |
| | | dataMap.put("imgStr" + (i + 10), getImageStr("d:/dangerReport/file/blank.jpg")); |
| | | } |
| | | } |
| | | } |
| | | if (photo.size() == 6) { |
| | | for (int i = 0; i < 9; i++) { |
| | | if (i < 6) { |
| | | downloadPicture(photo.get(i), comSwDangerReportVO.getId() + "_find_" + i, "d:/dangerReport/file/"); |
| | | dataMap.put("imgStr" + (i + 10), |
| | | getImageStr("d:/dangerReport/file/" + comSwDangerReportVO.getId() + "_find_" + i + ".jpg")); |
| | | } else { |
| | | dataMap.put("imgStr" + (i + 10), getImageStr("d:/dangerReport/file/blank.jpg")); |
| | | } |
| | | } |
| | | } |
| | | if (photo.size() == 7) { |
| | | for (int i = 0; i < 9; i++) { |
| | | if (i < 7) { |
| | | downloadPicture(photo.get(i), comSwDangerReportVO.getId() + "_find_" + i, "d:/dangerReport/file/"); |
| | | dataMap.put("imgStr" + (i + 10), |
| | | getImageStr("d:/dangerReport/file/" + comSwDangerReportVO.getId() + "_find_" + i + ".jpg")); |
| | | } else { |
| | | dataMap.put("imgStr" + (i + 10), getImageStr("d:/dangerReport/file/blank.jpg")); |
| | | } |
| | | } |
| | | } |
| | | if (photo.size() == 8) { |
| | | for (int i = 0; i < 9; i++) { |
| | | if (i < 8) { |
| | | downloadPicture(photo.get(i), comSwDangerReportVO.getId() + "_find_" + i, "d:/dangerReport/file/"); |
| | | dataMap.put("imgStr" + (i + 10), |
| | | getImageStr("d:/dangerReport/file/" + comSwDangerReportVO.getId() + "_find_" + i + ".jpg")); |
| | | } else { |
| | | dataMap.put("imgStr" + (i + 10), getImageStr("d:/dangerReport/file/blank.jpg")); |
| | | } |
| | | } |
| | | } |
| | | if (photo.size() == 9) { |
| | | for (int i = 0; i < 9; i++) { |
| | | downloadPicture(photo.get(i), comSwDangerReportVO.getId() + "_find_" + i, "d:/dangerReport/file/"); |
| | | dataMap.put("imgStr" + (i + 10), |
| | | getImageStr("d:/dangerReport/file/" + comSwDangerReportVO.getId() + "_find_" + i + ".jpg")); |
| | | } |
| | | } |
| | | } else { |
| | | for (int i = 0; i < 9; i++) { |
| | | dataMap.put("imgStr" + (i + 10), getImageStr("d:/dangerReport/file/blank.jpg")); |
| | | } |
| | | dataMap.put("imgList2",list); |
| | | } |
| | | // 备注 |
| | | if (StringUtils.isNotEmpty(comSwDangerReportVO.getRemark())) { |
| | |
| | | sftp.uploadMore(ftpUrl, name , inputStream); |
| | | sftp.logout(); |
| | | inputStream.close(); |
| | | FileUtils.deleteDirectory(new File(property+File.separator+"word"+File.separator)); |
| | | FileUtils.deleteDirectory(new File(zipFile)); |
| | | FileUtils.deleteDirectory(new File("d:/dangerReport/file/")); |
| | | } catch (FileNotFoundException e) { |
| | | e.printStackTrace(); |
| | | } catch (SftpException e) { |
| | |
| | | if (ObjectUtils.isEmpty(id)) { |
| | | return R.fail("动态主键不能为空"); |
| | | } |
| | | Date publishAt = comActDynVO.getPublishAt(); |
| | | if (!ObjectUtils.isEmpty(publishAt)) { |
| | | long time = publishAt.getTime(); |
| | | long l = System.currentTimeMillis(); |
| | | if (l >= time) { |
| | | comActDynVO.setStatus(1); |
| | | } else { |
| | | comActDynVO.setStatus(0); |
| | | } |
| | | } |
| | | comActDynVO.setCommunityId(communityId); |
| | | return communityService.putDynamic(comActDynVO); |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "上传文件") |
| | | @PostMapping(value = "/upload/file/noToken", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | public R uploadImageNoToken(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | | String extension = FilenameUtils.getExtension(file.getOriginalFilename()); |
| | | String name = UUID.randomUUID().toString().replaceAll("-", "") + "." + extension; |
| | | try { |
| | | SFTPUtil sftp = new SFTPUtil(userName, password, host, port); |
| | | sftp.login(); |
| | | InputStream is = file.getInputStream(); |
| | | sftp.uploadMore(FtpConstants.FTPFILEPATH_IDCARD, name, is); |
| | | sftp.logout(); |
| | | return R.ok(url + "/idcard/" + name); |
| | | } catch (Exception e) { |
| | | log.error("上传照片失败【{}】", e.getMessage()); |
| | | return R.fail(); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "minio上传文件测试") |
| | | @PostMapping(value = "/minio/upload/file", consumes = "multipart/*", headers = "content-type=multipart/form-date") |
| | | public R minipuploadImage(@RequestParam MultipartFile file, HttpServletRequest request) { |
| | |
| | | if (null == id || 0 == id) { |
| | | return R.fail("动态主键不能为空"); |
| | | } |
| | | Date publishAt = partyCommitteeVO.getPublishAt(); |
| | | if (!ObjectUtils.isEmpty(publishAt)) { |
| | | long time = publishAt.getTime(); |
| | | long l = System.currentTimeMillis(); |
| | | if (l > time) { |
| | | partyCommitteeVO.setStatus(1); |
| | | } else { |
| | | partyCommitteeVO.setStatus(2); |
| | | } |
| | | } |
| | | return partyBuildingService.updateYnamic(partyCommitteeVO); |
| | | } |
| | | |
| | |
| | | public R exportElderAuthRecords(@RequestBody PageElderAuthRecordsDTO pageElderAuthRecordsDTO) { |
| | | // List<ComMngPopulationMistakeExcelVO> list = JSON.parseArray(mistakes,ComMngPopulationMistakeExcelVO.class); |
| | | // 生成动态模板excel通过ftp工具上传到主节点,然后返回模板下载地址 |
| | | pageElderAuthRecordsDTO.setCommunityId(this.getCommunityId()); |
| | | String ftpUrl = "/mnt/data/web/excel/"; |
| | | String nowDate = DateUtils.getCurrentDateString(); |
| | | String name = "高龄认证导出数据" + nowDate + ".xlsx"; |
New file |
| | |
| | | package com.panzhihua.community_backstage.excel; |
| | | |
| | | import com.alibaba.excel.enums.CellDataTypeEnum; |
| | | import com.alibaba.excel.metadata.CellData; |
| | | import com.alibaba.excel.metadata.Head; |
| | | import com.alibaba.excel.write.metadata.holder.WriteSheetHolder; |
| | | import com.alibaba.excel.write.style.column.AbstractColumnWidthStyleStrategy; |
| | | import org.apache.poi.ss.usermodel.Cell; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | public class CustemSecondhandler extends AbstractColumnWidthStyleStrategy { |
| | | |
| | | private Map<Integer, Map<Integer, Integer>> CACHE = new HashMap(8); |
| | | |
| | | public CustemSecondhandler() { |
| | | } |
| | | |
| | | @Override |
| | | protected void setColumnWidth(WriteSheetHolder writeSheetHolder, List<CellData> cellDataList, Cell cell, Head head, Integer relativeRowIndex, Boolean isHead) { |
| | | boolean needSetWidth = isHead || !CollectionUtils.isEmpty(cellDataList); |
| | | if (needSetWidth) { |
| | | Map<Integer, Integer> maxColumnWidthMap = (Map)CACHE.get(writeSheetHolder.getSheetNo()); |
| | | if (maxColumnWidthMap == null) { |
| | | maxColumnWidthMap = new HashMap(16); |
| | | CACHE.put(writeSheetHolder.getSheetNo(), maxColumnWidthMap); |
| | | } |
| | | |
| | | Integer columnWidth = this.dataLength(cellDataList, cell, isHead); |
| | | if (columnWidth >= 0) { |
| | | if (columnWidth > 25) { |
| | | columnWidth = 25; |
| | | } |
| | | |
| | | Integer maxColumnWidth = (Integer)((Map)maxColumnWidthMap).get(cell.getColumnIndex()); |
| | | if (maxColumnWidth == null || columnWidth > maxColumnWidth) { |
| | | ((Map)maxColumnWidthMap).put(cell.getColumnIndex(), columnWidth); |
| | | writeSheetHolder.getSheet().setColumnWidth(cell.getColumnIndex(), columnWidth * 75); |
| | | } |
| | | if(cell.getStringCellValue().equals("隔离体温情况")){ |
| | | writeSheetHolder.getSheet().setColumnWidth(cell.getColumnIndex(),70*75); |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | | |
| | | private Integer dataLength(List<CellData> cellDataList, Cell cell, Boolean isHead) { |
| | | if (isHead) { |
| | | return cell.getStringCellValue().getBytes().length; |
| | | } else { |
| | | CellData cellData = cellDataList.get(0); |
| | | CellDataTypeEnum type = cellData.getType(); |
| | | if (type == null) { |
| | | return -1; |
| | | } else { |
| | | switch(type) { |
| | | case STRING: |
| | | return cellData.getStringValue().getBytes().length; |
| | | case BOOLEAN: |
| | | return cellData.getBooleanValue().toString().getBytes().length; |
| | | case NUMBER: |
| | | return cellData.getNumberValue().toString().getBytes().length; |
| | | default: |
| | | return -1; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | Integer columnWidth = this.dataLength(cellDataList, cell, isHead); |
| | | if (columnWidth >= 0) { |
| | | if (columnWidth > 25) { |
| | | columnWidth = 25; |
| | | if (columnWidth > 20) { |
| | | columnWidth = 20; |
| | | } |
| | | |
| | | Integer maxColumnWidth = (Integer)((Map)maxColumnWidthMap).get(cell.getColumnIndex()); |
| | |
| | | ((Map)maxColumnWidthMap).put(cell.getColumnIndex(), columnWidth); |
| | | writeSheetHolder.getSheet().setColumnWidth(cell.getColumnIndex(), columnWidth * 75); |
| | | } |
| | | if(cell.getStringCellValue().equals("有无")){ |
| | | writeSheetHolder.getSheet().setColumnWidth(cell.getColumnIndex(),30*75); |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | <orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.64" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-config-client:2.2.6.RELEASE" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.11.2" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.11.2" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-eureka-client:2.2.6.RELEASE" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-hystrix:2.2.6.RELEASE" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-eureka-client:2.2.6.RELEASE" level="project" /> |
| | |
| | | <orderEntry type="library" name="Maven: com.netflix.netflix-commons:netflix-eventbus:0.3.0" level="project" /> |
| | | <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-infix:0.3.0" level="project" /> |
| | | <orderEntry type="library" scope="RUNTIME" name="Maven: commons-jxpath:commons-jxpath:1.3" level="project" /> |
| | | <orderEntry type="library" scope="RUNTIME" name="Maven: joda-time:joda-time:2.3" level="project" /> |
| | | <orderEntry type="library" scope="RUNTIME" name="Maven: org.antlr:antlr-runtime:3.4" level="project" /> |
| | | <orderEntry type="library" scope="RUNTIME" name="Maven: org.antlr:stringtemplate:3.2.1" level="project" /> |
| | | <orderEntry type="library" scope="RUNTIME" name="Maven: antlr:antlr:2.7.7" level="project" /> |
| | |
| | | <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.14" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.tencentcloudapi:tencentcloud-sdk-java:3.1.286" level="project" /> |
| | | <orderEntry type="library" name="Maven: commons-logging:commons-logging:1.2" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.squareup.okio:okio:1.12.0" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.squareup.okhttp:okhttp:2.7.5" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.6" level="project" /> |
| | | <orderEntry type="library" name="Maven: javax.xml.bind:jaxb-api:2.3.1" level="project" /> |
| | |
| | | <orderEntry type="library" name="Maven: ognl:ognl:3.2.6" level="project" /> |
| | | <orderEntry type="library" name="Maven: javax.validation:validation-api:2.0.1.Final" level="project" /> |
| | | <orderEntry type="library" name="Maven: cn.afterturn:easypoi-annotation:4.1.0" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.google.zxing:core:3.1.0" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.google.zxing:javase:3.1.0" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-javanica:1.5.18" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.ow2.asm:asm:5.0.4" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-core:1.5.18" level="project" /> |
| | |
| | | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-actuator:2.3.4.RELEASE" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator-autoconfigure:2.3.4.RELEASE" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator:2.3.4.RELEASE" level="project" /> |
| | | <orderEntry type="library" name="Maven: io.minio:minio:6.0.8" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.google.http-client:google-http-client-xml:1.37.0" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.google.http-client:google-http-client:1.37.0" level="project" /> |
| | | <orderEntry type="library" name="Maven: io.opencensus:opencensus-api:0.24.0" level="project" /> |
| | | <orderEntry type="library" name="Maven: io.grpc:grpc-context:1.33.0" level="project" /> |
| | | <orderEntry type="library" name="Maven: io.opencensus:opencensus-contrib-http-util:0.24.0" level="project" /> |
| | | <orderEntry type="library" name="Maven: xpp3:xpp3:1.1.4c" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.squareup.okhttp3:okhttp:3.14.4" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.squareup.okio:okio:1.17.2" level="project" /> |
| | | <orderEntry type="library" name="Maven: joda-time:joda-time:2.7" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.11.2" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.google.code.findbugs:annotations:3.0.1" level="project" /> |
| | | <orderEntry type="library" name="Maven: net.jcip:jcip-annotations:1.0" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:3.0.2" level="project" /> |
| | | </component> |
| | | </module> |
| | |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * 外部调用提交预约/登记 |
| | | * @param comActReserveCommitVO |
| | | * @return |
| | | */ |
| | | @PostMapping("/commitNoToken") |
| | | public R commitNoToken(@RequestBody ComActReserveCommitVO comActReserveCommitVO){ |
| | | return comActReserveService.commitNoToken(comActReserveCommitVO); |
| | | } |
| | | |
| | | /** |
| | | * 小程序提交预约/登记 |
| | |
| | | public R list(@RequestParam("communityId") Long communityId){ |
| | | return comActReserveService.reserveListApplets(communityId); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询居家隔离统计 |
| | | * @param detailedAdminDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/admin/register/homeQuarantine/page") |
| | | public R pageRegisterHomeQuarantine(@RequestBody PageReserveRegisterDetailedAdminDTO detailedAdminDTO) { |
| | | return comActReserveAnswerContentService.pageRegisterHomeQuarantine(detailedAdminDTO); |
| | | } |
| | | |
| | | /** |
| | | * 居家隔离导出 |
| | | * @param detailedAdminDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/admin/homeQuarantine/export") |
| | | public R exportHomeQuarantine(@RequestBody PageReserveRegisterDetailedAdminDTO detailedAdminDTO) { |
| | | return comActReserveAnswerContentService.exportHomeQuarantine(detailedAdminDTO); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.ComPropertyPublicityDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComPropertyPublicityDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.service.ComPropertyPublicityService; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * @title: ComPropertyPublicityApi |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 物业宣传相关接口 |
| | | * @author: hans |
| | | * @date: 2021/11/11 10:08 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/property/publicity") |
| | | public class ComPropertyPublicityApi { |
| | | |
| | | @Resource |
| | | private ComPropertyPublicityService comPropertyPublicityService; |
| | | |
| | | /** |
| | | * 分页查询物业宣传 |
| | | * @param pageComPropertyPublicityDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/page") |
| | | public R pageComPropertyPublicity(@RequestBody PageComPropertyPublicityDTO pageComPropertyPublicityDTO) { |
| | | return comPropertyPublicityService.pageComPropertyPublicity(pageComPropertyPublicityDTO); |
| | | } |
| | | |
| | | /** |
| | | * 新增物业宣传 |
| | | * @param comPropertyPublicityDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/add") |
| | | public R addComPropertyPublicity(@RequestBody ComPropertyPublicityDTO comPropertyPublicityDTO){ |
| | | return comPropertyPublicityService.addComPropertyPublicity(comPropertyPublicityDTO); |
| | | } |
| | | |
| | | /** |
| | | * 修改物业宣传 |
| | | * @param comPropertyPublicityDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/update") |
| | | public R updateComPropertyPublicity(@RequestBody ComPropertyPublicityDTO comPropertyPublicityDTO) { |
| | | return comPropertyPublicityService.updateComPropertyPublicity(comPropertyPublicityDTO); |
| | | } |
| | | |
| | | /** |
| | | * 查看物业宣传信息 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/get") |
| | | public R getComPropertyPublicity(@RequestParam("id") Long id) { |
| | | return comPropertyPublicityService.getComPropertyPublicity(id); |
| | | } |
| | | |
| | | /** |
| | | * 删除物业宣传 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/delete") |
| | | public R deleteComPropertyPublicity(@RequestParam("id") Long id) { |
| | | return comPropertyPublicityService.deleteComPropertyPublicity(id); |
| | | } |
| | | |
| | | /** |
| | | * 物业公司列表 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @GetMapping("/list/property") |
| | | public R listProperty(@RequestParam(value = "villageId", required = false) Long villageId, |
| | | @RequestParam("communityId") Long communityId) { |
| | | return comPropertyPublicityService.listProperty(villageId, communityId); |
| | | } |
| | | /** |
| | | * 分页查询物业宣传-小程序 |
| | | * @param pageComPropertyPublicityDTO |
| | | * @return |
| | | */ |
| | | @PostMapping("/page/applet") |
| | | public R pageComPropertyPublicityApplet(@RequestBody PageComPropertyPublicityDTO pageComPropertyPublicityDTO) { |
| | | return comPropertyPublicityService.pageComPropertyPublicityApplet(pageComPropertyPublicityDTO); |
| | | } |
| | | |
| | | /** |
| | | * 增加物业宣传浏览量 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/incr-view") |
| | | public R incrPropertyPublicityView(@RequestParam("id") Long id) { |
| | | return comPropertyPublicityService.incrView(id); |
| | | } |
| | | } |
| | |
| | | "HAVING distance >= 0 and distance <= #{communityDTO.distance} ORDER BY distance ASC") |
| | | List<CommunitySwitchAllAppletsVO> getCommunityListByNearby(@Param("communityDTO") SearchCommunityDTO communityDTO); |
| | | |
| | | @Select("select t.community_id,t.`name` from com_act t left join com_street t1 on t.street_id = t1.street_id where t.state = 0 and t1.street_id in (12,14,15,16,17,19)") |
| | | @Select("select community_id,name from com_act where state = 0 and area_code = '510423' ") |
| | | List<EventGridCommunityAdminVO> getWestCommunityLists(); |
| | | } |
| | |
| | | import com.panzhihua.common.model.vos.community.ComActQuestnaireAnswerContentVO; |
| | | import com.panzhihua.common.model.vos.community.reserve.ComActReserveRegisterDetailedAnswerVO; |
| | | import com.panzhihua.common.model.vos.community.reserve.ComActReserveRegisterDetailedVO; |
| | | import com.panzhihua.common.model.vos.community.reserve.HomeQuarantineRegisterStatisticsVO; |
| | | import com.panzhihua.service_community.model.dos.ComActReserveAnswerContentDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | |
| | | ComActReserveRegisterDetailedVO getRegisterDetailedById(@Param("reserveRecordId") Long reserveRecordId); |
| | | |
| | | IPage<String> pageRegisterHomeQuarantine(@Param("page") Page page, @Param("detailedAdminDTO") PageReserveRegisterDetailedAdminDTO detailedAdminDTO); |
| | | |
| | | List<HomeQuarantineRegisterStatisticsVO> selectStatistics(@Param("reserveId") Long reserveId, @Param("record") String record); |
| | | |
| | | /** |
| | | * 查询居家隔离统计身份证号码 |
| | | * @param detailedAdminDTO |
| | | * @return |
| | | */ |
| | | List<String> exportHomeQuarantine(@Param("detailedAdminDTO") PageReserveRegisterDetailedAdminDTO detailedAdminDTO); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.community.PageComPropertyPublicityDTO; |
| | | import com.panzhihua.common.model.vos.community.ComMngVillageVO; |
| | | import com.panzhihua.common.model.vos.community.ComPropertyPublicityVO; |
| | | import com.panzhihua.service_community.model.dos.ComPropertyPublicityDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @title: ComPropertyPublicityDAO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 物业宣传mapper |
| | | * @author: hans |
| | | * @date: 2021/11/11 13:58 |
| | | */ |
| | | @Mapper |
| | | public interface ComPropertyPublicityDAO extends BaseMapper<ComPropertyPublicityDO> { |
| | | |
| | | /** |
| | | * 获取用户菜单权限 |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | List<String> retrieveUserMenuList(@Param("userId") Long userId); |
| | | |
| | | /** |
| | | * 分页查询物业宣传 |
| | | * @param pageComPropertyPublicityDTO |
| | | * @return |
| | | */ |
| | | IPage<ComPropertyPublicityVO> pageComPropertyPublicity(@Param("page") Page page, @Param("pageComPropertyPublicityDTO") PageComPropertyPublicityDTO pageComPropertyPublicityDTO); |
| | | |
| | | /** |
| | | * 获取物业宣传详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | ComPropertyPublicityVO selectDetail(@Param("id") Long id); |
| | | |
| | | /** |
| | | * 分页查询物业宣传-小程序 |
| | | * @param pageComPropertyPublicityDTO |
| | | * @return |
| | | */ |
| | | IPage<ComPropertyPublicityVO> pageComPropertyPublicityApplet(@Param("page") Page page, @Param("pageComPropertyPublicityDTO") PageComPropertyPublicityDTO pageComPropertyPublicityDTO); |
| | | |
| | | /** |
| | | * 增加物业宣传浏览量 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | int incrView(@Param("id") Long id); |
| | | } |
| | |
| | | */ |
| | | ConvenientMerchantVO selectMerchantById(@Param("merchantId") Long merchantId); |
| | | |
| | | List<ConvenientMerchantVO> selectMerchantByName(@Param("communityId") Long communityId, @Param("currentMon") String currentMon); |
| | | |
| | | /** |
| | | * 获取社区下热门商家 |
| | | * |
New file |
| | |
| | | package com.panzhihua.service_community.model.dos; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @title: ComPropertyPublicityDO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 物业宣传实体类 |
| | | * @author: hans |
| | | * @date: 2021/11/11 13:55 |
| | | */ |
| | | @Data |
| | | @TableName(value = "com_property_publicity") |
| | | public class ComPropertyPublicityDO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键id |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 宣传标题 |
| | | */ |
| | | private String title; |
| | | |
| | | /** |
| | | * 宣传类型(0.其他 1.停水通知 2.停电通知 3.停气通知 4.物业公告 5.优秀业主 |
| | | */ |
| | | private Integer publicityType; |
| | | |
| | | /** |
| | | * 其他类型自定义名称 |
| | | */ |
| | | private String other; |
| | | |
| | | /** |
| | | * 封面 |
| | | */ |
| | | private String cover; |
| | | |
| | | /** |
| | | * 内容形式(1.文章链接 2.自定义内容) |
| | | */ |
| | | private Integer contentType; |
| | | |
| | | /** |
| | | * 文章链接 |
| | | */ |
| | | private String articleUrl; |
| | | |
| | | /** |
| | | * 自定义内容 |
| | | */ |
| | | private String diyContent; |
| | | |
| | | /** |
| | | * 物业公司id |
| | | */ |
| | | private Long propertyId; |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | private Long communityId; |
| | | |
| | | /** |
| | | * 浏览量 |
| | | */ |
| | | private Integer viewNum; |
| | | |
| | | /** |
| | | * 发布时间 |
| | | */ |
| | | private Date createdAt; |
| | | |
| | | /** |
| | | * 更新时间 |
| | | */ |
| | | private Date updatedAt; |
| | | } |
| | |
| | | */ |
| | | R registerDetailedListAdmin(PageReserveRegisterDetailedAdminDTO detailedAdminDTO); |
| | | |
| | | /** |
| | | * 分页查询居家隔离统计 |
| | | * @param detailedAdminDTO |
| | | * @return |
| | | */ |
| | | R pageRegisterHomeQuarantine(PageReserveRegisterDetailedAdminDTO detailedAdminDTO); |
| | | |
| | | /** |
| | | * 居家隔离导出 |
| | | * @param detailedAdminDTO |
| | | * @return |
| | | */ |
| | | R exportHomeQuarantine(PageReserveRegisterDetailedAdminDTO detailedAdminDTO); |
| | | } |
| | |
| | | R commit(ComActReserveCommitVO comActReserveCommitVO); |
| | | |
| | | /** |
| | | * 外部提交预约登记 |
| | | * @param comActReserveCommitVO |
| | | * @return 预约登记结果 |
| | | */ |
| | | R commitNoToken(ComActReserveCommitVO comActReserveCommitVO); |
| | | |
| | | /** |
| | | * 小程序我的预约登记 |
| | | * @param pageUserReserveDTO |
| | | * @return 预约登记列表 |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.community.ComPropertyPublicityDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComPropertyPublicityDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.model.dos.ComPropertyPublicityDO; |
| | | |
| | | /** |
| | | * @title: ComPropertyPublicityService |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 物业宣传服务类 |
| | | * @author: hans |
| | | * @date: 2021/11/11 13:56 |
| | | */ |
| | | public interface ComPropertyPublicityService extends IService<ComPropertyPublicityDO> { |
| | | |
| | | /** |
| | | * 分页查询物业宣传 |
| | | * @param pageComPropertyPublicityDTO |
| | | * @return |
| | | */ |
| | | R pageComPropertyPublicity(PageComPropertyPublicityDTO pageComPropertyPublicityDTO); |
| | | |
| | | /** |
| | | * 新增物业宣传 |
| | | * @param comPropertyPublicityDTO |
| | | * @return |
| | | */ |
| | | R addComPropertyPublicity(ComPropertyPublicityDTO comPropertyPublicityDTO); |
| | | |
| | | /** |
| | | * 修改物业宣传 |
| | | * @param comPropertyPublicityDTO |
| | | * @return |
| | | */ |
| | | R updateComPropertyPublicity(ComPropertyPublicityDTO comPropertyPublicityDTO); |
| | | |
| | | /** |
| | | * 查看物业宣传信息 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | R getComPropertyPublicity(Long id); |
| | | |
| | | /** |
| | | * 删除物业宣传 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | R deleteComPropertyPublicity(Long id); |
| | | |
| | | /** |
| | | * 物业公司列表 |
| | | * |
| | | * @param villageId |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | R listProperty(Long villageId, Long communityId); |
| | | |
| | | /** |
| | | * 分页查询物业宣传-小程序 |
| | | * @param pageComPropertyPublicityDTO |
| | | * @return |
| | | */ |
| | | R pageComPropertyPublicityApplet(PageComPropertyPublicityDTO pageComPropertyPublicityDTO); |
| | | |
| | | /** |
| | | * 增加物业宣传浏览量 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | R incrView(Long id); |
| | | } |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import java.net.URL; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.xml.bind.DatatypeConverter; |
| | | |
| | | import com.panzhihua.common.model.vos.community.reserve.HomeQuarantineRegisterExportVO; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActQuestnaireAnswerContentVO; |
| | | import com.panzhihua.common.model.vos.community.ComActQuestnaireSubVO; |
| | | import com.panzhihua.common.model.vos.community.reserve.ComActReserveRecordListVO; |
| | | import com.panzhihua.common.model.vos.community.reserve.ComActReserveRegisterDetailedAnswerVO; |
| | | import com.panzhihua.common.model.vos.community.reserve.ComActReserveRegisterDetailedVO; |
| | | import com.panzhihua.common.model.vos.community.reserve.HomeQuarantineRegisterStatisticsVO; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_community.dao.ComActReserveAnswerContentMapper; |
| | | import com.panzhihua.service_community.dao.ComActReserveSubMapper; |
| | | import com.panzhihua.service_community.model.dos.ComActQuestnaireAnswerContentDO; |
| | | import com.panzhihua.service_community.model.dos.ComActQuestnaireSubDO; |
| | | import com.panzhihua.service_community.model.dos.ComActReserveAnswerContentDO; |
| | | import com.panzhihua.service_community.model.dos.ComActReserveSubDO; |
| | | import com.panzhihua.service_community.service.ComActReserveAnswerContentService; |
| | | import com.panzhihua.service_community.service.ComActReserveSubService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * @auther lyq |
| | |
| | | @Override |
| | | public R exportRegisterAdmin(PageReserveRegisterDetailedAdminDTO pageReserveRegisterDetailedAdminDTO){ |
| | | QuestnaireAnswersDTO result = new QuestnaireAnswersDTO(); |
| | | |
| | | //查询题目 |
| | | List<ComActReserveSubDO> list = comActReserveSubMapper.selectList(new QueryWrapper<ComActReserveSubDO>().lambda() |
| | | .eq(ComActReserveSubDO::getReserveId, pageReserveRegisterDetailedAdminDTO.getReserveId()).orderByAsc(ComActReserveSubDO::getCreateAt).orderByAsc(ComActReserveSubDO::getId)); |
| | | List<ComActQuestnaireSubVO> listSubVo = new ArrayList<>(); |
| | | list.forEach(subDo -> { |
| | | if(!subDo.getType().equals(5)){ |
| | | ComActQuestnaireSubVO comActQuestnaireSubVO = new ComActQuestnaireSubVO(); |
| | | BeanUtils.copyProperties(subDo, comActQuestnaireSubVO); |
| | | listSubVo.add(comActQuestnaireSubVO); |
| | | } |
| | | }); |
| | | result.setSubs(listSubVo); |
| | | result.setSubs(retrieveQuestnaireSub(pageReserveRegisterDetailedAdminDTO)); |
| | | |
| | | //查询用户回答 |
| | | List<ComActQuestnaireAnswerContentVO> vos = this.baseMapper.export(pageReserveRegisterDetailedAdminDTO); |
| | |
| | | //渲染序号 |
| | | HashMap<String,String> map = new HashMap<>(); |
| | | map.put("nub",nub + ""); |
| | | //渲染登记时间 |
| | | map.put("time", DateUtils.format(registerDetailed.getCreateAt(),DateUtils.ymdhms_format)); |
| | | //渲染用户昵称 |
| | | map.put("nickName",registerDetailed.getNickName()); |
| | | //查询记录填写答案并装载到数据集中 |
| | |
| | | } |
| | | //渲染登记流水号 |
| | | map.put("id",registerDetailed.getId() + ""); |
| | | //渲染登记时间 |
| | | map.put("time", DateUtils.format(registerDetailed.getCreateAt(),DateUtils.ymdhms_format)); |
| | | resultMapList.add(map); |
| | | nub++; |
| | | } |
| | |
| | | resultPage.setRecords(resultMapList); |
| | | return R.ok(resultPage); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询居家隔离统计 |
| | | * @param detailedAdminDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R pageRegisterHomeQuarantine(PageReserveRegisterDetailedAdminDTO detailedAdminDTO) { |
| | | IPage<HashMap<String,String>> resultPage = new Page<>(); |
| | | |
| | | Page page = new Page(detailedAdminDTO.getPageNum(), detailedAdminDTO.getPageSize()); |
| | | IPage<String> statisticsVOIPage = this.baseMapper.pageRegisterHomeQuarantine(page, detailedAdminDTO); |
| | | |
| | | resultPage.setCurrent(statisticsVOIPage.getCurrent()); |
| | | resultPage.setTotal(statisticsVOIPage.getTotal()); |
| | | resultPage.setSize(statisticsVOIPage.getSize()); |
| | | resultPage.setPages(statisticsVOIPage.getPages()); |
| | | |
| | | List<String> records = statisticsVOIPage.getRecords(); |
| | | List<HashMap<String,String>> resultMapList = new ArrayList<>(); |
| | | if (!records.isEmpty()) { |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); |
| | | int nub = 1; |
| | | for (String record : records) { |
| | | //渲染序号 |
| | | HashMap<String,String> map = new HashMap<>(); |
| | | map.put("nub", nub + ""); |
| | | List<HomeQuarantineRegisterStatisticsVO> statisticsList = this.baseMapper.selectStatistics(detailedAdminDTO.getReserveId(), record); |
| | | StringBuffer conditions = new StringBuffer(); |
| | | //渲染首次登记时间 |
| | | map.put("time", DateUtils.format(statisticsList.get(0).getCreateAt(), DateUtils.ymdhms_format)); |
| | | statisticsList.forEach(e -> { |
| | | String reserveSubContent = e.getReserveSubContent(); |
| | | String dateString = dateFormat.format(e.getCreateAt()); |
| | | if (reserveSubContent.contains("上午体温")) { |
| | | int index = conditions.indexOf(dateString + " " + "上午体温"); |
| | | if (index == -1) { |
| | | conditions.append(dateString + " " + "上午体温:" + e.getAnswerContent() + "℃" + "\n"); |
| | | } else { |
| | | conditions.replace(index, conditions.indexOf("℃", index), |
| | | dateString + " " + "上午体温:" + e.getAnswerContent()); |
| | | } |
| | | } else if (reserveSubContent.contains("下午体温")) { |
| | | int index = conditions.indexOf(dateString + " " + "下午体温"); |
| | | if (index == -1) { |
| | | conditions.append(dateString + " " + "下午体温:" + e.getAnswerContent() + "℃" + "\n"); |
| | | } else { |
| | | conditions.replace(index, conditions.indexOf("℃", index), |
| | | dateString + " " + "下午体温:" + e.getAnswerContent()); |
| | | } |
| | | } else if (reserveSubContent.contains("隔离情况")) { |
| | | int index = conditions.indexOf(dateString + " " + "当日隔离情况"); |
| | | if (index == -1) { |
| | | conditions.append(dateString + " " + "当日隔离情况:" + e.getAnswerContent() + "\n"); |
| | | conditions.append("————————" + "\n"); |
| | | } else { |
| | | conditions.replace(index, conditions.indexOf("\n", index), |
| | | dateString + " " + "当日隔离情况:" + e.getAnswerContent()); |
| | | } |
| | | } else { |
| | | map.put(e.getReserveSubId() + "", e.getAnswerContent()); |
| | | } |
| | | }); |
| | | map.put("isolation", conditions.toString()); |
| | | resultMapList.add(map); |
| | | nub++; |
| | | } |
| | | } |
| | | resultPage.setRecords(resultMapList); |
| | | return R.ok(resultPage); |
| | | } |
| | | |
| | | /** |
| | | * 居家隔离导出 |
| | | * @param detailedAdminDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R exportHomeQuarantine(PageReserveRegisterDetailedAdminDTO detailedAdminDTO) { |
| | | HomeQuarantineRegisterExportVO exportVO = new HomeQuarantineRegisterExportVO(); |
| | | //题目 |
| | | exportVO.setSubs(retrieveQuestnaireSub(detailedAdminDTO)); |
| | | //结果数据集合 |
| | | List<List<Object>> resultList = new ArrayList<>(); |
| | | List<String> idCards = this.baseMapper.exportHomeQuarantine(detailedAdminDTO); |
| | | if (!idCards.isEmpty()) { |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); |
| | | for (String idCard : idCards) { |
| | | //构建单个用户数据 |
| | | List<Object> userData = new ArrayList<>(); |
| | | List<HomeQuarantineRegisterStatisticsVO> statisticsList = this.baseMapper.selectStatistics(detailedAdminDTO.getReserveId(), idCard); |
| | | HomeQuarantineRegisterStatisticsVO firstStatisticsVO = statisticsList.get(0); |
| | | userData.add(firstStatisticsVO.getNickName()); |
| | | userData.add(DateUtils.format(firstStatisticsVO.getCreateAt(), DateUtils.ymdhms_format)); |
| | | int size = statisticsList.size(); |
| | | List<HomeQuarantineRegisterStatisticsVO> lastStatisticsVOList = statisticsList.subList(size - 13, size); |
| | | for (HomeQuarantineRegisterStatisticsVO statisticsVO : lastStatisticsVOList) { |
| | | //判断当前的组件类型是否是图片上传,导出时需要导出图片 |
| | | if (statisticsVO.getOptionType().equals(11)) { |
| | | try { |
| | | userData.add(new URL(statisticsVO.getAnswerContent())); |
| | | } catch (Exception e) { |
| | | userData.add(" "); |
| | | log.error("导出转换图片失败!"); |
| | | } |
| | | continue; |
| | | } |
| | | //判断当前组件类型是否签名 |
| | | if (statisticsVO.getOptionType().equals(12)) { |
| | | try { |
| | | userData.add(DatatypeConverter.parseBase64Binary(statisticsVO.getAnswerContent().substring(statisticsVO.getAnswerContent().indexOf(",") + 1))); |
| | | } catch (Exception e) { |
| | | userData.add(" "); |
| | | log.error("导出转换图片失败!"); |
| | | } |
| | | continue; |
| | | } |
| | | userData.add(statisticsVO.getAnswerContent()); |
| | | } |
| | | StringBuffer conditions = new StringBuffer(); |
| | | statisticsList.forEach(e -> { |
| | | String reserveSubContent = e.getReserveSubContent(); |
| | | String dateString = dateFormat.format(e.getCreateAt()); |
| | | if (reserveSubContent.contains("上午体温")) { |
| | | int index = conditions.indexOf(dateString + " " + "上午体温"); |
| | | if (index == -1) { |
| | | conditions.append(dateString + " " + "上午体温:" + e.getAnswerContent() + "℃" + "\n"); |
| | | } else { |
| | | conditions.replace(index, conditions.indexOf("℃", index), |
| | | dateString + " " + "上午体温:" + e.getAnswerContent()); |
| | | } |
| | | } else if (reserveSubContent.contains("下午体温")) { |
| | | int index = conditions.indexOf(dateString + " " + "下午体温"); |
| | | if (index == -1) { |
| | | conditions.append(dateString + " " + "下午体温:" + e.getAnswerContent() + "℃" + "\n"); |
| | | } else { |
| | | conditions.replace(index, conditions.indexOf("℃", index), |
| | | dateString + " " + "下午体温:" + e.getAnswerContent()); |
| | | } |
| | | } else if (reserveSubContent.contains("隔离情况")) { |
| | | int index = conditions.indexOf(dateString + " " + "当日隔离情况"); |
| | | if (index == -1) { |
| | | conditions.append(dateString + " " + "当日隔离情况:" + e.getAnswerContent() + "\n"); |
| | | conditions.append("————————" + "\n"); |
| | | } else { |
| | | conditions.replace(index, conditions.indexOf("\n", index), |
| | | dateString + " " + "当日隔离情况:" + e.getAnswerContent()); |
| | | } |
| | | } |
| | | }); |
| | | userData.add(conditions.toString()); |
| | | resultList.add(userData); |
| | | } |
| | | } |
| | | exportVO.setDataList(resultList); |
| | | return R.ok(exportVO); |
| | | } |
| | | |
| | | private List<ComActQuestnaireSubVO> retrieveQuestnaireSub(PageReserveRegisterDetailedAdminDTO detailedAdminDTO) { |
| | | //查询题目 |
| | | List<ComActReserveSubDO> list = comActReserveSubMapper.selectList(new QueryWrapper<ComActReserveSubDO>().lambda() |
| | | .eq(ComActReserveSubDO::getReserveId, detailedAdminDTO.getReserveId()).orderByAsc(ComActReserveSubDO::getCreateAt).orderByAsc(ComActReserveSubDO::getId)); |
| | | List<ComActQuestnaireSubVO> listSubVo = new ArrayList<>(); |
| | | list.forEach(subDo -> { |
| | | if(!subDo.getType().equals(5)){ |
| | | ComActQuestnaireSubVO comActQuestnaireSubVO = new ComActQuestnaireSubVO(); |
| | | BeanUtils.copyProperties(subDo, comActQuestnaireSubVO); |
| | | listSubVo.add(comActQuestnaireSubVO); |
| | | } |
| | | }); |
| | | return listSubVo; |
| | | } |
| | | } |
| | |
| | | return R.fail("参数错误"); |
| | | } |
| | | |
| | | @Override |
| | | public R commitNoToken(ComActReserveCommitVO comActReserveCommitVO) { |
| | | if(comActReserveCommitVO!=null){ |
| | | ComActReserveDO comActReserveDO=new ComActReserveDO(); |
| | | Date nowDate=DateUtil.date(); |
| | | //查询预约登记记录 |
| | | List<ComActReserveDO> list=comActReserveMapper.selectList(new QueryWrapper<ComActReserveDO>().lambda().eq(ComActReserveDO::getCommunityId,comActReserveCommitVO.getCommunityId()).eq(ComActReserveDO::getTitle,"返攀登记")); |
| | | if(!list.isEmpty()){ |
| | | comActReserveDO=list.get(0); |
| | | } |
| | | comActReserveCommitVO.setId(comActReserveDO.getId()); |
| | | if(comActReserveDO!=null){ |
| | | List<QuestnaiteSubVO> questnaiteSubVOS = JSON.parseArray(comActReserveCommitVO.getJsonObject(),QuestnaiteSubVO.class); |
| | | if(!questnaiteSubVOS.isEmpty()){ |
| | | Long questId=comActReserveCommitVO.getId(); |
| | | List<ComActReserveAnswerContentDO> answerContentList=new ArrayList<>(); |
| | | for(QuestnaiteSubVO questnaiteSub:questnaiteSubVOS){ |
| | | //查询用户填写题目 |
| | | ComActReserveSubDO questnaireSubDO = comActReserveSubMapper.selectOne(new QueryWrapper<ComActReserveSubDO>().lambda() |
| | | .eq(ComActReserveSubDO::getReserveId,questId).eq(ComActReserveSubDO::getKey,questnaiteSub.getKey())); |
| | | if(questnaireSubDO == null){ |
| | | log.error("未查询到调查问卷题目,题目名称:" + questnaiteSub.getLabel() + "题目key:" + questnaiteSub.getKey()); |
| | | continue; |
| | | } |
| | | Long queSubId = questnaireSubDO.getId(); |
| | | //根据上传的类型查询不同的题目选项 |
| | | if(questnaiteSub.getType().equals(QuestnaiteSubVO.type.danxuan) || questnaiteSub.getType().equals(QuestnaiteSubVO.type.imgselect)){ |
| | | //单选题处理 |
| | | ComActReserveSubSelectionDO subSelectionDO = comActReserveSubSelectionMapper.selectOne(new QueryWrapper<ComActReserveSubSelectionDO>() |
| | | .lambda().eq(ComActReserveSubSelectionDO::getReserveSubId,queSubId).eq(ComActReserveSubSelectionDO::getReserveId,questId) |
| | | .eq(ComActReserveSubSelectionDO::getKey,questnaiteSub.getValues())); |
| | | if(subSelectionDO == null){ |
| | | log.error("未查询到调查问卷选项,题目名称:" + questnaiteSub.getLabel() + "选项key:" + questnaiteSub.getValues()); |
| | | continue; |
| | | } |
| | | |
| | | ComActReserveAnswerContentDO answerContentDO = new ComActReserveAnswerContentDO(); |
| | | answerContentDO.setCreateAt(nowDate); |
| | | answerContentDO.setReserveSelectionId(subSelectionDO.getId()); |
| | | answerContentDO.setReserveSubId(queSubId); |
| | | answerContentDO.setType(1); |
| | | answerContentDO.setChoice(subSelectionDO.getOptionName()); |
| | | answerContentDO.setAnswerContent(subSelectionDO.getContent()); |
| | | answerContentList.add(answerContentDO); |
| | | }else if(questnaiteSub.getType().equals(QuestnaiteSubVO.type.duoxuan)){ |
| | | //多选题处理 |
| | | String values = questnaiteSub.getValues(); |
| | | String []value = values.split(","); |
| | | for (int i = 0; i < value.length; i++) { |
| | | ComActReserveSubSelectionDO subSelectionDO = comActReserveSubSelectionMapper.selectOne(new QueryWrapper<ComActReserveSubSelectionDO>() |
| | | .lambda().eq(ComActReserveSubSelectionDO::getReserveSubId,queSubId).eq(ComActReserveSubSelectionDO::getReserveId,questId) |
| | | .eq(ComActReserveSubSelectionDO::getKey,value[i])); |
| | | if(subSelectionDO == null){ |
| | | log.error("未查询到调查问卷选项,题目名称:" + questnaiteSub.getLabel() + "选项key:" + questnaiteSub.getValues()); |
| | | continue; |
| | | } |
| | | ComActReserveAnswerContentDO answerContentDO = new ComActReserveAnswerContentDO(); |
| | | answerContentDO.setCreateAt(nowDate); |
| | | answerContentDO.setReserveSelectionId(subSelectionDO.getId()); |
| | | answerContentDO.setReserveSubId(queSubId); |
| | | answerContentDO.setType(1); |
| | | answerContentDO.setChoice(subSelectionDO.getOptionName()); |
| | | answerContentDO.setAnswerContent(subSelectionDO.getContent()); |
| | | answerContentList.add(answerContentDO); |
| | | } |
| | | }else{ |
| | | //文字描述不做处理 |
| | | if(!questnaiteSub.getType().equals(QuestnaiteSubVO.type.describe)){ |
| | | //问答题处理 |
| | | String values = questnaiteSub.getValues(); |
| | | ComActReserveAnswerContentDO answerContentDO = new ComActReserveAnswerContentDO(); |
| | | answerContentDO.setCreateAt(nowDate); |
| | | answerContentDO.setReserveSubId(queSubId); |
| | | answerContentDO.setType(2); |
| | | answerContentDO.setAnswerContent(values); |
| | | answerContentList.add(answerContentDO); |
| | | } |
| | | } |
| | | } |
| | | if(!answerContentList.isEmpty()){ |
| | | //更新回答用户数量 |
| | | Integer joinCount = comActReserveDO.getJoinCount(); |
| | | comActReserveDO.setJoinCount(joinCount != null ? joinCount + 1 : 1); |
| | | comActReserveMapper.updateById(comActReserveDO); |
| | | //新增用户答题记录 |
| | | ComActReserveRecordDO userAnswerDO = new ComActReserveRecordDO(); |
| | | userAnswerDO.setContent(comActReserveCommitVO.getContent()!=null?comActReserveCommitVO.getContent():""); |
| | | userAnswerDO.setName(comActReserveCommitVO.getName()!=null?comActReserveCommitVO.getName():""); |
| | | userAnswerDO.setCommunityId(comActReserveCommitVO.getCommunityId()); |
| | | userAnswerDO.setPhone(comActReserveCommitVO.getPhone()!=null?comActReserveCommitVO.getPhone():""); |
| | | userAnswerDO.setReserveId(questId); |
| | | userAnswerDO.setReserveTime(comActReserveCommitVO.getReserveTime()!=null?comActReserveCommitVO.getReserveTime():new Date()); |
| | | userAnswerDO.setType(comActReserveCommitVO.getType()!=null? comActReserveCommitVO.getType() : 2); |
| | | userAnswerDO.setCreateAt(nowDate); |
| | | userAnswerDO.setJsonObject(comActReserveCommitVO.getJsonObject()); |
| | | userAnswerDO.setStatus(ComActReserveRecordDO.status.cg); |
| | | comActReserveRecordService.saveOrUpdate(userAnswerDO); |
| | | |
| | | //给答题记录赋值预约登记记录id |
| | | answerContentList.forEach(answerContent -> { |
| | | answerContent.setReserveRecordId(userAnswerDO.getId()); |
| | | }); |
| | | comActReserveAnswerContentService.saveBatch(answerContentList); |
| | | //新增用户操作记录 |
| | | ComActReserveOperationRecordDO comActReserveOperationRecordDO=new ComActReserveOperationRecordDO(); |
| | | comActReserveOperationRecordDO.setReserveId(comActReserveCommitVO.getId()); |
| | | comActReserveOperationRecordDO.setReserveRecordId(userAnswerDO.getId()); |
| | | comActReserveOperationRecordDO.setType(ComActReserveOperationRecordDO.type.br); |
| | | comActReserveOperationRecordDO.setCreateAt(DateUtil.date()); |
| | | comActReserveOperationRecordDO.setReserveTime(comActReserveCommitVO.getReserveTime()); |
| | | comActReserveOperationRecordDO.setReserveContent(COMMIT); |
| | | //comActReserveOperationRecordDO.setPhone(comActReserveCommitVO.getPhone()); |
| | | comActReserveOperationRecordDO.setStatus(ComActReserveOperationRecordDO.status.ytj); |
| | | //comActReserveOperationRecordDO.setRemark(comActReserveCommitVO.getContent()); |
| | | comActReserveOperationRecordMapper.insert(comActReserveOperationRecordDO); |
| | | return R.ok("提交成功"); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | | return R.fail("参数错误"); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 社区后台-分页查询预约登记列表 |
| | |
| | | if(isBack!=1){ |
| | | comActReserveDO.setViewNum(comActReserveDO.getViewNum()+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")); |
| | | List<ComActReserveRecordDO> list=comActReserveRecordMapper.selectList(new QueryWrapper<ComActReserveRecordDO>().eq("user_id",userId).eq("reserve_id",id).in("status",1,2).orderByDesc("create_at")); |
| | | List<ComActReserveRecordDO> secondlist=comActReserveRecordMapper.selectList(new QueryWrapper<ComActReserveRecordDO>().eq("user_id",userId).eq("reserve_id",id).orderByDesc("create_at")); |
| | | //判断当前数据是否可重复提交 |
| | | if(comActReserveDO.getIsRepeat()==ComActReserveDetailVO.isOk.y||list.isEmpty()){ |
| | | comActReserveDetailVO.setIsOk(ComActReserveDetailVO.isOk.n); |
| | |
| | | public R subjectListAdmin(Long reserveId){ |
| | | List<ComActReserveSubListVO> resultList = new ArrayList<>(100); |
| | | resultList.add(new ComActReserveSubListVO("nub","序号")); |
| | | resultList.add(new ComActReserveSubListVO("time","登记时间")); |
| | | resultList.add(new ComActReserveSubListVO("nickName","用户昵称")); |
| | | List<ComActReserveSubListVO> subList = this.baseMapper.getReserveSubjectList(reserveId); |
| | | if(subList != null && !subList.isEmpty()){ |
| | |
| | | // resultList.addAll(list); |
| | | } |
| | | resultList.add(new ComActReserveSubListVO("id","登记流水")); |
| | | resultList.add(new ComActReserveSubListVO("time","登记时间")); |
| | | return R.ok(resultList); |
| | | } |
| | | |
| | |
| | | comMngPopulationDO.setPhone(comElderAuthRecordVO.getPhone()); |
| | | comMngPopulationDAO.updateById(comMngPopulationDO); |
| | | comElderAuthElderliesDO.setAddress(comElderAuthRecordVO.getAddress()); |
| | | comElderAuthElderliesDO.setPhone(comElderAuthRecordVO.getPhone()); |
| | | comElderAuthElderliesDO.setIdCard(null); |
| | | comElderAuthElderliesDAO.updateById(comElderAuthElderliesDO); |
| | | ComPensionAuthPensionerDO comPensionAuthPensionerDO=comPensionAuthPensionerDAO.selectOne(new QueryWrapper<ComPensionAuthPensionerDO>().lambda().eq(ComPensionAuthPensionerDO::getPopulationId,comMngPopulationDO.getId())); |
| | | if(comPensionAuthPensionerDO!=null){ |
| | | comPensionAuthPensionerDO.setAddress(comElderAuthRecordVO.getAddress()); |
| | | comPensionAuthPensionerDO.setPhone(comElderAuthRecordVO.getPhone()); |
| | | comPensionAuthPensionerDO.setIdCard(null); |
| | | comPensionAuthPensionerDAO.updateById(comPensionAuthPensionerDO); |
| | | } |
| | | return R.ok(); |
| | |
| | | populationDO.setVillageName(comMngVillageDO.getGroupAt()); |
| | | populationDO.setCardNoStr(vo.getCardNo()); |
| | | populationDO.setUpdateAt(new Date()); |
| | | populationDO.setDeath(vo.getDeath().toString()); |
| | | |
| | | String cardNoAES = populationDO.getCardNo(); |
| | | try { |
| | |
| | | comMngPopulationDO.setPhone(comElderAuthRecordVO.getPhone()); |
| | | comMngPopulationDAO.updateById(comMngPopulationDO); |
| | | comPensionAuthPensionerDO.setAddress(comElderAuthRecordVO.getAddress()); |
| | | comPensionAuthPensionerDO.setPhone(comElderAuthRecordVO.getPhone()); |
| | | comPensionAuthPensionerDO.setIdCard(null); |
| | | comPensionAuthPensionerDAO.updateById(comPensionAuthPensionerDO); |
| | | ComElderAuthElderliesDO comElderAuthElderliesDO=comElderAuthElderliesDAO.selectOne(new QueryWrapper<ComElderAuthElderliesDO>().lambda().eq(ComElderAuthElderliesDO::getPopulationId,comMngPopulationDO.getId())); |
| | | if(comElderAuthElderliesDO!=null){ |
| | | comElderAuthElderliesDO.setAddress(comElderAuthRecordVO.getAddress()); |
| | | comElderAuthElderliesDO.setPhone(comElderAuthRecordVO.getPhone()); |
| | | comElderAuthElderliesDO.setIdCard(null); |
| | | comElderAuthElderliesDAO.updateById(comElderAuthElderliesDO); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | return R.fail("当前期数也认证,请勿重复认证"); |
| | | return R.fail("当前期数已认证,请勿重复认证"); |
| | | } |
| | | return R.fail("无养老认证数据"); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import static java.util.Objects.isNull; |
| | | import static java.util.Objects.nonNull; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.vos.community.ComMngVillageVO; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.ObjectUtils; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.community.ComPropertyPublicityDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComPropertyPublicityDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComMngStructAreaVO; |
| | | import com.panzhihua.service_community.dao.ComMngStructAreaDAO; |
| | | import com.panzhihua.service_community.dao.ComPropertyDao; |
| | | import com.panzhihua.service_community.dao.ComPropertyPublicityDAO; |
| | | import com.panzhihua.service_community.entity.ComProperty; |
| | | import com.panzhihua.service_community.model.dos.ComMngStructAreaDO; |
| | | import com.panzhihua.service_community.model.dos.ComPropertyPublicityDO; |
| | | import com.panzhihua.service_community.service.ComPropertyPublicityService; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * @title: ComPropertyPublicityServiceImpl |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: 物业宣传服务实现类 |
| | | * @author: hans |
| | | * @date: 2021/11/11 13:57 |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | public class ComPropertyPublicityServiceImpl extends ServiceImpl<ComPropertyPublicityDAO, ComPropertyPublicityDO> implements ComPropertyPublicityService { |
| | | |
| | | @Resource |
| | | private ComPropertyDao comPropertyDao; |
| | | @Resource |
| | | private ComMngStructAreaDAO comMngStructAreaDAO; |
| | | |
| | | /** |
| | | * 分页查询物业宣传 |
| | | * @param pageComPropertyPublicityDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R pageComPropertyPublicity(PageComPropertyPublicityDTO pageComPropertyPublicityDTO) { |
| | | Long userId = pageComPropertyPublicityDTO.getUserId(); |
| | | ComProperty comProperty = comPropertyDao.selectOne(new QueryWrapper<ComProperty>().lambda().eq(ComProperty::getUserId, userId)); |
| | | if (nonNull(comProperty)) { |
| | | //用户为物业 |
| | | pageComPropertyPublicityDTO.setPropertyId(comProperty.getId()); |
| | | pageComPropertyPublicityDTO.setVillageId(comProperty.getAreaId()); |
| | | } else { |
| | | //非物业用户查看是否拥有菜单权限 |
| | | List<String> menuList = this.baseMapper.retrieveUserMenuList(userId); |
| | | if (menuList.isEmpty() || !menuList.contains("物业宣传")) { |
| | | return R.fail("暂无权限"); |
| | | } |
| | | } |
| | | Page page = new Page<>(); |
| | | page.setSize(pageComPropertyPublicityDTO.getPageSize()); |
| | | page.setCurrent(pageComPropertyPublicityDTO.getPageNum()); |
| | | return R.ok(this.baseMapper.pageComPropertyPublicity(page, pageComPropertyPublicityDTO)); |
| | | } |
| | | |
| | | /** |
| | | * 新增物业宣传 |
| | | * @param comPropertyPublicityDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R addComPropertyPublicity(ComPropertyPublicityDTO comPropertyPublicityDTO) { |
| | | Long userId = comPropertyPublicityDTO.getUserId(); |
| | | ComProperty comProperty = comPropertyDao.selectOne(new QueryWrapper<ComProperty>().lambda().eq(ComProperty::getUserId, userId)); |
| | | if (isNull(comProperty)) { |
| | | return R.fail("暂无权限"); |
| | | } |
| | | comPropertyPublicityDTO.setPropertyId(comProperty.getId()); |
| | | ComPropertyPublicityDO publicityDO = new ComPropertyPublicityDO(); |
| | | BeanUtils.copyProperties(comPropertyPublicityDTO, publicityDO); |
| | | Date nowDate = new Date(); |
| | | publicityDO.setCreatedAt(nowDate); |
| | | publicityDO.setUpdatedAt(nowDate); |
| | | int result = this.baseMapper.insert(publicityDO); |
| | | if (result > 0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("添加失败"); |
| | | } |
| | | |
| | | /** |
| | | * 修改物业宣传 |
| | | * @param comPropertyPublicityDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R updateComPropertyPublicity(ComPropertyPublicityDTO comPropertyPublicityDTO) { |
| | | ComPropertyPublicityDO comPropertyPublicityDO = this.baseMapper.selectById(comPropertyPublicityDTO.getId()); |
| | | if (isNull(comPropertyPublicityDO)) { |
| | | return R.fail("信息不存在"); |
| | | } |
| | | BeanUtils.copyProperties(comPropertyPublicityDTO, comPropertyPublicityDO); |
| | | comPropertyPublicityDO.setUpdatedAt(new Date()); |
| | | int result = this.baseMapper.updateById(comPropertyPublicityDO); |
| | | if (result > 0) { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("修改失败"); |
| | | } |
| | | |
| | | /** |
| | | * 查看物业宣传信息 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R getComPropertyPublicity(Long id) { |
| | | return R.ok(this.baseMapper.selectDetail(id)); |
| | | } |
| | | |
| | | /** |
| | | * 删除物业宣传 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R deleteComPropertyPublicity(Long id) { |
| | | this.baseMapper.deleteById(id); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 物业公司列表 |
| | | * |
| | | * @param villageId |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R listProperty(Long villageId, Long communityId) { |
| | | List<ComProperty> propertyList; |
| | | if (nonNull(villageId)) { |
| | | propertyList = comPropertyDao.selectList(new QueryWrapper<ComProperty>().lambda() |
| | | .eq(ComProperty::getCommunityId, communityId).eq(ComProperty::getAreaId, villageId)); |
| | | } else { |
| | | propertyList = comPropertyDao.selectList(new QueryWrapper<ComProperty>().lambda().eq(ComProperty::getCommunityId, communityId)); |
| | | } |
| | | return R.ok(propertyList); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询物业宣传-小程序 |
| | | * @param pageComPropertyPublicityDTO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R pageComPropertyPublicityApplet(PageComPropertyPublicityDTO pageComPropertyPublicityDTO) { |
| | | Page page = new Page<>(); |
| | | page.setSize(pageComPropertyPublicityDTO.getPageSize()); |
| | | page.setCurrent(pageComPropertyPublicityDTO.getPageNum()); |
| | | return R.ok(this.baseMapper.pageComPropertyPublicityApplet(page, pageComPropertyPublicityDTO)); |
| | | } |
| | | |
| | | /** |
| | | * 增加物业宣传浏览量 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R incrView(Long id) { |
| | | this.baseMapper.incrView(id); |
| | | return R.ok(); |
| | | } |
| | | } |
| | |
| | | .eq(ComSwPatrolRecordReportDO::getPatrolRecordId, patrolRecordId)); |
| | | if (null != comSwPatrolRecordReportDO) { |
| | | if (comSwPatrolRecordVO.getIsHiddenDanger().equals(ComSwPatrolRecordVO.isOk.yes)) { |
| | | if (null != comSwDangerReportDAO.selectById(comSwPatrolRecordReportDO.getReportId())) { |
| | | ComSwDangerReportDO comSwDangerReportDO=comSwDangerReportDAO.selectById(comSwPatrolRecordReportDO.getReportId()); |
| | | if (null != comSwDangerReportDO) { |
| | | comSwPatrolRecordVO.setDisplayButton(3); |
| | | comSwPatrolRecordVO.setDagerNo(comSwDangerReportDO.getDangerNo()); |
| | | } else { |
| | | comSwPatrolRecordVO.setDisplayButton(2); |
| | | } |
| | |
| | | return R.fail("该值班表不存在"); |
| | | } |
| | | ComSwRotaDO checkCreditCode = comSwRotaDAO.selectOne(new QueryWrapper<ComSwRotaDO>().lambda() |
| | | .eq(ComSwRotaDO::getRotaDate, comSwRotaSaveDTO.getRotaDate())); |
| | | .eq(ComSwRotaDO::getRotaDate, comSwRotaSaveDTO.getRotaDate()).eq(ComSwRotaDO::getCommunityId,comSwRotaSaveDTO.getCommunityId())); |
| | | if (null != checkCreditCode && !comSwRotaDO.getId().equals(checkCreditCode.getId())) { |
| | | return R.fail("该值班表已存在,值班日期重复"); |
| | | } |
| | |
| | | comSwRotaDAO.updateById(comSwRotaDO); |
| | | } else { |
| | | Integer count = comSwRotaDAO.selectCount(new QueryWrapper<ComSwRotaDO>().lambda() |
| | | .eq(ComSwRotaDO::getRotaDate, comSwRotaSaveDTO.getRotaDate())); |
| | | .eq(ComSwRotaDO::getRotaDate, comSwRotaSaveDTO.getRotaDate()).eq(ComSwRotaDO::getCommunityId,comSwRotaSaveDTO.getCommunityId())); |
| | | if (count > 0) { |
| | | return R.fail("该值班表已存在,值班日期重复"); |
| | | } |
| | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.ComSwSafetyWorkEditDTO; |
| | | import com.panzhihua.service_community.model.dos.ComActDO; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | } |
| | | |
| | | // 所属社区名称 |
| | | comSwSafetyWorkRecordVO.setCommunityName(comActDAO.selectById(communityId).getName()); |
| | | ComActDO comActDO=comActDAO.selectById(comSwSafetyWorkRecordVO.getCommunityId()); |
| | | if(comActDO!=null&&StringUtils.isNotEmpty(comActDO.getName())){ |
| | | comSwSafetyWorkRecordVO.setCommunityName(comActDO.getName()); |
| | | } |
| | | |
| | | return R.ok(comSwSafetyWorkRecordVO); |
| | | } |
| | | |
| | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R addMerchant(ConvenientMerchantDTO convenientMerchantDTO) { |
| | | ComActDO comActDO = comActDAO.selectById(convenientMerchantDTO.getCommunityId()); |
| | | ConvenientMerchantDO convenientMerchantDO = new ConvenientMerchantDO(); |
| | | BeanUtils.copyProperties(convenientMerchantDTO, convenientMerchantDO); |
| | | if(convenientMerchantDTO.getCommunityId()==0){ |
| | | convenientMerchantDO.setCommunityName("西区社区"); |
| | | } |
| | | else { |
| | | ComActDO comActDO = comActDAO.selectById(convenientMerchantDTO.getCommunityId()); |
| | | convenientMerchantDO.setCommunityName(comActDO.getName()); |
| | | } |
| | | convenientMerchantDO.setUserId(0L); |
| | | convenientMerchantDO.setCommunityName(comActDO.getName()); |
| | | convenientMerchantDO.setCreatedAt(new Date()); |
| | | int insertResult = this.baseMapper.insert(convenientMerchantDO); |
| | | if (insertResult > 0) { |
| | |
| | | Long communityId = convenientMerchantDTO.getCommunityId(); |
| | | if (nonNull(communityId)) { |
| | | ComActDO comActDO = comActDAO.selectById(communityId); |
| | | convenientMerchantDO.setCommunityName(comActDO.getName()); |
| | | if(comActDO!=null){ |
| | | convenientMerchantDO.setCommunityName(comActDO.getName()); |
| | | } |
| | | else { |
| | | convenientMerchantDO.setCommunityName("西区社区"); |
| | | } |
| | | } |
| | | String account = convenientMerchantDTO.getAccount(); |
| | | if (isNotBlank(account)) { |
| | |
| | | page.setSize(pagePopularMerchantDTO.getPageSize()); |
| | | page.setCurrent(pagePopularMerchantDTO.getPageNum()); |
| | | IPage<ConvenientMerchantVO> merchantVOList = this.baseMapper.getPopularMerchants(page, pagePopularMerchantDTO.getCommunityId(), currentMon); |
| | | if(pagePopularMerchantDTO.getPageNum().equals(1L)){ |
| | | //第一页默认把犇师傅维修中心加载到第一个 |
| | | List<ConvenientMerchantVO> merchantList = this.baseMapper.selectMerchantByName(pagePopularMerchantDTO.getCommunityId(), currentMon); |
| | | if(merchantList != null && merchantList.size() > 0){ |
| | | merchantList.addAll(merchantVOList.getRecords()); |
| | | merchantVOList.setRecords(merchantList); |
| | | } |
| | | |
| | | } |
| | | return R.ok(merchantVOList); |
| | | } |
| | | |
| | |
| | | <if test="detailedAdminDTO.keyword!=null and detailedAdminDTO.keyword != """> |
| | | AND carac.answer_content like concat ('%',#{detailedAdminDTO.keyword},'%') |
| | | </if> |
| | | group by carr.id |
| | | group by carr.id order by carr.id desc |
| | | </select> |
| | | |
| | | <select id="getRegisterDetailedAnswerList" resultType="com.panzhihua.common.model.vos.community.reserve.ComActReserveRegisterDetailedAnswerVO"> |
| | |
| | | </if> |
| | | ) |
| | | GROUP BY ac.id ) ac left join sys_user t on ac.user_id = t.user_id |
| | | order by ac.reserve_record_id asc,ac.id asc |
| | | order by ac.reserve_record_id desc,ac.id asc |
| | | </select> |
| | | <select id="pageRegisterHomeQuarantine" resultType="java.lang.String"> |
| | | SELECT answer_content FROM ( |
| | | SELECT carr.id, carac.answer_content |
| | | FROM com_act_reserve_record AS carr |
| | | LEFT JOIN com_act_reserve_answer_content carac ON carr.id=carac.reserve_record_id |
| | | LEFT JOIN com_act_reserve_sub t ON carac.reserve_sub_id = t.id |
| | | WHERE carr.reserve_id = #{detailedAdminDTO.reserveId} AND t.content LIKE '身份证%' |
| | | <if test="detailedAdminDTO.keyword!=null and detailedAdminDTO.keyword != """> |
| | | AND carac.answer_content LIKE CONCAT (#{detailedAdminDTO.keyword},'%') |
| | | </if> |
| | | ORDER BY carr.id ASC LIMIT 9999999) temp |
| | | WHERE 1=1 |
| | | <if test='detailedAdminDTO.startTime != null and detailedAdminDTO.startTime != ""'> |
| | | AND temp.create_at <![CDATA[ >= ]]> #{detailedAdminDTO.startTime} |
| | | </if> |
| | | <if test='detailedAdminDTO.endTime != null and detailedAdminDTO.endTime != ""'> |
| | | AND temp.create_at <![CDATA[ <= ]]> #{detailedAdminDTO.endTime} |
| | | </if> |
| | | GROUP BY answer_content ORDER BY id DESC |
| | | </select> |
| | | <select id="selectStatistics" |
| | | resultType="com.panzhihua.common.model.vos.community.reserve.HomeQuarantineRegisterStatisticsVO"> |
| | | SELECT carr.id, carr.create_at, su.nick_name, carac.reserve_record_id, car.content AS reserveSubContent, |
| | | carac.answer_content AS answerContent, carac.reserve_sub_id AS reserveSubId, car.`type` AS optionType |
| | | FROM com_act_reserve_record AS carr |
| | | LEFT JOIN com_act_reserve_answer_content carac ON carr.id=carac.reserve_record_id |
| | | LEFT JOIN com_act_reserve_sub AS car ON carac.reserve_sub_id = car.id |
| | | LEFT JOIN sys_user su ON carr.user_id = su.user_id |
| | | WHERE carr.id IN ( |
| | | SELECT t1.reserve_record_id FROM com_act_reserve_answer_content t1 |
| | | LEFT JOIN com_act_reserve_record t2 ON t1.reserve_record_id = t2.id |
| | | WHERE t2.reserve_id = #{reserveId} AND t1.answer_content = #{record} |
| | | ) ORDER BY carr.id ASC |
| | | </select> |
| | | <select id="exportHomeQuarantine" resultType="java.lang.String"> |
| | | SELECT answer_content FROM ( |
| | | SELECT carr.id, carac.answer_content |
| | | FROM com_act_reserve_record AS carr |
| | | LEFT JOIN com_act_reserve_answer_content carac ON carr.id=carac.reserve_record_id |
| | | LEFT JOIN com_act_reserve_sub t ON carac.reserve_sub_id = t.id |
| | | WHERE carr.reserve_id = #{detailedAdminDTO.reserveId} AND t.content LIKE '身份证%' |
| | | <if test="detailedAdminDTO.keyword!=null and detailedAdminDTO.keyword != """> |
| | | AND carac.answer_content LIKE CONCAT (#{detailedAdminDTO.keyword},'%') |
| | | </if> |
| | | ORDER BY carr.id ASC LIMIT 9999999) temp |
| | | WHERE 1=1 |
| | | <if test='detailedAdminDTO.startTime != null and detailedAdminDTO.startTime != ""'> |
| | | AND temp.create_at <![CDATA[ >= ]]> #{detailedAdminDTO.startTime} |
| | | </if> |
| | | <if test='detailedAdminDTO.endTime != null and detailedAdminDTO.endTime != ""'> |
| | | AND temp.create_at <![CDATA[ <= ]]> #{detailedAdminDTO.endTime} |
| | | </if> |
| | | GROUP BY answer_content ORDER BY id DESC |
| | | </select> |
| | | </mapper> |
| | |
| | | and t.community_id = #{pageReserveDTO.communityId} |
| | | </if> |
| | | <if test="pageReserveDTO.communityId ==0"> |
| | | and t1.street_id in (12,14,15,16,17,19) |
| | | and t1.area_code = '510423' |
| | | </if> |
| | | <if test="pageReserveDTO.type != null and pageReserveDTO.type.size > 0"> |
| | | and t.`type` in |
| | |
| | | <if test="pageElderAuthRecordsDTO.personnelCategory != null and pageElderAuthRecordsDTO.personnelCategory != 0"> |
| | | and ceae.personnel_category = #{pageElderAuthRecordsDTO.personnelCategory} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.isAlive != null"> |
| | | and ceae.is_alive = #{pageElderAuthRecordsDTO.isAlive} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.searchKey != null and pageElderAuthRecordsDTO.searchKey != ''"> |
| | | and (ceae.`name` like concat ('%', #{pageElderAuthRecordsDTO.searchKey}, '%') |
| | | or cear.mark like concat ('%', #{pageElderAuthRecordsDTO.searchKey}, '%') |
| | | or ceae.id_card = #{pageElderAuthRecordsDTO.idCard}) |
| | | </if> |
| | | order by cear.create_at desc |
| | | </select> |
| | | |
| | | <select id="export" resultType="com.panzhihua.common.model.vos.community.ComElderAuthRecordVO"> |
| | | SELECT |
| | | cear.id, |
| | | su.`name` submitUserName, |
| | | ceae.phone, |
| | | ceae.`name`, |
| | | ceae.id_card, |
| | | ceae.sex, |
| | | ceae.birthday, |
| | | ceae.personnel_category, |
| | | cear.address, |
| | | ceae.is_alive, |
| | | cear.auth_method, |
| | | cear.auth_period, |
| | | cear.auth_video, |
| | | cear.auth_date, |
| | | cear.mark, |
| | | cear.approval_status, |
| | | cear.approver_id, |
| | | su1.`name` as approverName, |
| | | cear.approval_date, |
| | | cear.auth_status |
| | | FROM |
| | | com_elder_auth_records cear |
| | | LEFT JOIN com_elder_auth_elderlies ceae ON cear.elderlies_id = ceae.id |
| | | LEFT JOIN sys_user su ON cear.submit_user_id = su.user_id |
| | | LEFT JOIN sys_user su1 ON cear.approver_id = su1.user_id |
| | | WHERE |
| | | ceae.community_id = #{pageElderAuthRecordsDTO.communityId} |
| | | <if test="pageElderAuthRecordsDTO.authPeriod != null and pageElderAuthRecordsDTO.authPeriod !=''"> |
| | | and cear.auth_period = #{pageElderAuthRecordsDTO.authPeriod} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.authMethod != null and pageElderAuthRecordsDTO.authMethod != 0"> |
| | | and cear.auth_method = #{pageElderAuthRecordsDTO.authMethod} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.authDateBegin != null and pageElderAuthRecordsDTO.authDateBegin != ''"> |
| | | and cear.auth_date <![CDATA[ >= ]]> #{pageElderAuthRecordsDTO.authDateBegin} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.authDateEnd != null and pageElderAuthRecordsDTO.authDateEnd != ''"> |
| | | and cear.auth_date <![CDATA[ <= ]]> #{pageElderAuthRecordsDTO.authDateEnd} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.approvalStatus != null and pageElderAuthRecordsDTO.approvalStatus != 0"> |
| | | and cear.approval_status = #{pageElderAuthRecordsDTO.approvalStatus} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.authStatus != null and pageElderAuthRecordsDTO.authStatus != 0"> |
| | | and cear.auth_status = #{pageElderAuthRecordsDTO.authStatus} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.personnelCategory != null and pageElderAuthRecordsDTO.personnelCategory != 0"> |
| | | and ceae.personnel_category = #{pageElderAuthRecordsDTO.personnelCategory} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.isAlive != null and pageElderAuthRecordsDTO.isAlive != 0"> |
| | | and ceae.is_alive = #{pageElderAuthRecordsDTO.isAlive} |
| | | </if> |
| | |
| | | <if test="pageElderAuthRecordsDTO.personnelCategory != null and pageElderAuthRecordsDTO.personnelCategory != 0"> |
| | | and cpap.personnel_category = #{pageElderAuthRecordsDTO.personnelCategory} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.isAlive != null and pageElderAuthRecordsDTO.isAlive != 0"> |
| | | <if test="pageElderAuthRecordsDTO.isAlive != null"> |
| | | and cpap.is_alive = #{pageElderAuthRecordsDTO.isAlive} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.searchKey != null and pageElderAuthRecordsDTO.searchKey != ''"> |
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.ComPropertyPublicityDAO"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ComPropertyPublicityDO"> |
| | | <id column="id" property="id" /> |
| | | <id column="title" property="title" /> |
| | | <id column="publicity_type" property="publicityType" /> |
| | | <id column="other" property="other" /> |
| | | <id column="cover" property="cover" /> |
| | | <id column="content_type" property="contentType" /> |
| | | <id column="article_url" property="articleUrl" /> |
| | | <id column="diy_content" property="diyContent" /> |
| | | <id column="property_id" property="propertyId" /> |
| | | <id column="community_id" property="communityId" /> |
| | | <id column="view_num" property="viewNum" /> |
| | | <id column="created_at" property="createdAt" /> |
| | | <id column="updated_at" property="updatedAt" /> |
| | | </resultMap> |
| | | <update id="incrView"> |
| | | UPDATE com_property_publicity SET view_num = view_num + 1 WHERE id = #{id} |
| | | </update> |
| | | <select id="retrieveUserMenuList" resultType="java.lang.String"> |
| | | SELECT m.menu_name FROM sys_user u |
| | | INNER JOIN sys_user_role ur ON u.user_id = ur.user_id |
| | | LEFT JOIN sys_role r ON ur.role_id = r.role_id |
| | | LEFT JOIN sys_role_menu rm ON r.role_id = rm.role_id |
| | | LEFT JOIN sys_menu m ON rm.menu_id = m.menu_id |
| | | WHERE u.user_id = #{userId} |
| | | </select> |
| | | <select id="pageComPropertyPublicity" |
| | | resultType="com.panzhihua.common.model.vos.community.ComPropertyPublicityVO"> |
| | | SELECT pp.*, p.`name` AS propertyName, v.`name` AS villageName |
| | | FROM com_property_publicity pp |
| | | INNER JOIN com_property p ON pp.property_id = p.id |
| | | LEFT JOIN com_mng_village v ON p.area_id = v.village_id |
| | | WHERE pp.community_id = #{pageComPropertyPublicityDTO.communityId} |
| | | <if test="pageComPropertyPublicityDTO.propertyId != null"> |
| | | AND pp.property_id = #{pageComPropertyPublicityDTO.propertyId} |
| | | </if> |
| | | <if test="pageComPropertyPublicityDTO.villageId != null"> |
| | | AND p.area_id = #{pageComPropertyPublicityDTO.villageId} |
| | | </if> |
| | | <if test="pageComPropertyPublicityDTO.publicityType != null"> |
| | | AND pp.publicity_type = #{pageComPropertyPublicityDTO.publicityType} |
| | | </if> |
| | | <if test="pageComPropertyPublicityDTO.keyword != null and pageComPropertyPublicityDTO.keyword != """> |
| | | AND pp.title LIKE CONCAT(#{pageComPropertyPublicityDTO.keyword}, '%') |
| | | </if> |
| | | ORDER BY pp.id DESC |
| | | </select> |
| | | <select id="selectDetail" resultType="com.panzhihua.common.model.vos.community.ComPropertyPublicityVO"> |
| | | SELECT pp.*, p.`name` AS propertyName, v.`name` AS villageName FROM com_property_publicity pp |
| | | INNER JOIN com_property p ON pp.property_id = p.id |
| | | LEFT JOIN com_mng_village v ON p.area_id = v.village_id |
| | | WHERE pp.id = #{id} |
| | | </select> |
| | | <select id="pageComPropertyPublicityApplet" |
| | | resultType="com.panzhihua.common.model.vos.community.ComPropertyPublicityVO"> |
| | | SELECT pp.*, p.`name` AS propertyName, v.`name` AS villageName FROM com_property_publicity pp |
| | | INNER JOIN com_property p ON pp.property_id = p.id |
| | | LEFT JOIN com_mng_village v ON p.area_id = v.village_id |
| | | WHERE pp.community_id = #{pageComPropertyPublicityDTO.communityId} |
| | | <if test="pageComPropertyPublicityDTO.villageId != null"> |
| | | AND p.area_id = #{pageComPropertyPublicityDTO.villageId} |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | com_sw_danger_report as csdr |
| | | left join com_sw_patrol_record_report as csprr on csprr.report_id = csdr.id |
| | | left join com_sw_patrol_record as cspr on csprr.patrol_record_id = cspr.id |
| | | left join com_act t on csdr.community_id =t.community_id |
| | | left join com_act t on cspr.community_id =t.community_id |
| | | <where> |
| | | <if test='comSwPatrolRecordDTO.communityId != null and comSwPatrolRecordDTO.communityId != 0'> |
| | | AND cspr.community_id = #{comSwPatrolRecordDTO.communityId} |
| | | </if> |
| | | <if test='comSwPatrolRecordDTO.communityId == 0'> |
| | | AND t.street_id in (12,14,15,16,17,19) |
| | | AND t.area_code = '510423' |
| | | </if> |
| | | <if test='comSwPatrolRecordDTO.patrolPerson != null and comSwPatrolRecordDTO.patrolPerson != ""'> |
| | | AND cspr.person_name LIKE concat('%',#{comSwPatrolRecordDTO.patrolPerson},'%') |
| | |
| | | AND cspr.community_id = #{comSwPatrolRecordDTO.communityId} |
| | | </if> |
| | | <if test='comSwPatrolRecordDTO.communityId == 0'> |
| | | AND t.street_id in (12,14,15,16,17,19) |
| | | AND t.area_code = '510423' |
| | | </if> |
| | | <if test='comSwPatrolRecordDTO.patrolPerson != null and comSwPatrolRecordDTO.patrolPerson != ""'> |
| | | AND cspr.person_name LIKE concat('%',#{comSwPatrolRecordDTO.patrolPerson},'%') |
| | |
| | | AND cspr.community_id = #{comSwPatrolRecordDTO.communityId} |
| | | </if> |
| | | <if test='comSwPatrolRecordDTO.communityId == 0'> |
| | | AND t.street_id in (12,14,15,16,17,19) |
| | | AND t.area_code = '510423' |
| | | </if> |
| | | <if test='comSwPatrolRecordDTO.patrolPerson != null and comSwPatrolRecordDTO.patrolPerson != ""'> |
| | | AND cspr.person_name LIKE concat('%',#{comSwPatrolRecordDTO.patrolPerson},'%') |
| | |
| | | ,(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(id) from com_sw_safety_work_record where community_id = #{communityId}) as safetyWorkTotal |
| | | ,(select count(id) from com_sw_danger_report where community_id = #{communityId}) as dangerTotal |
| | | ,(select count(id) from com_sw_danger_report where community_id = #{communityId} and status = '3') as handledDangerTotal |
| | | ,(select count(id) from com_sw_danger_report where community_id = #{communityId} and danger_type like CONCAT('%','1','%')) as huoDangerTotal |
| | | ,(select count(id) from com_sw_danger_report where community_id = #{communityId} and danger_type like CONCAT('%','2','%')) as xunDangerTotal |
| | | ,(select count(id) from com_sw_danger_report where community_id = #{communityId} and danger_type like CONCAT('%','3','%')) as yiDangerTotal |
| | | ,(select count(id) from com_sw_danger_report where community_id = #{communityId} and danger_type like CONCAT('%','1','%') and status = '3' ) as huoHandledDangerTotal |
| | | ,(select count(id) from com_sw_danger_report where community_id = #{communityId} and danger_type like CONCAT('%','1','%') and status in ('1','2')) as huoHandlingDangerTotal |
| | | ,(select count(id) from com_sw_danger_report where community_id = #{communityId} and danger_type like CONCAT('%','2','%') and status = '3' ) as xunHandledDangerTotal |
| | | ,(select count(id) from com_sw_danger_report where community_id = #{communityId} and danger_type like CONCAT('%','2','%') and status in ('1','2')) as xunHandlingDangerTotal |
| | | ,(select count(id) from com_sw_danger_report where community_id = #{communityId} and danger_type like CONCAT('%','3','%') and status = '3' ) as yiHandledDangerTotal |
| | | ,(select count(id) from com_sw_danger_report where community_id = #{communityId} and danger_type like CONCAT('%','3','%') and status in ('1','2')) as yiHandlingDangerTotal |
| | | ,(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> |
| | | |
| | |
| | | LEFT JOIN sys_user su ON ccm.user_id = su.user_id |
| | | WHERE ccm.id = #{merchantId} |
| | | </select> |
| | | |
| | | <select id="selectMerchantByName" resultType="com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO"> |
| | | SELECT |
| | | temp.id, |
| | | temp.NAME, |
| | | temp.introduction, |
| | | temp.logo, |
| | | temp.serviceScope, |
| | | IF |
| | | ( |
| | | SUM( temp.consultation_volume ) IS NULL, |
| | | 0, |
| | | SUM( temp.consultation_volume )) AS monthConsultationVolume |
| | | FROM |
| | | ( |
| | | SELECT |
| | | ccm.id, |
| | | ccm.NAME, |
| | | ccm.introduction, |
| | | ccm.logo, |
| | | cccs.consultation_volume, |
| | | GROUP_CONCAT( ccss.service_name ) AS serviceScope |
| | | FROM |
| | | com_convenient_merchants ccm |
| | | LEFT JOIN ( |
| | | SELECT |
| | | * |
| | | FROM |
| | | com_convenient_consultation_statistics |
| | | WHERE |
| | | statistic_date LIKE #{currentMon}) cccs ON ccm.id = cccs.merchant_id |
| | | LEFT JOIN com_convenient_service_scope ccss ON ccm.id = ccss.merchant_id |
| | | WHERE |
| | | ( ccm.community_id = #{communityId} or ccm.community_id = 0) AND ccm.business_status = 1 and ccm.is_del = 0 and ccm.`name` = '犇师傅维修中心' GROUP BY cccs.id |
| | | ) temp |
| | | GROUP BY |
| | | temp.id |
| | | ORDER BY |
| | | SUM( temp.consultation_volume ) DESC |
| | | </select> |
| | | <select id="getPopularMerchants" resultType="com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO"> |
| | | SELECT |
| | | temp.id, temp.name, temp.introduction, temp.logo, |
| | |
| | | FROM com_convenient_merchants ccm |
| | | LEFT JOIN (SELECT * FROM com_convenient_consultation_statistics WHERE statistic_date LIKE #{currentMon}) cccs ON ccm.id = cccs.merchant_id |
| | | LEFT JOIN com_convenient_service_scope ccss ON ccm.id = ccss.merchant_id |
| | | WHERE ccm.community_id = #{communityId} AND ccm.business_status = 1 GROUP BY cccs.id |
| | | WHERE ( ccm.community_id = #{communityId} or ccm.community_id = 0) AND ccm.business_status = 1 and ccm.is_del = 0 and ccm.`name` != '犇师傅维修中心' GROUP BY cccs.id |
| | | ) temp GROUP BY temp.id ORDER BY SUM(temp.consultation_volume) DESC |
| | | </select> |
| | | <select id="getClassifyMerchants" resultType="com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO"> |
| | |
| | | FROM com_convenient_merchants ccm |
| | | LEFT JOIN (SELECT * FROM com_convenient_consultation_statistics WHERE statistic_date LIKE #{currentMon}) cccs ON ccm.id = cccs.merchant_id |
| | | LEFT JOIN com_convenient_service_scope ccss ON ccm.id = ccss.merchant_id |
| | | WHERE ccm.community_id = #{pageClassifyMerchantDTO.communityId} AND ccm.business_status = 1 AND ccss.service_category_id = #{pageClassifyMerchantDTO.serviceId} |
| | | WHERE (ccm.community_id = #{pageClassifyMerchantDTO.communityId} or ccm.community_id = 0) and ccm.is_del = 0 AND ccm.business_status = 1 AND ccss.service_category_id = #{pageClassifyMerchantDTO.serviceId} |
| | | GROUP BY cccs.id |
| | | ) temp GROUP BY temp.id ORDER BY SUM(temp.consultation_volume) DESC |
| | | </select> |
| | |
| | | FROM com_convenient_merchants ccm |
| | | LEFT JOIN (SELECT * FROM com_convenient_consultation_statistics WHERE statistic_date LIKE #{currentMon}) cccs ON ccm.id = cccs.merchant_id |
| | | LEFT JOIN com_convenient_service_scope ccss ON ccm.id = ccss.merchant_id |
| | | WHERE ccm.community_id = #{pageSearchDTO.communityId} AND ccm.business_status = 1 AND ccm.`name` LIKE CONCAT('%', #{pageSearchDTO.keyword}, '%') |
| | | WHERE (ccm.community_id = #{pageSearchDTO.communityId} or ccm.community_id = 0) AND ccm.business_status = 1 AND ccm.`name` LIKE CONCAT('%', #{pageSearchDTO.keyword}, '%') |
| | | AND ccm.is_del = 0 GROUP BY cccs.id |
| | | ) temp GROUP BY temp.id ORDER BY SUM(temp.consultation_volume) DESC |
| | | </select> |
| | |
| | | FROM com_convenient_products ccp |
| | | LEFT JOIN com_convenient_merchants ccm ON ccp.merchant_id = ccm.id |
| | | INNER JOIN com_convenient_product_specifications ccps ON ccp.id = ccps.product_id |
| | | WHERE ccm.community_id = #{pageSearchDTO.communityId} AND ccp.is_del = 0 |
| | | WHERE (ccm.community_id = #{pageSearchDTO.communityId} or ccm.community_id = 0) AND ccp.is_del = 0 |
| | | AND ccp.on_shelf = 1 AND ccps.is_del = 0 AND ccp.`name` LIKE CONCAT('%', #{pageSearchDTO.keyword}, '%') GROUP BY ccp.id |
| | | </select> |
| | | </mapper> |
| | |
| | | FROM com_convenient_service_categories ccsc |
| | | INNER JOIN com_convenient_service_scope ccss ON ccsc.id = ccss.service_category_id |
| | | LEFT JOIN com_convenient_merchants ccm ON ccss.merchant_id = ccm.id |
| | | WHERE ccsc.is_del = 0 AND ccm.is_del = 0 AND ccm.community_id = #{communityId} AND ccm.business_status = 1 GROUP BY ccsc.id ORDER BY ccsc.weight desc |
| | | WHERE ccsc.is_del = 0 AND ccm.is_del = 0 AND( ccm.community_id = #{communityId} or ccm.community_id =0) AND ccm.business_status = 1 GROUP BY ccsc.id ORDER BY ccsc.weight desc |
| | | </select> |
| | | </mapper> |
| | |
| | | |
| | | @Select("<script> " + "SELECT\n" + " distinct COUNT( u.id ) readingVolume,\n" |
| | | + " d.community_id, d.content, d.cover, d.cover_mode, d.create_at, d.create_by, d.dyn_type, d.id, d.publish_at, d.status, d.title, d.type, \n" |
| | | + " act.name as createByName " + "FROM\n" |
| | | + " act.name as createByName,d.jump_type,d.jump_url " + "FROM\n" |
| | | + "com_pb_dyn d LEFT JOIN com_act act ON d.community_id = act.community_id \n" |
| | | + "LEFT JOIN com_pb_dyn_user u ON d.id = u.dyn_id " + "where d.id = #{id} " + " group by d.id " + "</script>") |
| | | PartyBuildingComPbDynVO selectVoById(@Param("id") Long id); |
| | |
| | | @Override |
| | | public R updateYnamic(PartyBuildingComPbDynVO partyCommitteeVO) { |
| | | ComPbDynDO comPbDynDO = new ComPbDynDO(); |
| | | if (partyCommitteeVO.getPublishAt() != null |
| | | && partyCommitteeVO.getPublishAt().getTime() > System.currentTimeMillis()) { |
| | | partyCommitteeVO.setStatus(1); |
| | | } else if (partyCommitteeVO.getPublishAt() != null |
| | | && partyCommitteeVO.getPublishAt().getTime() < System.currentTimeMillis()) { |
| | | partyCommitteeVO.setStatus(2); |
| | | } |
| | | BeanUtils.copyProperties(partyCommitteeVO, comPbDynDO); |
| | | int insert = comPbDynDAO.updateById(comPbDynDO); |
| | | if (insert > 0) { |
| | |
| | | * @return 社区注册人数统计数据导出 |
| | | */ |
| | | List<IndexUserStreetExcelExportVo> getUserCommunityExcelExport(); |
| | | |
| | | /** |
| | | * 查看是否是社区物业人员 |
| | | * @param userId |
| | | * @param userCommunityId |
| | | * @return |
| | | */ |
| | | int countPropertyWorker(@Param("userId") Long userId, @Param("communityId") Long userCommunityId); |
| | | } |
| | |
| | | loginUserInfoVO.setIsmemberrole(2); |
| | | loginUserInfoVO.setIsFourMember(2); |
| | | loginUserInfoVO.setIsCommunityWorker(2); |
| | | loginUserInfoVO.setIsPropertyWorker(2); |
| | | // 志愿者状态 |
| | | String phone = sysUserDO.getPhone(); |
| | | Long userCommunityId = sysUserDO.getCommunityId(); |
| | |
| | | Integer countFourMember=comActFourMemberDao.selectCount(new QueryWrapper<ComActFourMember>().lambda().eq(ComActFourMember::getIdCard,sysUserDO.getIdCard())); |
| | | if(countFourMember>0){ |
| | | loginUserInfoVO.setIsFourMember(1); |
| | | } |
| | | //是否是社区物业人员 |
| | | int countPropertyWorker = userDao.countPropertyWorker(Long.parseLong(userId), userCommunityId); |
| | | if (countPropertyWorker > 0) { |
| | | loginUserInfoVO.setIsPropertyWorker(1); |
| | | } |
| | | // 是否是"管理员"或者 本社区 "社区团队"、"党委成员" |
| | | Integer countTeam = userDao.selectCountTeam(phone, userCommunityId); |
| | |
| | | if (ObjectUtils.isEmpty(sysUserDO)) { |
| | | return R.fail("人员不存在"); |
| | | } |
| | | |
| | | BeanUtils.copyProperties(sysUserDO, loginUserInfoVO); |
| | | List<ComMngFamilyInfoDO> comMngFamilyInfoDOS = comMngFamilyInfoDAO |
| | | .selectList(new QueryWrapper<ComMngFamilyInfoDO>().lambda().eq(ComMngFamilyInfoDO::getUserId, userId)); |
| | |
| | | if (!ObjectUtils.isEmpty(comActVO)) { |
| | | loginUserInfoVO.setCommunityName(comActVO.getName()); |
| | | } |
| | | //是否是社区物业人员 |
| | | int countPropertyWorker = userDao.countPropertyWorker(userId, loginUserInfoVO.getCommunityId()); |
| | | loginUserInfoVO.setIsPropertyWorker(countPropertyWorker > 0 ? 1 : 0); |
| | | loginUserInfoVO.setIdCard(SensitiveUtil.desensitizedIdNumber(loginUserInfoVO.getIdCard())); |
| | | loginUserInfoVO.setPhone(SensitiveUtil.desensitizedPhoneNumber(loginUserInfoVO.getPhone())); |
| | | return R.ok(loginUserInfoVO); |
| | |
| | | if (nonNull(sysUserDO)) { |
| | | return R.fail("账户已经存在"); |
| | | } |
| | | sysUserDO = userDao.selectOne(new QueryWrapper<SysUserDO>().lambda().eq(SysUserDO::getPhone, convenientMerchantDTO.getPhone())); |
| | | if (nonNull(sysUserDO)) { |
| | | return R.fail("手机号已经存在"); |
| | | } |
| | | // sys_user 表 |
| | | sysUserDO = new SysUserDO(); |
| | | String encode = new BCryptPasswordEncoder().encode(convenientMerchantDTO.getPassword()); |
| | |
| | | sysUserDO.setType(10); |
| | | sysUserDO.setAreaId(null); |
| | | sysUserDO.setStatus(1); |
| | | sysUserDO.setPhone(convenientMerchantDTO.getPhone()); |
| | | sysUserDO.setPhone(null); |
| | | sysUserDO.setName(convenientMerchantDTO.getContacts()); |
| | | sysUserDO.setPassword(encode); |
| | | try { |
| | |
| | | <select id="selectIndexDataKanban" resultType="com.panzhihua.common.model.vos.IndexDataKanbanVO"> |
| | | SELECT |
| | | COUNT(user_id)allUser, |
| | | COUNT(case WHEN DATE_FORMAT(create_at,'%m-%d-%Y')=DATE_FORMAT(SYSDATE(),'%m-%d-%Y') then user_id else null end )addUser, |
| | | COUNT(case WHEN DATE_FORMAT(t.create_at,'%m-%d-%Y')=DATE_FORMAT(SYSDATE(),'%m-%d-%Y') then user_id else null end )addUser, |
| | | COUNT(case WHEN DATE_FORMAT(last_login_time,'%m-%d-%Y')=DATE_FORMAT(SYSDATE(),'%m-%d-%Y') then user_id else null end )activeDayUser, |
| | | (SELECT count(user_id) FROM sys_user WHERE type = 1 AND last_login_time > date_sub(SYSDATE(), INTERVAL 7 DAY))activeWeekUser |
| | | (SELECT count(user_id) FROM sys_user t left join com_act t1 on t.community_id = t1.community_id WHERE type = 1 and t1.area_code = '510423' AND last_login_time > date_sub(SYSDATE(), INTERVAL 7 DAY))activeWeekUser |
| | | FROM |
| | | sys_user |
| | | where type=1 and community_id is not null |
| | | sys_user t LEFT JOIN com_act t1 on t.community_id = t1.community_id |
| | | where t.type=1 and t.community_id is not null and t1.area_code ='510423' |
| | | </select> |
| | | |
| | | <select id="selectCommunityUserOrder" resultType="com.panzhihua.service_user.model.dtos.DataKanbanDTO"> |
| | |
| | | AND last_login_time > DATE_FORMAT( date_sub( SYSDATE(), INTERVAL 0 DAY ), '%Y-%m-%d 00:00:00')) as dayNum |
| | | FROM |
| | | com_act a |
| | | LEFT JOIN sys_user u ON a.community_id = u.community_id and u.type=1 |
| | | LEFT JOIN sys_user u ON a.community_id = u.community_id and u.type=1 where a.area_code = '510423' |
| | | GROUP BY a.community_id)t ORDER BY t.num desc |
| | | </select> |
| | | |
| | |
| | | FROM |
| | | com_act a |
| | | LEFT JOIN sys_user u ON a.community_id = u.community_id |
| | | and u.type=1 and u.create_at <![CDATA[ >= ]]> DATE_SUB(DATE_FORMAT(CURDATE(),'%Y-%m-%d 00:00:00'),INTERVAL 0 DAY) |
| | | and u.type=1 and u.create_at >= DATE_ADD(curdate(),interval -day(curdate())+1 day) where a.area_code = '510423' |
| | | GROUP BY a.community_id)t ORDER BY t.num desc |
| | | </select> |
| | | |
| | |
| | | |
| | | <select id="selectCommunityAddUserOrder" resultType="com.panzhihua.service_user.model.dtos.DataKanbanDTO"> |
| | | select count(user_id) as num, |
| | | (SELECT count( user_id ) FROM sys_user WHERE type = 1 |
| | | (SELECT count( user_id ) FROM sys_user t LEFT JOIN com_act t1 on t.community_id=t1.community_id WHERE t.type = 1 and t1.area_code = '510423' |
| | | AND last_login_time <![CDATA[ >= ]]> DATE_FORMAT( #{date1}, '%Y-%m-%d 00:00:00') |
| | | AND last_login_time <![CDATA[ <= ]]> DATE_FORMAT( #{date1}, '%Y-%m-%d 23:59:59')) as dayNum from sys_user as su |
| | | AND last_login_time <![CDATA[ <= ]]> DATE_FORMAT( #{date1}, '%Y-%m-%d 23:59:59')) as dayNum from sys_user as su LEFT JOIN com_act t1 on su.community_id = t1.community_id |
| | | where su.create_at <![CDATA[ >= ]]> DATE_SUB(DATE_FORMAT(#{date1},'%Y-%m-%d 00:00:00'),INTERVAL 0 DAY) |
| | | and su.create_at <![CDATA[ <= ]]> DATE_SUB(DATE_FORMAT(#{date1},'%Y-%m-%d 23:59:59'),INTERVAL 0 DAY) |
| | | and su.type = 1 |
| | | and su.type = 1 and t1.area_code='510423' |
| | | </select> |
| | | |
| | | <update id="gridMemberEditStatus"> |
| | |
| | | AND ca.street_id = cs.street_id |
| | | ) AS userNum |
| | | FROM |
| | | `com_street` AS cs |
| | | `com_street` AS cs where area_code='510423' |
| | | order by userNum desc |
| | | </select> |
| | | |
| | |
| | | LEFT JOIN com_street AS cs ON cs.street_id = ca.street_id |
| | | WHERE |
| | | su.type = 1 |
| | | AND su.community_id IS NOT NULL |
| | | AND su.community_id IS NOT NULL and ca.area_code = '510423' |
| | | GROUP BY |
| | | ca.community_id |
| | | ORDER BY |
| | |
| | | userNum DESC |
| | | </select> |
| | | |
| | | <select id="countPropertyWorker" resultType="integer"> |
| | | SELECT COUNT(id) FROM com_property |
| | | WHERE user_id = #{userId} AND community_id = #{communityId} |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | noLoginUrl.add("/api/shopbackstage/convenient/upload/file"); |
| | | noLoginUrl.add("/api/applets/warehouse/donates/page"); |
| | | noLoginUrl.add("/api/applets/warehouse/donates/get"); |
| | | noLoginUrl.add("/api/applets/property/publicity/page"); |
| | | noLoginUrl.add("/api/applets/property/publicity/get"); |
| | | noLoginUrl.add("/api/applets/property/publicity/list/village"); |
| | | noLoginUrl.add("/api/applets/property/publicity/incr-view"); |
| | | if (noLoginUrl.contains(requestURI)) { |
| | | List<SimpleGrantedAuthority> authorities = new ArrayList<>(); |
| | | authorities.add(new SimpleGrantedAuthority(SecurityConstants.ROLE_APPLETS)); |