Przeglądaj źródła

系统功能增强

1. 平台应收	平台的结算记录以对接人为统计,因为是以对接人结算的
2. 应付账款	添加了银行卡,也通过了,但是app账号内部显示没有审核通过的银行卡3. 应付账款	收支明细导出表增加订单的签单日期,提现的提现时间,支付的支付时间
私有应收	手续费开票时的应收金额没带出来
私有应收	手续费开票记录这里有小框,就不需要再有单独一列原因了
私有应收	手续费开票记录,这里都显示已结清了,还显示有待结金额
lipf 2 miesięcy temu
rodzic
commit
fc08348fec

+ 8 - 0
commons/src/main/java/com/jzg/commons/entity/account/po/SysUserAccountChangeLog.java

@@ -118,6 +118,14 @@ public class SysUserAccountChangeLog extends BaseModel {
     @Schema(description = "备注")
     private String remark;
 
+    @ExcelProperty("签单时间")
+    @Schema(description = "签单时间")
+    private String signTime;
+
+    @ExcelProperty("提现时间")
+    @Schema(description = "提现时间")
+    private String payTime;
+
     public SysUserAccountChangeLog(){
 
     }

+ 8 - 0
commons/src/main/java/com/jzg/commons/entity/finance/dto/ExportSuperviseSettlementExcelDto.java

@@ -97,4 +97,12 @@ public class ExportSuperviseSettlementExcelDto {
     @ExcelProperty(value = "订单号")
     private String orderNo;
 
+    @Schema(description = "对接人姓名")
+    @ExcelProperty(value = "对接人姓名")
+    private String contactPerson;
+
+    @Schema(description = "对接人手机号")
+    @ExcelProperty(value = "对接人手机号")
+    private String contactPersonPhone;
+
 }

+ 10 - 0
commons/src/main/java/com/jzg/commons/entity/finance/po/InsPlyIncome.java

@@ -199,6 +199,16 @@ public class InsPlyIncome extends BaseModel {
     @ExcelProperty("总应收金额")
     private String receivableAmount;
 
+    @TableField(exist = false)
+    @Schema(description = "总应收金额(车险)")
+    @ExcelProperty("总应收金额(车险)")
+    private String receivableAmount4Car;
+
+    @TableField(exist = false)
+    @Schema(description = "总应收金额(非车)")
+    @ExcelProperty("总应收金额(非车)")
+    private String receivableAmount4Other;
+
     @TableField(exist = false)
     @Schema(description = "车险应收手续费")
     @ExcelProperty("车险应收手续费")

+ 17 - 1
tenant/organization/src/main/java/com/jzg/organization/mapper/SysUserAccountIncomeLogMapper.java

@@ -20,6 +20,22 @@ public interface SysUserAccountIncomeLogMapper extends BaseMapper<SysUserAccount
      * @author lipf
      * @date 2026/6/8 17:25
      */
-    @Select("select ioci.license_no , a.* from sys_user_account_change_log a  left join ins_orders_car_info ioci on a.related_order_id = ioci.order_no where a.user_id = #{ywyUserId} and a.create_time >= #{beginDate} and a.create_time < #{endDate} and a.is_delete = 0 order by a.create_time desc")
+    @Select("""
+        select
+            ioci.license_no ,
+            io.signing_time  as signTime,
+            saa.auditing_time as payTime,
+            a.*
+        from
+            sys_user_account_change_log a
+        left join ins_orders_car_info ioci on
+            a.related_order_id = ioci.order_no
+        left join ins_orders io
+            on a.related_order_id = io.id
+        left join sys_amount_auditing saa
+        on saa.user_id = a.user_id
+        where
+            a.user_id = #{ywyUserId} and a.create_time >= #{beginDate} and a.create_time < #{endDate} and a.is_delete = 0 order by a.create_time desc
+        """)
     List<SysUserAccountChangeLog> queryYwyIORecs(String ywyUserId, LocalDate beginDate, LocalDate endDate);
 }

+ 5 - 14
tenant/organization/src/main/java/com/jzg/organization/service/impl/ReceivableServiceImpl.java

@@ -398,19 +398,6 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
         log.info("应收数据的二次过滤:incomeDataVO=[{}]", JSONUtil.toJsonStr(incomeDataVO));
         List<String> orderNos = incomeDataVO.getOrderNos();
         String companyId = incomeDataVO.getCompanyId();
-//        if(CollUtil.isEmpty(orderNos)){
-//            log.info("应收数据的二次过滤: 订单号不能为空");
-//            return HttpResult.error("请勾选要处理的订单信息");
-//        }
-//        if (StrUtil.isEmpty(companyId)) {
-//            log.info("应收数据的二次过滤. 保司不能为空");
-//            return HttpResult.error("保司不能为空");
-//        }
-//        if(!"and".equalsIgnoreCase(incomeDataVO.getLogicJudge()) && "20".equalsIgnoreCase(incomeDataVO.getLogicJudge())){
-//            log.info("应收数据的二次过滤. 逻辑条件必须是and或or");
-//            return HttpResult.error("逻辑条件必须是and或or");
-//        }
-
         List<InsPlyIncome> incomes =  baseMapper.queryIncomeDatasByOrderIds(orderNos,companyId);
         log.info("根据订单号和保司id查询出[{}]条记录。 orderNos =[{}],companyId=[{}]",CollUtil.size(incomes), JSONUtil.toJsonStr(orderNos), companyId);
         // 需要查询未结算的数据 modify by lipf 2026年6月4日11:06:50
@@ -4493,7 +4480,11 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
                 // 设置已结算的金额
                 action.setSettlementAmount(settlementAmount);
                 // 设置待结算金额
-                action.setRemainSettlementAmount(remainSettlementAmount);
+                if(remainSettlementAmount.compareTo(BigDecimal.ZERO) < 0){
+                    // 特殊梳理,当待结算金额计算出来为负数时, 设置为0
+                    remainSettlementAmount = BigDecimal.ZERO;
+                }
+                action.setRemainSettlementAmount( remainSettlementAmount);
                 action.setCompanyAllName(allCompanyHierarchyPaths.get(Objects.toString(action.getCompanyId(),"")));
                 action.setSettlementStatus(settlementStatusName);
                 // 回款差额

+ 1 - 1
tenant/organization/src/main/java/com/jzg/organization/service/impl/SysUserJzgInfoBankCardServiceImpl.java

@@ -100,7 +100,7 @@ public class SysUserJzgInfoBankCardServiceImpl extends ServiceImpl<SysUserJzgInf
      */
     @Override
     public Page<SysUserJzgInfoBankCardDto> getBankCardPageList(Page page, SysUserJzgInfoBankCardVo sysUserJzgInfoBankCardVo) {
-        log.info("查询业务员账户:sysUserJzgInfoBankCardVo=[{}]", JSONUtil.toJsonStr(sysUserJzgInfoBankCardVo));
+        log.info("查询业务员银行卡:sysUserJzgInfoBankCardVo=[{}]", JSONUtil.toJsonStr(sysUserJzgInfoBankCardVo));
         Page<SysUserJzgInfoBankCardDto> pageList = sysUserJzgInfoBankCardMapper.getBankCardPageList(page, sysUserJzgInfoBankCardVo);
         // 查询业务员类型
         Map<String, String> typeAttrMap = sysUserJzgInfoSalesmanService.queryYwyTypeAttrMap();

+ 4 - 2
tenant/organization/src/main/resources/mapper/ReceivableMapper.xml

@@ -226,6 +226,8 @@
         ipi.license_no,
         -- 1. 总应收金额 (修复了多余的右括号)
         (COALESCE(ipi.jq_receivable_premium, 0) + COALESCE(ipi.sy_receivable_premium, 0) + COALESCE(ipi.jy_receivable_premium, 0)) AS receivableAmount,
+        (COALESCE(ipi.jq_receivable_premium, 0) + COALESCE(ipi.sy_receivable_premium, 0) ) AS receivableAmount4Car,
+        (COALESCE(ipi.jy_receivable_premium, 0)) AS receivableAmount4Other,
         -- 2. 总应收手续费 (为最后一个字段补充了默认值 0)
         (COALESCE(ipi.jq_supervise_costs_premiums, 0) + COALESCE(ipi.sy_supervise_costs_premiums, 0) + COALESCE(ipi.jy_supervise_costs_premiums, 0)) AS superviseCostsPremiums,
         -- 3. 总应收跟单费 (修复了括号位置错误,并为最后一个字段补充了默认值 0)
@@ -582,7 +584,7 @@
         ipii.receivable_supervise_premium,
         ipiis.receive_payment_date,
         ipiis.create_by ,
-        ipiis.create_time
+        ipiis.create_time, ipiis.settlement_payment_difference , ipiis.settlement_payment_reason
         FROM
         ins_ply_income_invoice_settlement ipiis
         LEFT JOIN ins_ply_income_invoice ipii ON ipii.id = ipiis.invoice_id AND ipii.is_delete = 0
@@ -665,7 +667,7 @@
         MAX(ipiis.actual_received_amount) AS actual_received_amount,
         MAX(ipiis.receive_payment_date) AS receive_payment_date,
         MAX(ipiis.create_by) AS create_by,
-        MAX(ipiis.create_time) AS create_time, ipiis.settlement_payment_difference , ipiis.settlement_payment_reason, ipii.receivable_supervise_premium
+        MAX(ipiis.create_time) AS create_time, ipiis.settlement_payment_difference , ipiis.settlement_payment_reason, ipii.receivable_supervise_premium,ipii.contact_person , ipii.contact_person_phone
         FROM ins_ply_income_invoice_settlement ipiis
         LEFT JOIN ins_ply_income_invoice ipii ON ipii.id = ipiis.invoice_id AND ipii.is_delete = 0
         LEFT JOIN ins_ply_income_invoice_link ipil ON ipil.invoice_id = ipiis.invoice_id AND ipil.is_delete = 0

+ 1 - 1
tenant/organization/src/main/resources/mapper/SysUserJzgInfoBankCardMapper.xml

@@ -72,7 +72,7 @@
                 and sujibc.audit_status = #{sysUserJzgInfoBankCardVo.auditStatus}
             </if>
             <if test="sysUserJzgInfoBankCardVo.userId != null and sysUserJzgInfoBankCardVo.userId != ''">
-                and sujibc.user_info_id = #{sysUserJzgInfoBankCardVo.userId}
+                and su.id = #{sysUserJzgInfoBankCardVo.userId}
             </if>
         </where>
         order by