Qchen преди 2 години
родител
ревизия
45e8ac0bcf

+ 0 - 5
src/main/java/com/ydtech/modules/admin/controller/SysDeptAccountHistoryController.java

@@ -1,14 +1,9 @@
 package com.ydtech.modules.admin.controller;
 
-import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.ydtech.core.page.HttpResult;
-import com.ydtech.core.page.PageResult;
-import com.ydtech.modules.admin.model.SysDeptAccountHistory;
 import com.ydtech.modules.admin.model.dto.SysDeptAccountHistoryDto;
 import com.ydtech.modules.admin.service.SysDeptAccountHistoryService;
 import com.ydtech.modules.base.controller.BaseController;
-import com.ydtech.modules.ser.model.SerAnnualAuditOrder;
-import com.ydtech.modules.ser.model.vo.SerAnnualAuditOrderQueryVo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;

+ 0 - 3
src/main/java/com/ydtech/modules/admin/controller/SysDeptController.java

@@ -67,9 +67,6 @@ public class SysDeptController extends BaseController {
                 return HttpResult.error("机构已被设置来源无法修改");
             }
         }
-        if (record.getComlevel() == null && record.getWithdrawUser() != null) {
-            return HttpResult.error("机构级别为空,无法设置提现人员");
-        }
         sysDeptService.updateDept(record);
         return HttpResult.ok();
     }

+ 1 - 2
src/main/java/com/ydtech/modules/admin/dao/SysDeptAccountHistoryMapper.java

@@ -4,11 +4,10 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.ydtech.modules.admin.model.SysDeptAccountHistory;
 import com.ydtech.modules.admin.model.dto.SysDeptAccountHistoryDto;
-import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 
 
-@Mapper
+
 public interface SysDeptAccountHistoryMapper extends BaseMapper<SysDeptAccountHistory> {
     Page<SysDeptAccountHistoryDto> getDeptHistory(Page page,@Param("sysDeptAccountHistoryDto") SysDeptAccountHistoryDto sysDeptAccountHistoryDto);
 }

+ 2 - 1
src/main/java/com/ydtech/modules/admin/dao/SysDeptAccountMapper.java

@@ -1,6 +1,7 @@
 package com.ydtech.modules.admin.dao;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.ydtech.modules.admin.model.SysDeptAccount;
 import com.ydtech.modules.admin.model.dto.SysDeptAccountDto;
 import com.ydtech.modules.admin.model.vo.SysDeptAccountByUserVo;
