New file |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.warehouse.ApplyStatistics; |
| | | import com.panzhihua.common.model.vos.community.warehouse.ComActWarehouseApplyVO; |
| | | import com.panzhihua.common.model.vos.community.warehouse.QRCodeVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 物品申请表(ComActWarehouseApply)表控制层 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-10-09 17:13:53 |
| | | */ |
| | | @Slf4j |
| | | @Api(tags = {"爱心义仓申领记录接口"}) |
| | | @RestController |
| | | @RequestMapping("comActWarehouseApply") |
| | | public class ComActWarehouseApplyApi extends BaseController { |
| | | /** |
| | | * 服务对象 |
| | | */ |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * |
| | | * @param commonPage 查询实体 |
| | | * @return 所有数据 |
| | | */ |
| | | @ApiOperation(value = "分页查询所有数据",response = ComActWarehouseApplyVO.class) |
| | | @PostMapping("queryAll") |
| | | public R selectAll(@RequestBody CommonPage commonPage) { |
| | | commonPage.setParamId(this.getCommunityId()); |
| | | return this.communityService.comActWarehouseApplySelectAll(commonPage); |
| | | } |
| | | |
| | | /** |
| | | * 统计查询 |
| | | * |
| | | * @return 所有数据 |
| | | */ |
| | | @ApiOperation(value = "统计查询",response = ApplyStatistics.class) |
| | | @GetMapping("selectStatics") |
| | | public R selectAll() { |
| | | return this.communityService.comActWarehouseApplySelectAll(this.getCommunityId()); |
| | | } |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @ApiOperation(value = "通过主键查询单条数据",response = ComActWarehouseApplyVO.class) |
| | | @GetMapping("{id}") |
| | | public R selectOne(@PathVariable("id") Integer id) { |
| | | return this.communityService.comActWarehouseApplySelectOne(id); |
| | | } |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comActWarehouseApply 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @ApiOperation("新增数据") |
| | | @PostMapping |
| | | public R insert(@RequestBody ComActWarehouseApplyVO comActWarehouseApply) { |
| | | comActWarehouseApply.setCommunityId(this.getCommunityId()); |
| | | comActWarehouseApply.setCreateTime(new Date()); |
| | | comActWarehouseApply.setApplyUserId(this.getUserId()); |
| | | comActWarehouseApply.setStatus(ComActWarehouseApplyVO.status.dcl); |
| | | return this.communityService.comActWarehouseApplyInsert(comActWarehouseApply); |
| | | } |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param comActWarehouseApply 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @ApiOperation("修改数据") |
| | | @PostMapping("/update") |
| | | public R update(@RequestBody ComActWarehouseApplyVO comActWarehouseApply) { |
| | | if(comActWarehouseApply.getStatus().equals(ComActWarehouseApplyVO.status.yqx)){ |
| | | comActWarehouseApply.setCancelTime(new Date()); |
| | | } |
| | | if(comActWarehouseApply.getStatus().equals(ComActWarehouseApplyVO.status.dlq)||comActWarehouseApply.getStatus().equals(ComActWarehouseApplyVO.status.ybh)){ |
| | | comActWarehouseApply.setSolveTime(new Date()); |
| | | comActWarehouseApply.setSolveUserId(this.getUserId()); |
| | | } |
| | | if(comActWarehouseApply.getStatus().equals(ComActWarehouseApplyVO.status.ylq)){ |
| | | comActWarehouseApply.setActualTime(new Date()); |
| | | } |
| | | return this.communityService.comActWarehouseApplyUpdate(comActWarehouseApply); |
| | | } |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * |
| | | * @param id 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @ApiOperation("删除数据") |
| | | @GetMapping("del") |
| | | public R delete(@RequestParam("id") Long id) { |
| | | return this.communityService.comActWarehouseApplyDelete(id); |
| | | } |
| | | |
| | | /** |
| | | * 生成二维码 |
| | | * @param qrCodeVO |
| | | * @return |
| | | */ |
| | | @ApiOperation("生成二维码") |
| | | @PostMapping("/getQRCode") |
| | | public R getQRCode(@RequestBody QRCodeVO qrCodeVO){ |
| | | return this.communityService.comActWarehouseApplyGetQRCode(qrCodeVO); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.warehouse.ComActWarehouseBaseVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * 义仓基础设置表(ComActWarehouseBase)表控制层 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-10-11 09:21:53 |
| | | */ |
| | | @Slf4j |
| | | @Api(tags = {"爱心义仓基础记录接口"}) |
| | | @RestController |
| | | @RequestMapping("comActWarehouseBase") |
| | | public class ComActWarehouseBaseApi extends BaseController { |
| | | /** |
| | | * 服务对象 |
| | | */ |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | /** |
| | | * 通过社区id查询单条数据 |
| | | * |
| | | * @return 单条数据 |
| | | */ |
| | | @ApiOperation(value = "查询单条数据",response = ComActWarehouseBaseVO.class) |
| | | @GetMapping |
| | | public R selectOne() { |
| | | return this.communityService.comActWarehouseBaseSelectOne(this.getCommunityId()); |
| | | } |
| | | |
| | | } |
| | |
| | | private String keyword; |
| | | @ApiModelProperty("职务") |
| | | private String position; |
| | | @ApiModelProperty("参数id2") |
| | | private Integer paramId2; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.warehouse; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zzj |
| | | */ |
| | | @Data |
| | | @ApiModel("申领统计") |
| | | public class ApplyStatistics { |
| | | /** |
| | | * 待处理 |
| | | */ |
| | | @ApiModelProperty("待处理") |
| | | private Integer pending; |
| | | |
| | | /** |
| | | * 待领取 |
| | | */ |
| | | @ApiModelProperty("待领取") |
| | | private Integer unclaimed; |
| | | |
| | | /** |
| | | * 已领取 |
| | | */ |
| | | @ApiModelProperty("已领取") |
| | | private Integer received; |
| | | |
| | | /** |
| | | *已取消 |
| | | */ |
| | | @ApiModelProperty("已取消") |
| | | private Integer cancelled; |
| | | |
| | | /** |
| | | * 已驳回 |
| | | */ |
| | | @ApiModelProperty("已驳回") |
| | | private Integer rejected; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.warehouse; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.alibaba.excel.converters.string.StringImageConverter; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author zzj |
| | | */ |
| | | @Data |
| | | public class ComActWarehouseApplyExcelVO { |
| | | |
| | | @ExcelProperty(value = "申领流水",index = 10) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 物品数量 |
| | | */ |
| | | @ExcelProperty(value = "物品数量",index = 6) |
| | | private Integer goodsNum; |
| | | |
| | | /** |
| | | * 预约时间 |
| | | */ |
| | | @ExcelProperty(value = "预约领用时间",index = 7) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date reserveTime; |
| | | |
| | | /** |
| | | * 实际时间 |
| | | */ |
| | | @ExcelProperty(value = "实际领用时间",index = 8) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date actualTime; |
| | | |
| | | /** |
| | | * 理由 |
| | | */ |
| | | @ExcelProperty(value = "主要困难",index = 9) |
| | | private String reason; |
| | | |
| | | /** |
| | | * 领取图片 |
| | | */ |
| | | @ExcelProperty(value = "领取图片",converter = StringImageConverter.class,index = 11) |
| | | private String receiveUrl; |
| | | |
| | | /** |
| | | * 提交时间 |
| | | */ |
| | | @ExcelProperty(value = "提交时间",index = 13) |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 状态 0待处理 1 待领取 2已拒绝 3已领取 -1已取消 |
| | | */ |
| | | @ExcelProperty(value = "状态",index =14) |
| | | private String status; |
| | | @ExcelProperty(value = "核销人",index = 12) |
| | | private String writeOffUserName; |
| | | |
| | | /** |
| | | * 申请人 |
| | | */ |
| | | @ExcelProperty(value = "申请人",index = 0) |
| | | private String applyName; |
| | | |
| | | /** |
| | | * 申请人联系电话 |
| | | */ |
| | | @ExcelProperty(value = "申请人联系电话",index = 1) |
| | | private String applyPhone; |
| | | |
| | | /** |
| | | * 申请物品 |
| | | */ |
| | | @ExcelProperty(value = "申请物品",index = 2) |
| | | private String item; |
| | | |
| | | /** |
| | | * 捐赠人 |
| | | */ |
| | | @ExcelProperty(value = "捐赠人",index = 3) |
| | | private String donateName; |
| | | |
| | | /** |
| | | * 捐赠人联系方式 |
| | | */ |
| | | @ExcelProperty(value = "捐赠人联系方式",index = 4) |
| | | private String donatePhone; |
| | | |
| | | /** |
| | | * 物品图片 |
| | | */ |
| | | @ExcelProperty(value = "物品图片",index = 5,converter = StringImageConverter.class) |
| | | private String image; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.warehouse; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author zzj |
| | | */ |
| | | @Data |
| | | @ApiModel("义仓物品申领记录实体") |
| | | public class ComActWarehouseApplyVO { |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 物品id |
| | | */ |
| | | @ApiModelProperty(value = "物品id") |
| | | private Integer goodsId; |
| | | |
| | | /** |
| | | * 物品数量 |
| | | */ |
| | | @ApiModelProperty(value = "物品数量") |
| | | private Integer goodsNum; |
| | | |
| | | /** |
| | | * 预约时间 |
| | | */ |
| | | @ApiModelProperty(value = "预约时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date reserveTime; |
| | | |
| | | /** |
| | | * 实际时间 |
| | | */ |
| | | @ApiModelProperty(value = "实际时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date actualTime; |
| | | |
| | | /** |
| | | * 理由 |
| | | */ |
| | | @ApiModelProperty(value = "理由") |
| | | private String reason; |
| | | |
| | | /** |
| | | * 领取图片 |
| | | */ |
| | | @ApiModelProperty(value = "领取图片") |
| | | private String receiveUrl; |
| | | |
| | | /** |
| | | * 提交时间 |
| | | */ |
| | | @ApiModelProperty(value = "提交时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 状态 0待处理 1 待领取 2已拒绝 3已领取 -1已取消 |
| | | */ |
| | | @ApiModelProperty(value = "状态 0待处理 1 待领取 2已拒绝 3已领取 -1已取消") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 申请人id |
| | | */ |
| | | @ApiModelProperty("申请人id") |
| | | private Long applyUserId; |
| | | |
| | | /** |
| | | * 处理人id |
| | | */ |
| | | @ApiModelProperty(value = "处理人id") |
| | | private Long solveUserId; |
| | | |
| | | /** |
| | | * 处理人时间 |
| | | */ |
| | | @ApiModelProperty(value = "处理人时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date solveTime; |
| | | |
| | | /** |
| | | * 处理人备注 |
| | | */ |
| | | @ApiModelProperty(value = "处理人备注") |
| | | private String solveContent; |
| | | |
| | | /** |
| | | * 核销人id |
| | | */ |
| | | @ApiModelProperty(value = "核销人id") |
| | | private Long writeOffUserId; |
| | | |
| | | /** |
| | | * 取消时间 |
| | | */ |
| | | @ApiModelProperty(value = "取消时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date cancelTime; |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "社区id") |
| | | private Long communityId; |
| | | |
| | | /** |
| | | * 申请人 |
| | | */ |
| | | @ApiModelProperty("申请人") |
| | | private String applyName; |
| | | |
| | | /** |
| | | * 申请人联系电话 |
| | | */ |
| | | @ApiModelProperty("申请人联系电话") |
| | | private String applyPhone; |
| | | |
| | | /** |
| | | * 申请物品 |
| | | */ |
| | | @ApiModelProperty("申请物品") |
| | | private String item; |
| | | |
| | | /** |
| | | * 捐赠人 |
| | | */ |
| | | @ApiModelProperty("捐赠人") |
| | | private String donateName; |
| | | |
| | | /** |
| | | * 捐赠人联系方式 |
| | | */ |
| | | @ApiModelProperty("捐赠人联系方式") |
| | | private String donatePhone; |
| | | |
| | | /** |
| | | * 物品图片 |
| | | */ |
| | | @ApiModelProperty("物品图片") |
| | | private String image; |
| | | |
| | | /** |
| | | * 核销人 |
| | | */ |
| | | @ApiModelProperty("核销人") |
| | | private String writeOffUserName; |
| | | /** |
| | | * 状态 0待处理 1 待领取 2已拒绝 3已领取 -1已取消 |
| | | */ |
| | | public interface status{ |
| | | int dcl=0; |
| | | int dlq=1; |
| | | int ybh=2; |
| | | int ylq=3; |
| | | int yqx=-1; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.warehouse; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author zzj |
| | | */ |
| | | @Data |
| | | @ApiModel("义仓基础设置实体") |
| | | public class ComActWarehouseBaseVO { |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 义仓说明 |
| | | */ |
| | | @ApiModelProperty(value = "义仓说明") |
| | | private String warehouseExplain; |
| | | |
| | | /** |
| | | * 工作时间 |
| | | */ |
| | | @ApiModelProperty(value = "工作时间") |
| | | private String warehouseWorkTime; |
| | | |
| | | /** |
| | | * 联系电话 |
| | | */ |
| | | @ApiModelProperty(value = "联系电话") |
| | | private String warehouseContact; |
| | | |
| | | /** |
| | | * 接收地点 |
| | | */ |
| | | @ApiModelProperty(value = "接收地点") |
| | | private String receivePosition; |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "社区id") |
| | | private Long communityId; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty(value = "创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | *经度 |
| | | */ |
| | | @ApiModelProperty("经度") |
| | | private String longitude; |
| | | |
| | | /** |
| | | *纬度 |
| | | */ |
| | | @ApiModelProperty("纬度") |
| | | private String latitude; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.warehouse; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zzj |
| | | */ |
| | | @Data |
| | | @ApiModel("生成二维码传参") |
| | | public class QRCodeVO { |
| | | @ApiModelProperty("数据主键id") |
| | | private Integer id; |
| | | @ApiModelProperty("二维码类型 1签收 2核销") |
| | | private Integer type; |
| | | } |
| | |
| | | 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 com.panzhihua.common.model.vos.community.warehouse.ComActWarehouseApplyVO; |
| | | import com.panzhihua.common.model.vos.community.warehouse.ComActWarehouseBaseVO; |
| | | import com.panzhihua.common.model.vos.community.warehouse.QRCodeVO; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | |
| | | */ |
| | | @GetMapping("/common/data/population/house/user/detail") |
| | | public R detailHousesUser(@RequestParam("id") Long id); |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * |
| | | * @param commonPage 查询实体 |
| | | * @return 所有数据 |
| | | */ |
| | | @PostMapping("/comActWarehouseApply/queryAll") |
| | | public R comActWarehouseApplySelectAll(@RequestBody CommonPage commonPage); |
| | | |
| | | /** |
| | | * 统计查询 |
| | | * |
| | | * @param communityId |
| | | * @return 所有数据 |
| | | */ |
| | | @GetMapping("/comActWarehouseApply/selectStatics") |
| | | public R comActWarehouseApplySelectAll(@RequestParam("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @GetMapping("/comActWarehouseApply/{id}") |
| | | public R comActWarehouseApplySelectOne(@PathVariable("id") Integer id); |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comActWarehouseApply 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/comActWarehouseApply") |
| | | public R comActWarehouseApplyInsert(@RequestBody ComActWarehouseApplyVO comActWarehouseApply); |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param comActWarehouseApply 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @PostMapping("/comActWarehouseApply/update") |
| | | public R comActWarehouseApplyUpdate(@RequestBody ComActWarehouseApplyVO comActWarehouseApply); |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * |
| | | * @param id 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @GetMapping("/comActWarehouseApply/del") |
| | | public R comActWarehouseApplyDelete(@RequestParam("id") Long id); |
| | | |
| | | /** |
| | | * 生成二维码 |
| | | * @param qrCodeVO |
| | | * @return |
| | | */ |
| | | @PostMapping("/comActWarehouseApply/getQRCode") |
| | | public R comActWarehouseApplyGetQRCode(@RequestBody QRCodeVO qrCodeVO); |
| | | |
| | | /** |
| | | * 社区Id查询基础配置 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @GetMapping("/comActWarehouseBase") |
| | | public R comActWarehouseBaseSelectOne(Long communityId); |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comActWarehouseBase 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/comActWarehouseBase") |
| | | public R comActWarehouseBaseInsert(@RequestBody ComActWarehouseBaseVO comActWarehouseBase); |
| | | |
| | | /** |
| | | * 导出数据 |
| | | */ |
| | | @PostMapping("/comActWarehouseApply/export") |
| | | public R comActWarehouseApplyExport(@RequestBody CommonPage commonPage); |
| | | } |
New file |
| | |
| | | package com.panzhihua.community_backstage.api; |
| | | |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.ExcelWriter; |
| | | import com.alibaba.excel.write.metadata.WriteSheet; |
| | | import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.ExportUserDTO; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.dtos.user.EexcelUserDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActUserWalletTradeExcelVO; |
| | | import com.panzhihua.common.model.vos.community.ComActUserWalletTradeRewardExcelVO; |
| | | import com.panzhihua.common.model.vos.community.warehouse.ApplyStatistics; |
| | | import com.panzhihua.common.model.vos.community.warehouse.ComActWarehouseApplyExcelVO; |
| | | import com.panzhihua.common.model.vos.community.warehouse.ComActWarehouseApplyVO; |
| | | import com.panzhihua.common.model.vos.community.warehouse.QRCodeVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.SFTPUtil; |
| | | import com.panzhihua.community_backstage.excel.CustomSheetWriteHandler; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.io.InputStream; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.UUID; |
| | | |
| | | /** |
| | | * 物品申请表(ComActWarehouseApply)表控制层 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-10-09 17:13:53 |
| | | */ |
| | | @Slf4j |
| | | @Api(tags = {"爱心义仓申领记录接口"}) |
| | | @RestController |
| | | @RequestMapping("comActWarehouseApply") |
| | | public class ComActWarehouseApplyApi extends BaseController { |
| | | /** |
| | | * 服务对象 |
| | | */ |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | @Value("${excel.userurl}") |
| | | private String excelUrl; |
| | | // FTP 登录用户名 |
| | | @Value("${ftp.username}") |
| | | private String userName; |
| | | // FTP 登录密码 |
| | | @Value("${ftp.password}") |
| | | private String password; |
| | | // FTP 服务器地址IP地址 |
| | | @Value("${ftp.host}") |
| | | private String host; |
| | | // FTP 端口 |
| | | @Value("${ftp.port}") |
| | | private int port; |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * |
| | | * @param commonPage 查询实体 |
| | | * @return 所有数据 |
| | | */ |
| | | @ApiOperation(value = "分页查询所有数据",response = ComActWarehouseApplyVO.class) |
| | | @PostMapping("queryAll") |
| | | public R selectAll(@RequestBody CommonPage commonPage) { |
| | | commonPage.setParamId(this.getCommunityId()); |
| | | return this.communityService.comActWarehouseApplySelectAll(commonPage); |
| | | } |
| | | |
| | | /** |
| | | * 统计查询 |
| | | * |
| | | * @return 所有数据 |
| | | */ |
| | | @ApiOperation(value = "统计查询",response = ApplyStatistics.class) |
| | | @GetMapping("selectStatics") |
| | | public R selectAll() { |
| | | return this.communityService.comActWarehouseApplySelectAll(this.getCommunityId()); |
| | | } |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @ApiOperation(value = "通过主键查询单条数据",response = ComActWarehouseApplyVO.class) |
| | | @GetMapping("{id}") |
| | | public R selectOne(@PathVariable("id") Integer id) { |
| | | return this.communityService.comActWarehouseApplySelectOne(id); |
| | | } |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comActWarehouseApply 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @ApiOperation("新增数据") |
| | | @PostMapping |
| | | public R insert(@RequestBody ComActWarehouseApplyVO comActWarehouseApply) { |
| | | comActWarehouseApply.setCommunityId(this.getCommunityId()); |
| | | comActWarehouseApply.setCreateTime(new Date()); |
| | | return this.communityService.comActWarehouseApplyInsert(comActWarehouseApply); |
| | | } |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param comActWarehouseApply 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @ApiOperation("修改数据") |
| | | @PostMapping("/update") |
| | | public R update(@RequestBody ComActWarehouseApplyVO comActWarehouseApply) { |
| | | return this.communityService.comActWarehouseApplyUpdate(comActWarehouseApply); |
| | | } |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * |
| | | * @param id 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @ApiOperation("删除数据") |
| | | @GetMapping("del") |
| | | public R delete(@RequestParam("id") Long id) { |
| | | return this.communityService.comActWarehouseApplyDelete(id); |
| | | } |
| | | |
| | | /** |
| | | * 生成二维码 |
| | | * @param qrCodeVO |
| | | * @return |
| | | */ |
| | | @ApiOperation("生成二维码") |
| | | @PostMapping("/getQRCode") |
| | | public R getQRCode(@RequestBody QRCodeVO qrCodeVO){ |
| | | return this.communityService.comActWarehouseApplyGetQRCode(qrCodeVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "导出") |
| | | @PostMapping("/export") |
| | | public R export(@RequestBody CommonPage commonPage) { |
| | | Long communityId = this.getCommunityId(); |
| | | commonPage.setParamId(communityId); |
| | | |
| | | |
| | | String name = "物品领取.xlsx"; |
| | | String ftpUrl = "/mnt/data/web/excel/"; |
| | | // 用户搜索了就下载搜索的用户否则下载所有用户 |
| | | R r = communityService.comActWarehouseApplyExport(commonPage); |
| | | if (R.isOk(r)) { |
| | | try { |
| | | SFTPUtil sftp = new SFTPUtil(userName, password, host, port); |
| | | sftp.login(); |
| | | boolean existDir = sftp.isExistDir(ftpUrl + name); |
| | | if (!existDir) { |
| | | String property = System.getProperty("user.dir"); |
| | | String fileName = property + File.separator + name; |
| | | // 这里 需要指定写用哪个class去写 |
| | | ExcelWriter excelWriter = null; |
| | | InputStream inputStream = null; |
| | | try { |
| | | excelWriter = EasyExcel.write(fileName, ComActWarehouseApplyExcelVO.class) |
| | | .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) |
| | | .registerWriteHandler(new CustomSheetWriteHandler()).build(); |
| | | WriteSheet writeSheet = EasyExcel.writerSheet( "导出").build(); |
| | | excelWriter.write(JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ComActWarehouseApplyExcelVO.class), 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(excelUrl + name); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | log.error("文件传输失败【{}】", e.getMessage()); |
| | | return R.fail(); |
| | | } |
| | | } |
| | | return r; |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.community_backstage.api; |
| | | |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.warehouse.ComActWarehouseBaseVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 义仓基础设置表(ComActWarehouseBase)表控制层 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-10-11 09:21:53 |
| | | */ |
| | | @Slf4j |
| | | @Api(tags = {"爱心义仓基础记录接口"}) |
| | | @RestController |
| | | @RequestMapping("comActWarehouseBase") |
| | | public class ComActWarehouseBaseApi extends BaseController { |
| | | /** |
| | | * 服务对象 |
| | | */ |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | /** |
| | | * 通过社区id查询单条数据 |
| | | * |
| | | * @return 单条数据 |
| | | */ |
| | | @ApiOperation(value = "查询单条数据",response = ComActWarehouseBaseVO.class) |
| | | @GetMapping |
| | | public R selectOne() { |
| | | return this.communityService.comActWarehouseBaseSelectOne(this.getCommunityId()); |
| | | } |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comActWarehouseBase 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @ApiOperation("新增接口") |
| | | @PostMapping |
| | | public R insert(@RequestBody ComActWarehouseBaseVO comActWarehouseBase) { |
| | | comActWarehouseBase.setCreateTime(new Date()); |
| | | comActWarehouseBase.setCommunityId(this.getCommunityId()); |
| | | return communityService.comActWarehouseBaseInsert(comActWarehouseBase); |
| | | } |
| | | |
| | | } |
| | |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-actuator</artifactId> |
| | | </dependency> |
| | | <!-- zxing生成二维码 --> |
| | | <dependency> |
| | | <groupId>com.google.zxing</groupId> |
| | | <artifactId>core</artifactId> |
| | | <version>3.3.3</version> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>com.google.zxing</groupId> |
| | | <artifactId>javase</artifactId> |
| | | <version>3.3.3</version> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | |
| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.api.ApiController; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.vos.community.warehouse.ComActWarehouseApplyVO; |
| | | import com.panzhihua.common.model.vos.community.warehouse.QRCodeVO; |
| | | import com.panzhihua.service_community.entity.ComActWarehouseApply; |
| | | import com.panzhihua.service_community.service.ComActWarehouseApplyService; |
| | | import com.panzhihua.service_community.util.QRCodeUtil; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 物品申请表(ComActWarehouseApply)表控制层 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 统计查询 |
| | | * |
| | | * @param communityId |
| | | * @return 所有数据 |
| | | */ |
| | | @GetMapping("selectStatics") |
| | | public R selectAll(@RequestParam("communityId") Long communityId) { |
| | | return this.comActWarehouseApplyService.selectStatics(communityId); |
| | | } |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @GetMapping("{id}") |
| | | public R selectOne(@PathVariable("id") Serializable id) { |
| | | return R.ok(this.comActWarehouseApplyService.getById(id)); |
| | | public R selectOne(@PathVariable("id") Integer id) { |
| | | return this.comActWarehouseApplyService.selectById(id); |
| | | } |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comActWarehouseApply 实体对象 |
| | | * @param comActWarehouseApplyVO 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping |
| | | public R insert(@RequestBody ComActWarehouseApply comActWarehouseApply) { |
| | | public R insert(@RequestBody ComActWarehouseApplyVO comActWarehouseApplyVO) { |
| | | ComActWarehouseApply comActWarehouseApply=new ComActWarehouseApply(); |
| | | BeanUtils.copyProperties(comActWarehouseApplyVO,comActWarehouseApply); |
| | | return R.ok(this.comActWarehouseApplyService.save(comActWarehouseApply)); |
| | | } |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param comActWarehouseApply 实体对象 |
| | | * @param comActWarehouseApplyVO 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @PostMapping("/update") |
| | | public R update(@RequestBody ComActWarehouseApply comActWarehouseApply) { |
| | | return R.ok(this.comActWarehouseApplyService.updateById(comActWarehouseApply)); |
| | | public R update(@RequestBody ComActWarehouseApplyVO comActWarehouseApplyVO) { |
| | | ComActWarehouseApply comActWarehouseApply=new ComActWarehouseApply(); |
| | | BeanUtils.copyProperties(comActWarehouseApplyVO,comActWarehouseApply); |
| | | return R.ok(this.comActWarehouseApplyService.update(comActWarehouseApply)); |
| | | } |
| | | |
| | | /** |
| | |
| | | public R delete(@RequestParam("id") Long id) { |
| | | return R.ok(this.comActWarehouseApplyService.removeById(id)); |
| | | } |
| | | |
| | | /** |
| | | * 生成二维码 |
| | | * @param qrCodeVO |
| | | * @return |
| | | */ |
| | | @PostMapping("/getQRCode") |
| | | public R getQRCode(@RequestBody QRCodeVO qrCodeVO){ |
| | | return R.ok(QRCodeUtil.getBase64QRCode(JSONObject.toJSONString(qrCodeVO))); |
| | | } |
| | | /** |
| | | * 社区团队权限校验 |
| | | */ |
| | | @GetMapping("/check") |
| | | public R check(@RequestParam("phone") String phone){ |
| | | return this.comActWarehouseApplyService.check(phone); |
| | | } |
| | | |
| | | /** |
| | | * 导出数据 |
| | | */ |
| | | @PostMapping("/export") |
| | | public R export(@RequestBody CommonPage commonPage){ |
| | | return this.comActWarehouseApplyService.export(commonPage); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.api.ApiController; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.vos.community.warehouse.ComActWarehouseBaseVO; |
| | | import com.panzhihua.service_community.entity.ComActWarehouseBase; |
| | | import com.panzhihua.service_community.service.ComActWarehouseBaseService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 义仓基础设置表(ComActWarehouseBase)表控制层 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-10-11 09:21:53 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("comActWarehouseBase") |
| | | public class ComActWarehouseBaseApi { |
| | | /** |
| | | * 服务对象 |
| | | */ |
| | | @Resource |
| | | private ComActWarehouseBaseService comActWarehouseBaseService; |
| | | |
| | | /** |
| | | * 通过社区id查询单条数据 |
| | | * |
| | | * @param communityId 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @GetMapping |
| | | public R selectOne(Long communityId) { |
| | | return R.ok(this.comActWarehouseBaseService.getOne(new QueryWrapper<ComActWarehouseBase>().lambda().eq(ComActWarehouseBase::getCommunityId,communityId))); |
| | | } |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param comActWarehouseBaseVO 实体对象 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping |
| | | public R insert(@RequestBody ComActWarehouseBaseVO comActWarehouseBaseVO) { |
| | | ComActWarehouseBase comActWarehouseBase=new ComActWarehouseBase(); |
| | | BeanUtils.copyProperties(comActWarehouseBaseVO,comActWarehouseBase); |
| | | if(comActWarehouseBase.getId()!=null){ |
| | | return R.ok(this.comActWarehouseBaseService.updateById(comActWarehouseBase)); |
| | | } |
| | | return R.ok(this.comActWarehouseBaseService.save(comActWarehouseBase)); |
| | | } |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * |
| | | * @param comActWarehouseBase 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @PostMapping("/update") |
| | | public R update(@RequestBody ComActWarehouseBase comActWarehouseBase) { |
| | | return R.ok(this.comActWarehouseBaseService.updateById(comActWarehouseBase)); |
| | | } |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * |
| | | * @param id 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @GetMapping("del") |
| | | public R delete(@RequestParam("id") Long id) { |
| | | return R.ok(this.comActWarehouseBaseService.removeById(id)); |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.community.warehouse.ApplyStatistics; |
| | | import com.panzhihua.common.model.vos.community.warehouse.ComActWarehouseApplyVO; |
| | | import com.panzhihua.service_community.entity.ComActWarehouseApply; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 物品申请表(ComActWarehouseApply)表数据库访问层 |
| | |
| | | */ |
| | | @Mapper |
| | | public interface ComActWarehouseApplyDao extends BaseMapper<ComActWarehouseApply> { |
| | | /** |
| | | * 分页查询 |
| | | * @param page |
| | | * @param commonPage |
| | | * @return |
| | | */ |
| | | IPage<ComActWarehouseApplyVO> queryAll(Page page, @Param("commonPage")CommonPage commonPage); |
| | | |
| | | /** |
| | | * 申领统计 |
| | | * @param communityId |
| | | * @return ApplyStatistics |
| | | */ |
| | | ApplyStatistics selectStatics(Long communityId); |
| | | |
| | | /** |
| | | * 主键查询详情 |
| | | * @param id |
| | | * @return ComActWarehouseApplyVO |
| | | */ |
| | | ComActWarehouseApplyVO selectById(Integer id); |
| | | |
| | | /** |
| | | * 条件导出 |
| | | * @param commonPage |
| | | * @return |
| | | */ |
| | | List<ComActWarehouseApplyVO> queryAll(@Param("commonPage") CommonPage commonPage); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import com.panzhihua.service_community.entity.ComActWarehouseBase; |
| | | |
| | | /** |
| | | * 义仓基础设置表(ComActWarehouseBase)表数据库访问层 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-10-11 09:21:52 |
| | | */ |
| | | @Mapper |
| | | public interface ComActWarehouseBaseDao extends BaseMapper<ComActWarehouseBase> { |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import com.panzhihua.service_community.entity.ComPbServiceTeam; |
| | | |
| | | /** |
| | | * 服务团队(ComPbServiceTeam)表数据库访问层 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-10-11 13:24:35 |
| | | */ |
| | | @Mapper |
| | | public interface ComPbServiceTeamDao extends BaseMapper<ComPbServiceTeam> { |
| | | |
| | | } |
| | |
| | | * 物品申请表(ComActWarehouseApply)表实体类 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-10-09 17:13:52 |
| | | * @since 2021-10-11 13:47:37 |
| | | */ |
| | | @Data |
| | | @Builder |
| | |
| | | @ApiModel("物品申请表") |
| | | public class ComActWarehouseApply implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 914504508468901144L; |
| | | private static final long serialVersionUID = 225290522401641721L; |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | |
| | | /** |
| | | * 申请人id |
| | | */ |
| | | @ApiModelProperty(value = "申请人id") |
| | | private Integer applyUserId; |
| | | @ApiModelProperty("申请人id") |
| | | private Long applyUserId; |
| | | |
| | | /** |
| | | * 申请人 |
| | | */ |
| | | @ApiModelProperty("申请人") |
| | | private String applyName; |
| | | |
| | | /** |
| | | * 申请人联系电话 |
| | | */ |
| | | @ApiModelProperty("申请人联系电话") |
| | | private String applyPhone; |
| | | |
| | | /** |
| | | * 处理人id |
| | | */ |
| | | @ApiModelProperty(value = "处理人id") |
| | | private Integer solveUserId; |
| | | private Long solveUserId; |
| | | |
| | | /** |
| | | * 处理人时间 |
| | |
| | | * 核销人id |
| | | */ |
| | | @ApiModelProperty(value = "核销人id") |
| | | private Integer writeOffUserId; |
| | | private Long writeOffUserId; |
| | | |
| | | /** |
| | | * 取消时间 |
| | |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "社区id") |
| | | private Integer communityId; |
| | | private Long communityId; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.entity; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | |
| | | /** |
| | | * 义仓基础设置表(ComActWarehouseBase)表实体类 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-10-11 09:21:52 |
| | | */ |
| | | @Data |
| | | @Builder |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | @ApiModel("义仓基础设置表") |
| | | public class ComActWarehouseBase implements Serializable { |
| | | |
| | | private static final long serialVersionUID = -68726161070095574L; |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | /** |
| | | * 义仓说明 |
| | | */ |
| | | @ApiModelProperty(value = "义仓说明") |
| | | private String warehouseExplain; |
| | | |
| | | /** |
| | | * 工作时间 |
| | | */ |
| | | @ApiModelProperty(value = "工作时间") |
| | | private String warehouseWorkTime; |
| | | |
| | | /** |
| | | * 联系电话 |
| | | */ |
| | | @ApiModelProperty(value = "联系电话") |
| | | private String warehouseContact; |
| | | |
| | | /** |
| | | * 接收地点 |
| | | */ |
| | | @ApiModelProperty(value = "接收地点") |
| | | private String receivePosition; |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "社区id") |
| | | private Long communityId; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | *经度 |
| | | */ |
| | | @ApiModelProperty("经度") |
| | | private String longitude; |
| | | |
| | | /** |
| | | *纬度 |
| | | */ |
| | | @ApiModelProperty("纬度") |
| | | private String latitude; |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.entity; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | |
| | | /** |
| | | * 服务团队(ComPbServiceTeam)表实体类 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-10-11 13:24:35 |
| | | */ |
| | | @Data |
| | | @Builder |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | @ApiModel("服务团队") |
| | | public class ComPbServiceTeam implements Serializable { |
| | | |
| | | private static final long serialVersionUID = -12211594984638204L; |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 姓名 |
| | | */ |
| | | @ApiModelProperty(value = "姓名") |
| | | private String name; |
| | | |
| | | /** |
| | | * 职位 |
| | | */ |
| | | @ApiModelProperty(value = "职位") |
| | | private String job; |
| | | |
| | | /** |
| | | * 职位2 |
| | | */ |
| | | @ApiModelProperty(value = "职位2") |
| | | private String jobTwo; |
| | | |
| | | /** |
| | | * 照片 |
| | | */ |
| | | @ApiModelProperty(value = "照片") |
| | | private String url; |
| | | |
| | | private Date createAt; |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "社区id") |
| | | private Long communityId; |
| | | |
| | | private String jobResponsibilities; |
| | | |
| | | private String phone; |
| | | |
| | | private Integer isReg; |
| | | |
| | | /** |
| | | * 身份证号码 |
| | | */ |
| | | @ApiModelProperty(value = "身份证号码") |
| | | private String cardNo; |
| | | |
| | | } |
| | |
| | | * @since 2021-10-09 17:13:52 |
| | | */ |
| | | public interface ComActWarehouseApplyService extends IService<ComActWarehouseApply> { |
| | | /** |
| | | * 分页查询 |
| | | * @param commonPage |
| | | * @return |
| | | */ |
| | | R pageList(CommonPage commonPage); |
| | | |
| | | /** |
| | | * 社区id查询统计数据 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | R selectStatics(Long communityId); |
| | | |
| | | /** |
| | | * 主键查询详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | R selectById(Integer id); |
| | | |
| | | /** |
| | | * 验证用户是否社区团队 |
| | | * @param phone |
| | | * @return |
| | | */ |
| | | R check(String phone); |
| | | |
| | | /** |
| | | * 更新 |
| | | * @param comActWarehouseApply |
| | | * @return |
| | | */ |
| | | R update(ComActWarehouseApply comActWarehouseApply); |
| | | |
| | | /** |
| | | * 导出 |
| | | */ |
| | | R export(CommonPage commonPage); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.service_community.entity.ComActWarehouseBase; |
| | | |
| | | /** |
| | | * 义仓基础设置表(ComActWarehouseBase)表服务接口 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-10-11 09:21:53 |
| | | */ |
| | | public interface ComActWarehouseBaseService extends IService<ComActWarehouseBase> { |
| | | } |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | 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.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.entity.ComActWarehouseApply; |
| | | import com.panzhihua.common.model.vos.community.warehouse.ComActWarehouseApplyVO; |
| | | import com.panzhihua.service_community.dao.ComActWarehouseDonatesDao; |
| | | import com.panzhihua.service_community.dao.ComActWarehouseOperationDao; |
| | | import com.panzhihua.service_community.dao.ComPbServiceTeamDao; |
| | | import com.panzhihua.service_community.dao.ComActWarehouseApplyDao; |
| | | import com.panzhihua.service_community.entity.ComActWarehouseApply; |
| | | import com.panzhihua.service_community.entity.ComActWarehouseDonates; |
| | | import com.panzhihua.service_community.entity.ComActWarehouseOperation; |
| | | import com.panzhihua.service_community.entity.ComPbServiceTeam; |
| | | import com.panzhihua.service_community.service.ComActWarehouseApplyService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 物品申请表(ComActWarehouseApply)表服务实现类 |
| | |
| | | @Slf4j |
| | | @Service |
| | | public class ComActWarehouseApplyServiceImpl extends ServiceImpl<ComActWarehouseApplyDao, ComActWarehouseApply> implements ComActWarehouseApplyService { |
| | | |
| | | @Resource |
| | | private ComActWarehouseApplyDao comActWarehouseApplyDao; |
| | | @Resource |
| | | private ComPbServiceTeamDao comPbServiceTeamDao; |
| | | @Resource |
| | | private ComActWarehouseDonatesDao comActWarehouseDonatesDao; |
| | | @Resource |
| | | private ComActWarehouseOperationDao comActWarehouseOperationDao; |
| | | @Override |
| | | public R pageList(CommonPage commonPage) { |
| | | return null; |
| | | IPage<ComActWarehouseApplyVO> iPage=this.comActWarehouseApplyDao.queryAll(new Page<>(commonPage.getPage(),commonPage.getSize()),commonPage); |
| | | return R.ok(iPage); |
| | | } |
| | | |
| | | @Override |
| | | public R selectStatics(Long communityId) { |
| | | return R.ok(this.comActWarehouseApplyDao.selectStatics(communityId)); |
| | | } |
| | | |
| | | @Override |
| | | public R selectById(Integer id) { |
| | | return R.ok(this.comActWarehouseApplyDao.selectById(id)); |
| | | } |
| | | |
| | | @Override |
| | | public R check(String phone) { |
| | | Integer count=comPbServiceTeamDao.selectCount(new QueryWrapper<ComPbServiceTeam>().lambda().eq(ComPbServiceTeam::getPhone,phone)); |
| | | return count>0? R.ok():R.fail("无权限"); |
| | | } |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Override |
| | | public R update(ComActWarehouseApply comActWarehouseApply) { |
| | | if(comActWarehouseApply.getStatus().equals(ComActWarehouseApplyVO.status.ylq)){ |
| | | ComActWarehouseDonates comActWarehouseDonates=this.comActWarehouseDonatesDao.selectById(comActWarehouseApply.getGoodsId()); |
| | | if(comActWarehouseDonates!=null&&comActWarehouseDonates.getSurplusQuantity()>0){ |
| | | comActWarehouseDonates.setSurplusQuantity(comActWarehouseDonates.getSurplusQuantity()-1); |
| | | this.comActWarehouseDonatesDao.updateById(comActWarehouseDonates); |
| | | ComActWarehouseOperation comActWarehouseOperation=new ComActWarehouseOperation(); |
| | | comActWarehouseOperation.setGoodsId(comActWarehouseApply.getGoodsId()); |
| | | comActWarehouseOperation.setCreateTime(new Date()); |
| | | comActWarehouseOperation.setContent("爱心传递给了"+comActWarehouseApply.getApplyName().charAt(0)+"**,"+"减少了"+comActWarehouseApply.getReason()+"的困难,谢谢你的帮助"); |
| | | this.comActWarehouseOperationDao.insert(comActWarehouseOperation); |
| | | } |
| | | else { |
| | | return R.fail("库存不足"); |
| | | } |
| | | } |
| | | return R.ok(this.comActWarehouseApplyDao.updateById(comActWarehouseApply)); |
| | | } |
| | | |
| | | @Override |
| | | public R export(CommonPage commonPage) { |
| | | return R.ok(this.comActWarehouseApplyDao.queryAll(commonPage)); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_community.entity.ComActWarehouseBase; |
| | | import com.panzhihua.service_community.dao.ComActWarehouseBaseDao; |
| | | import com.panzhihua.service_community.service.ComActWarehouseBaseService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * 义仓基础设置表(ComActWarehouseBase)表服务实现类 |
| | | * |
| | | * @author makejava |
| | | * @since 2021-10-11 09:21:53 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class ComActWarehouseBaseServiceImpl extends ServiceImpl<ComActWarehouseBaseDao, ComActWarehouseBase> implements ComActWarehouseBaseService { |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.util; |
| | | |
| | | import cn.hutool.core.codec.Base64; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.google.zxing.BarcodeFormat; |
| | | import com.google.zxing.EncodeHintType; |
| | | import com.google.zxing.common.BitMatrix; |
| | | import com.google.zxing.qrcode.QRCodeWriter; |
| | | import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel; |
| | | import lombok.experimental.UtilityClass; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import javax.imageio.ImageIO; |
| | | import javax.servlet.ServletOutputStream; |
| | | import java.awt.*; |
| | | import java.awt.geom.RoundRectangle2D; |
| | | import java.awt.image.BufferedImage; |
| | | import java.io.ByteArrayOutputStream; |
| | | import java.io.IOException; |
| | | import java.io.OutputStream; |
| | | import java.net.URL; |
| | | import java.util.HashMap; |
| | | |
| | | @Slf4j |
| | | @UtilityClass |
| | | public class QRCodeUtil { |
| | | /** |
| | | * 默认宽度 |
| | | */ |
| | | private static final Integer WIDTH = 140; |
| | | /** |
| | | * 默认高度 |
| | | */ |
| | | private static final Integer HEIGHT = 140; |
| | | |
| | | /** |
| | | * LOGO 默认宽度 |
| | | */ |
| | | private static final Integer LOGO_WIDTH = 22; |
| | | /** |
| | | * LOGO 默认高度 |
| | | */ |
| | | private static final Integer LOGO_HEIGHT = 22; |
| | | |
| | | /** |
| | | * 图片格式 |
| | | */ |
| | | private static final String IMAGE_FORMAT = "png"; |
| | | private static final String CHARSET = "utf-8"; |
| | | /** |
| | | * 原生转码前面没有 data:image/png;base64 这些字段,返回给前端是无法被解析 |
| | | */ |
| | | private static final String BASE64_IMAGE = "data:image/png;base64,%s"; |
| | | |
| | | /** |
| | | * 生成二维码,使用默认尺寸 |
| | | * |
| | | * @param content 内容 |
| | | * @return |
| | | */ |
| | | public String getBase64QRCode(String content) { |
| | | return getBase64Image(content, WIDTH, HEIGHT, null, null, null); |
| | | } |
| | | |
| | | /** |
| | | * 生成二维码,使用默认尺寸二维码,插入默认尺寸logo |
| | | * |
| | | * @param content 内容 |
| | | * @param logoUrl logo地址 |
| | | * @return |
| | | */ |
| | | public String getBase64QRCode(String content, String logoUrl) { |
| | | return getBase64Image(content, WIDTH, HEIGHT, logoUrl, LOGO_WIDTH, LOGO_HEIGHT); |
| | | } |
| | | |
| | | /** |
| | | * 生成二维码 |
| | | * |
| | | * @param content 内容 |
| | | * @param width 二维码宽度 |
| | | * @param height 二维码高度 |
| | | * @param logoUrl logo 在线地址 |
| | | * @param logoWidth logo 宽度 |
| | | * @param logoHeight logo 高度 |
| | | * @return |
| | | */ |
| | | public String getBase64QRCode(String content, Integer width, Integer height, String logoUrl, Integer logoWidth, Integer logoHeight) { |
| | | return getBase64Image(content, width, height, logoUrl, logoWidth, logoHeight); |
| | | } |
| | | |
| | | private String getBase64Image(String content, Integer width, Integer height, String logoUrl, Integer logoWidth, Integer logoHeight) { |
| | | ByteArrayOutputStream os = new ByteArrayOutputStream(); |
| | | BufferedImage bufferedImage = crateQRCode(content, width, height, logoUrl, logoWidth, logoHeight); |
| | | try { |
| | | ImageIO.write(bufferedImage, IMAGE_FORMAT, os); |
| | | } catch (IOException e) { |
| | | log.error("[生成二维码,错误{}]", e); |
| | | } |
| | | // 转出即可直接使用 |
| | | return String.format(BASE64_IMAGE, Base64.encode(os.toByteArray())); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 生成二维码 |
| | | * |
| | | * @param content 内容 |
| | | * @param width 二维码宽度 |
| | | * @param height 二维码高度 |
| | | * @param logoUrl logo 在线地址 |
| | | * @param logoWidth logo 宽度 |
| | | * @param logoHeight logo 高度 |
| | | * @return |
| | | */ |
| | | private BufferedImage crateQRCode(String content, Integer width, Integer height, String logoUrl, Integer logoWidth, Integer logoHeight) { |
| | | if (StrUtil.isNotBlank(content)) { |
| | | ServletOutputStream stream = null; |
| | | HashMap<EncodeHintType, Comparable> hints = new HashMap<>(4); |
| | | // 指定字符编码为utf-8 |
| | | hints.put(EncodeHintType.CHARACTER_SET, CHARSET); |
| | | // 指定二维码的纠错等级为中级 |
| | | hints.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.M); |
| | | // 设置图片的边距 |
| | | hints.put(EncodeHintType.MARGIN, 2); |
| | | try { |
| | | QRCodeWriter writer = new QRCodeWriter(); |
| | | BitMatrix bitMatrix = writer.encode(content, BarcodeFormat.QR_CODE, width, height, hints); |
| | | BufferedImage bufferedImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); |
| | | for (int x = 0; x < width; x++) { |
| | | for (int y = 0; y < height; y++) { |
| | | bufferedImage.setRGB(x, y, bitMatrix.get(x, y) ? 0xFF000000 : 0xFFFFFFFF); |
| | | } |
| | | } |
| | | if (StrUtil.isNotBlank(logoUrl)) { |
| | | insertLogo(bufferedImage, width, height, logoUrl, logoWidth, logoHeight); |
| | | } |
| | | return bufferedImage; |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } finally { |
| | | if (stream != null) { |
| | | try { |
| | | stream.flush(); |
| | | stream.close(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * 二维码插入logo |
| | | * |
| | | * @param source 二维码 |
| | | * @param width 二维码宽度 |
| | | * @param height 二维码高度 |
| | | * @param logoUrl logo 在线地址 |
| | | * @param logoWidth logo 宽度 |
| | | * @param logoHeight logo 高度 |
| | | * @throws Exception |
| | | */ |
| | | private void insertLogo(BufferedImage source, Integer width, Integer height, String logoUrl, Integer logoWidth, Integer logoHeight) throws Exception { |
| | | // logo 源可为 File/InputStream/URL |
| | | Image src = ImageIO.read(new URL(logoUrl)); |
| | | // 插入LOGO |
| | | Graphics2D graph = source.createGraphics(); |
| | | int x = (width - logoWidth) / 2; |
| | | int y = (height - logoHeight) / 2; |
| | | graph.drawImage(src, x, y, logoWidth, logoHeight, null); |
| | | Shape shape = new RoundRectangle2D.Float(x, y, logoWidth, logoHeight, 6, 6); |
| | | graph.setStroke(new BasicStroke(3f)); |
| | | graph.draw(shape); |
| | | graph.dispose(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取二维码 |
| | | * |
| | | * @param content 内容 |
| | | * @param output 输出流 |
| | | * @throws IOException |
| | | */ |
| | | public void getQRCode(String content, OutputStream output) throws IOException { |
| | | BufferedImage image = crateQRCode(content, WIDTH, HEIGHT, null, null, null); |
| | | ImageIO.write(image, IMAGE_FORMAT, output); |
| | | } |
| | | |
| | | /** |
| | | * 获取二维码 |
| | | * |
| | | * @param content 内容 |
| | | * @param logoUrl logo资源 |
| | | * @param output 输出流 |
| | | * @throws Exception |
| | | */ |
| | | public void getQRCode(String content, String logoUrl, OutputStream output) throws Exception { |
| | | BufferedImage image = crateQRCode(content, WIDTH, HEIGHT, logoUrl, LOGO_WIDTH, LOGO_HEIGHT); |
| | | ImageIO.write(image, IMAGE_FORMAT, output); |
| | | } |
| | | |
| | | } |
| | |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="status" column="status"/> |
| | | <result property="applyUserId" column="apply_user_id"/> |
| | | <result property="applyName" column="apply_name"/> |
| | | <result property="applyPhone" column="apply_phone"/> |
| | | <result property="solveUserId" column="solve_user_id"/> |
| | | <result property="solveTime" column="solve_time"/> |
| | | <result property="solveContent" column="solve_content"/> |
| | |
| | | <result property="communityId" column="community_id"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <select id="queryAll" resultType="com.panzhihua.common.model.vos.community.warehouse.ComActWarehouseApplyVO"> |
| | | select t.*,t1.name as donateName,t1.item,t1.image,t1.phone as donatePhone,t2.name as writeOffUserName from com_act_warehouse_apply t inner join com_act_warehouse_donates t1 on t.goods_id = t1.id left join sys_user t2 on t.write_off_user_id = t2.user_id |
| | | <where> |
| | | 1=1 |
| | | <if test="commonPage.paramId !=null"> |
| | | and t.community_id=#{commonPage.paramId} |
| | | </if> |
| | | <if test="commonPage.status !=null"> |
| | | and t.status=#{commonPage.status} |
| | | </if> |
| | | <if test="commonPage.paramId2 != null"> |
| | | and t.goods_id = #{commonPage.paramId2} |
| | | </if> |
| | | <if test="commonPage.keyword !=null and commonPage.keyword !=''"> |
| | | and (t.id like concat('%',#{commonPage.keyword},'%') or t1.item like concat('%',#{commonPage.keyword},'%') or t.apply_phone like concat('%',#{commonPage.keyword},'%') or t.apply_name like concat('%',#{commonPage.keyword},'%')) |
| | | </if> |
| | | <if test="commonPage.userId !=null"> |
| | | and t.apply_user_id = #{commonPage.userId} |
| | | </if> |
| | | </where> |
| | | order by t.actual_time desc |
| | | </select> |
| | | |
| | | <select id="selectStatics" resultType="com.panzhihua.common.model.vos.community.warehouse.ApplyStatistics"> |
| | | select |
| | | (select count(*) from com_act_warehouse_apply where status = 0 and community_id =#{communityId}) as pending, |
| | | (select count(*) from com_act_warehouse_apply where status = 1 and community_id =#{communityId}) as unclaimed, |
| | | (select count(*) from com_act_warehouse_apply where status = 2 and community_id =#{communityId}) as rejected, |
| | | (select count(*) from com_act_warehouse_apply where status = 3 and community_id =#{communityId}) as received, |
| | | (select count(*) from com_act_warehouse_apply where status = -1 and community_id =#{communityId}) as cancelled |
| | | </select> |
| | | |
| | | <select id="selectById" resultType="com.panzhihua.common.model.vos.community.warehouse.ComActWarehouseApplyVO"> |
| | | select t.*,t1.name as donateName,t1.item,t1.image,t1.phone as donatePhone,t2.name as writeOffUserName from com_act_warehouse_apply t inner join com_act_warehouse_donates t1 on t.goods_id = t1.id left join sys_user t2 on t.write_off_user_id = t2.user_id |
| | | where t.id=#{id} |
| | | </select> |
| | | </mapper> |
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.ComActWarehouseBaseDao"> |
| | | |
| | | <resultMap type="com.panzhihua.service_community.entity.ComActWarehouseBase" id="ComActWarehouseBaseBaseResultMap"> |
| | | <result property="id" column="id"/> |
| | | <result property="warehouseExplain" column="warehouse_explain"/> |
| | | <result property="warehouseWorkTime" column="warehouse_work_time"/> |
| | | <result property="warehouseContact" column="warehouse_contact"/> |
| | | <result property="receivePosition" column="receive_position"/> |
| | | <result property="communityId" column="community_id"/> |
| | | <result property="createTime" column="create_time"/> |
| | | </resultMap> |
| | | |
| | | </mapper> |
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.ComPbServiceTeamDao"> |
| | | |
| | | <resultMap type="com.panzhihua.service_community.entity.ComPbServiceTeam" id="ComPbServiceTeamBaseResultMap"> |
| | | <result property="id" column="id"/> |
| | | <result property="name" column="name"/> |
| | | <result property="job" column="job"/> |
| | | <result property="jobTwo" column="job_two"/> |
| | | <result property="url" column="url"/> |
| | | <result property="createAt" column="create_at"/> |
| | | <result property="communityId" column="community_id"/> |
| | | <result property="jobResponsibilities" column="job_responsibilities"/> |
| | | <result property="phone" column="phone"/> |
| | | <result property="isReg" column="is_reg"/> |
| | | <result property="cardNo" column="card_no"/> |
| | | </resultMap> |
| | | |
| | | </mapper> |