From 6b969ca247b98e5a793e61ec5b0d89f4fccb3318 Mon Sep 17 00:00:00 2001
From: shiyunteng <shiyunteng@example.com>
Date: 星期三, 10 六月 2026 16:25:18 +0800
Subject: [PATCH] feat:抵抹账条件新增付款金额小于开票金额,红票审核拒绝后蓝票可重新开红票

---
 platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/ContractInvoiceServiceImpl.java |   11 ++++-
 platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/ContractServiceImpl.java        |   39 +++++++++++--------
 platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/PaymentConfirmServiceImpl.java  |   20 +++++-----
 platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/MeterReadRecordServiceImpl.java |    6 +-
 platformx-business-finance-api/src/main/java/com/by4cloud/platformx/business/entity/ContractSubjectMatter.java            |    2 
 platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/controller/ContractController.java           |    6 ++-
 platformx-business-finance-api/src/main/java/com/by4cloud/platformx/business/dto/ContractAddDTO.java                      |    9 +++-
 platformx-business-finance-api/src/main/java/com/by4cloud/platformx/business/entity/BusinessCustomer.java                 |    4 +-
 8 files changed, 59 insertions(+), 38 deletions(-)

diff --git a/platformx-business-finance-api/src/main/java/com/by4cloud/platformx/business/dto/ContractAddDTO.java b/platformx-business-finance-api/src/main/java/com/by4cloud/platformx/business/dto/ContractAddDTO.java
index 6cd702a..43515c8 100644
--- a/platformx-business-finance-api/src/main/java/com/by4cloud/platformx/business/dto/ContractAddDTO.java
+++ b/platformx-business-finance-api/src/main/java/com/by4cloud/platformx/business/dto/ContractAddDTO.java
@@ -63,6 +63,11 @@
 
 	@DateTimeFormat(pattern = "yyyy-MM-dd")
 	@JsonFormat(pattern = "yyyy-MM-dd")
+	@Schema(description = "鐢熸晥鏃ユ湡")
+	private String effectiveDate;
+
+	@DateTimeFormat(pattern = "yyyy-MM-dd")
+	@JsonFormat(pattern = "yyyy-MM-dd")
 	@Schema(description = "鍒版湡鏃ユ湡")
 	private String expirationDate;
 
@@ -81,8 +86,8 @@
 	@Schema(description = "鎵ц鍛ㄦ湡 1/鍛� 2/鏈� 3/瀛e害 4/鍗婂勾 5/骞�")
 	private String execFrequency;
 
-	@Schema(description = "鎵ц娆℃暟")
-	private Integer execTimes;
+//	@Schema(description = "鎵ц娆℃暟")
+//	private Integer execTimes;
 
 	@Schema(description = "鎵ц鏃ユ湡鍚庡灏戝ぉ鐢熸垚搴旀敹")
 	private Integer execDay;
diff --git a/platformx-business-finance-api/src/main/java/com/by4cloud/platformx/business/entity/BusinessCustomer.java b/platformx-business-finance-api/src/main/java/com/by4cloud/platformx/business/entity/BusinessCustomer.java
index 380cb3c..8797049 100644
--- a/platformx-business-finance-api/src/main/java/com/by4cloud/platformx/business/entity/BusinessCustomer.java
+++ b/platformx-business-finance-api/src/main/java/com/by4cloud/platformx/business/entity/BusinessCustomer.java
@@ -73,8 +73,8 @@
 
    // 鐓ょ偔銆佹湁鑹层�侀粦鑹层�佺數鍔涖�佸叾瀹冦�佹哀鍖栭摑銆佸寲宸ャ�佹按娉ャ�佽埞杩�
 
-	@Schema(description = "娉ㄥ唽璧勬湰")
-    @Column(columnDefinition = "VARCHAR(128) comment '娉ㄥ唽璧勬湰'")
+	@Schema(description = "娉ㄥ唽鍚嶇О")
+    @Column(columnDefinition = "VARCHAR(128) comment '娉ㄥ唽鍚嶇О'")
     private String registerName;
 
     @Schema(description = "寮�鎴烽摱琛�")
