|
@@ -130,12 +130,13 @@ public class PaySyncDataServiceImpl implements PaySyncDataService {
|
|
|
//取客户编号
|
|
|
String customerNo="";
|
|
|
List<PayBaseConfigDto> payBaseConfigDtos = payBaseConfigService.getPrintInfo("CUSTOMER_NO",loginUser.getSiteId(),loginUser.getCustomerId());
|
|
|
- for (PayBaseConfigDto item : payBaseConfigDtos){
|
|
|
- if(item.getName().trim()=="CUSTOMER_NO"){
|
|
|
+ if(payBaseConfigDtos.size() == 1){
|
|
|
+ for (PayBaseConfigDto item : payBaseConfigDtos){
|
|
|
customerNo = item.getValue();
|
|
|
installPlanInput.setCustomerNo(customerNo);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
if(customerNo == "")
|
|
|
throw new ServiceException(-900,"客户编号参数未配置"); //客户编号对应抄表系统中的customer_id
|
|
|
|
|
@@ -145,10 +146,11 @@ public class PaySyncDataServiceImpl implements PaySyncDataService {
|
|
|
String communityAndBuildingAndUnitAddress=""; //小区 楼栋 单元地址
|
|
|
String floorAddress="";
|
|
|
String doorAddress="";
|
|
|
- if (1==1) {
|
|
|
+ if (installPlanInput.getCommunityId() == null) {
|
|
|
Community community = communityService.findByNameV2(siteId,installPlanInput.getProvince(),installPlanInput.getCity(),installPlanInput.getRegion(), installPlanInput.getCommunityName());
|
|
|
if (community != null) {
|
|
|
installPlanInput.setCommunityId(community.getId());
|
|
|
+ code =String.format("%03d",Integer.valueOf(community.getCode()));
|
|
|
} else {
|
|
|
Community newCommunity = new Community();
|
|
|
//获取小区最大值,然后加1
|
|
@@ -174,7 +176,12 @@ public class PaySyncDataServiceImpl implements PaySyncDataService {
|
|
|
//installPlanInput.setCommunityId(newCommunity.getId());
|
|
|
}
|
|
|
}
|
|
|
+ else {
|
|
|
+ Community community = communityService.findById(installPlanInput.getCommunityId());
|
|
|
+ code =String.format("%03d",Integer.valueOf(community.getCode()));
|
|
|
+ }
|
|
|
|
|
|
+ //取当前小区最大客户编号
|
|
|
int maxAccountNumber = payBaseAccountService.getMaxAccountNumber(code);
|
|
|
|
|
|
//楼栋
|