15 changed files with 2756 additions and 33 deletions
@ -0,0 +1,27 @@ |
|||
package com.demo; |
|||
|
|||
import com.demo.cost.*; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
|
|||
/** |
|||
* @author YenHex |
|||
* @since 2023/3/22 |
|||
*/ |
|||
@Slf4j |
|||
public class Application5 { |
|||
|
|||
public static void main(String[] args) { |
|||
|
|||
|
|||
// SyncCheckTbsServiceImpl service = new SyncCheckTbsServiceImpl();
|
|||
// service.checkVtb();
|
|||
// service.matchBudget();
|
|||
// service.test();
|
|||
|
|||
|
|||
TbsPay3ServiceImpl service = new TbsPay3ServiceImpl(); |
|||
service.comparePay(); |
|||
} |
|||
|
|||
|
|||
} |
File diff suppressed because it is too large
@ -0,0 +1,248 @@ |
|||
package com.demo.cost; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import cn.hutool.core.date.LocalDateTimeUtil; |
|||
import cn.hutool.core.text.UnicodeUtil; |
|||
import cn.hutool.http.HttpRequest; |
|||
import cn.hutool.http.HttpResponse; |
|||
import cn.hutool.http.HttpUtil; |
|||
import cn.hutool.json.JSONObject; |
|||
import cn.hutool.json.JSONUtil; |
|||
import com.demo.cost.entity.JslCmsPay; |
|||
import com.demo.cost.entity.JslErpPayZYD; |
|||
import com.demo.cost.entity.PayPayment; |
|||
import com.demo.cost.entity.PayPaymentBo; |
|||
import com.demo.jsl.entity.costapply.JslCostApply; |
|||
import com.demo.jsl.entity.verifi.VtbVerification; |
|||
import com.demo.util.CollectionUtil; |
|||
import lombok.SneakyThrows; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.noear.wood.DbContext; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.time.LocalDateTime; |
|||
import java.time.format.DateTimeFormatter; |
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
import java.util.stream.Collectors; |
|||
|
|||
@Slf4j |
|||
public class TbsPay2ServiceImpl { |
|||
|
|||
String sql_cms_vtb = "select * from vtb_verification where del_flag !=1 and cost_apply_id in "; |
|||
String sql_erp_pay = "SELECT * FROM XLT_BI_HxDbf WHERE Year(cCrTime)=? and Month(cCrTime)=? "; |
|||
String sql_cms_pay = "select * from pay_payment_item where del_flag !=1 and erp_id in "; |
|||
String sql_cms_verId_pay = "select * from pay_payment_item where del_flag !=1 and verification_id = ? "; |
|||
String sql_cms_verId_payAmount = "select sum(item_pay_amount) as amount from pay_payment_item where del_flag !=1 and verification_id = ? "; |
|||
String sql_cms_user = "select account from sys_user where name = ?"; |
|||
String sql_cms_update_pay = "update pay_payment set user_id=0,user_code=?,user_name = ? where id = ?"; |
|||
String sql_cms_amountError = "select p.* from pay_payment_item p left join vtb_verification v on v.id = p.verification_id where v.id is not null and p.cost_apply_id is not null and v.amount < p.item_pay_amount and v.cost_apply_id in "; |
|||
String sql_cms_vtb_by_main_code = "select * from vtb_verification where del_flag !=1 and verification_main_code =? "; |
|||
String sql_cms_vtb_by_code = "select * from vtb_verification where del_flag !=1 and verification_code =? "; |
|||
String sql_delete_pay = "delete from pay_payment_item where verification_main_code in "; |
|||
String sql_delete_pay_erp_ids = "delete from pay_payment where erp_id in "; |
|||
String sql_select_pay_erp_id = "select * from pay_payment where erp_id = ? "; |
|||
String sql_select_pay_item = "SELECT * from pay_payment_item where verification_main_code in "; |
|||
String sql_erp_pay_cyCode = "SELECT * FROM XLT_BI_HxDbf WHERE cFyCode in "; |
|||
|
|||
@SneakyThrows |
|||
public void comparePay(){ |
|||
DbContext jsl11Context = TbsMapper.getjsl11Context(); |
|||
DbContext jslErpContext = TbsMapper.getjslErpZYDContext(); |
|||
DbContext jslContext = TbsMapper.getJslDbContext(); |
|||
DbContext xltContext = TbsMapper.getXltDbContext(); |
|||
|
|||
for(int month = 1;month<=12;month++) { |
|||
List<JslErpPayZYD> erpPayList = jslErpContext.sql(sql_erp_pay,"2023",month).getList(JslErpPayZYD.class); |
|||
|
|||
List<String> erpIdList = erpPayList.stream().map(a->a.getCAcc()+"_"+a.getIIndex()+"_"+a.getCFyCode()).distinct().collect(Collectors.toList()); |
|||
|
|||
String tempErpIdString = "(" + erpIdList.stream().map(a -> "'" + a + "'").collect(Collectors.joining(",")) + ")"; |
|||
List<JslCmsPay> cmsPayList = jslContext.sql(sql_cms_pay + tempErpIdString).getList(JslCmsPay.class); |
|||
Map<String,List<JslCmsPay>> jslCmsPayMap = cmsPayList.stream().collect(Collectors.groupingBy(JslCmsPay::getErpId)); |
|||
|
|||
List<JslCmsPay> jslCmsPayAmountReduceList = jslCmsPayMap.keySet().stream().map(a-> { |
|||
BigDecimal amount = jslCmsPayMap.get(a).stream().map(b -> b.getItemPayAmount()).reduce(BigDecimal.ZERO, BigDecimal::add); |
|||
JslCmsPay tempPay = new JslCmsPay(); |
|||
tempPay.setErpId(a); |
|||
tempPay.setItemPayAmount(amount); |
|||
tempPay.setRemark(a +"_" + amount.toString()); |
|||
return tempPay; |
|||
} |
|||
).collect(Collectors.toList()); |
|||
|
|||
Map<String,List<JslErpPayZYD>> jslErpPayMap = erpPayList.stream().map(a->{ |
|||
a.setErpId(a.getCAcc()+"_"+a.getIIndex()+"_"+a.getCFyCode()); |
|||
return a; |
|||
}).collect(Collectors.groupingBy(JslErpPayZYD::getErpId)); |
|||
List<JslCmsPay> erpPayListAmountReduceList = jslErpPayMap.keySet().stream().map(a-> { |
|||
BigDecimal amount = jslErpPayMap.get(a).stream().map(b -> b.getNHxJe()).reduce(BigDecimal.ZERO, BigDecimal::add); |
|||
JslCmsPay tempPay = new JslCmsPay(); |
|||
tempPay.setErpId(a); |
|||
tempPay.setItemPayAmount(amount); |
|||
tempPay.setRemark(a + "_" + amount.toString()); |
|||
return tempPay; |
|||
} |
|||
).collect(Collectors.toList()); |
|||
List<String> erpIdAmountList = erpPayListAmountReduceList.stream().map(a->a.getRemark()).distinct().collect(Collectors.toList()); |
|||
List<String> cmsErpIdAmountList = jslCmsPayAmountReduceList.stream().map(a->a.getRemark()).distinct().collect(Collectors.toList()); |
|||
|
|||
List<String> onlyCmsPayCode = cmsErpIdAmountList.stream().filter(a->!erpIdAmountList.contains(a)).collect(Collectors.toList()); |
|||
List<String> onlyErpPayCode = erpIdAmountList.stream().filter(a->!cmsErpIdAmountList.contains(a)).collect(Collectors.toList()); |
|||
|
|||
log.info(month + "月 CMS Only支付数:"+onlyCmsPayCode.size()); |
|||
log.info(month + "月 ERP Only支付数:"+onlyErpPayCode.size()); |
|||
log.info("-------------------"); |
|||
|
|||
List<String> erpMainCodes = erpPayListAmountReduceList.stream().filter(a->onlyErpPayCode.contains(a.getRemark())).map(a->a.getErpId()).collect(Collectors.toList()); |
|||
List<String> cmsMainCodes = jslCmsPayAmountReduceList.stream().filter(a->onlyCmsPayCode.contains(a.getRemark())).map(a->a.getErpId()).collect(Collectors.toList()); |
|||
List<String> erpDeleteMainCodes = erpPayList.stream().filter(a->erpMainCodes.contains(a.getCAcc()+"_"+a.getIIndex()+"_"+a.getCFyCode())).map(a->{ |
|||
if(a.getCFyCode().contains("_")){ |
|||
return a.getCFyCode().substring(0,a.getCFyCode().indexOf("_")); |
|||
}else{ |
|||
return a.getCFyCode(); |
|||
} |
|||
}).collect(Collectors.toList()); |
|||
|
|||
List<String> cmsDeleteMainCodes = cmsPayList.stream().filter(a->cmsMainCodes.contains(a.getErpId())).map(a->a.getVerificationMainCode()).collect(Collectors.toList()); |
|||
List<String> deleteMainCodes = new ArrayList<>(); |
|||
deleteMainCodes.addAll(erpDeleteMainCodes); |
|||
deleteMainCodes.addAll(cmsDeleteMainCodes); |
|||
deleteMainCodes = deleteMainCodes.stream().distinct().collect(Collectors.toList()); |
|||
log.info("-------------------"); |
|||
String deleteMainCodesString = "(" + deleteMainCodes.stream().map(a -> "'" + a + "'").collect(Collectors.joining(",")) + ")"; |
|||
|
|||
// if(deleteMainCodes.size()>0) {
|
|||
// List<JslCmsPay> delPayItemList = jslContext.sql(sql_select_pay_item + deleteMainCodesString).getList(JslCmsPay.class);
|
|||
// List<String> deleteErpIds = delPayItemList.stream().map(a -> a.getErpId()).distinct().collect(Collectors.toList());
|
|||
// log.info(month + "月 清除支付数:" + deleteErpIds.size());
|
|||
// String deleteErpIdsString = "(" + deleteErpIds.stream().map(a -> "'" + a + "'").collect(Collectors.joining(",")) + ")";
|
|||
//
|
|||
// if(deleteErpIds.size()>0) {
|
|||
// jslContext.sql(sql_delete_pay_erp_ids + deleteErpIdsString).execute();
|
|||
// }
|
|||
// jslContext.sql(sql_delete_pay + deleteMainCodesString).execute();
|
|||
//
|
|||
// }
|
|||
List<String> erpFyCodes = erpPayList.stream().filter(a->erpMainCodes.contains(a.getCAcc()+"_"+a.getIIndex()+"_"+a.getCFyCode())).map(a->a.getCFyCode()).collect(Collectors.toList()); |
|||
|
|||
String erpFyCodesString = "(" + erpFyCodes.stream().map(a -> "'" + a + "'").collect(Collectors.joining(",")) + ")"; |
|||
|
|||
if(erpFyCodes.size()==0){ |
|||
continue; |
|||
} |
|||
List<JslErpPayZYD> onlyErpPayList = jslErpContext.sql(sql_erp_pay_cyCode + erpFyCodesString).getList(JslErpPayZYD.class); |
|||
if(onlyErpPayList.size()>0) { |
|||
for(JslErpPayZYD item : onlyErpPayList) { |
|||
BigDecimal payAmount = item.getNHxJe(); |
|||
if(payAmount.compareTo(BigDecimal.ZERO)<=0){ |
|||
log.info("支付金额小于或等于0:"+item.getCAcc()+"_"+item.getIIndex()+"_"+item.getCFyCode()); |
|||
continue; |
|||
} |
|||
String verificationCode = item.getCFyCode(); |
|||
if(verificationCode.contains("BI")){ |
|||
continue; |
|||
} |
|||
|
|||
if(jslContext.sql(sql_select_pay_erp_id,item.getCAcc()+"_"+item.getIIndex()+"_"+item.getCFyCode()).getList(PayPayment.class).size()>0){ |
|||
log.info("已存在支付:"+item.getCAcc()+"_"+item.getIIndex()+"_"+item.getCFyCode()); |
|||
continue; |
|||
} |
|||
|
|||
log.info(verificationCode); |
|||
|
|||
List<VtbVerification> verificationList = jslContext.sql(sql_cms_vtb_by_code,verificationCode).getList(VtbVerification.class); |
|||
|
|||
if(verificationList.size()==0) { |
|||
String verificationMainCode = verificationCode; |
|||
if(verificationCode.contains("_")) { |
|||
verificationMainCode = verificationCode.substring(0, verificationCode.indexOf("_")); |
|||
} |
|||
verificationList = jslContext.sql(sql_cms_vtb_by_main_code,verificationMainCode).getList(VtbVerification.class); |
|||
if(verificationList.size()==0){ |
|||
log.info("没有找到核销:"+ item.getCFyCode()); |
|||
continue; |
|||
} |
|||
} |
|||
|
|||
List<JslCmsPay> newPayList = new ArrayList<>(); |
|||
|
|||
PayPayment payPayment = new PayPayment(); |
|||
payPayment.setPayType("pay"); |
|||
payPayment.setPayCode(item.getCAcc()+"_"+item.getIIndex()+"_"+item.getCFyCode()); |
|||
payPayment.setErpId(payPayment.getPayCode()); |
|||
payPayment.setPayAmount(item.getNHxJe()); |
|||
payPayment.setUserId("0"); |
|||
String itemUser = item.getCCrUser(); |
|||
if(itemUser.contains("-")){ |
|||
String[] itemUsers = itemUser.split("-"); |
|||
String userCode = itemUsers[0].trim(); |
|||
String userName = itemUsers[1].trim(); |
|||
payPayment.setUserCode(userCode); |
|||
payPayment.setUserName(userName); |
|||
} |
|||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); |
|||
LocalDateTime payTime = LocalDateTime.parse(item.getCCrTime().trim(),formatter); |
|||
payPayment.setPayTime(payTime); |
|||
payPayment.setPayDate(payTime); |
|||
payPayment.setBillNumber(item.getCSBVCode()); |
|||
payPayment.setRemark(item.getCMemo()); |
|||
payPayment.setTenantId("001"); |
|||
|
|||
for(VtbVerification vtb:verificationList){ |
|||
if(payAmount.compareTo(BigDecimal.ZERO)<=0){ |
|||
continue; |
|||
} |
|||
// List<JslCmsPay> payList = jslContext.sql(sql_cms_verId_pay, vtb.getId()).getList(JslCmsPay.class);
|
|||
// BigDecimal usedAmount = payList.stream().map(a -> a.getItemPayAmount()).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|||
List<BigDecimal> vtbAmountList = jslContext.sql(sql_cms_verId_payAmount, vtb.getId()).getArray("amount"); |
|||
BigDecimal usedAmount = vtbAmountList.get(0); |
|||
if(usedAmount==null){ |
|||
usedAmount = BigDecimal.ZERO; |
|||
} |
|||
if(vtb.getAmount().compareTo(usedAmount)>0) { |
|||
JslCmsPay newPayItem = new JslCmsPay(); |
|||
BeanUtil.copyProperties(payPayment, newPayItem); |
|||
newPayItem.setId(null); |
|||
newPayItem.setCostApplyId(vtb.getCostApplyId()); |
|||
newPayItem.setSupplierId(vtb.getSupplierId()); |
|||
newPayItem.setVerificationId(vtb.getId()); |
|||
newPayItem.setVerificationSubjectId(null); |
|||
newPayItem.setVerificationCode(vtb.getVerificationCode()); |
|||
if (item.getCFyCode().contains("_")) { |
|||
String mainCode = item.getCFyCode().substring(0, item.getCFyCode().indexOf("_")); |
|||
newPayItem.setVerificationMainCode(mainCode); |
|||
}else{ |
|||
newPayItem.setVerificationMainCode(item.getCFyCode()); |
|||
} |
|||
BigDecimal vtbAmountUnused = vtb.getAmount().subtract(usedAmount); |
|||
if(payAmount.compareTo(vtbAmountUnused)>0){ |
|||
newPayItem.setItemPayAmount(vtbAmountUnused); |
|||
}else{ |
|||
newPayItem.setItemPayAmount(payAmount); |
|||
} |
|||
// jslContext.table("pay_payment_item").setEntity(newPayItem).insert();
|
|||
|
|||
payAmount = payAmount.subtract(newPayItem.getItemPayAmount()); |
|||
newPayList.add(newPayItem); |
|||
payPayment.setSupplierId(vtb.getSupplierId()); |
|||
payPayment.setSupplierCode(vtb.getSupplierCode()==null?"":vtb.getSupplierCode()); |
|||
payPayment.setSupplierName(vtb.getSupplierName()==null?"":vtb.getSupplierName()); |
|||
} |
|||
} |
|||
|
|||
Long payId = jslContext.table("pay_payment").setEntity(payPayment).insert(); |
|||
newPayList = newPayList.stream().map(a->{ |
|||
a.setPaymentId(payId); |
|||
return a; |
|||
}).collect(Collectors.toList()); |
|||
|
|||
for(JslCmsPay payItem : newPayList){ |
|||
jslContext.table("pay_payment_item").setEntity(payItem).insert(); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,177 @@ |
|||
package com.demo.cost; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import com.demo.cost.entity.JslCmsPay; |
|||
import com.demo.cost.entity.JslErpPayZYD; |
|||
import com.demo.cost.entity.PayPayment; |
|||
import com.demo.jsl.entity.verifi.VtbVerification; |
|||
import lombok.SneakyThrows; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.noear.wood.DbContext; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.time.LocalDateTime; |
|||
import java.time.format.DateTimeFormatter; |
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
import java.util.stream.Collectors; |
|||
|
|||
@Slf4j |
|||
public class TbsPay3ServiceImpl { |
|||
|
|||
String sql_cms_vtb = "select * from vtb_verification where del_flag !=1 and cost_apply_id in "; |
|||
String sql_erp_pay = "SELECT * FROM XLT_BI_HxDbf WHERE Year(cCrTime)=? and Month(cCrTime)=? and cFyCode like 'BI%'"; |
|||
String sql_cms_pay = "select * from pay_payment_item where del_flag !=1 and erp_id in "; |
|||
String sql_cms_verId_pay = "select * from pay_payment_item where del_flag !=1 and verification_id = ? "; |
|||
String sql_cms_verId_payAmount = "select sum(item_pay_amount) as amount from pay_payment_item where del_flag !=1 and verification_id = ? "; |
|||
String sql_cms_user = "select account from sys_user where name = ?"; |
|||
String sql_cms_update_pay = "update pay_payment set user_id=0,user_code=?,user_name = ? where id = ?"; |
|||
String sql_cms_amountError = "select p.* from pay_payment_item p left join vtb_verification v on v.id = p.verification_id where v.id is not null and p.cost_apply_id is not null and v.amount < p.item_pay_amount and v.cost_apply_id in "; |
|||
String sql_cms_vtb_by_main_code = "select * from vtb_verification where del_flag !=1 and verification_main_code =? "; |
|||
String sql_cms_vtb_by_code = "select * from vtb_verification where del_flag !=1 and verification_code =? "; |
|||
String sql_delete_pay = "delete from pay_payment_item where erp_id in "; |
|||
String sql_delete_pay_erp_ids = "delete from pay_payment where erp_id in "; |
|||
String sql_select_pay_erp_id = "select * from pay_payment where erp_id = ? "; |
|||
String sql_select_pay_item = "SELECT * from pay_payment_item where verification_main_code in "; |
|||
String sql_erp_pay_cyCode = "SELECT * FROM XLT_BI_HxDbf WHERE cFyCode in "; |
|||
String sql_xlt_vtb_code = "SELECT c.costCode FROM aptifee a left join vw_costCode c on a.deleteId=c.deleteId WHERE c.costCode is not null and a.aptifee_erpHao = ?"; |
|||
|
|||
@SneakyThrows |
|||
public void comparePay(){ |
|||
DbContext jsl11Context = TbsMapper.getjsl11Context(); |
|||
DbContext jslErpContext = TbsMapper.getjslErpZYDContext(); |
|||
DbContext jslContext = TbsMapper.getJslDbContext(); |
|||
DbContext xltContext = TbsMapper.getXltDbContext(); |
|||
|
|||
for(int month = 1;month<=12;month++) { |
|||
List<JslErpPayZYD> erpPayList = jslErpContext.sql(sql_erp_pay,"2021",month).getList(JslErpPayZYD.class); |
|||
|
|||
List<String> erpIdList = erpPayList.stream().map(a->a.getCAcc()+"_"+a.getIIndex()+"_"+a.getCFyCode()).distinct().collect(Collectors.toList()); |
|||
|
|||
log.info(month + "月 BI数据:" +erpIdList.size()); |
|||
|
|||
// if(erpIdList.size()>0) {
|
|||
// String tempErpIdString = "(" + erpIdList.stream().map(a -> "'" + a + "'").collect(Collectors.joining(",")) + ")";
|
|||
// jslContext.sql(sql_delete_pay_erp_ids + tempErpIdString).execute();
|
|||
// jslContext.sql(sql_delete_pay + tempErpIdString).execute();
|
|||
// }
|
|||
|
|||
if(erpPayList.size()>0) { |
|||
for(JslErpPayZYD item : erpPayList) { |
|||
BigDecimal payAmount = item.getNHxJe(); |
|||
if(payAmount.compareTo(BigDecimal.ZERO)<=0){ |
|||
log.info("支付金额小于或等于0:"+item.getCAcc()+"_"+item.getIIndex()+"_"+item.getCFyCode()); |
|||
continue; |
|||
} |
|||
List<String> vtbCodes = xltContext.sql(sql_xlt_vtb_code,item.getCFyCode()).getArray("costCode"); |
|||
if(vtbCodes.size()==0){ |
|||
log.info("没有找到XLT核销:"+ item.getCFyCode()); |
|||
continue; |
|||
} |
|||
String verificationCode = vtbCodes.get(0); |
|||
if(verificationCode == null){ |
|||
log.info("没有找到XLT核销:"+ item.getCFyCode()); |
|||
continue; |
|||
} |
|||
if(jslContext.sql(sql_select_pay_erp_id,item.getCAcc()+"_"+item.getIIndex()+"_"+item.getCFyCode()).getList(PayPayment.class).size()>0){ |
|||
log.info("已存在支付:"+item.getCAcc()+"_"+item.getIIndex()+"_"+item.getCFyCode()); |
|||
continue; |
|||
} |
|||
|
|||
log.info(verificationCode); |
|||
|
|||
List<VtbVerification> verificationList = jslContext.sql(sql_cms_vtb_by_code,verificationCode).getList(VtbVerification.class); |
|||
|
|||
if(verificationList.size()==0) { |
|||
String verificationMainCode = verificationCode; |
|||
if(verificationCode.contains("_")) { |
|||
verificationMainCode = verificationCode.substring(0, verificationCode.indexOf("_")); |
|||
} |
|||
verificationList = jslContext.sql(sql_cms_vtb_by_main_code,verificationMainCode).getList(VtbVerification.class); |
|||
if(verificationList.size()==0){ |
|||
log.info("没有找到核销:"+ item.getCFyCode()); |
|||
continue; |
|||
} |
|||
} |
|||
|
|||
List<JslCmsPay> newPayList = new ArrayList<>(); |
|||
|
|||
PayPayment payPayment = new PayPayment(); |
|||
payPayment.setPayType("pay"); |
|||
payPayment.setPayCode(item.getCAcc()+"_"+item.getIIndex()+"_"+item.getCFyCode()); |
|||
payPayment.setErpId(payPayment.getPayCode()); |
|||
payPayment.setPayAmount(item.getNHxJe()); |
|||
payPayment.setUserId("0"); |
|||
String itemUser = item.getCCrUser(); |
|||
if(itemUser.contains("-")){ |
|||
String[] itemUsers = itemUser.split("-"); |
|||
String userCode = itemUsers[0].trim(); |
|||
String userName = itemUsers[1].trim(); |
|||
payPayment.setUserCode(userCode); |
|||
payPayment.setUserName(userName); |
|||
} |
|||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); |
|||
LocalDateTime payTime = LocalDateTime.parse(item.getCCrTime().trim(),formatter); |
|||
payPayment.setPayTime(payTime); |
|||
payPayment.setPayDate(payTime); |
|||
payPayment.setBillNumber(item.getCSBVCode()); |
|||
payPayment.setRemark(item.getCMemo()); |
|||
payPayment.setTenantId("001"); |
|||
|
|||
for(VtbVerification vtb:verificationList){ |
|||
if(payAmount.compareTo(BigDecimal.ZERO)<=0){ |
|||
continue; |
|||
} |
|||
// List<JslCmsPay> payList = jslContext.sql(sql_cms_verId_pay, vtb.getId()).getList(JslCmsPay.class);
|
|||
// BigDecimal usedAmount = payList.stream().map(a -> a.getItemPayAmount()).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|||
List<BigDecimal> vtbAmountList = jslContext.sql(sql_cms_verId_payAmount, vtb.getId()).getArray("amount"); |
|||
BigDecimal usedAmount = vtbAmountList.get(0); |
|||
if(usedAmount==null){ |
|||
usedAmount = BigDecimal.ZERO; |
|||
} |
|||
if(vtb.getAmount().compareTo(usedAmount)>0) { |
|||
JslCmsPay newPayItem = new JslCmsPay(); |
|||
BeanUtil.copyProperties(payPayment, newPayItem); |
|||
newPayItem.setId(null); |
|||
newPayItem.setCostApplyId(vtb.getCostApplyId()); |
|||
newPayItem.setSupplierId(vtb.getSupplierId()); |
|||
newPayItem.setVerificationId(vtb.getId()); |
|||
newPayItem.setVerificationSubjectId(null); |
|||
newPayItem.setVerificationCode(vtb.getVerificationCode()); |
|||
if (item.getCFyCode().contains("_")) { |
|||
String mainCode = item.getCFyCode().substring(0, item.getCFyCode().indexOf("_")); |
|||
newPayItem.setVerificationMainCode(mainCode); |
|||
}else{ |
|||
newPayItem.setVerificationMainCode(item.getCFyCode()); |
|||
} |
|||
BigDecimal vtbAmountUnused = vtb.getAmount().subtract(usedAmount); |
|||
if(payAmount.compareTo(vtbAmountUnused)>0){ |
|||
newPayItem.setItemPayAmount(vtbAmountUnused); |
|||
}else{ |
|||
newPayItem.setItemPayAmount(payAmount); |
|||
} |
|||
// jslContext.table("pay_payment_item").setEntity(newPayItem).insert();
|
|||
|
|||
payAmount = payAmount.subtract(newPayItem.getItemPayAmount()); |
|||
newPayList.add(newPayItem); |
|||
payPayment.setSupplierId(vtb.getSupplierId()); |
|||
payPayment.setSupplierCode(vtb.getSupplierCode()==null?"":vtb.getSupplierCode()); |
|||
payPayment.setSupplierName(vtb.getSupplierName()==null?"":vtb.getSupplierName()); |
|||
} |
|||
} |
|||
|
|||
Long payId = jslContext.table("pay_payment").setEntity(payPayment).insert(); |
|||
newPayList = newPayList.stream().map(a->{ |
|||
a.setPaymentId(payId); |
|||
return a; |
|||
}).collect(Collectors.toList()); |
|||
|
|||
for(JslCmsPay payItem : newPayList){ |
|||
jslContext.table("pay_payment_item").setEntity(payItem).insert(); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,194 @@ |
|||
package com.demo.cost; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import cn.hutool.core.date.LocalDateTimeUtil; |
|||
import cn.hutool.core.text.UnicodeUtil; |
|||
import cn.hutool.http.HttpRequest; |
|||
import cn.hutool.http.HttpResponse; |
|||
import cn.hutool.http.HttpUtil; |
|||
import cn.hutool.json.JSONObject; |
|||
import cn.hutool.json.JSONUtil; |
|||
import com.demo.cost.entity.JslCmsPay; |
|||
import com.demo.cost.entity.JslErpPayZYD; |
|||
import com.demo.cost.entity.PayPaymentBo; |
|||
import com.demo.jsl.entity.costapply.JslCostApply; |
|||
import com.demo.jsl.entity.verifi.VtbVerification; |
|||
import com.demo.util.CollectionUtil; |
|||
import com.demo.util.DateUtil; |
|||
import com.sun.corba.se.spi.copyobject.ObjectCopier; |
|||
import lombok.SneakyThrows; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.noear.wood.DbContext; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.time.LocalDateTime; |
|||
import java.time.format.DateTimeFormatter; |
|||
import java.util.ArrayList; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
import java.util.stream.Collectors; |
|||
|
|||
@Slf4j |
|||
public class TbsPayServiceImpl { |
|||
|
|||
String sql_cms_vtb = "select * from vtb_verification where del_flag !=1 and cost_apply_id in "; |
|||
String sql_erp_pay = "SELECT * FROM XLT_BI_HxDbf WHERE cFyCode in "; |
|||
String sql_cms_pay = "select * from pay_payment_item where del_flag !=1 and (verification_code in "; |
|||
String sql_cms_verId_pay = "select * from pay_payment_item where del_flag !=1 and verification_id = ? "; |
|||
String sql_cms_user = "select account from sys_user where name = ?"; |
|||
String sql_cms_update_pay = "update pay_payment set user_id=0,user_code=?,user_name = ? where id = ?"; |
|||
String sql_cms_amountError = "select p.* from pay_payment_item p left join vtb_verification v on v.id = p.verification_id where v.id is not null and p.cost_apply_id is not null and v.amount < p.item_pay_amount and v.cost_apply_id in "; |
|||
String sql_cms_vtb_by_code = "select * from vtb_verification where del_flag !=1 and verification_main_code =? "; |
|||
String sql_delete_pay = "delete from pay_payment_item where id = ?"; |
|||
|
|||
@SneakyThrows |
|||
public void comparePay(){ |
|||
DbContext jsl11Context = TbsMapper.getjsl11Context(); |
|||
DbContext jslErpContext = TbsMapper.getjslErpZYDContext(); |
|||
DbContext jslContext = TbsMapper.getJslDbContext(); |
|||
DbContext xltContext = TbsMapper.getXltDbContext(); |
|||
|
|||
for(int month = 12;month<=12;month++) { |
|||
String sql = "SELECT * FROM `tbs_cost_apply` WHERE `xlt_sync` is not null AND `del_flag` = '0' and year(submit_time) = 2022 and month(submit_time)= " + month; |
|||
List<JslCostApply> costApplyList = jslContext.sql(sql).getList(JslCostApply.class); |
|||
if (costApplyList.size() == 0) { |
|||
continue; |
|||
} |
|||
|
|||
String costApplyIdsString = "(" + costApplyList.stream().map(a -> "'" + a.getId().toString() + "'").collect(Collectors.joining(",")) + ")"; |
|||
List<VtbVerification> vtbList = jslContext.sql(sql_cms_vtb+costApplyIdsString).getList(VtbVerification.class); |
|||
log.info(month + "月 CMS核销数:"+vtbList.size()); |
|||
|
|||
List<String> cmsVtbCode = vtbList.stream().map(a->a.getVerificationMainCode()).collect(Collectors.toList()); |
|||
String cmsVtbCodeString = "(" + cmsVtbCode.stream().map(a -> "'" + a + "'").collect(Collectors.joining(",")) + ")"; |
|||
List<JslErpPayZYD> erpPayList = new ArrayList<>(); |
|||
|
|||
List<String> cmsVtbMainCode = vtbList.stream().map(a->a.getVerificationCode()).collect(Collectors.toList()); |
|||
List<String> cmsVtbAllCode = new ArrayList<>(); |
|||
cmsVtbAllCode.addAll(cmsVtbCode); |
|||
cmsVtbAllCode.addAll(cmsVtbMainCode); |
|||
cmsVtbAllCode = cmsVtbAllCode.stream().distinct().collect(Collectors.toList()); |
|||
|
|||
List<List<String>> tempVtbCodes = CollectionUtil.createList(cmsVtbAllCode,10000); |
|||
for(List<String> temp:tempVtbCodes){ |
|||
String tempVtbCodeString = "(" + temp.stream().map(a -> "'" + a + "'").collect(Collectors.joining(",")) + ")"; |
|||
erpPayList.addAll(jslErpContext.sql(sql_erp_pay + tempVtbCodeString + " or cFyCode in "+ tempVtbCodeString).getList(JslErpPayZYD.class)); |
|||
} |
|||
|
|||
List<JslCmsPay> cmsPayList = jslContext.sql(sql_cms_pay + cmsVtbCodeString + " or verification_main_code in "+cmsVtbCodeString + ")").getList(JslCmsPay.class); |
|||
|
|||
log.info(month + "月 ERP支付数:"+erpPayList.size()); |
|||
log.info(month + "月 CMS支付数:"+cmsPayList.size()); |
|||
|
|||
List<String> cmsErpIdList = cmsPayList.stream().map(a->a.getErpId()).distinct().collect(Collectors.toList()); |
|||
List<String> erpIdList = erpPayList.stream().map(a->a.getCAcc()+"_"+a.getIIndex()+"_"+a.getCFyCode()).distinct().collect(Collectors.toList()); |
|||
|
|||
log.info(month + "月 ERP支付数:"+erpIdList.size()); |
|||
log.info(month + "月 CMS支付数:"+cmsErpIdList.size()); |
|||
log.info("-------------------"); |
|||
|
|||
List<String> onlyCmsPayCode = cmsErpIdList.stream().filter(a->!erpIdList.contains(a)).collect(Collectors.toList()); |
|||
List<String> onlyErpPayCode = erpIdList.stream().filter(a->!cmsErpIdList.contains(a)).collect(Collectors.toList()); |
|||
|
|||
log.info(month + "月 CMS Only支付数:"+onlyCmsPayCode.size()); |
|||
log.info(month + "月 ERP Only支付数:"+onlyErpPayCode.size()); |
|||
log.info("-------------------"); |
|||
|
|||
|
|||
|
|||
|
|||
List<JslErpPayZYD> onlyErpPayList = erpPayList.stream().filter(a->onlyErpPayCode.contains(a.getCAcc()+"_"+a.getIIndex()+"_"+a.getCFyCode())).collect(Collectors.toList()); |
|||
List<JslCmsPay> onlyCmsPayList = cmsPayList.stream().filter(a->onlyCmsPayCode.contains(a.getErpId())).collect(Collectors.toList()); |
|||
|
|||
if(onlyErpPayList.size()>0){ |
|||
for(JslErpPayZYD item:onlyErpPayList) { |
|||
PayPaymentBo bo = new PayPaymentBo(); |
|||
bo.setVerificationSubCode(item.getCFyCode()); |
|||
bo.setPayAmount(item.getNHxJe()); |
|||
String erpId = item.getCAcc()+"_"+item.getIIndex()+"_"+item.getCFyCode(); |
|||
bo.setErpId(erpId); |
|||
bo.setBillNumber(item.getCSBVCode()); |
|||
bo.setRemark(item.getCMemo()); |
|||
bo.setPayDate(LocalDateTimeUtil.of(item.getDDate())); |
|||
bo.setPayTime(LocalDateTimeUtil.of(item.getDDate())); |
|||
|
|||
bo.setUserCode("sysuser"); |
|||
bo.setPayType("pay"); |
|||
|
|||
String url = "https://crm.gdjsl.com/qsapi/pay/payment/save"; |
|||
|
|||
HttpRequest request = HttpUtil.createPost(url); |
|||
request.header("Authorization", "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJVSUQiOiJTVTc3ODgzNDg1NTQ0NTEzNTM2IiwiaXNzIjoiS1BfSVNTIiwiZXhwIjoxNjk4Mjg5NDIxLCJpYXQiOjE2OTc2ODQ2MjEsIlRZUEUiOiIwMSIsIkNMSUVOVCI6InBjIn0.E9-Ir07KqrjSu5ntWmkjLVDn_5K_Vt1yCYVfwJ9_BEY"); |
|||
request.header("Tenant-Id","001"); |
|||
|
|||
JSONObject object = new JSONObject(bo); |
|||
|
|||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); |
|||
String payTime = formatter.format(bo.getPayTime()); |
|||
object.set("payTime",payTime); |
|||
|
|||
object.set("payDate",payTime); |
|||
|
|||
String jsonString = object.toJSONString(0); |
|||
request.body(jsonString); |
|||
|
|||
HttpResponse execute = request.execute(); |
|||
if (!execute.isOk()) { |
|||
log.error("请求token失败,body={},execute={}", execute.body(), execute); |
|||
throw new RuntimeException(execute.body()); |
|||
} |
|||
String res = UnicodeUtil.toString(execute.body()); |
|||
JSONObject jsonObject = JSONUtil.parseObj(res, true); |
|||
if(jsonObject.get("status").equals(200)){ |
|||
Long payid = jsonObject.getJSONObject("data").getLong("id"); |
|||
String itemUser = item.getCCrUser(); |
|||
if(itemUser.contains("-")){ |
|||
String[] itemUsers = itemUser.split("-"); |
|||
String userCode = itemUsers[0].trim(); |
|||
String userName = itemUsers[1].trim(); |
|||
jslContext.sql(sql_cms_update_pay,userCode,userName,payid).update(); |
|||
} |
|||
}else{ |
|||
log.info(res); |
|||
} |
|||
} |
|||
} |
|||
//
|
|||
List<JslCmsPay> cmsPayListError = jslContext.sql(sql_cms_amountError+costApplyIdsString).getList(JslCmsPay.class); |
|||
log.info(month + "月 CMS Error支付数:"+cmsPayListError.size()); |
|||
//
|
|||
if(cmsPayListError.size()>0){ |
|||
for(JslCmsPay item : cmsPayListError){ |
|||
List<JslCmsPay> newPayList = new ArrayList<>(); |
|||
BigDecimal payAmount = item.getItemPayAmount(); |
|||
String verificationMainCode = item.getVerificationMainCode(); |
|||
List<VtbVerification> verificationList = jslContext.sql(sql_cms_vtb_by_code,verificationMainCode).getList(VtbVerification.class); |
|||
for(VtbVerification vtb:verificationList){ |
|||
if(payAmount.compareTo(BigDecimal.ZERO)<=0){ |
|||
continue; |
|||
} |
|||
List<JslCmsPay> payList = jslContext.sql(sql_cms_verId_pay, vtb.getId()).getList(JslCmsPay.class); |
|||
BigDecimal usedAmount = payList.stream().map(a -> a.getItemPayAmount()).reduce(BigDecimal.ZERO, BigDecimal::add); |
|||
if(vtb.getId().equals(item.getVerificationId())){ |
|||
usedAmount = BigDecimal.ZERO; |
|||
} |
|||
if(vtb.getAmount().compareTo(usedAmount)>0) { |
|||
JslCmsPay newPayItem = new JslCmsPay(); |
|||
BeanUtil.copyProperties(item, newPayItem); |
|||
newPayItem.setId(null); |
|||
newPayItem.setVerificationId(vtb.getId()); |
|||
newPayItem.setVerificationSubjectId(null); |
|||
newPayItem.setVerificationCode(vtb.getVerificationCode()); |
|||
newPayItem.setItemPayAmount(vtb.getAmount().subtract(usedAmount)); |
|||
jslContext.table("pay_payment_item").setEntity(newPayItem).insert(); |
|||
|
|||
payAmount = payAmount.subtract(newPayItem.getItemPayAmount()); |
|||
// newPayList.add(newPayItem);
|
|||
} |
|||
} |
|||
jslContext.sql(sql_delete_pay,item.getId()).execute(); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,106 @@ |
|||
package com.demo.cost.entity; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.fasterxml.jackson.annotation.JsonIgnore; |
|||
import com.fasterxml.jackson.annotation.JsonProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.time.LocalDateTime; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 费用活动 实体类 |
|||
* |
|||
* @author YenHex |
|||
* @since 2022-11-08 |
|||
*/ |
|||
@Data |
|||
public class JslCmsPay implements Serializable { |
|||
|
|||
private Long id; |
|||
|
|||
/** |
|||
* 支付类型 |
|||
* pay - 支付 |
|||
* unPay - 不再支付 |
|||
**/ |
|||
private String payType; |
|||
|
|||
/** 支付id */ |
|||
private Long paymentId; |
|||
|
|||
/** 供应商id */ |
|||
private Long supplierId; |
|||
|
|||
/** 支付金额 */ |
|||
private BigDecimal itemPayAmount; |
|||
|
|||
/** 核销id */ |
|||
private Long verificationId; |
|||
|
|||
private String verificationMainCode; |
|||
|
|||
private String verificationCode; |
|||
|
|||
/** 核销科目项id */ |
|||
private Long verificationSubjectId; |
|||
|
|||
/** 费用申请id */ |
|||
private Long costApplyId; |
|||
|
|||
/** 活动id */ |
|||
private Long activityId; |
|||
|
|||
/** 活动编码 */ |
|||
private String activityCode; |
|||
|
|||
/** 政策项id */ |
|||
private Long policyItemId; |
|||
|
|||
/** 政策项编码 */ |
|||
private String policyItemCode; |
|||
|
|||
/** 科目id */ |
|||
private Long subjectId; |
|||
|
|||
/** 科目编码 */ |
|||
private String subjectCode; |
|||
|
|||
private String subjectName; |
|||
|
|||
/** 备注 */ |
|||
private String remark; |
|||
|
|||
/** 创建时间 */ |
|||
private LocalDateTime createTime; |
|||
|
|||
/** 最后更新时间 */ |
|||
private LocalDateTime updateTime; |
|||
|
|||
private String erpId; |
|||
|
|||
private String billNumber; |
|||
|
|||
/** 所属租户 */ |
|||
private String tenantId; |
|||
|
|||
/** 创建人 */ |
|||
private String createBy; |
|||
|
|||
/** 更新人 */ |
|||
private String updateBy; |
|||
|
|||
/** 逻辑删除标记(0:显示;1:隐藏) */ |
|||
private String delFlag; |
|||
|
|||
/** 支付时间 */ |
|||
private LocalDateTime payTime; |
|||
|
|||
/** 支付时间 */ |
|||
private LocalDateTime payDate; |
|||
|
|||
|
|||
} |
|||
|
@ -0,0 +1,72 @@ |
|||
package com.demo.cost.entity; |
|||
|
|||
import lombok.Data; |
|||
import org.noear.wood.annotation.Column; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 费用活动 实体类 |
|||
* |
|||
* @author YenHex |
|||
* @since 2022-11-08 |
|||
*/ |
|||
@Data |
|||
public class JslErpPayZYD implements Serializable { |
|||
|
|||
@Column("cAcc") |
|||
private String cAcc; |
|||
|
|||
@Column("cFyCode") |
|||
private String cFyCode; |
|||
|
|||
@Column("iIndex") |
|||
private Integer iIndex; |
|||
|
|||
@Column("dDate") |
|||
private Date dDate; |
|||
|
|||
@Column("cSBVCode") |
|||
private String cSBVCode; |
|||
|
|||
@Column("cDLCode") |
|||
private String cDLCode; |
|||
|
|||
@Column("nHxJe") |
|||
private BigDecimal nHxJe; |
|||
|
|||
@Column("cMemo") |
|||
private String cMemo; |
|||
|
|||
@Column("cCrUser") |
|||
private String cCrUser; |
|||
|
|||
@Column("cCrTime") |
|||
private String cCrTime; |
|||
|
|||
@Column("cChkUser") |
|||
private String cChkUser; |
|||
|
|||
@Column("cChkTime") |
|||
private String cChkTime; |
|||
|
|||
@Column("nFlag") |
|||
private Integer nFlag; |
|||
|
|||
@Column("cSBVCode1") |
|||
private String cSBVCode1; |
|||
|
|||
@Column("nTbXLT") |
|||
private Boolean nTbXLT; |
|||
|
|||
@Column("isCmsSyn") |
|||
private Integer isCmsSyn; |
|||
|
|||
@Column("erpId") |
|||
private String erpId; |
|||
|
|||
|
|||
} |
|||
|
@ -0,0 +1,100 @@ |
|||
package com.demo.cost.entity; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.time.LocalDateTime; |
|||
|
|||
/** |
|||
* 支付 实体类 |
|||
* @author YenHex |
|||
* @since 2022-12-15 |
|||
*/ |
|||
@Data |
|||
public class PayPayment implements Serializable { |
|||
|
|||
/** id */ |
|||
private Long id; |
|||
|
|||
/** |
|||
* 支付类型 |
|||
* pay - 支付 |
|||
* unPay - 不再支付 |
|||
**/ |
|||
private String payType; |
|||
|
|||
/** |
|||
* 支付编码 |
|||
**/ |
|||
private String payCode; |
|||
|
|||
/** 供应商id */ |
|||
private Long supplierId; |
|||
|
|||
/** 供应商编码 */ |
|||
private String supplierCode; |
|||
|
|||
/** 供应商 */ |
|||
private String supplierName; |
|||
|
|||
/** 支付金额 */ |
|||
private BigDecimal payAmount; |
|||
|
|||
/** 发货单号 */ |
|||
private String erpCode; |
|||
|
|||
/** 发票编号 */ |
|||
private String billNumber; |
|||
|
|||
/** 支付人id */ |
|||
private String userId; |
|||
|
|||
/** 支付人编码 */ |
|||
private String userCode; |
|||
|
|||
/** 支付人 */ |
|||
private String userName; |
|||
|
|||
/** 支付时间 */ |
|||
private LocalDateTime payTime; |
|||
|
|||
|
|||
private LocalDateTime payDate; |
|||
/** |
|||
* 取消标识 |
|||
* 不再支付列表:0-冻结;1-解冻 |
|||
* 支付列表:0-正常;1-取消 |
|||
**/ |
|||
private Integer cancelFlag; |
|||
|
|||
/** 取消时间 */ |
|||
private LocalDateTime cancelTime; |
|||
|
|||
/** 备注 */ |
|||
private String remark; |
|||
|
|||
/** 创建时间 */ |
|||
private LocalDateTime createTime; |
|||
|
|||
/** 最后更新时间 */ |
|||
private LocalDateTime updateTime; |
|||
|
|||
private Long costApplyId; |
|||
|
|||
private String erpId; |
|||
|
|||
/** 所属租户 */ |
|||
private String tenantId; |
|||
|
|||
/** 创建人 */ |
|||
private String createBy; |
|||
|
|||
/** 更新人 */ |
|||
private String updateBy; |
|||
|
|||
/** 逻辑删除标记(0:显示;1:隐藏) */ |
|||
private String delFlag; |
|||
|
|||
} |
|||
|
@ -0,0 +1,60 @@ |
|||
package com.demo.cost.entity; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.time.LocalDateTime; |
|||
|
|||
/** |
|||
* 支付 Bo |
|||
* @author YenHex |
|||
* @since 2022-12-15 |
|||
*/ |
|||
@Data |
|||
public class PayPaymentBo implements Serializable { |
|||
|
|||
/** 核销编码 */ |
|||
private String verificationSubCode; |
|||
|
|||
/** 支付金额 */ |
|||
// @DecimalMin(value = "0.01",message = "支付金额必须大于0元")
|
|||
// @NotNull(message = "支付金额不能为空")
|
|||
private BigDecimal payAmount; |
|||
|
|||
/** ERP编码 */ |
|||
// @NotNull(message = "ERP编码不能为空")
|
|||
private String erpId; |
|||
|
|||
/** 发票编号 */ |
|||
private String billNumber; |
|||
|
|||
/** 备注 */ |
|||
private String remark; |
|||
|
|||
/** 支付时间 */ |
|||
// @NotNull(message = "支付时间不能为空")
|
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
|||
private LocalDateTime payTime; |
|||
|
|||
/** 支付日期 */ |
|||
// @NotNull(message = "支付日期不能为空")
|
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
|||
private LocalDateTime payDate; |
|||
|
|||
/** 人员工号 */ |
|||
private String userCode; |
|||
|
|||
/** |
|||
* 支付类型 |
|||
* pay - 支付 |
|||
* unPay - 不再支付 |
|||
**/ |
|||
private String payType; |
|||
|
|||
|
|||
private Integer release; |
|||
|
|||
} |
|||
|
Loading…
Reference in new issue