@@ -11,7 +12,7 @@ import java.util.List;
 
 @Mapper
 public interface SysDeptAccountMapper extends BaseMapper<SysDeptAccount> {
-    List<SysDeptAccountDto> getDept(@Param("sysDeptAccountDto") SysDeptAccountDto sysDeptAccountDto);
+    Page<SysDeptAccountDto> getDept(Page page, @Param("sysDeptAccountDto") SysDeptAccountDto sysDeptAccountDto);
 
 
     List<SysDeptAccountByUserVo> getDeptAccountByUser(String userId);

+ 0 - 4
src/main/java/com/ydtech/modules/admin/model/SysDept.java

@@ -130,10 +130,6 @@ public class SysDept implements Serializable {
     @ApiModelProperty(value = "机构来源(渠道、个代)")
     private String managementSource;
 
-    @TableField(value = "withdraw_user")
-    @ApiModelProperty(value = "提现人员")
-    private String withdrawUser;
-
     @TableField(exist = false)
     private List<SysDept> children;
 

+ 3 - 0
src/main/java/com/ydtech/modules/admin/model/dto/SysDeptAccountDto.java

@@ -27,4 +27,7 @@ public class SysDeptAccountDto {
     @ApiModelProperty(value = "已提现金额")
     @JsonFormat(pattern = "0.00")
     private BigDecimal totalAmount;
+    private int pageNo;
+
+    private int pageSize;
 }

+ 0 - 6
src/main/java/com/ydtech/modules/admin/service/SysDeptAccountHistoryService.java

@@ -4,12 +4,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.ydtech.modules.admin.model.SysDeptAccountHistory;
 import com.ydtech.modules.admin.model.dto.SysDeptAccountHistoryDto;
-import com.ydtech.modules.inv.model.InvAccountOperate;
-import com.ydtech.modules.ser.model.SerAnnualAuditOrder;
-import com.ydtech.modules.ser.model.vo.SerAnnualAuditOrderQueryVo;
-
-import java.math.BigDecimal;
-import java.text.ParseException;
 
 
 public interface SysDeptAccountHistoryService extends IService<SysDeptAccountHistory> {

+ 6 - 7
src/main/java/com/ydtech/modules/admin/service/impl/SysDeptAccountServiceImpl.java

@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ydtech.constants.sys.SysDeptAccountStatus;
 import com.ydtech.core.page.HttpResult;
+import com.ydtech.core.page.PageRequest;
 import com.ydtech.exception.SystemException;
 import com.ydtech.modules.admin.dao.SysDeptAccountMapper;
 import com.ydtech.modules.admin.model.*;
@@ -58,10 +59,11 @@ public class SysDeptAccountServiceImpl extends ServiceImpl<SysDeptAccountMapper,
     }
 
     public IPage<SysDeptAccountDto> getDept(SysDeptAccountDto sysDeptAccountDto) {
-        Page<SysDeptAccountDto> page = new Page<>();
-        List<SysDeptAccountDto> deptList = sysDeptAccountMapper.getDept(sysDeptAccountDto);
-        page.setRecords(deptList);
-        page.setTotal(deptList.size());
+        PageRequest pageRequest = new PageRequest();
+        pageRequest.setPageNum(sysDeptAccountDto.getPageNo());
+        pageRequest.setPageSize(sysDeptAccountDto.getPageSize());
+        Page page = PageRequest.buildPageRequest(pageRequest);
+        Page<SysDeptAccountDto> deptList = sysDeptAccountMapper.getDept(page,sysDeptAccountDto);
         return page;
     }
 
@@ -77,9 +79,6 @@ public class SysDeptAccountServiceImpl extends ServiceImpl<SysDeptAccountMapper,
         queryWrapper.eq(SysDept::getId, sysDeptAccount.getDeptId());
         SysDept sysDept = sysDeptService.getOne(queryWrapper);
 
-        if (!BaseController.getUser().getId().equals(sysDept.getWithdrawUser())) {
-            throw new SystemException("您不为该机构账户提现人员");
-        }
         if (sysDeptAccount.getAmount().compareTo(deptAccount.getManagementFee()) > 0) {
             throw new SystemException("提现金额大于机构账户金额");
         }

+ 6 - 0
src/main/java/com/ydtech/modules/inv/model/excel/InvSourceExcel.java

@@ -42,6 +42,12 @@ public class InvSourceExcel implements Serializable {
     @ExcelProperty("保司机构id")
     private String insuranceDeptId;
 
+    /**
+     * 含税/不含税
+     */
+    @ExcelProperty("含税/不含税")
+    private String invSourceType;
+
     /**
      * 险种
      */

+ 5 - 3
src/main/java/com/ydtech/modules/inv/model/po/InvSource.java

@@ -79,6 +79,11 @@ public class InvSource implements Serializable {
     @ExcelProperty("保司名称")
     private String insuranceName;
 
+    @TableField(value = "inv_source_type")
+    @ApiModelProperty("应收类型(含税/不含税)")
+    @ExcelProperty("含税/不含税")
+    private String invSourceType;
+
     /**
      * 险种
      */
@@ -386,9 +391,6 @@ public class InvSource implements Serializable {
     @ApiModelProperty("修改人Id")
     private String updateUserId;
 
-    @TableField(value = "inv_source_type")
-    @ApiModelProperty("应收类型(含税,不含税)")
-    private String invSourceType;
 
     @TableField(exist = false)
     private String[] ids;

+ 2 - 0
src/main/java/com/ydtech/modules/inv/service/impl/InvReceivableServiceImpl.java

@@ -407,6 +407,8 @@ public class InvReceivableServiceImpl implements InvReceivableService {
                     "2".equals(x.getClearingState()) ? "孤儿单" : x.getClearingState());
             x.setInsuranceClearingState("0".equals(x.getInsuranceClearingState()) ? "未结算" :
                     "1".equals(x.getInsuranceClearingState()) ? "已结算" : x.getInsuranceClearingState());
+            x.setInvSourceType(null == (x.getInvSourceType()) ? "" :
+                    ("platform".equals(x.getInvSourceType()) ? "平台" : "私有"));
         });
         return pageData;
     }

+ 14 - 1
src/main/java/com/ydtech/modules/inv/service/impl/InvSourceServiceImpl.java

@@ -49,7 +49,20 @@ public class InvSourceServiceImpl extends ServiceImpl<InvSourceMapper, InvSource
             invSource.setRevenueName(user.getName());
             invSource.setRevenueTime(dateTime.toString());
             invSource.setRevenueUserId(user.getId());
-            invSource.setInvSourceType("platform");
+            if (invSource.getInvSourceType().equals("含税")) {
+                invSource.setInvSourceType("platform");
+            } else if (invSource.getInvSourceType().equals("不含税")) {
+                invSource.setInvSourceType("privately");
+            }
+            if (invSource.getClearingState().equals("已结算")) {
+                invSource.setClearingState("1");
+            } else if (invSource.getClearingState().equals("未结算")) {
+                invSource.setClearingState("0");
+            } else if (invSource.getClearingState().equals("未认领")) {
+                invSource.setClearingState("2");
+            } else if (invSource.getClearingState().equals("孤儿单")) {
+                invSource.setClearingState("3");
+            }
         }
 
         boolean result = invSourceService.saveOrUpdateBatchWithConditions(invSources);

+ 2 - 0
src/main/resources/mapper/modules/inv/InvSourceMapper.xml

@@ -245,6 +245,8 @@
         max_receivable,
         revenue_time,
         revenue_name,
+        update_name,
+        update_userid,
         inv_source_type,
         CASE WHEN DATEDIFF(NOW(), signing_time) > 90 THEN 2 ELSE inv_source.clearing_state END as clearing_state,
         insurance_clearing_state

BIN
src/main/resources/template/finance/accountsReceivable.xlsx