diff --git a/platformx-business-finance-api/src/main/java/com/by4cloud/platformx/business/entity/ContractSubjectMatter.java b/platformx-business-finance-api/src/main/java/com/by4cloud/platformx/business/entity/ContractSubjectMatter.java
index e20f33f..472b9e5 100644
--- a/platformx-business-finance-api/src/main/java/com/by4cloud/platformx/business/entity/ContractSubjectMatter.java
+++ b/platformx-business-finance-api/src/main/java/com/by4cloud/platformx/business/entity/ContractSubjectMatter.java
@@ -53,7 +53,7 @@
     private String materialCode;
 
     @Schema(description = "鏍囩殑鐗╃紪鐮侊紙鍐呴儴鍞竴鍚嶇О锛�")
-    @Column(columnDefinition = "VARCHAR(64) comment '鏍囩殑鐗╁悕绉�(鍐呴儴)'")
+    @Column(columnDefinition = "VARCHAR(200) comment '鏍囩殑鐗╁悕绉�(鍐呴儴)'")
     private String materialInternalName;
 
     @Schema(description = "鏍囩殑鐗╄鏍�/鍨嬪彿")
diff --git a/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/controller/ContractController.java b/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/controller/ContractController.java
index 839212c..64f1152 100644
--- a/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/controller/ContractController.java
+++ b/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/controller/ContractController.java
@@ -51,7 +51,7 @@
     /**
      * 鍒嗛〉鏌ヨ
      * @param page 鍒嗛〉瀵硅薄
-     * @param contract 鍚堝悓绠$悊
+     * @param queryDTO 鍚堝悓绠$悊
      * @return
      */
     @Operation(summary = "鍒嗛〉鏌ヨ" , description = "鍒嗛〉鏌ヨ" )
