springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/enums/RealAssetsCategoryType.java
New file @@ -0,0 +1,24 @@ package com.panzhihua.common.enums; import lombok.Getter; /** * 建筑类型 * * @author llming */ @Getter public enum RealAssetsCategoryType { PUBLIC(2, "公共设施"), BUILD(1, "建筑类"); private final int code; private final String info; RealAssetsCategoryType(int code, String info) { this.code = code; this.info = info; } } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComMngRealAssetsExcelListen.java
@@ -3,11 +3,13 @@ import com.alibaba.excel.context.AnalysisContext; import com.alibaba.excel.event.AnalysisEventListener; import com.alibaba.fastjson.JSONObject; import com.panzhihua.common.enums.RealAssetsCategoryType; import com.panzhihua.common.exceptions.ServiceException; import com.panzhihua.common.model.vos.R; import com.panzhihua.common.model.vos.community.ComMngRealAssetsExcelVO; import com.panzhihua.common.model.vos.community.ComMngRealCompanyExcelVO; import com.panzhihua.common.service.community.CommunityService; import com.panzhihua.common.utlis.StringUtils; import lombok.extern.slf4j.Slf4j; import java.util.ArrayList; springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/shop/AddShopGoodsVO.java
@@ -19,7 +19,7 @@ private Long storeId; @ApiModelProperty("店铺名称") @ApiModelProperty("商品名称") private String name; @ApiModelProperty("商品现价") springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
@@ -425,6 +425,15 @@ R pageOtherBuild(@RequestBody ComMngStructOtherBuildVO comMngStructOtherBuildVO); /** * 获取志愿者详情 * * @param id 志愿者信息 * @return 增加结果 */ @GetMapping("getVolunteerById") R getVolunteerById(@RequestParam("id")Long id); /** * 增加志愿者 * * @param comMngVolunteerMngVO 志愿者信息 springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/CommunityManagerApi.java
@@ -332,7 +332,13 @@ @ApiOperation(value = "删除志愿者") @DeleteMapping("volunteer") public R deleteVolunteer(@RequestBody ComMngVolunteerMngVO comMngVolunteerMngVO){ String phone1 = comMngVolunteerMngVO.getPhone(); Object data = communityService.getVolunteerById(comMngVolunteerMngVO.getId()).getData(); if (data==null){ return R.fail("Id有误!"); } String dataStr = JSONObject.toJSONString(data); ComMngVolunteerMngAppletsVO oneVolunteerVO = JSONObject.parseObject(dataStr, ComMngVolunteerMngAppletsVO.class); String phone1 = oneVolunteerVO.getPhone(); if (ObjectUtils.isEmpty(phone1)) { return R.fail("志愿者手机号不能为空"); } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommunityApi.java
@@ -794,6 +794,16 @@ } /** * 获取志愿者详情 * @param id * @return */ @GetMapping("getVolunteerById") R getVolunteerById(@RequestParam("id")Long id){ return comMngVolunteerMngService.getVolunteerById(id); } /** * 删除志愿者 * @param comMngVolunteerMngVO 手机号 * @return 删除结果 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngStructOtherBuildDAO.java
@@ -48,6 +48,7 @@ "b.name like concat(#{comMngStructOtherBuildVO.name},'%') "+ " </if> " + " </where>" + " order by b.create_at desc" + "</script>") IPage<ComMngStructOtherBuildVO> pageOtherBuild(Page page, @Param("comMngStructOtherBuildVO") ComMngStructOtherBuildVO comMngStructOtherBuildVO); springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComMngVolunteerMngService.java
@@ -83,4 +83,10 @@ */ List<TodoEventsVO> selectNeedToDo(Long communityId, Long userId); /** * 获取志愿者详情 * @param id * @return */ R getVolunteerById(Long id); } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngRealAssetsServiceImpl.java
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.panzhihua.common.enums.RealAssetsCategoryType; import com.panzhihua.common.enums.RealAssetsFloorType; import com.panzhihua.common.exceptions.ServiceException; import com.panzhihua.common.model.dtos.community.ExportRealAssetsExcelDTO; @@ -11,6 +12,7 @@ import com.panzhihua.common.model.vos.R; import com.panzhihua.common.model.vos.community.ComMngRealAssetsExcelVO; import com.panzhihua.common.model.vos.community.ComMngRealAssetsVO; import com.panzhihua.common.utlis.StringUtils; import com.panzhihua.service_community.dao.ComMngRealAssetsDAO; import com.panzhihua.service_community.dao.ComMngStructBuildTypeDAO; import com.panzhihua.service_community.model.dos.ComMngRealAssetsDO; @@ -119,6 +121,12 @@ } else if (l.getFloorType().equals(RealAssetsFloorType.LOW.getInfo())) { comMngRealAssetsDO.setFloorType(RealAssetsFloorType.LOW.getCode()); } if(l.getCategory().equals(RealAssetsCategoryType.PUBLIC.getInfo())){ comMngRealAssetsDO.setCategory(RealAssetsCategoryType.PUBLIC.getCode()); } if(l.getCategory().equals(RealAssetsCategoryType.BUILD.getInfo())){ comMngRealAssetsDO.setCategory(RealAssetsCategoryType.BUILD.getCode()); } comMngRealAssetsDOS.add(comMngRealAssetsDO); }); boolean batch = this.saveBatch(comMngRealAssetsDOS); springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngVolunteerMngServiceImpl.java
@@ -234,6 +234,11 @@ } @Override public R getVolunteerById(Long id) { ComMngVolunteerMngDO comMngVolunteerMngDO = comMngVolunteerMngDAO.selectById(id); ComMngVolunteerMngAppletsVO vo=new ComMngVolunteerMngAppletsVO(); BeanUtils.copyProperties(comMngVolunteerMngDO,vo); return R.ok(vo); } }