
12 changed files with 222 additions and 0 deletions
@ -0,0 +1,43 @@ |
|||
package com.yxt.supervise.customer.biz.csmcash; |
|||
|
|||
import cn.hutool.core.util.IdUtil; |
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.yxt.common.core.domain.EntityWithId; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
@Data |
|||
@TableName("csm_cash_different") |
|||
public class CsmCashDifferent extends EntityWithId { |
|||
|
|||
private String sid = IdUtil.fastSimpleUUID(); // sid
|
|||
@JsonFormat( |
|||
pattern = "yyyy-MM-dd HH:mm:ss", |
|||
timezone = "GMT+8" |
|||
) |
|||
private Date createTime = new Date(); // 记录创建时间
|
|||
private String remarks; // 备注说明',
|
|||
|
|||
private String dataDate; // 日期',
|
|||
|
|||
private int serialNumber = 0; // 序号',
|
|||
private Date saleDate; // 销售日期',
|
|||
private String disbursementChannelSid; // 支付渠道Sid',
|
|||
private String disbursementChannelName; // 支付渠道名称',
|
|||
private double amount = 0; // 金额(元)',
|
|||
private String CompanySid; // 对应公司主体Sid',
|
|||
private String CompanyName; // 对应公司主体名称',
|
|||
|
|||
private String accountCycle = "-"; // 回款周期',
|
|||
private int accountCycleDays = 0; // 回款周期天数',
|
|||
private Date antipateCashedDate; // 应回款日期',
|
|||
private Date realCashedDate; // 实际回款日期',
|
|||
private double cashedAmount = 0; // 回款金额',
|
|||
private double differentAmount = 0; // 回款差额',
|
|||
private Date antipateDifferentDate; // 差额预计到账日期',
|
|||
|
|||
private String logsid; // 日志记录的SID',
|
|||
|
|||
} |
@ -0,0 +1,8 @@ |
|||
package com.yxt.supervise.customer.biz.csmcash; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
@Mapper |
|||
public interface CsmCashDifferentMapper extends BaseMapper<CsmCashDifferent> { |
|||
} |
@ -0,0 +1,8 @@ |
|||
package com.yxt.supervise.customer.biz.csmcash; |
|||
|
|||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
@Service |
|||
public class CsmCashDifferentService extends ServiceImpl<CsmCashDifferentMapper, CsmCashDifferent> { |
|||
} |
@ -0,0 +1,33 @@ |
|||
package com.yxt.supervise.customer.biz.csmcash; |
|||
|
|||
import cn.hutool.core.util.IdUtil; |
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.yxt.common.core.domain.EntityWithId; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
@Data |
|||
@TableName("csm_cash_income") |
|||
public class CsmCashIncome extends EntityWithId { |
|||
|
|||
private String sid = IdUtil.fastSimpleUUID(); // sid
|
|||
@JsonFormat( |
|||
pattern = "yyyy-MM-dd HH:mm:ss", |
|||
timezone = "GMT+8" |
|||
) |
|||
private Date createTime = new Date(); // 记录创建时间
|
|||
private String remarks; // 备注说明',
|
|||
|
|||
private String dataDate; // 日期',
|
|||
|
|||
private int serialNumber = 0; // 序号',
|
|||
private String collectionChannelSid; // 回款渠道Sid',
|
|||
private String collectionChannelName; // 回款渠道名称',
|
|||
private double amount = 0; // 回款金额(元)',
|
|||
|
|||
private Date saleDate; // 销售日期',
|
|||
|
|||
private String logsid; // 日志记录的SID',
|
|||
} |
@ -0,0 +1,8 @@ |
|||
package com.yxt.supervise.customer.biz.csmcash; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
@Mapper |
|||
public interface CsmCashIncomeMapper extends BaseMapper<CsmCashIncome> { |
|||
} |
@ -0,0 +1,8 @@ |
|||
package com.yxt.supervise.customer.biz.csmcash; |
|||
|
|||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
@Service |
|||
public class CsmCashIncomeService extends ServiceImpl<CsmCashIncomeMapper, CsmCashIncome> { |
|||
} |
@ -0,0 +1,24 @@ |
|||
package com.yxt.supervise.customer.biz.csmcash; |
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
|
|||
public class CsmCashLogQuery implements Query { |
|||
private String dataDateStart; // 数据日期
|
|||
private String dataDateEnd; // 数据日期
|
|||
|
|||
public String getDataDateStart() { |
|||
return dataDateStart; |
|||
} |
|||
|
|||
public void setDataDateStart(String dataDateStart) { |
|||
this.dataDateStart = dataDateStart; |
|||
} |
|||
|
|||
public String getDataDateEnd() { |
|||
return dataDateEnd; |
|||
} |
|||
|
|||
public void setDataDateEnd(String dataDateEnd) { |
|||
this.dataDateEnd = dataDateEnd; |
|||
} |
|||
} |
@ -0,0 +1,40 @@ |
|||
package com.yxt.supervise.customer.biz.csmcash; |
|||
|
|||
import cn.hutool.core.util.IdUtil; |
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.yxt.common.core.domain.EntityWithId; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
@Data |
|||
@TableName("csm_cash_sales") |
|||
public class CsmCashSales extends EntityWithId { |
|||
|
|||
private String sid = IdUtil.fastSimpleUUID(); // sid
|
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
|||
private Date createTime = new Date(); // 记录创建时间
|
|||
private String remarks; // 备注说明',
|
|||
|
|||
private String dataDate; // 日期',
|
|||
|
|||
private int serialNumber = 0; // 序号',
|
|||
private String disbursementChannelSid; // 支付渠道Sid',
|
|||
private String disbursementChannelName; // 支付渠道名称',
|
|||
private double amount = 0; // 金额(元)',
|
|||
private String CompanySid; // 对应公司主体Sid',
|
|||
private String CompanyName; // 对应公司主体名称',
|
|||
|
|||
private String accountCycle = "-"; //到账周期',
|
|||
private int accountCycleDays = 0; // 到账周期天数',
|
|||
|
|||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
|||
private Date antipateCashedDate; // 预计回款日期',
|
|||
private double inaccountAmount = 0; // 财务到账金额',
|
|||
private double differentAmount = 0; // 到账差额',
|
|||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
|||
private Date antipateDifferentDate; // 差额预计到账时间',
|
|||
|
|||
private String logsid; // 日志记录的SID',
|
|||
} |
@ -0,0 +1,13 @@ |
|||
package com.yxt.supervise.customer.biz.csmcash; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import org.apache.ibatis.annotations.Delete; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
@Mapper |
|||
public interface CsmCashSalesMapper extends BaseMapper<CsmCashSales> { |
|||
|
|||
@Delete("delete from csm_cash_sales where dataDate=#{dataDate} ") |
|||
void clearOfDay(@Param("dataDate") String dataDate); |
|||
} |
@ -0,0 +1,29 @@ |
|||
package com.yxt.supervise.customer.biz.csmcash; |
|||
|
|||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
@Service |
|||
public class CsmCashSalesService extends ServiceImpl<CsmCashSalesMapper, CsmCashSales> { |
|||
public void clearAndCreateOfDay(String dataDate, List<CsmCashGd> gdList) { |
|||
baseMapper.clearOfDay(dataDate); |
|||
List<CsmCashSales> list = new ArrayList<>(); |
|||
int sn = 1; |
|||
for (CsmCashGd gd : gdList) { |
|||
if (gd.getAccountAmount() > 0) { |
|||
CsmCashSales ccs = new CsmCashSales(); |
|||
ccs.setLogsid(gd.getLogsid()); |
|||
ccs.setDataDate(gd.getDataDate()); |
|||
ccs.setSerialNumber(sn); |
|||
sn++; |
|||
ccs.setDisbursementChannelName(gd.getAccountName()); |
|||
ccs.setAmount(gd.getAccountAmount()); |
|||
list.add(ccs); |
|||
} |
|||
} |
|||
super.saveBatch(list); |
|||
} |
|||
} |
Loading…
Reference in new issue