5 İşlemeler feb39c187d ... 2df64aa1ef

Yazar SHA1 Mesaj Tarih
  LiRong 2df64aa1ef 处理连表查询时的省市区校验 1 hafta önce
  LiRong d88be7a270 Merge remote-tracking branch 'origin/master' 1 hafta önce
  LiRong c0053136e7 恢复到之前的版本 1 hafta önce
  LiRong f4ab12f434 志愿者账户的余额和用户账户的余额,以及去掉主订单中无用的字段 1 hafta önce
  LiRong 4dce876862 志愿者账户的余额和用户账户的余额,以及去掉主订单中无用的字段 1 hafta önce
26 değiştirilmiş dosya ile 259 ekleme ve 110 silme
  1. 3 1
      leromro-common/src/main/java/com/leromro/common/constant/CommonConstants.java
  2. 18 0
      leromro-common/src/main/java/com/leromro/common/core/domain/entity/LongitudeAndLatitude.java
  3. 16 0
      leromro-common/src/main/java/com/leromro/common/core/domain/entity/SysDept.java
  4. 15 6
      leromro-core/src/main/java/com/leromro/core/controller/ClientAccountChangeController.java
  5. 1 1
      leromro-core/src/main/java/com/leromro/core/controller/OrdersController.java
  6. 31 16
      leromro-core/src/main/java/com/leromro/core/controller/VolunteerAccountChangeController.java
  7. 4 2
      leromro-core/src/main/java/com/leromro/core/controller/volunteerOrderController.java
  8. 6 8
      leromro-core/src/main/java/com/leromro/core/domain/MainOrders.java
  9. 1 1
      leromro-core/src/main/java/com/leromro/core/domain/Region.java
  10. 5 0
      leromro-core/src/main/java/com/leromro/core/domain/SecondOrder.java
  11. 5 0
      leromro-core/src/main/java/com/leromro/core/domain/VolunteerAccountChange.java
  12. 1 1
      leromro-core/src/main/java/com/leromro/core/domain/VolunteerInfo.java
  13. 7 10
      leromro-core/src/main/java/com/leromro/core/domain/vo/ClientAccountChangeListVO.java
  14. 9 0
      leromro-core/src/main/java/com/leromro/core/domain/vo/VolunteerAccountChangeVO.java
  15. 0 1
      leromro-core/src/main/java/com/leromro/core/mapper/ClientAccountChangeMapper.java
  16. 3 0
      leromro-core/src/main/java/com/leromro/core/mapper/VolunteerAccountChangeMapper.java
  17. 5 2
      leromro-core/src/main/java/com/leromro/core/service/IClientAccountChangeService.java
  18. 6 0
      leromro-core/src/main/java/com/leromro/core/service/IVolunteerAccountChangeService.java
  19. 15 7
      leromro-core/src/main/java/com/leromro/core/service/impl/ClientAccountChangeServiceImpl.java
  20. 0 1
      leromro-core/src/main/java/com/leromro/core/service/impl/MainOrderServiceImpl.java
  21. 36 2
      leromro-core/src/main/java/com/leromro/core/service/impl/VolunteerAccountChangeServiceImpl.java
  22. 1 1
      leromro-core/src/main/java/com/leromro/core/service/impl/VolunteerInfoServiceImpl.java
  23. 2 2
      leromro-core/src/main/java/com/leromro/core/ttl/Monitor.java
  24. 1 2
      leromro-core/src/main/resources/mapper/core/ClientAccountChangeMapper.xml
  25. 24 2
      leromro-core/src/main/resources/mapper/core/VolunteerAccountChangeMapper.xml
  26. 44 44
      leromro-system/src/main/resources/mapper/system/SysDeptMapper.xml

+ 3 - 1
leromro-common/src/main/java/com/leromro/common/constant/CommonConstants.java

@@ -15,6 +15,8 @@ public class CommonConstants {
     public static final String CHECK_PROVINCE = "province_code";
     //校验省市
     public static final String CHECK_PROVINCE_CITY= "province_code,city_code";
-    //校验省市区
+    //校验省市区(和志愿者表的联查)
+    public static final String CHECK_VOLUNTEER_PROVINCE_CITY_DISTRICT = "lvi.province_code,lvi.city_code,lvi.district_code";
+    //校验省市区(无联查)
     public static final String CHECK_PROVINCE_CITY_DISTRICT = "province_code,city_code,district_code";
 }

+ 18 - 0
leromro-common/src/main/java/com/leromro/common/core/domain/entity/LongitudeAndLatitude.java

@@ -0,0 +1,18 @@
+package com.leromro.common.core.domain.entity;
+
+import io.swagger.annotations.ApiOperation;
+import lombok.*;
+import org.checkerframework.checker.units.qual.A;
+
+@Data
+@Getter
+@Setter
+@AllArgsConstructor
+@NoArgsConstructor
+public class LongitudeAndLatitude {
+    private String Longitude;
+
+    private String latitude;
+
+    private String height;
+}

+ 16 - 0
leromro-common/src/main/java/com/leromro/common/core/domain/entity/SysDept.java

@@ -7,7 +7,9 @@ import javax.validation.constraints.NotBlank;
 import javax.validation.constraints.NotNull;
 import javax.validation.constraints.Size;
 
+import cn.hutool.json.JSONArray;
 import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
 import io.swagger.annotations.ApiModelProperty;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
@@ -87,6 +89,20 @@ public class SysDept extends BaseEntity
     @ApiModelProperty("区级名称")
     private String districtName;
 
+
+    public String getPointList() {
+        return pointList;
+    }
+
+    public void setPointList(String pointList) {
+        this.pointList = pointList;
+    }
+
+    @ApiModelProperty("经纬度集合")
+    private String pointList;
+
+
+
     public String getProvinceCode() {
         return provinceCode;
     }

