puhanshu
2022-04-26 5053f5546a2de21471faf39f9c44a26db410f133
花城优化
6个文件已修改
11个文件已添加
811 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ComPropertyWorkerApi.java 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComMngVolunteerExcelListen.java 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/property/PagePropertyWorkerDTO.java 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/property/PropertyWorkerDTO.java 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComPropertyVO.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/property/ComPropertyWorkerVO.java 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComPropertyWorkerApi.java 79 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComPropertyWorkerApi.java 83 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComPropertyWorkerDAO.java 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComProperty.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComPropertyWorker.java 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComPropertyWorkerService.java 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngVolunteerMngServiceImpl.java 58 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComPropertyServiceImpl.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComPropertyWorkerServiceImpl.java 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComPropertyWorkerMapper.xml 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ComPropertyWorkerApi.java
New file
@@ -0,0 +1,53 @@
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.property.PagePropertyWorkerDTO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.property.ComPropertyWorkerVO;
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;
/**
 * 物业公司工作人员(ComPropertyWorker)表控制层
 *
 * @author makejava
 * @since 2022-04-26 09:54:07
 */
@Slf4j
@Api(tags = "物业工作人员")
@RestController
@RequestMapping("comPropertyWorker")
public class ComPropertyWorkerApi extends BaseController {
    /**
     * 服务对象
     */
    @Resource
    private CommunityService communityService;
    @ApiOperation(value = "分页查询物业工作人员", response = ComPropertyWorkerVO.class)
    @PostMapping("/page")
    public R pagePropertyWorker(@RequestBody @Valid PagePropertyWorkerDTO pagePropertyWorkerDTO) {
        return communityService.pagePropertyWorker(pagePropertyWorkerDTO);
    }
    @ApiOperation(value = "物业工作人员详情", response = ComPropertyWorkerVO.class)
    @ApiImplicitParam(name = "id", value = "物业工作人员id", required = true)
    @GetMapping("/detail")
    public R detailPropertyWorker(@RequestParam("id") Long id) {
        return communityService.detailPropertyWorker(id);
    }
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComMngVolunteerExcelListen.java
@@ -132,25 +132,16 @@
                    }
                }
                vo.setIdCard(oneData.get(2).toUpperCase());
                if (StringUtils.isEmpty(oneData.get(3))) {
                    index++;
                    mistakes.add(setErrorObject(oneData,"志愿者组织不可为空,请填写志愿者组织"));
                    continue;
                if (StringUtils.isNotEmpty(oneData.get(3))) {
                    vo.setOrgName(oneData.get(3));
                }
                vo.setOrgName(oneData.get(3));
                if (StringUtils.isEmpty(oneData.get(4))) {
                    index++;
                    mistakes.add(setErrorObject(oneData,"志愿者队伍不可为空,请填写志愿者队伍"));
                    continue;
                if (StringUtils.isNotEmpty(oneData.get(4))) {
                    vo.setTeamName(oneData.get(4));
                }
                vo.setTeamName(oneData.get(4));
                if (StringUtils.isEmpty(oneData.get(5))) {
                    index++;
                    mistakes.add(setErrorObject(oneData,"志愿者技能不可为空,请填写志愿者技能"));
                    continue;
                if (StringUtils.isNotEmpty(oneData.get(5))) {
                    vo.setSkillName(oneData.get(5));
                }
                vo.setSkillName(oneData.get(5));
                vo.setIsUniversity(2);
                if (StringUtils.isNotEmpty(oneData.get(6))) {
                    vo.setIsUniversity(1);
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/property/PagePropertyWorkerDTO.java
New file
@@ -0,0 +1,34 @@
package com.panzhihua.common.model.dtos.property;
import javax.validation.constraints.NotNull;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @title: PagePropertyWorkerDTO
 * @projectName: 成都呐喊信息技术有限公司-智慧社区项目
 * @description: 分页查询物业工作人员请求参数
 * @author: hans
 * @date: 2022/04/26 10:21
 */
@Data
@ApiModel("分页查询物业工作人员请求参数")
public class PagePropertyWorkerDTO {
    @ApiModelProperty(value = "关键字")
    private String keyword;
    @ApiModelProperty(value = "物业公司关联id")
    @NotNull
    private Long refId;
    @ApiModelProperty(value = "分页-当前页数", example = "1")
    @NotNull
    private Long pageNum;
    @ApiModelProperty(value = "分页-每页记录数", example = "10")
    @NotNull
    private Long pageSize;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/property/PropertyWorkerDTO.java
New file
@@ -0,0 +1,46 @@
package com.panzhihua.common.model.dtos.property;
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: PropertyWorkerDTO
 * @projectName: 成都呐喊信息技术有限公司-智慧社区项目
 * @description: 新增/编辑物业工作人员请求参数类
 * @author: hans
 * @date: 2022/04/26 10:06
 */
@Data
@ApiModel("新增/编辑物业工作人员请求参数类")
public class PropertyWorkerDTO {
    @ApiModelProperty("物业工作人员id")
    @NotNull(groups = {PutGroup.class}, message = "物业工作人员id不能为空")
    private Long id;
    @ApiModelProperty("工作人员姓名")
    @NotBlank(groups = {AddGroup.class}, message = "工作人员姓名不能为空")
    private String name;
    @ApiModelProperty("手机号")
    @NotBlank(groups = {AddGroup.class}, message = "手机号不能为空")
    private String phone;
    @ApiModelProperty("职务")
    @NotBlank(groups = {AddGroup.class}, message = "职务不能为空")
    private String position;
    @ApiModelProperty("照片")
    private String image;
    @ApiModelProperty("物业公司关联id")
    @NotNull(groups = {AddGroup.class}, message = "物业公司关联id不能为空")
    private Long refId;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComPropertyVO.java
@@ -80,4 +80,13 @@
    @ApiModelProperty("小区id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long areaId;
    @ApiModelProperty("评价星级(1~5)")
    private Integer star;
    @ApiModelProperty("红色物业(1.是 2.否)")
    private Integer isRed;
    @ApiModelProperty("logo")
    private String logo;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/property/ComPropertyWorkerVO.java
New file
@@ -0,0 +1,35 @@
package com.panzhihua.common.model.vos.property;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @title: ComPropertyWorkerVO
 * @projectName: 成都呐喊信息技术有限公司-智慧社区项目
 * @description: 物业工作人员信息
 * @author: hans
 * @date: 2022/04/26 10:35
 */
@Data
@ApiModel("物业工作人员信息")
public class ComPropertyWorkerVO {
    @ApiModelProperty(value = "物业工作人员id")
    private Long id;
    @ApiModelProperty(value = "工作人员姓名")
    private String name;
    @ApiModelProperty(value = "手机号")
    private String phone;
    @ApiModelProperty(value = "职务")
    private String position;
    @ApiModelProperty(value = "照片")
    private String image;
    @ApiModelProperty(value = "物业公司关联id")
    private Long refId;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
@@ -21,6 +21,8 @@
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.dtos.property.PagePropertyWorkerDTO;
import com.panzhihua.common.model.dtos.property.PropertyWorkerDTO;
import com.panzhihua.common.model.vos.*;
import com.panzhihua.common.model.vos.civil.ComActSocialWorkerDetailsVO;
import com.panzhihua.common.model.vos.civil.ComActSocialWorkerVO;
@@ -9681,4 +9683,44 @@
     */
    @GetMapping("/comProperty/detail")
    R detailProperty(@RequestParam("id") Long id);
    /**
     * 添加物业工作人员
     * @param propertyWorkerDTO
     * @return
     */
    @PostMapping("/comPropertyWorker/add")
    R addPropertyWorker(@RequestBody PropertyWorkerDTO propertyWorkerDTO);
    /**
     * 编辑物业工作人员
     * @param propertyWorkerDTO
     * @return
     */
    @PutMapping("/comPropertyWorker/update")
    R updatePropertyWorker(@RequestBody PropertyWorkerDTO propertyWorkerDTO);
    /**
     * 删除物业工作人员
     * @param id
     * @return
     */
    @DeleteMapping("/comPropertyWorker/delete")
    R deletePropertyWorker(@RequestParam("id") Long id);
    /**
     * 分页查询物业工作人员
     * @param pagePropertyWorkerDTO
     * @return
     */
    @PostMapping("/comPropertyWorker/page")
    R pagePropertyWorker(@RequestBody PagePropertyWorkerDTO pagePropertyWorkerDTO);
    /**
     * 物业工作人员详情
     * @param id
     * @return
     */
    @GetMapping("/comPropertyWorker/detail")
    R detailPropertyWorker(@RequestParam("id") Long id);
}
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComPropertyWorkerApi.java
New file
@@ -0,0 +1,79 @@
package com.panzhihua.community_backstage.api;
import javax.annotation.Resource;
import javax.validation.Valid;
import com.panzhihua.common.model.vos.property.ComPropertyWorkerVO;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
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.PutMapping;
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.property.PagePropertyWorkerDTO;
import com.panzhihua.common.model.dtos.property.PropertyWorkerDTO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.service.community.CommunityService;
import com.panzhihua.common.validated.AddGroup;
import com.panzhihua.common.validated.PutGroup;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
/**
 * 物业公司工作人员(ComPropertyWorker)表控制层
 *
 * @author makejava
 * @since 2022-04-26 09:54:07
 */
@Slf4j
@Api(tags = "物业工作人员")
@RestController
@RequestMapping("comPropertyWorker")
public class ComPropertyWorkerApi extends BaseController {
    /**
     * 服务对象
     */
    @Resource
    private CommunityService communityService;
    @ApiOperation(value = "添加物业工作人员")
    @PostMapping("/add")
    public R addPropertyWorker(@RequestBody @Validated(AddGroup.class) PropertyWorkerDTO propertyWorkerDTO) {
        return communityService.addPropertyWorker(propertyWorkerDTO);
    }
    @ApiOperation(value = "编辑物业工作人员")
    @PutMapping("/update")
    public R updatePropertyWorker(@RequestBody @Validated(PutGroup.class) PropertyWorkerDTO propertyWorkerDTO) {
        return communityService.updatePropertyWorker(propertyWorkerDTO);
    }
    @ApiOperation(value = "删除物业工作人员")
    @ApiImplicitParam(name = "id", value = "物业工作人员id", required = true)
    @DeleteMapping("/delete")
    public R deletePropertyWorker(@RequestParam("id") Long id) {
        return communityService.deletePropertyWorker(id);
    }
    @ApiOperation(value = "分页查询物业工作人员", response = ComPropertyWorkerVO.class)
    @PostMapping("/page")
    public R pagePropertyWorker(@RequestBody @Valid PagePropertyWorkerDTO pagePropertyWorkerDTO) {
        return communityService.pagePropertyWorker(pagePropertyWorkerDTO);
    }
    @ApiOperation(value = "物业工作人员详情", response = ComPropertyWorkerVO.class)
    @ApiImplicitParam(name = "id", value = "物业工作人员id", required = true)
    @GetMapping("/detail")
    public R detailPropertyWorker(@RequestParam("id") Long id) {
        return communityService.detailPropertyWorker(id);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComPropertyWorkerApi.java
New file
@@ -0,0 +1,83 @@
package com.panzhihua.service_community.api;
import javax.annotation.Resource;
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.PutMapping;
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.model.dtos.property.PagePropertyWorkerDTO;
import com.panzhihua.common.model.dtos.property.PropertyWorkerDTO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.service_community.service.ComPropertyWorkerService;
/**
 * 物业公司工作人员(ComPropertyWorker)表控制层
 *
 * @author makejava
 * @since 2022-04-26 09:54:07
 */
@RestController
@RequestMapping("comPropertyWorker")
public class ComPropertyWorkerApi {
    /**
     * 服务对象
     */
    @Resource
    private ComPropertyWorkerService comPropertyWorkerService;
    /**
     * 添加物业工作人员
     * @param propertyWorkerDTO
     * @return
     */
    @PostMapping("/add")
    public R addPropertyWorker(@RequestBody PropertyWorkerDTO propertyWorkerDTO) {
        return comPropertyWorkerService.addPropertyWorker(propertyWorkerDTO);
    }
    /**
     * 编辑物业工作人员
     * @param propertyWorkerDTO
     * @return
     */
    @PutMapping("/update")
    public R updatePropertyWorker(@RequestBody PropertyWorkerDTO propertyWorkerDTO) {
        return comPropertyWorkerService.updatePropertyWorker(propertyWorkerDTO);
    }
    /**
     * 删除物业工作人员
     * @param id
     * @return
     */
    @DeleteMapping("/delete")
    public R deletePropertyWorker(@RequestParam("id") Long id) {
        return comPropertyWorkerService.deletePropertyWorker(id);
    }
    /**
     * 分页查询物业工作人员
     * @param pagePropertyWorkerDTO
     * @return
     */
    @PostMapping("/page")
    public R pagePropertyWorker(@RequestBody PagePropertyWorkerDTO pagePropertyWorkerDTO) {
        return comPropertyWorkerService.pagePropertyWorker(pagePropertyWorkerDTO);
    }
    /**
     * 物业工作人员详情
     * @param id
     * @return
     */
    @GetMapping("/detail")
    public R detailPropertyWorker(@RequestParam("id") Long id) {
        return comPropertyWorkerService.detailPropertyWorker(id);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComPropertyWorkerDAO.java
New file
@@ -0,0 +1,50 @@
package com.panzhihua.service_community.dao;
import java.util.List;
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.property.PagePropertyWorkerDTO;
import com.panzhihua.common.model.vos.property.ComPropertyWorkerVO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import com.panzhihua.service_community.entity.ComPropertyWorker;
/**
 * 物业公司工作人员(ComPropertyWorker)表数据库访问层
 *
 * @author makejava
 * @since 2022-04-26 09:39:59
 */
@Mapper
public interface ComPropertyWorkerDAO extends BaseMapper<ComPropertyWorker> {
    /**
     * 批量新增数据(MyBatis原生foreach方法)
     *
     * @param entities
     *            List<ComPropertyWorker> 实例对象列表
     * @return 影响行数
     */
    int insertBatch(@Param("entities") List<ComPropertyWorker> entities);
    /**
     * 批量新增或按主键更新数据(MyBatis原生foreach方法)
     *
     * @param entities
     *            List<ComPropertyWorker> 实例对象列表
     * @return 影响行数
     * @throws org.springframework.jdbc.BadSqlGrammarException
     *             入参是空List的时候会抛SQL语句错误的异常,请自行校验入参
     */
    int insertOrUpdateBatch(@Param("entities") List<ComPropertyWorker> entities);
    /**
     * 分页查询物业工作人员
     * @param page
     * @param pagePropertyWorkerDTO
     * @return
     */
    IPage<ComPropertyWorkerVO> pagePropertyWorker(@Param("page") Page page, @Param("pagePropertyWorkerDTO") PagePropertyWorkerDTO pagePropertyWorkerDTO);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComProperty.java
@@ -83,4 +83,19 @@
    private String password;
    /**
     * 评价星级(1~5)
     */
    private Integer star;
    /**
     * 红色物业(1.是 2.否)
     */
    private Integer isRed;
    /**
     * logo
     */
    private String logo;
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComPropertyWorker.java
New file
@@ -0,0 +1,53 @@
package com.panzhihua.service_community.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
 * 物业公司工作人员(ComPropertyWorker)表实体类
 *
 * @author makejava
 * @since 2022-04-26 09:39:59
 */
@Data
@TableName(value = "com_property_worker")
@SuppressWarnings("serial")
public class ComPropertyWorker implements Serializable {
    private static final long serialVersionUID = -27758929486387787L;
    /**
     * 物业工作人员id
     */
    private Long id;
    /**
     * 工作人员姓名
     */
    private String name;
    /**
     * 手机号
     */
    private String phone;
    /**
     * 职务
     */
    private String position;
    /**
     * 照片
     */
    private String image;
    /**
     * 物业公司关联id
     */
    private Long refId;
    /**
     * 创建时间
     */
    private Date createdAt;
    /**
     * 更新时间
     */
    private Date updatedAt;
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComPropertyWorkerService.java
New file
@@ -0,0 +1,51 @@
package com.panzhihua.service_community.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.panzhihua.common.model.dtos.property.PagePropertyWorkerDTO;
import com.panzhihua.common.model.dtos.property.PropertyWorkerDTO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.service_community.entity.ComPropertyWorker;
/**
 * 物业公司工作人员(ComPropertyWorker)表服务接口
 *
 * @author makejava
 * @since 2022-04-26 09:40:00
 */
public interface ComPropertyWorkerService extends IService<ComPropertyWorker> {
    /**
     * 添加物业工作人员
     * @param propertyWorkerDTO
     * @return
     */
    R addPropertyWorker(PropertyWorkerDTO propertyWorkerDTO);
    /**
     * 编辑物业工作人员
     * @param propertyWorkerDTO
     * @return
     */
    R updatePropertyWorker(PropertyWorkerDTO propertyWorkerDTO);
    /**
     * 删除物业工作人员
     * @param id
     * @return
     */
    R deletePropertyWorker(Long id);
    /**
     * 分页查询物业工作人员
     * @param pagePropertyWorkerDTO
     * @return
     */
    R pagePropertyWorker(PagePropertyWorkerDTO pagePropertyWorkerDTO);
    /**
     * 物业工作人员详情
     * @param id
     * @return
     */
    R detailPropertyWorker(Long id);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngVolunteerMngServiceImpl.java
@@ -35,6 +35,8 @@
import com.panzhihua.service_community.model.dos.ComMngVolunteerMngDO;
import com.panzhihua.service_community.service.ComMngVolunteerMngService;
import static java.util.Objects.nonNull;
/**
 * @program: springcloud_k8s_panzhihuazhihuishequ
 * @description: 志愿者
@@ -294,34 +296,34 @@
            ComMngVolunteerOrgTeam orgVo = comMngVolunteerOrgTeamMapper.selectOne(new QueryWrapper<ComMngVolunteerOrgTeam>().lambda()
                    .eq(ComMngVolunteerOrgTeam::getName,excel.getOrgName()).eq(ComMngVolunteerOrgTeam::getCommunityId,communityId)
                    .eq(ComMngVolunteerOrgTeam::getParentId,0));
            if(orgVo == null){
                ComMngVolunteerErrorExcelVO errorExcelVO = new ComMngVolunteerErrorExcelVO();
                BeanUtils.copyProperties(excel,errorExcelVO);
                errorExcelVO.setError("该志愿者组织不存在,请先通过后台添加该志愿者组织");
                errorList.add(errorExcelVO);
                continue;
            }
//            if(orgVo == null){
//                ComMngVolunteerErrorExcelVO errorExcelVO = new ComMngVolunteerErrorExcelVO();
//                BeanUtils.copyProperties(excel,errorExcelVO);
//                errorExcelVO.setError("该志愿者组织不存在,请先通过后台添加该志愿者组织");
//                errorList.add(errorExcelVO);
//                continue;
//            }
            //查询队伍
            ComMngVolunteerOrgTeam teamVo = comMngVolunteerOrgTeamMapper.selectOne(new QueryWrapper<ComMngVolunteerOrgTeam>().lambda()
                    .eq(ComMngVolunteerOrgTeam::getName,excel.getTeamName()).eq(ComMngVolunteerOrgTeam::getCommunityId,communityId)
                    .eq(ComMngVolunteerOrgTeam::getParentId,orgVo.getId()));
            if(teamVo == null){
                ComMngVolunteerErrorExcelVO errorExcelVO = new ComMngVolunteerErrorExcelVO();
                BeanUtils.copyProperties(excel,errorExcelVO);
                errorExcelVO.setError("该志愿者队伍不存在,请先通过后台添加该志愿者队伍");
                errorList.add(errorExcelVO);
                continue;
            }
                    .eq(ComMngVolunteerOrgTeam::getParentId, nonNull(orgVo) ? orgVo.getId() : null));
//            if(teamVo == null){
//                ComMngVolunteerErrorExcelVO errorExcelVO = new ComMngVolunteerErrorExcelVO();
//                BeanUtils.copyProperties(excel,errorExcelVO);
//                errorExcelVO.setError("该志愿者队伍不存在,请先通过后台添加该志愿者队伍");
//                errorList.add(errorExcelVO);
//                continue;
//            }
            //查询技能
            ComMngVolunteerSkill skillVo = comMngVolunteerSkillMapper.selectOne(new QueryWrapper<ComMngVolunteerSkill>().lambda()
                    .eq(ComMngVolunteerSkill::getName,excel.getSkillName()).eq(ComMngVolunteerSkill::getCommunityId,communityId));
            if(skillVo == null){
                ComMngVolunteerErrorExcelVO errorExcelVO = new ComMngVolunteerErrorExcelVO();
                BeanUtils.copyProperties(excel,errorExcelVO);
                errorExcelVO.setError("该志愿者技能不存在,请先通过后台添加该志愿者技能");
                errorList.add(errorExcelVO);
                continue;
            }
//            if(skillVo == null){
//                ComMngVolunteerErrorExcelVO errorExcelVO = new ComMngVolunteerErrorExcelVO();
//                BeanUtils.copyProperties(excel,errorExcelVO);
//                errorExcelVO.setError("该志愿者技能不存在,请先通过后台添加该志愿者技能");
//                errorList.add(errorExcelVO);
//                continue;
//            }
            Date nowDate = new Date();
            ComMngVolunteerMngDO comMngVolunteerMngDO = comMngVolunteerMngDAO.selectOne(new QueryWrapper<ComMngVolunteerMngDO>().lambda()
                    .eq(ComMngVolunteerMngDO::getIdCard,excel.getIdCard()).in(ComMngVolunteerMngDO::getState,1,2));
@@ -329,9 +331,9 @@
                if(comMngVolunteerMngDO.getState().equals(1)){
                    BeanUtils.copyProperties(excel,comMngVolunteerMngDO);
                    comMngVolunteerMngDO.setState(2);
                    comMngVolunteerMngDO.setOrgId(orgVo.getId());
                    comMngVolunteerMngDO.setTeamId(teamVo.getId());
                    comMngVolunteerMngDO.setSkillId(skillVo.getId());
                    comMngVolunteerMngDO.setOrgId(nonNull(orgVo) ? orgVo.getId() : null);
                    comMngVolunteerMngDO.setTeamId(nonNull(teamVo) ? teamVo.getId() : null);
                    comMngVolunteerMngDO.setSkillId(nonNull(skillVo) ? skillVo.getId() : null);
                    comMngVolunteerMngDAO.updateById(comMngVolunteerMngDO);
                }else{
                    ComMngVolunteerErrorExcelVO errorExcelVO = new ComMngVolunteerErrorExcelVO();
@@ -344,9 +346,9 @@
                BeanUtils.copyProperties(excel,comMngVolunteerMngDO);
                comMngVolunteerMngDO.setCommunityId(communityId);
                comMngVolunteerMngDO.setState(2);
                comMngVolunteerMngDO.setOrgId(orgVo.getId());
                comMngVolunteerMngDO.setTeamId(teamVo.getId());
                comMngVolunteerMngDO.setSkillId(skillVo.getId());
                comMngVolunteerMngDO.setOrgId(nonNull(orgVo) ? orgVo.getId() : null);
                comMngVolunteerMngDO.setTeamId(nonNull(teamVo) ? teamVo.getId() : null);
                comMngVolunteerMngDO.setSkillId(nonNull(skillVo) ? skillVo.getId() : null);
                comMngVolunteerMngDO.setCreateAt(nowDate);
                //查询用户id,如果存在则需要绑定
                Long volunteerUserId = comMngVolunteerMngDAO.selectUserIdByIdCard(excel.getIdCard());
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComPropertyServiceImpl.java
@@ -20,6 +20,8 @@
import javax.annotation.Resource;
import static java.util.Objects.isNull;
import static java.util.Objects.nonNull;
import static org.apache.commons.lang3.StringUtils.isNotBlank;
/**
 * (ComProperty)表服务实现类
@@ -50,18 +52,24 @@
        if(comPropertyVO!=null){
            ComProperty comProperty=new ComProperty();
            BeanUtils.copyProperties(comPropertyVO,comProperty);
            AdministratorsUserVO administratorsUserVO=new AdministratorsUserVO();
            administratorsUserVO.setType(3);
            administratorsUserVO.setAccount(comPropertyVO.getAccount());
            administratorsUserVO.setPassword(comPropertyVO.getPassword());
            administratorsUserVO.setRoleId(comPropertyVO.getRoleId());
            administratorsUserVO.setCommunityId(comPropertyVO.getCommunityId());
            administratorsUserVO.setAreaId(comPropertyVO.getAreaId());
            administratorsUserVO.setName(comPropertyVO.getContactName());
            administratorsUserVO.setPhone(comPropertyVO.getPhone());
            R r=userService.addUserBackstageProperty(administratorsUserVO);
            if(R.isOk(r)){
                comProperty.setUserId(Long.parseLong(r.getData().toString()));
            if (isNotBlank(comPropertyVO.getAccount())) {
                AdministratorsUserVO administratorsUserVO=new AdministratorsUserVO();
                administratorsUserVO.setType(3);
                administratorsUserVO.setAccount(comPropertyVO.getAccount());
                administratorsUserVO.setPassword(comPropertyVO.getPassword());
                administratorsUserVO.setRoleId(comPropertyVO.getRoleId());
                administratorsUserVO.setCommunityId(comPropertyVO.getCommunityId());
                administratorsUserVO.setAreaId(comPropertyVO.getAreaId());
                administratorsUserVO.setName(comPropertyVO.getContactName());
                administratorsUserVO.setPhone(comPropertyVO.getPhone());
                R r=userService.addUserBackstageProperty(administratorsUserVO);
                if(R.isOk(r)){
                    comProperty.setUserId(Long.parseLong(r.getData().toString()));
                    comProperty.setCreateTime(DateUtil.date());
                    this.comPropertyDao.insert(comProperty);
                    return R.ok();
                }
            } else {
                comProperty.setCreateTime(DateUtil.date());
                this.comPropertyDao.insert(comProperty);
                return R.ok();
@@ -99,9 +107,9 @@
                administratorsUserVO.setUserId(comProperty.getUserId());
                administratorsUserVO.setCommunityId(comProperty.getCommunityId());
                userService.deleteUserBackstage(administratorsUserVO);
                this.comPropertyDao.deleteById(id);
                return R.ok();
            }
            this.comPropertyDao.deleteById(id);
            return R.ok();
        }
        return R.fail("用户账号错误");
    }
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComPropertyWorkerServiceImpl.java
New file
@@ -0,0 +1,96 @@
package com.panzhihua.service_community.service.impl;
import static java.util.Objects.isNull;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.panzhihua.common.model.dtos.property.PagePropertyWorkerDTO;
import com.panzhihua.common.model.dtos.property.PropertyWorkerDTO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.property.ComPropertyWorkerVO;
import com.panzhihua.service_community.dao.ComPropertyWorkerDAO;
import com.panzhihua.service_community.entity.ComPropertyWorker;
import com.panzhihua.service_community.service.ComPropertyWorkerService;
/**
 * 物业公司工作人员(ComPropertyWorker)表服务实现类
 *
 * @author makejava
 * @since 2022-04-26 09:40:00
 */
@Service("comPropertyWorkerService")
public class ComPropertyWorkerServiceImpl extends ServiceImpl<ComPropertyWorkerDAO, ComPropertyWorker>
    implements ComPropertyWorkerService {
    /**
     * 添加物业工作人员
     * @param propertyWorkerDTO
     * @return
     */
    @Override
    public R addPropertyWorker(PropertyWorkerDTO propertyWorkerDTO) {
        ComPropertyWorker propertyWorker = new ComPropertyWorker();
        BeanUtils.copyProperties(propertyWorkerDTO, propertyWorker);
        int result = this.baseMapper.insert(propertyWorker);
        return result > 0 ? R.ok() : R.fail("操作失败,请重试");
    }
    /**
     * 编辑物业工作人员
     * @param propertyWorkerDTO
     * @return
     */
    @Override
    public R updatePropertyWorker(PropertyWorkerDTO propertyWorkerDTO) {
        ComPropertyWorker propertyWorker = this.baseMapper.selectById(propertyWorkerDTO.getId());
        if (isNull(propertyWorker)) {
            return R.fail("资源不存在");
        }
        BeanUtils.copyProperties(propertyWorkerDTO, propertyWorker);
        int result = this.baseMapper.updateById(propertyWorker);
        return result > 0 ? R.ok() : R.fail("操作失败,请重试");
    }
    /**
     * 删除物业工作人员
     * @param id
     * @return
     */
    @Override
    public R deletePropertyWorker(Long id) {
        this.baseMapper.deleteById(id);
        return R.ok();
    }
    /**
     * 分页查询物业工作人员
     * @param pagePropertyWorkerDTO
     * @return
     */
    @Override
    public R pagePropertyWorker(PagePropertyWorkerDTO pagePropertyWorkerDTO) {
        Page page = new Page<>();
        page.setCurrent(pagePropertyWorkerDTO.getPageNum());
        page.setSize(pagePropertyWorkerDTO.getPageSize());
        return R.ok(this.baseMapper.pagePropertyWorker(page, pagePropertyWorkerDTO));
    }
    /**
     * 物业工作人员详情
     * @param id
     * @return
     */
    @Override
    public R detailPropertyWorker(Long id) {
        ComPropertyWorker propertyWorker = this.baseMapper.selectById(id);
        if (isNull(propertyWorker)) {
            return R.fail("资源不存在");
        }
        ComPropertyWorkerVO propertyWorkerVO = new ComPropertyWorkerVO();
        BeanUtils.copyProperties(propertyWorker, propertyWorkerVO);
        return R.ok(propertyWorkerVO);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComPropertyWorkerMapper.xml
New file
@@ -0,0 +1,50 @@
<?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.ComPropertyWorkerDAO">
    <resultMap type="com.panzhihua.service_community.entity.ComPropertyWorker" id="ComPropertyWorkerMap">
        <result property="id" column="id" jdbcType="INTEGER"/>
        <result property="name" column="name" jdbcType="VARCHAR"/>
        <result property="phone" column="phone" jdbcType="VARCHAR"/>
        <result property="position" column="position" jdbcType="VARCHAR"/>
        <result property="image" column="image" jdbcType="VARCHAR"/>
        <result property="refId" column="ref_id" jdbcType="INTEGER"/>
        <result property="createdAt" column="created_at" jdbcType="TIMESTAMP"/>
        <result property="updatedAt" column="updated_at" jdbcType="TIMESTAMP"/>
    </resultMap>
    <!-- 批量插入 -->
    <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
        insert into huacheng_smart_life.com_property_worker(name, phone, position, image, ref_id, created_at,
        updated_at)
        values
        <foreach collection="entities" item="entity" separator=",">
            (#{entity.name}, #{entity.phone}, #{entity.position}, #{entity.image}, #{entity.refId}, #{entity.createdAt},
            #{entity.updatedAt})
        </foreach>
    </insert>
    <!-- 批量插入或按主键更新 -->
    <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
        insert into huacheng_smart_life.com_property_worker(name, phone, position, image, ref_id, created_at,
        updated_at)
        values
        <foreach collection="entities" item="entity" separator=",">
            (#{entity.name}, #{entity.phone}, #{entity.position}, #{entity.image}, #{entity.refId}, #{entity.createdAt},
            #{entity.updatedAt})
        </foreach>
        on duplicate key update
        name = values(name) , phone = values(phone) , position = values(position) , image = values(image) , ref_id =
        values(ref_id) , created_at = values(created_at) , updated_at = values(updated_at)
    </insert>
    <select id="pagePropertyWorker" resultType="com.panzhihua.common.model.vos.property.ComPropertyWorkerVO">
        SELECT id, `name`, phone, `position`, image, ref_id
        FROM com_property_worker
        WHERE ref_id = #{pagePropertyWorkerDTO.refId}
        <if test="pagePropertyWorkerDTO.keyword != null and pagePropertyWorkerDTO.keyword != &quot;&quot;">
            AND (`name` LIKE CONCAT('%', #{pagePropertyWorkerDTO.keyword})
            OR phone LIKE CONCAT('%', #{pagePropertyWorkerDTO.keyword}))
        </if>
    </select>
</mapper>