|
@@ -123,7 +123,7 @@ public class BaseClosingAccountInfoServiceImpl implements BaseClosingAccountInfo
|
|
|
//1.先判断客户概况表是否存在记录,如果不存在则按账期月去卡旧数据的客户总数、水表总数、开户总数
|
|
|
//2.根据历史账期对旧数据进行入库保存
|
|
|
//查看记录表是否已经存在数据,为NULL则代表没有存在历史数据
|
|
|
- Integer count = 0;
|
|
|
+ Integer count = payChargeSurveyMapper.getAccountCount(BigInteger.valueOf(loginUser.getSiteId()),BigInteger.valueOf(loginUser.getCustomerId()));
|
|
|
if(count <= 0){
|
|
|
//按账期月卡旧数据
|
|
|
List<BaseClosingAccountInfoDto> list = baseClosingAccountInfoMapper.getListNumber(null,null,
|
|
@@ -134,29 +134,29 @@ public class BaseClosingAccountInfoServiceImpl implements BaseClosingAccountInfo
|
|
|
int state = list.get(i).getState();
|
|
|
/*if(state == 1){*/
|
|
|
//把历史结账数据存进去,但不包含本期未结账的
|
|
|
- //this.insertAccountNumber(list.get(i).getYear(),list.get(i).getMonth(),list.get(i).getStartTime(),list.get(i).getEndTime());
|
|
|
+ this.insertAccountNumber(list.get(i).getYear(),list.get(i).getMonth(),list.get(i).getStartTime(),list.get(i).getEndTime());
|
|
|
//历史交易数据
|
|
|
this.insertTransaction(list.get(i).getYear(),list.get(i).getMonth());
|
|
|
//历史交易数据
|
|
|
- //this.insertFeeSummary(list.get(i).getYear(),list.get(i).getMonth());
|
|
|
+ this.insertFeeSummary(list.get(i).getYear(),list.get(i).getMonth());
|
|
|
//历史水量
|
|
|
- //this.insetAmountInfo(list.get(i).getYear(),list.get(i).getMonth());
|
|
|
+ this.insetAmountInfo(list.get(i).getYear(),list.get(i).getMonth());
|
|
|
/*}*/
|
|
|
}
|
|
|
}
|
|
|
}else if(count > 0){
|
|
|
//存储本期未结账数据
|
|
|
- //this.insertAccountNumber(year,month,startTime,endTime);
|
|
|
+ this.insertAccountNumber(year,month,startTime,endTime);
|
|
|
//本期交易未结账数据
|
|
|
this.insertTransaction(year,month);
|
|
|
//本期交易数据
|
|
|
- //this.insertFeeSummary(year,month);
|
|
|
+ this.insertFeeSummary(year,month);
|
|
|
//本期水量
|
|
|
- //this.insetAmountInfo(year,month);
|
|
|
+ this.insetAmountInfo(year,month);
|
|
|
}
|
|
|
|
|
|
// 更新本账期
|
|
|
- /*String msg2 = year + "年" + String.format("%02d", month) + "月已经结账";
|
|
|
+ String msg2 = year + "年" + String.format("%02d", month) + "月已经结账";
|
|
|
baseClosingAccountInfoDto.setEndTime(endTime);
|
|
|
baseClosingAccountInfoDto.setRemarks(msg2);
|
|
|
baseClosingAccountInfoDto.setState(1);
|
|
@@ -180,7 +180,7 @@ public class BaseClosingAccountInfoServiceImpl implements BaseClosingAccountInfo
|
|
|
baseClosingAccountInfoDto.setMonth(1);
|
|
|
}
|
|
|
baseClosingAccountInfoDto.setName(baseClosingAccountInfoDto.getYear()+"年"+String.format("%02d", baseClosingAccountInfoDto.getMonth())+"月");
|
|
|
- this.add(baseClosingAccountInfoDto);*/
|
|
|
+ this.add(baseClosingAccountInfoDto);
|
|
|
}else{
|
|
|
message.setStatus(-707);
|
|
|
message.setMsg(msg);
|
|
@@ -215,13 +215,13 @@ public class BaseClosingAccountInfoServiceImpl implements BaseClosingAccountInfo
|
|
|
|
|
|
//根据账期查找历史客户数(仅统计状态为欠费与正常的客户总数之和)
|
|
|
Integer accountNumber = payChargeSurveyMapper.getAccountNumber
|
|
|
- (strarDate,endDate,BigInteger.valueOf(loginUser.getSiteId()),BigInteger.valueOf(loginUser.getCustomerId()));
|
|
|
+ (null,endDate,BigInteger.valueOf(loginUser.getSiteId()),BigInteger.valueOf(loginUser.getCustomerId()));
|
|
|
//根据账期查找历史水表数(仅统计状态为已开户的水表总数)
|
|
|
Integer meterNumber = payChargeSurveyMapper.getMeterNumber
|
|
|
- (strarDate,endDate,BigInteger.valueOf(loginUser.getSiteId()),BigInteger.valueOf(loginUser.getCustomerId()));
|
|
|
+ (null,endDate,BigInteger.valueOf(loginUser.getSiteId()),BigInteger.valueOf(loginUser.getCustomerId()));
|
|
|
//根据账期查找历史开户数(仅统计状态为正常的开户总数)
|
|
|
Integer customerNumber = payChargeSurveyMapper.getCustomerNumber
|
|
|
- (strarDate,endDate,BigInteger.valueOf(loginUser.getSiteId()),BigInteger.valueOf(loginUser.getCustomerId()));
|
|
|
+ (null,endDate,BigInteger.valueOf(loginUser.getSiteId()),BigInteger.valueOf(loginUser.getCustomerId()));
|
|
|
|
|
|
//上一账期汇总
|
|
|
PayAccountSurvey lastAccount = payChargeSurveyMapper.getlastNumber(lastYear,lastMonth,
|