+ 15 - 6
leromro-core/src/main/java/com/leromro/core/controller/ClientAccountChangeController.java

@@ -4,7 +4,7 @@ import java.util.List;
 import javax.servlet.http.HttpServletResponse;
 
 import com.leromro.common.utils.SecurityUtils;
-import com.leromro.core.domain.vo.ClientAccountChangeListVO;
+import com.leromro.core.domain.vo.AccountChangeTotalMoney;
 import com.leromro.core.domain.vo.ClientAccountChangeVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -44,15 +44,24 @@ public class ClientAccountChangeController extends BaseController
     /**
      * 查询用户自己的钱包变更记录
      */
-
     @ApiOperation("查询用户自己的账户变更记录 收入或支出字段在字典中 类型为:jlzj_money_change_type 用户变更来源 字典字段为:jlzj_client_source_type ")
     @GetMapping
-    public R<ClientAccountChangeListVO> clientAccountChange(ClientAccountChange clientAccountChange){
-
+    public TableDataInfo<ClientAccountChangeVO> clientAccountChange(ClientAccountChange clientAccountChange){
+        startPage();
         clientAccountChange.setUserId(SecurityUtils.getUserId());
-        return R.ok(lClientAccountChangeService.selectAccountChangeByuserId(clientAccountChange));
+        List<ClientAccountChangeVO> list = lClientAccountChangeService.selectAccountChangeByuserId(clientAccountChange);
+        return getDataTable(list);
+    }
+    /**
+     * 查询自己的历史总支出和总收入
+     */
+    @ApiOperation("查询用户的总收入和总支出 列表接口一样,选择了日期也传进来 就会返回选择的所在日期的总钱数")
+    @GetMapping("/totalMoney")
+    public R<AccountChangeTotalMoney> clientAccountChangTotalHistoryInfo (ClientAccountChange clientAccountChange){
+        clientAccountChange.setUserId(SecurityUtils.getUserId());
+        AccountChangeTotalMoney totalMoneyHistory = lClientAccountChangeService.selectTotalHistory(clientAccountChange);
+        return  R.ok(totalMoneyHistory);
     }
-
 
     /**
      * 查询用户钱包余额变更记录列表

+ 1 - 1
leromro-core/src/main/java/com/leromro/core/controller/OrdersController.java

@@ -78,7 +78,7 @@ public class OrdersController extends BaseController {
     @ApiOperation("用户查询订单列表")
     @GetMapping("/mainOrderList")
     public TableDataInfo<MainOrdersVO> selectOrderList(String[] orderStatus) {
-        //startPage();
+        startPage();
         Long userId = SecurityUtils.getUserId();
         List<MainOrdersVO> list = mainOrderService.selectByUserId(orderStatus, userId);
         return getDataTable(list);

+ 31 - 16
leromro-core/src/main/java/com/leromro/core/controller/VolunteerAccountChangeController.java

@@ -3,6 +3,9 @@ package com.leromro.core.controller;
 import java.util.List;
 import javax.servlet.http.HttpServletResponse;
 
+import com.leromro.common.utils.SecurityUtils;
+import com.leromro.core.domain.vo.AccountChangeTotalMoney;
+import com.leromro.core.domain.vo.VolunteerAccountChangeVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import com.leromro.common.core.domain.R;
@@ -27,26 +30,43 @@ import com.leromro.common.core.page.TableDataInfo;
 
 /**
  * 志愿者账号变动明细Controller
- * 
+ *
  * @author ruoyi
  * @date 2025-04-11
  */
 @RestController
 @Api(tags = "志愿者账号变动明细")
 @RequestMapping("/core/volunteer/account-change")
-public class VolunteerAccountChangeController extends BaseController
-{
+public class VolunteerAccountChangeController extends BaseController {
     @Autowired
     private IVolunteerAccountChangeService volunteerAccountChangeService;
 
+    /**
+     * 查询志愿者账号变动明细列表
+     */
+    @ApiOperation("*小程序 志愿者收入明细列表")
+    @GetMapping("/changeList")
+    public TableDataInfo<VolunteerAccountChangeVO> volunteerAccountChangeList(VolunteerAccountChange volunteerAccountChange)
+    {
+        startPage();
+        volunteerAccountChange.setVolunteerId(SecurityUtils.getUserId());
+        List<VolunteerAccountChangeVO> list = volunteerAccountChangeService.selectVolunteerAccountChangeListInfo(volunteerAccountChange);
+        return getDataTable(list);
+    }
+    @ApiOperation("*小程序 志愿者总收入总支出 ")
+    @GetMapping("/totalMoney")
+    public R<AccountChangeTotalMoney> volunteerAccountChangeHistoryTotalMoney(VolunteerAccountChange volunteerAccountChange) {
+        AccountChangeTotalMoney accountChangeTotalMoney =  volunteerAccountChangeService.getVolunteerAccountTotalChangeMoney(volunteerAccountChange);
+        return R.ok(accountChangeTotalMoney);
+    }
+
     /**
      * 查询志愿者账号变动明细列表
      */
     @ApiOperation("查询志愿者账号变动明细列表")
     @PreAuthorize("@ss.hasPermi('core:volunteer/account-change:list')")
     @GetMapping("/list")
-    public TableDataInfo<VolunteerAccountChange> list(VolunteerAccountChange volunteerAccountChange)
-    {
+    public TableDataInfo<VolunteerAccountChange> list(VolunteerAccountChange volunteerAccountChange) {
         startPage();
         List<VolunteerAccountChange> list = volunteerAccountChangeService.selectVolunteerAccountChangeList(volunteerAccountChange);
         return getDataTable(list);
@@ -59,8 +79,7 @@ public class VolunteerAccountChangeController extends BaseController
     @PreAuthorize("@ss.hasPermi('core:volunteer/account-change:export')")
     @Log(title = "志愿者账号变动明细", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
-    public void export(HttpServletResponse response, VolunteerAccountChange volunteerAccountChange)
-    {
+    public void export(HttpServletResponse response, VolunteerAccountChange volunteerAccountChange) {
         List<VolunteerAccountChange> list = volunteerAccountChangeService.selectVolunteerAccountChangeList(volunteerAccountChange);
         ExcelUtil<VolunteerAccountChange> util = new ExcelUtil<VolunteerAccountChange>(VolunteerAccountChange.class);
         util.exportExcel(response, list, "志愿者账号变动明细数据");
@@ -72,8 +91,7 @@ public class VolunteerAccountChangeController extends BaseController
     @ApiOperation("获取志愿者账号变动明细详细信息")
     @PreAuthorize("@ss.hasPermi('core:volunteer/account-change:query')")
     @GetMapping(value = "/{volunteerAccountChangeId}")
-    public R<VolunteerAccountChange> getInfo(@PathVariable("volunteerAccountChangeId") Long volunteerAccountChangeId)
-    {
+    public R<VolunteerAccountChange> getInfo(@PathVariable("volunteerAccountChangeId") Long volunteerAccountChangeId) {
         return R.ok(volunteerAccountChangeService.selectVolunteerAccountChangeByVolunteerAccountChangeId(volunteerAccountChangeId));
     }
 
@@ -84,8 +102,7 @@ public class VolunteerAccountChangeController extends BaseController
     @PreAuthorize("@ss.hasPermi('core:volunteer/account-change:add')")
     @Log(title = "志愿者账号变动明细", businessType = BusinessType.INSERT)
     @PostMapping
-    public AjaxResult add(@RequestBody VolunteerAccountChange volunteerAccountChange)
-    {
+    public AjaxResult add(@RequestBody VolunteerAccountChange volunteerAccountChange) {
         return toAjax(volunteerAccountChangeService.insertVolunteerAccountChange(volunteerAccountChange));
     }
 
@@ -96,8 +113,7 @@ public class VolunteerAccountChangeController extends BaseController
     @PreAuthorize("@ss.hasPermi('core:volunteer/account-change:edit')")
     @Log(title = "志愿者账号变动明细", businessType = BusinessType.UPDATE)
     @PutMapping
-    public AjaxResult edit(@RequestBody VolunteerAccountChange volunteerAccountChange)
-    {
+    public AjaxResult edit(@RequestBody VolunteerAccountChange volunteerAccountChange) {
         return toAjax(volunteerAccountChangeService.updateVolunteerAccountChange(volunteerAccountChange));
     }
 
@@ -107,9 +123,8 @@ public class VolunteerAccountChangeController extends BaseController
     @ApiOperation("删除志愿者账号变动明细")
     @PreAuthorize("@ss.hasPermi('core:volunteer/account-change:remove')")
     @Log(title = "志愿者账号变动明细", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{volunteerAccountChangeIds}")
-    public R<Integer> remove(@PathVariable Long[] volunteerAccountChangeIds)
-    {
+    @DeleteMapping("/{volunteerAccountChangeIds}")
+    public R<Integer> remove(@PathVariable Long[] volunteerAccountChangeIds) {
         return R.ok(volunteerAccountChangeService.deleteVolunteerAccountChangeByVolunteerAccountChangeIds(volunteerAccountChangeIds));
     }
 }

+ 4 - 2
leromro-core/src/main/java/com/leromro/core/controller/volunteerOrderController.java

@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.leromro.common.core.controller.BaseController;
 import com.leromro.common.core.domain.AjaxResult;
 import com.leromro.common.core.domain.R;
+import com.leromro.common.core.page.TableDataInfo;
 import com.leromro.common.utils.SecurityUtils;
 import com.leromro.core.domain.Address;
 import com.leromro.core.domain.MainOrders;
@@ -43,11 +44,12 @@ public class volunteerOrderController extends BaseController {
     private IMainOrderService mainOrderService;
     @ApiOperation("志愿者查询小订单列表")
     @GetMapping("/volunteerOrderList")
-    public R<List<VolunteerOrdersVO>> selectVolunteerList(Long orderStatus) {
+    public TableDataInfo<VolunteerOrdersVO> selectVolunteerList(Long orderStatus) {
+        startPage();
         Long userId = SecurityUtils.getUserId();
         List<VolunteerOrdersVO> list = secondOrderService.selectOrderList(userId, orderStatus);
         list.forEach(volunteerOrdersVO -> volunteerOrdersVO.setServiceOnePrice(volunteerOrdersVO.getServiceOnePrice().multiply(new BigDecimal("0.85"))));
-        return R.ok(list);
+        return getDataTable(list);
     }
 
     @ApiOperation("志愿者订单详情,(收货地址和状态)")

+ 6 - 8
leromro-core/src/main/java/com/leromro/core/domain/MainOrders.java

@@ -70,6 +70,10 @@ public class MainOrders extends BaseEntity
     @ApiModelProperty("服务大类别")
     private Long serviceCategory;
 
+    /** 服务大类别 */
+    @Excel(name = "单次服务数量")
+    @ApiModelProperty("单次服务数量")
+    private Long singleQuantity;
 
     /** 总次数 */
     @Excel(name = "总次数")
@@ -93,14 +97,9 @@ public class MainOrders extends BaseEntity
     @ApiModelProperty("预计结束日期")
     private LocalDate serviceFinishDate;
 
-    /** 工作开始时间 */
-    @JsonFormat(pattern = "H:mm")
-    @Excel(name = "工作开始时间", width = 30, dateFormat = "H:mm")
-    @ApiModelProperty("工作开始时间")
-    private LocalTime startTime;
 
-    @Excel(name = "服务时长")
-    @ApiModelProperty("服务时长")
+    @Excel(name = "单次服务时长")
+    @ApiModelProperty("单词服务时长")
     private Integer serviceDuration;
 
     /** 支付金额 */
@@ -114,7 +113,6 @@ public class MainOrders extends BaseEntity
     private String paymentMethod;
 
 
-
     /** 志愿者id */
     @Excel(name = "志愿者id")
     @ApiModelProperty("志愿者id")

+ 1 - 1
leromro-core/src/main/java/com/leromro/core/domain/Region.java

@@ -23,7 +23,7 @@ public class Region extends BaseEntity {
     private static final long serialVersionUID = 418341656517240988L;
 
     @ApiModelProperty(value = "id")
-    private String id;
+    private Long id;
 
     @ApiModelProperty(value = "区域编码")
     private String regionCode;

+ 5 - 0
leromro-core/src/main/java/com/leromro/core/domain/SecondOrder.java

@@ -106,6 +106,11 @@ public class SecondOrder extends BaseEntity
     @ApiModelProperty("结束时间")
     private LocalTime workEndTime;
 
+    /** 服务大类别 */
+    @Excel(name = "单次服务数量")
+    @ApiModelProperty("单次服务数量")
+    private Long singleQuantity;
+
     /** 服务第几次 */
     @Excel(name = "服务第几次")
     @ApiModelProperty("服务第几次")

+ 5 - 0
leromro-core/src/main/java/com/leromro/core/domain/VolunteerAccountChange.java

@@ -61,5 +61,10 @@ public class VolunteerAccountChange extends BaseEntity
     @ApiModelProperty("变更后可提现金额")
     private BigDecimal afterBalance;
 
+    /** 变更后可提现金额 */
+    @TableField("second_order_id")
+    @ApiModelProperty("小订单id")
+    private Long secondOrderId;
+
 
 }

+ 1 - 1
leromro-core/src/main/java/com/leromro/core/domain/VolunteerInfo.java

@@ -130,7 +130,7 @@ public class VolunteerInfo extends BaseEntity {
     @ApiModelProperty("省级名称")
     private String provinceName;
 
-    @TableField("city_code")
+    @TableField("cityCode")
     @ApiModelProperty("市级编号")
     private String cityCode;
 

+ 7 - 10
leromro-core/src/main/java/com/leromro/core/domain/vo/ClientAccountChangeListVO.java

@@ -1,21 +1,18 @@
 package com.leromro.core.domain.vo;
 
 import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiOperation;
+import lombok.AllArgsConstructor;
 import lombok.Data;
-import lombok.Getter;
-import lombok.Setter;
+import lombok.NoArgsConstructor;
 
 import java.math.BigDecimal;
-import java.util.List;
 
-@Getter
-@Setter
 @Data
-public class ClientAccountChangeListVO  {
-
-    @ApiModelProperty("总收入")
-    private List<ClientAccountChangeVO> clientAccountChangeVOlist;
-
+@AllArgsConstructor
+@NoArgsConstructor
+@ApiOperation("总钱数(支出和收入)")
+public class AccountChangeTotalMoney {
     @ApiModelProperty("总收入")
     private BigDecimal totalEarning;
     @ApiModelProperty("总支出")

+ 9 - 0
leromro-core/src/main/java/com/leromro/core/domain/vo/VolunteerAccountChangeVO.java

@@ -0,0 +1,9 @@
+package com.leromro.core.domain.vo;
+
+import com.leromro.core.domain.VolunteerAccountChange;
+import io.swagger.annotations.ApiModelProperty;
+
+public class VolunteerAccountChangeVO extends VolunteerAccountChange {
+    @ApiModelProperty("服务名称")
+    private String businessTierName;
+}

+ 0 - 1
leromro-core/src/main/java/com/leromro/core/mapper/ClientAccountChangeMapper.java

@@ -3,7 +3,6 @@ package com.leromro.core.mapper;
 import java.util.List;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.leromro.core.domain.ClientAccountChange;
-import com.leromro.core.domain.vo.ClientAccountChangeListVO;
 import com.leromro.core.domain.vo.ClientAccountChangeVO;
 
 /**

+ 3 - 0
leromro-core/src/main/java/com/leromro/core/mapper/VolunteerAccountChangeMapper.java

@@ -3,6 +3,7 @@ package com.leromro.core.mapper;
 import java.util.List;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.leromro.core.domain.VolunteerAccountChange;
+import com.leromro.core.domain.vo.VolunteerAccountChangeVO;
 
 /**
  * 志愿者账号变动明细Mapper接口
@@ -62,4 +63,6 @@ public interface VolunteerAccountChangeMapper extends BaseMapper<VolunteerAccoun
 
 
     void insertList(List<VolunteerAccountChange> volunteerAccountChangeList);
+
+    List<VolunteerAccountChangeVO> selectVolunteerAccountChangeListAndServiceType(VolunteerAccountChange volunteerAccountChange);
 }

+ 5 - 2
leromro-core/src/main/java/com/leromro/core/service/IClientAccountChangeService.java

@@ -3,7 +3,8 @@ package com.leromro.core.service;
 import java.util.List;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.leromro.core.domain.ClientAccountChange;
-import com.leromro.core.domain.vo.ClientAccountChangeListVO;
+import com.leromro.core.domain.vo.AccountChangeTotalMoney;
+import com.leromro.core.domain.vo.ClientAccountChangeVO;
 
 /**
  * 用户钱包余额变更记录Service接口
@@ -61,5 +62,7 @@ public interface IClientAccountChangeService extends IService<ClientAccountChang
      */
     public int deleteLClientAccountChangeByClientAccountChangeId(Long clientAccountChangeId);
 
-    ClientAccountChangeListVO selectAccountChangeByuserId(ClientAccountChange clientAccountChange);
+    List<ClientAccountChangeVO> selectAccountChangeByuserId(ClientAccountChange clientAccountChange);
+
+    AccountChangeTotalMoney selectTotalHistory(ClientAccountChange clientAccountChange);
 }

+ 6 - 0
leromro-core/src/main/java/com/leromro/core/service/IVolunteerAccountChangeService.java

@@ -3,6 +3,8 @@ package com.leromro.core.service;
 import java.util.List;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.leromro.core.domain.VolunteerAccountChange;
+import com.leromro.core.domain.vo.AccountChangeTotalMoney;
+import com.leromro.core.domain.vo.VolunteerAccountChangeVO;
 
 /**
  * 志愿者账号变动明细Service接口
@@ -59,4 +61,8 @@ public interface IVolunteerAccountChangeService extends IService<VolunteerAccoun
      * @return 结果
      */
     public int deleteVolunteerAccountChangeByVolunteerAccountChangeId(Long volunteerAccountChangeId);
+
+    AccountChangeTotalMoney getVolunteerAccountTotalChangeMoney(VolunteerAccountChange volunteerAccountChange);
+
+    List<VolunteerAccountChangeVO> selectVolunteerAccountChangeListInfo(VolunteerAccountChange volunteerAccountChange);
 }

+ 15 - 7
leromro-core/src/main/java/com/leromro/core/service/impl/ClientAccountChangeServiceImpl.java

@@ -3,7 +3,7 @@ package com.leromro.core.service.impl;
 import java.math.BigDecimal;
 import java.util.List;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.leromro.core.domain.vo.ClientAccountChangeListVO;
+import com.leromro.core.domain.vo.AccountChangeTotalMoney;
 import com.leromro.core.domain.vo.ClientAccountChangeVO;
 import com.leromro.core.mapper.ClientAccountChangeMapper;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -100,10 +100,18 @@ public class ClientAccountChangeServiceImpl extends ServiceImpl<ClientAccountCha
      * @return
      */
     @Override
-    public ClientAccountChangeListVO selectAccountChangeByuserId(ClientAccountChange clientAccountChange) {
-        ClientAccountChangeListVO clientAccountChangeListVO = new ClientAccountChangeListVO();
+    public List<ClientAccountChangeVO> selectAccountChangeByuserId(ClientAccountChange clientAccountChange) {
+        return clientAccountChangeMapper.selectClientAccountChangebyUserId(clientAccountChange);
+    }
+
+    /**
+     * @param clientAccountChange
+     * @return
+     */
+    @Override
+    public AccountChangeTotalMoney selectTotalHistory(ClientAccountChange clientAccountChange) {
+        AccountChangeTotalMoney totalMoney = new AccountChangeTotalMoney();
         List<ClientAccountChangeVO> list = clientAccountChangeMapper.selectClientAccountChangebyUserId(clientAccountChange);
-        clientAccountChangeListVO.setClientAccountChangeVOlist(list);
         //算出总收入以及总支出
         BigDecimal totalEarning = list.stream()
                 .filter(vo -> "1".equals(vo.getChangeType()))
@@ -113,8 +121,8 @@ public class ClientAccountChangeServiceImpl extends ServiceImpl<ClientAccountCha
                 .filter(vo -> "0".equals(vo.getChangeType()))
                 .map(ClientAccountChangeVO::getChangeMoney)
                 .reduce(BigDecimal.ZERO, BigDecimal::add);
-        clientAccountChangeListVO.setTotalExpend(totalExpend);
-        clientAccountChangeListVO.setTotalEarning(totalEarning);
-        return clientAccountChangeListVO;
+        totalMoney.setTotalExpend(totalExpend);
+        totalMoney.setTotalEarning(totalEarning);
+        return totalMoney;
     }
 }

+ 0 - 1
leromro-core/src/main/java/com/leromro/core/service/impl/MainOrderServiceImpl.java

@@ -211,7 +211,6 @@ public class MainOrderServiceImpl extends ServiceImpl<MainOrdersMapper, MainOrde
         orders.setServiceTotalPrice(serviceOnePrice.multiply(BigDecimal.valueOf(orders.getTotalTimes())));
         orders.setServiceDuration(businessDurationMin);
         //设置服务的开始与结束日期 以及开始与结束时间
-        orders.setStartTime(workDateList.get(0).getWorkStartTime());
         orders.setServiceStartDate(workDateList.get(0).getWorkDate());
         orders.setServiceFinishDate(workDateList.get(workDateList.size()-1).getWorkDate());
         this.save(orders);

+ 36 - 2
leromro-core/src/main/java/com/leromro/core/service/impl/VolunteerAccountChangeServiceImpl.java

@@ -1,12 +1,14 @@
 package com.leromro.core.service.impl;
 
+import java.math.BigDecimal;
 import java.util.List;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.leromro.core.domain.vo.AccountChangeTotalMoney;
+import com.leromro.core.domain.vo.ClientAccountChangeVO;
+import com.leromro.core.domain.vo.VolunteerAccountChangeVO;
 import com.leromro.core.mapper.VolunteerAccountChangeMapper;
-import com.leromro.common.utils.DateUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-import com.leromro.core.mapper.VolunteerAccountChangeMapper;
 import com.leromro.core.domain.VolunteerAccountChange;
 import com.leromro.core.service.IVolunteerAccountChangeService;
 
@@ -93,4 +95,36 @@ public class VolunteerAccountChangeServiceImpl extends ServiceImpl<VolunteerAcco
     {
         return volunteerAccountChangeMapper.deleteVolunteerAccountChangeByVolunteerAccountChangeId(volunteerAccountChangeId);
     }
+
+    /**
+     * @return
+     */
+    @Override
+    public AccountChangeTotalMoney getVolunteerAccountTotalChangeMoney(VolunteerAccountChange volunteerAccountChange) {
+        AccountChangeTotalMoney totalMoney = new AccountChangeTotalMoney();
+        List<VolunteerAccountChangeVO> list = volunteerAccountChangeMapper.selectVolunteerAccountChangeListAndServiceType(volunteerAccountChange);
+        //算出总收入以及总支出
+        BigDecimal totalEarning = list.stream()
+                .filter(vo -> "1".equals(vo.getChangeType()))
+                .map(VolunteerAccountChangeVO::getChangeMoney)
+                .reduce(BigDecimal.ZERO, BigDecimal::add);
+        BigDecimal totalExpend = list.stream()
+                .filter(vo -> "0".equals(vo.getChangeType()))
+                .map(VolunteerAccountChangeVO::getChangeMoney)
+                .reduce(BigDecimal.ZERO, BigDecimal::add);
+        totalMoney.setTotalExpend(totalExpend);
+        totalMoney.setTotalEarning(totalEarning);
+        return totalMoney;
+    }
+
+    /**
+     * @param volunteerAccountChange
+     * @return
+     */
+    @Override
+    public List<VolunteerAccountChangeVO> selectVolunteerAccountChangeListInfo(VolunteerAccountChange volunteerAccountChange) {
+         List<VolunteerAccountChangeVO> volunteerAccountChangeListVO =volunteerAccountChangeMapper.selectVolunteerAccountChangeListAndServiceType(volunteerAccountChange);
+        return volunteerAccountChangeListVO;
+    }
+
 }

+ 1 - 1
leromro-core/src/main/java/com/leromro/core/service/impl/VolunteerInfoServiceImpl.java

@@ -146,7 +146,7 @@ public class VolunteerInfoServiceImpl extends ServiceImpl<VolunteerInfoMapper, V
     @Override
     public List<VolunteerInfoVO> selectVolunteerInfoList(VolunteerInfo volunteerInfo) {
         //查询出志愿者信息
-        List<VolunteerInfoVO> infos = volunteerInfoMapper.selectVolunteerInfoSimple(new ListPermission(SecondOrder.class, CommonConstants.CHECK_PROVINCE_CITY_DISTRICT),volunteerInfo);
+        List<VolunteerInfoVO> infos = volunteerInfoMapper.selectVolunteerInfoSimple(new ListPermission(SecondOrder.class, CommonConstants.CHECK_VOLUNTEER_PROVINCE_CITY_DISTRICT),volunteerInfo);
         //查询出所有服务名称
         Map<Long, String> idMapTierName = businessManagementService.list().stream().collect(Collectors.toMap(BusinessManagement::getBusinessManagementId, BusinessManagement::getBusinessTierName));
         if (ObjectUtil.isNotEmpty(infos)){

+ 2 - 2
leromro-core/src/main/java/com/leromro/core/ttl/Monitor.java

@@ -105,7 +105,7 @@ public class Monitor {
             BigDecimal beforeChangeBalance = BigDecimal.valueOf(0);
 
             for (OrderFrozenFunds orderFrozenFund : orderFrozenFunds) {
-                VolunteerAccountChange volunteerAccountChange1 = new VolunteerAccountChange(null, volunteerId, "1", "1", orderFrozenFund.getVolunteerMoney(), beforeChangeBalance.add(oldVolunteerBalance), orderFrozenFund.getVolunteerMoney().add(beforeChangeBalance).add(oldVolunteerBalance));
+                VolunteerAccountChange volunteerAccountChange1 = new VolunteerAccountChange(null, volunteerId, "1", "1", orderFrozenFund.getVolunteerMoney(), beforeChangeBalance.add(oldVolunteerBalance), orderFrozenFund.getVolunteerMoney().add(beforeChangeBalance).add(oldVolunteerBalance),orderFrozenFund.getSecondOrderId());
                 volunteerAccountChange1.setCreateTime(DateTimeUtil.getNowTime());
                 volunteerAccountChangeList.add(volunteerAccountChange1);
                /* volunteerAccountChanges.add(new Object[]{volunteerId,1,1,orderFrozenFund.getVolunteerMoney(),beforeChangeBalance.add(oldVolunteerBalance),orderFrozenFund.getVolunteerMoney().add(beforeChangeBalance).add(oldVolunteerBalance)
@@ -113,7 +113,7 @@ public class Monitor {
                 beforeChangeBalance = beforeChangeBalance.add(orderFrozenFund.getVolunteerMoney());
 
                 if (orderFrozenFund.getScoreMoney() != null && orderFrozenFund.getScoreMoney().compareTo(BigDecimal.ZERO) != 0) {
-                    VolunteerAccountChange volunteerAccountChange2 = new VolunteerAccountChange(null, volunteerId, "1", "2", orderFrozenFund.getScoreMoney(), beforeChangeBalance.add(oldVolunteerBalance), orderFrozenFund.getScoreMoney().add(beforeChangeBalance).add(oldVolunteerBalance));
+                    VolunteerAccountChange volunteerAccountChange2 = new VolunteerAccountChange(null, volunteerId, "1", "2", orderFrozenFund.getScoreMoney(), beforeChangeBalance.add(oldVolunteerBalance), orderFrozenFund.getScoreMoney().add(beforeChangeBalance).add(oldVolunteerBalance),orderFrozenFund.getSecondOrderId());
                     volunteerAccountChange2.setCreateTime(DateTimeUtil.getNowTime());
                     volunteerAccountChangeList.add(volunteerAccountChange2);
                     /*volunteerAccountChanges.add(new Object[]{volunteerId,1,1,orderFrozenFund.getScoreMoney(),beforeChangeBalance.add(oldVolunteerBalance),orderFrozenFund.getScoreMoney().add(beforeChangeBalance).add(oldVolunteerBalance)

+ 1 - 2
leromro-core/src/main/resources/mapper/core/ClientAccountChangeMapper.xml

@@ -23,8 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         select client_account_change_id, user_id, change_type, source_type, change_money, before_balance, after_balance,main_order_id, create_by, create_time, update_by, remark from l_client_account_change
     </sql>
 
-    <select id="selectClientAccountChangebyUserId" resultType="com.leromro.core.domain.vo.ClientAccountChangeVO"
-            parameterType="java.lang.Long">
+    <select id="selectClientAccountChangebyUserId" resultType="com.leromro.core.domain.vo.ClientAccountChangeVO">
         select lcac.user_id,
                lcac.create_time,
                lcac.source_type,

+ 24 - 2
leromro-core/src/main/resources/mapper/core/VolunteerAccountChangeMapper.xml

@@ -16,10 +16,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="updateBy"    column="update_by"    />
         <result property="updateTime"    column="update_time"    />
         <result property="remark"    column="remark"    />
+        <result property="secondOrderId"    column="second_order_id"    />
     </resultMap>
 
     <sql id="selectVolunteerAccountChangeVo">
-        select volunteer_account_change_id, change_type, source_type, change_money, before_balance, after_balance, create_by, create_time, update_by, update_time, remark from l_volunteer_account_change
+        select volunteer_account_change_id, change_type, source_type, change_money, before_balance, after_balance, second_order_id, create_by, create_time, update_by, update_time, remark from l_volunteer_account_change
     </sql>
 
     <select id="selectVolunteerAccountChangeList" parameterType="VolunteerAccountChange" resultMap="VolunteerAccountChangeResult">
@@ -38,6 +39,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         where volunteer_account_change_id = #{volunteerAccountChangeId}
     </select>
 
+
+    <select id="selectVolunteerAccountChangeListAndServiceType"
+            resultType="com.leromro.core.domain.vo.VolunteerAccountChangeVO"
+            parameterType="com.leromro.core.domain.VolunteerAccountChange">
+        select lvac.* from l_volunteer_account_change lvac
+
+        <where>
+            <if test="volunteerId != null and volunteerId != ''">and lvac.volunteer_id = #{volunteerId}</if>
+            <if test="createTime != null ">
+                AND lvac.create_time &gt;= #{createTime}
+                AND lvac.create_time &lt; DATE_ADD(#{createTime}, INTERVAL 1 DAY)
+            </if>
+        </where>
+
+
+    </select>
+
     <insert id="insertVolunteerAccountChange" parameterType="VolunteerAccountChange" useGeneratedKeys="true" keyProperty="volunteerAccountChangeId">
         insert into l_volunteer_account_change
         <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -46,6 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="changeMoney != null">change_money,</if>
             <if test="beforeBalance != null">before_balance,</if>
             <if test="afterBalance != null">after_balance,</if>
+            <if test="secondOrderId != null">second_order_id,</if>
             <if test="createBy != null">create_by,</if>
             <if test="createTime != null">create_time,</if>
             <if test="updateBy != null">update_by,</if>
@@ -58,6 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="changeMoney != null">#{changeMoney},</if>
             <if test="beforeBalance != null">#{beforeBalance},</if>
             <if test="afterBalance != null">#{afterBalance},</if>
+            <if test="secondOrderId != null">#{secondOrderId},</if>
             <if test="createBy != null">#{createBy},</if>
             <if test="createTime != null">#{createTime},</if>
             <if test="updateBy != null">#{updateBy},</if>
@@ -75,6 +95,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="changeMoney != null">change_money = #{changeMoney},</if>
             <if test="beforeBalance != null">before_balance = #{beforeBalance},</if>
             <if test="afterBalance != null">after_balance = #{afterBalance},</if>
+            <if test="secondOrderId != null">second_order_id = #{secondOrderId},</if>
             <if test="createBy != null">create_by = #{createBy},</if>
             <if test="createTime != null">create_time = #{createTime},</if>
             <if test="updateBy != null">update_by = #{updateBy},</if>
@@ -96,7 +117,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </delete>
     <insert id="insertList" parameterType="java.util.List">
         INSERT INTO l_volunteer_account_change
-        (volunteer_id, change_type, source_type, change_money, before_balance, after_balance, create_time)
+        (volunteer_id, change_type, source_type, change_money, before_balance, after_balance,second_order_id, create_time)
         VALUES
         <foreach collection="list" item="item" separator=",">
             (
@@ -106,6 +127,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{item.changeMoney},
             #{item.beforeBalance},
             #{item.afterBalance},
+            #{item.secondOrderId},
             #{item.createTime}
             )
         </foreach>

+ 44 - 44
leromro-system/src/main/resources/mapper/system/SysDeptMapper.xml

@@ -24,7 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	
 	<sql id="selectDeptVo">
         select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time ,
-        d.area_type ,d.province_code ,d.province_name ,d.city_code ,d.city_name ,d.district_code ,d.district_name
+        d.area_type ,d.province_code ,d.province_name ,d.city_code ,d.city_name ,d.district_code ,d.district_name ,d.point_list
         from sys_dept d
     </sql>
     
@@ -98,49 +98,49 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	</select>
 
     <insert id="insertDept" parameterType="SysDept">
- 		insert into sys_dept(
- 			<if test="deptId != null and deptId != 0">dept_id,</if>
- 			<if test="parentId != null and parentId != 0">parent_id,</if>
- 			<if test="deptName != null and deptName != ''">dept_name,</if>
- 			<if test="ancestors != null and ancestors != ''">ancestors,</if>
- 			<if test="orderNum != null">order_num,</if>
- 			<if test="leader != null and leader != ''">leader,</if>
- 			<if test="phone != null and phone != ''">phone,</if>
- 			<if test="email != null and email != ''">email,</if>
- 			<if test="status != null">status,</if>
- 			<if test="createBy != null and createBy != ''">create_by,</if>
+        insert into sys_dept(
+        <if test="deptId != null and deptId != 0">dept_id,</if>
+        <if test="parentId != null and parentId != 0">parent_id,</if>
+        <if test="deptName != null and deptName != ''">dept_name,</if>
+        <if test="ancestors != null and ancestors != ''">ancestors,</if>
+        <if test="orderNum != null">order_num,</if>
+        <if test="leader != null and leader != ''">leader,</if>
+        <if test="phone != null and phone != ''">phone,</if>
+        <if test="email != null and email != ''">email,</if>
+        <if test="status != null">status,</if>
+        <if test="createBy != null and createBy != ''">create_by,</if>
+        <if test="pointList != null and pointList != ''">point_list,</if>
+        <if test="areaType != null and areaType != ''">area_type,</if>
+        <if test="provinceCode != null and provinceCode != ''">province_code,</if>
+        <if test="provinceName != null and provinceName != ''">province_name,</if>
+        <if test="cityCode != null and cityCode != ''">city_code,</if>
+        <if test="cityName != null and cityName != ''">city_name,</if>
+        <if test="districtCode != null and districtCode != ''">district_code,</if>
+        <if test="districtName != null and districtName != ''">district_name,</if>
+        create_time
+        )values(
+        <if test="deptId != null and deptId != 0">#{deptId},</if>
+        <if test="parentId != null and parentId != 0">#{parentId},</if>
+        <if test="deptName != null and deptName != ''">#{deptName},</if>
+        <if test="ancestors != null and ancestors != ''">#{ancestors},</if>
+        <if test="orderNum != null">#{orderNum},</if>
+        <if test="leader != null and leader != ''">#{leader},</if>
+        <if test="phone != null and phone != ''">#{phone},</if>
+        <if test="email != null and email != ''">#{email},</if>
+        <if test="status != null">#{status},</if>
+        <if test="createBy != null and createBy != ''">#{createBy},</if>
+		<if test="pointList != null and pointList != ''">#{pointList},</if>
+        <if test="areaType != null and areaType != ''">#{areaType},</if>
+        <if test="provinceCode != null and provinceCode != ''">#{provinceCode},</if>
+        <if test="provinceName != null and provinceName != ''">#{provinceName},</if>
+        <if test="cityCode != null and cityCode != ''">#{cityCode},</if>
+        <if test="cityName != null and cityName != ''">#{cityName},</if>
+        <if test="districtCode != null and districtCode != ''">#{districtCode},</if>
+        <if test="districtName != null and districtName != ''">#{districtName},</if>
 
- 			<if test="areaType != null and areaType != ''">area_type,</if>
- 			<if test="provinceCode != null and provinceCode != ''">province_code,</if>
- 			<if test="provinceName != null and provinceName != ''">province_name,</if>
- 			<if test="cityCode != null and cityCode != ''">city_code,</if>
- 			<if test="cityName != null and cityName != ''">city_name,</if>
- 			<if test="districtCode != null and districtCode != ''">district_code,</if>
- 			<if test="districtName != null and districtName != ''">district_name,</if>
- 			create_time
- 		)values(
- 			<if test="deptId != null and deptId != 0">#{deptId},</if>
- 			<if test="parentId != null and parentId != 0">#{parentId},</if>
- 			<if test="deptName != null and deptName != ''">#{deptName},</if>
- 			<if test="ancestors != null and ancestors != ''">#{ancestors},</if>
- 			<if test="orderNum != null">#{orderNum},</if>
- 			<if test="leader != null and leader != ''">#{leader},</if>
- 			<if test="phone != null and phone != ''">#{phone},</if>
- 			<if test="email != null and email != ''">#{email},</if>
- 			<if test="status != null">#{status},</if>
- 			<if test="createBy != null and createBy != ''">#{createBy},</if>
-
- 			<if test="areaType != null and areaType != ''">#{areaType},</if>
- 			<if test="provinceCode != null and provinceCode != ''">#{provinceCode},</if>
- 			<if test="provinceName != null and provinceName != ''">#{provinceName},</if>
- 			<if test="cityCode != null and cityCode != ''">#{cityCode},</if>
- 			<if test="cityName != null and cityName != ''">#{cityName},</if>
- 			<if test="districtCode != null and districtCode != ''">#{districtCode},</if>
- 			<if test="districtName != null and districtName != ''">#{districtName},</if>
-
- 			sysdate()
- 		)
-	</insert>
+        sysdate()
+        )
+    </insert>
 	
 	<update id="updateDept" parameterType="SysDept">
  		update sys_dept
@@ -154,7 +154,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="email != null">email = #{email},</if>
  			<if test="status != null and status != ''">status = #{status},</if>
  			<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
-
+			<if test="pointList != null and pointList != ''">point_list = #{pointList},</if>
 			<if test="areaType != null and areaType != ''">area_type = #{areaType},</if>
 			<if test="provinceCode != null and provinceCode != ''"> province_code=#{provinceCode},</if>
 			<if test="provinceName != null and provinceName != ''">province_name=#{provinceName},</if>