@@ -184,7 +184,9 @@
 	@GetMapping("/listByBusId/{busId}" )
 	public R listByBusId(@PathVariable("busId" ) Long busId) {
 		return R.ok(contractService.listByScope(Wrappers.<Contract>lambdaQuery().eq(Contract::getPartyAId,busId)
-				.gt(Contract::getBillingAmout,new BigDecimal("0"))));
+				.eq(Contract::getPartyBId,SecurityUtils.getUser().getCompId())
+				.gt(Contract::getBillingAmout,new BigDecimal("0"))
+				.apply("paid_amount < billing_amout")));
 	}
 
 	/**
diff --git a/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/ContractInvoiceServiceImpl.java b/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/ContractInvoiceServiceImpl.java
index 328c86d..675e5aa 100644
--- a/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/ContractInvoiceServiceImpl.java
+++ b/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/ContractInvoiceServiceImpl.java
@@ -117,7 +117,7 @@
 	private GenInvoiceInfoVo genInvoiceInfoVo(GenInvoiceInfoDTO genInvoiceInfoDTO, Contract contract, SysDept b) {
 		GenInvoiceInfoVo vo = new GenInvoiceInfoVo();
 		BusinessCustomer a = businessCustomerMapper.selectById(contract.getPartyAId());
-		vo.setPartyA(a.getCompanyName());
+		vo.setPartyA(a.getRegisterName());
 		vo.setPartyAOrgCode(a.getCreditCode());
 		vo.setPartyAOpenBank(a.getBankName());
 		vo.setPartyABankAccount(a.getBankAccount());
@@ -629,8 +629,11 @@
 			}
 			//鏇存柊鍚堝悓寮�绁ㄧ姸鎬�
 			contract.setBillingStatus("2");
-			contract.setBillingAmout(contract.getAmount().subtract(invoice.getInvoiceTotalPriceTax()));
+			contract.setBillingAmout(contract.getBillingAmout().subtract(invoice.getInvoiceTotalPriceTax()));
 			contractMapper.updateById(contract);
+
+			blueInvoice.setRedReversal("1");
+			baseMapper.updateById(blueInvoice);
 
 			//鏇存柊鍚堝悓鍑哄簱鍗曠姸鎬�
 			List<ContractOutBoundInvoiceVo> outBoundInvoiceVoList = BeanUtil.copyToList(JSONArray.parseArray(blueInvoice.getInvoicePreviewParam()),ContractOutBoundInvoiceVo.class);
@@ -658,5 +661,9 @@
 		});
 		invoice.setApprovalStatus("2");
 		baseMapper.updateById(invoice);
+
+		ContractInvoice blueInvoice = baseMapper.selectById(invoice.getBlueInvoiceId());
+		blueInvoice.setRedReversal("0");
+		baseMapper.updateById(blueInvoice);
 	}
 }
diff --git a/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/ContractServiceImpl.java b/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/ContractServiceImpl.java
index bf5f56e..a9cf047 100644
--- a/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/ContractServiceImpl.java
+++ b/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/ContractServiceImpl.java
@@ -33,7 +33,6 @@
 import com.deepoove.poi.plugin.table.LoopRowTableRenderPolicy;
 import jakarta.servlet.http.HttpServletResponse;
 import lombok.RequiredArgsConstructor;
-import org.springframework.beans.factory.annotation.Value;
 import org.springframework.core.io.ClassPathResource;
 import org.springframework.stereotype.Service;
 
@@ -278,10 +277,10 @@
 					.eq(ContractSubjectMatter::getContractId,id));
 
 			if (ArrayUtil.isNotEmpty(subjectMatterList.toArray())) {
-				subjectMatterList.stream().forEach(contractSubjectMatter -> {
+				for (ContractSubjectMatter contractSubjectMatter: subjectMatterList)  {
 					if (StrUtil.equals(contract.getExecFrequency(), "1")) {
 						Long weeksTrue = DateUtil.betweenWeek(DateUtil.beginOfWeek(contract.getEffectiveDate()),
-								DateUtil.endOfWeek(contract.getExpirationDate()), true);
+								DateUtil.endOfWeek(contract.getExpirationDate()), true)+1;
 						//寰幆鏃ユ湡
 						Date execDate0 = DateUtil.offsetDay(DateUtil.beginOfWeek(contract.getEffectiveDate()), contract.getExecDay());
 						for (int i = 0; i < weeksTrue.intValue(); i++) {
@@ -298,7 +297,7 @@
 					}
 					if (StrUtil.equals(contract.getExecFrequency(), "2")) {
 						Long weeksTrue = DateUtil.betweenMonth(DateUtil.beginOfMonth(contract.getEffectiveDate()),
-								DateUtil.endOfMonth(contract.getExpirationDate()), true);
+								DateUtil.endOfMonth(contract.getExpirationDate()), true)+1;
 						//寰幆鏃ユ湡
 						Date execDate0 = DateUtil.offsetDay(DateUtil.beginOfMonth(contract.getEffectiveDate()), contract.getExecDay());
 						for (int i = 0; i < weeksTrue.intValue(); i++) {
@@ -314,11 +313,11 @@
 						}
 					}
 					if (StrUtil.equals(contract.getExecFrequency(), "3")) {
-						Long weeksTrue = DateUtil.betweenMonth(DateUtil.beginOfQuarter(contract.getEffectiveDate()),
-								DateUtil.endOfQuarter(contract.getExpirationDate()), true)/3;
+						Long weeksTrue = (DateUtil.betweenMonth(DateUtil.beginOfQuarter(contract.getEffectiveDate()),
+								DateUtil.endOfQuarter(contract.getExpirationDate()), true)+1)/3;
 
 						//寰幆鏃ユ湡
-						Date execDate0 = DateUtil.offsetDay(DateUtil.beginOfWeek(contract.getExpirationDate()), contract.getExecDay());
+						Date execDate0 = DateUtil.offsetDay(DateUtil.beginOfQuarter(contract.getEffectiveDate()), contract.getExecDay());
 						for (int i = 0; i < weeksTrue.intValue(); i++) {
 							Date execDatei = DateUtil.offsetMonth(execDate0, i*3);
 							ContractExecDate execDate = new ContractExecDate();
@@ -348,9 +347,9 @@
 						if (7<=endMonth&&endMonth<=12){
 							endDate = DateUtil.endOfYear(endDate);
 						}
-						Long weeksTrue = DateUtil.betweenMonth(startDate,endDate, true)/6;
+						Long weeksTrue = (DateUtil.betweenMonth(startDate,endDate, true)+1)/6;
 						//寰幆鏃ユ湡
-						Date execDate0 = DateUtil.offsetDay(DateUtil.beginOfWeek(contract.getExpirationDate()), contract.getExecDay());
+						Date execDate0 = DateUtil.offsetDay(startDate, contract.getExecDay());
 						for (int i = 0; i < weeksTrue.intValue(); i++) {
 							Date execDatei = DateUtil.offsetMonth(execDate0, i*6);
 							ContractExecDate execDate = new ContractExecDate();
@@ -365,7 +364,7 @@
 					}
 					if (StrUtil.equals(contract.getExecFrequency(), "5")) {
 						Long weeksTrue = DateUtil.betweenWeek(DateUtil.beginOfYear(contract.getEffectiveDate()),
-								DateUtil.endOfYear(contract.getExpirationDate()), true);
+								DateUtil.endOfYear(contract.getExpirationDate()), true)+1;
 						//寰幆鏃ユ湡
 						Date execDate0 = DateUtil.offsetDay(DateUtil.beginOfYear(contract.getEffectiveDate()), contract.getExecDay());
 						for (int i = 0; i < weeksTrue.intValue(); i++) {
@@ -381,7 +380,7 @@
 						}
 					}
 
-				});
+				}
 			}
 		} else {
 			ContractPaymentSchedule fitstSchedule = contractPaymentScheduleMapper.selectOne(Wrappers.<ContractPaymentSchedule>lambdaQuery().eq(ContractPaymentSchedule::getContractId, contract.getId())
@@ -698,7 +697,7 @@
 		map.put("items", items);
 		//瀹氬埗鏂�
 		BusinessCustomer customer = businessCustomerMapper.selectById(contract.getPartyAId());
-		map.put("companyName", customer.getCompanyName());
+		map.put("companyName", customer.getRegisterName());
 		map.put("legalPerson", customer.getLegalPerson());
 		map.put("contactPhone", customer.getContactPhone());
 		map.put("bankName", customer.getBankName());
@@ -867,7 +866,7 @@
 		map.put("items", items);
 		//瀹氬埗鏂�
 		BusinessCustomer customer = businessCustomerMapper.selectById(contract.getPartyAId());
-		map.put("companyName", customer.getCompanyName());
+		map.put("companyName", customer.getRegisterName());
 		map.put("legalPerson", customer.getLegalPerson());
 		map.put("contactPhone", customer.getContactPhone());
 		map.put("bankName", customer.getBankName());
@@ -953,7 +952,7 @@
 		map.put("items", items);
 		//瀹氬埗鏂�
 		BusinessCustomer customer = businessCustomerMapper.selectById(contract.getPartyAId());
-		map.put("companyName", customer.getCompanyName());
+		map.put("companyName", customer.getRegisterName());
 		map.put("legalPerson", customer.getLegalPerson());
 		map.put("contactPhone", customer.getContactPhone());
 		map.put("bankName", customer.getBankName());
@@ -1088,7 +1087,7 @@
 		map.put("items", items);
 		//瀹氬埗鏂�
 		BusinessCustomer customer = businessCustomerMapper.selectById(contract.getPartyAId());
-		map.put("companyName", customer.getCompanyName());
+		map.put("companyName", customer.getRegisterName());
 		map.put("legalPerson", customer.getLegalPerson());
 		map.put("contactPhone", customer.getContactPhone());
 		map.put("bankName", customer.getBankName());
@@ -1148,6 +1147,8 @@
 		Map<String,Object> map = new HashMap<>();
 		map.put("contractId",contract.getId());
 		map.put("contractName",contract.getContractName());
+		map.put("partyA",contract.getPartyA());
+		map.put("partyB",contract.getPartyB());
 		map.put("delayDay",dto.getDelayDay());
 		map.put("applyName",SecurityUtils.getUser().getUsername());
 		map.put("applyTime",DateUtil.format(delayOut.getApplyTime(),DatePattern.NORM_DATETIME_FORMAT));
@@ -1165,7 +1166,13 @@
 
 	@Override
 	public Page pageScope(Page page, ContracQueryDTO queryDTO) {
-
 		return baseMapper.pageScope(page,queryDTO, DataScope.of("comp_id"));
 	}
+
+	public static void main(String[] args) {
+		System.out.println(DateUtil.beginOfQuarter(DateUtil.parseDate("2026-06-05")));
+		System.out.println(DateUtil.endOfQuarter(DateUtil.parseDate("2026-09-30")));
+		System.out.println(DateUtil.betweenMonth(DateUtil.beginOfQuarter(DateUtil.parseDate("2026-06-05")),
+				DateUtil.endOfQuarter(DateUtil.parseDate("2026-09-30")),true));
+	}
 }
diff --git a/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/MeterReadRecordServiceImpl.java b/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/MeterReadRecordServiceImpl.java
index ebc0afb..90ac7f2 100644
--- a/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/MeterReadRecordServiceImpl.java
+++ b/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/MeterReadRecordServiceImpl.java
@@ -35,10 +35,10 @@
 				.eq(MeterReadRecord::getMeterReadCode,updateDTO.getMeterReadCode()).lt(MeterReadRecord::getCreateTime,record.getCreateTime())
 				.orderByDesc(MeterReadRecord::getCreateTime).last("limit 1"));
 		if(ObjUtil.isNull(lastRecord)){
-			return R.failed("鏃犳渶杩戞妱鍙疯褰�");
+			return R.failed("鏃犳渶杩戞妱琛ㄨ褰�");
 		}
-		if (updateDTO.getMeterReadNum().compareTo(lastRecord.getMeterReadNum())<0){
-			return R.failed("鎶勫彿鏁板瓧涓嶈兘姣斾笂娆″皯");
+		if (updateDTO.getMeterReadNum().compareTo(lastRecord.getMeterReadNum())<=0){
+			return R.failed("鎶勮〃鏁板瓧涓嶈兘姣斾笂娆″皯");
 		}
 		record.setMeterReadTime(updateDTO.getMeterReadTime());
 		record.setMeterReadNum(updateDTO.getMeterReadNum());
diff --git a/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/PaymentConfirmServiceImpl.java b/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/PaymentConfirmServiceImpl.java
index 986a3a1..f01f00e 100644
--- a/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/PaymentConfirmServiceImpl.java
+++ b/platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/PaymentConfirmServiceImpl.java
@@ -74,7 +74,7 @@
 		if (StrUtil.isNotBlank(addDTO.getContractNo())) {
 			Contract contract = contractService.getOne(Wrappers.<Contract>lambdaQuery().eq(Contract::getContractNo, addDTO.getContractNo()));
 			BusinessCustomer customer = businessCustomerService.getOne(Wrappers.<BusinessCustomer>lambdaQuery()
-					.eq(StrUtil.isNotBlank(addDTO.getBusGuestName()), BusinessCustomer::getCompanyName, addDTO.getBusGuestName())
+					.eq(StrUtil.isNotBlank(addDTO.getBusGuestName()), BusinessCustomer::getRegisterName, addDTO.getBusGuestName())
 					.eq(StrUtil.isNotBlank(addDTO.getBusGuestId()), BusinessCustomer::getId, addDTO.getBusGuestId()));
 			if (ObjUtil.isNull(customer)) {
 				return R.failed("瀹㈠晢鏌ヨ澶辫触锛岃妫�鏌ュ鍟�");
@@ -99,7 +99,7 @@
 					entity.setScheduleName(lastConfirm.getScheduleName());
 				}
 				entity.setBusGuestId(customer.getId());
-				entity.setBusGuestName(customer.getCompanyName());
+				entity.setBusGuestName(customer.getRegisterName());
 				entity.setBusinessType("瀹㈡埛浠樻");
 				if (newtotal.compareTo(new BigDecimal("0")) > 0) {
 					entity.setTransationAmount(addDTO.getTransationAmount());
@@ -193,7 +193,7 @@
 				entity.setContractNo(addDTO.getContractNo());
 
 				entity.setBusGuestId(customer.getId());
-				entity.setBusGuestName(customer.getCompanyName());
+				entity.setBusGuestName(customer.getRegisterName());
 				entity.setBusinessType("");
 				entity.setTransationAmount(addDTO.getTransationAmount());
 				BigDecimal newtotal = addDTO.getTransationAmount().multiply(new BigDecimal("-1")).add(lastConfirm.getTotalAmount());
@@ -225,7 +225,7 @@
 				return R.failed("涓烘煡璇㈠埌鏈粯娆惧悎鍚�");
 			}
 			BusinessCustomer customer = businessCustomerService.getOne(Wrappers.<BusinessCustomer>lambdaQuery()
-					.eq(StrUtil.isNotBlank(addDTO.getBusGuestName()), BusinessCustomer::getCompanyName, addDTO.getBusGuestName())
+					.eq(StrUtil.isNotBlank(addDTO.getBusGuestName()), BusinessCustomer::getRegisterName, addDTO.getBusGuestName())
 					.eq(ObjUtil.isNotNull(addDTO.getBusGuestId()), BusinessCustomer::getId, addDTO.getBusGuestId())
 					.last("limit 1"));
 			if (ObjUtil.isNull(customer)) {
@@ -234,7 +234,7 @@
 			//鏂板浠樻鍗�
 			PaymentSlip slip = new PaymentSlip();
 			slip.setBusGuestId(customer.getId());
-			slip.setBusGuestName(customer.getCompanyName());
+			slip.setBusGuestName(customer.getRegisterName());
 			slip.setPayeeCompId(SecurityUtils.getUser().getCompId());
 			slip.setPaymentTime(addDTO.getConfirmTime());
 			slip.setPaymentAmount(addDTO.getTransationAmount());
@@ -285,7 +285,7 @@
 					entity.setScheduleName(lastConfirm.getScheduleName());
 				}
 				entity.setBusGuestId(customer.getId());
-				entity.setBusGuestName(customer.getCompanyName());
+				entity.setBusGuestName(customer.getRegisterName());
 				entity.setBusinessType("瀹㈡埛浠樻");
 				if (transtionRemainAmount.compareTo(new BigDecimal("0")) > 0) {
 					entity.setConfirmTime(payDate);
@@ -571,7 +571,7 @@
 			return;
 		}
 		BusinessCustomer customer = businessCustomerService.getOne(Wrappers.<BusinessCustomer>lambdaQuery()
-				.eq(StrUtil.isNotBlank(record.getString("bodyItemCustomerName")), BusinessCustomer::getCompanyName, record.getString("bodyItemCustomerName"))
+				.eq(StrUtil.isNotBlank(record.getString("bodyItemCustomerName")), BusinessCustomer::getRegisterName, record.getString("bodyItemCustomerName"))
 		);
 		if (ObjUtil.isNull(customer)) {
 			log.error("浠樻鍗昳d锛歿},瀹㈠晢鏌ヨ澶辫触锛岃妫�鏌ュ鍟�", record.getString("id"));
@@ -627,7 +627,7 @@
 				entity.setScheduleName(lastConfirm.getScheduleName());
 			}
 			entity.setBusGuestId(customer.getId());
-			entity.setBusGuestName(customer.getCompanyName());
+			entity.setBusGuestName(customer.getRegisterName());
 			entity.setBusinessType("瀹㈡埛浠樻");
 			entity.setIsBip(1);
 			entity.setPaymentCode(record.getString("code"));
@@ -784,7 +784,7 @@
 	private Boolean savePaymentSlip(BusinessCustomer customer, JSONObject record,SysDept dept) {
 		PaymentSlip slip = new PaymentSlip();
 		slip.setBusGuestId(customer.getId());
-		slip.setBusGuestName(customer.getCompanyName());
+		slip.setBusGuestName(customer.getRegisterName());
 		slip.setPayee(dept.getName());
 		slip.setPayeeCompId(dept.getDeptId());
 		slip.setPaymentTime(ObjUtil.isNotNull(record.get("billDate"))?
@@ -821,7 +821,7 @@
 		}
 
 		entity.setBusGuestId(customer.getId());
-		entity.setBusGuestName(customer.getCompanyName());
+		entity.setBusGuestName(customer.getRegisterName());
 		entity.setBusinessType("瀹㈡埛浠樻");
 		if (ObjUtil.isNotNull(record)){
 			entity.setIsBip(1);

--
Gitblit v1.9.1