修改 用户充值记录、刷卡记录、灌溉记录接口
This commit is contained in:
@@ -16,10 +16,18 @@ public interface NgUserRechargeRecordsMapper
|
||||
/**
|
||||
* 查询用户充值记录
|
||||
*
|
||||
* @param userId 用户id
|
||||
* @param
|
||||
* @return 用户充值记录
|
||||
*/
|
||||
public NgUserRechargeRecords selectNgUserRechargeRecordsById(Long userId);
|
||||
public List<NgUserRechargeRecords> selectNgUserRechargeRecordsByCardNumber(NgUserRechargeRecords ngUserRechargeRecords);
|
||||
|
||||
/**
|
||||
* 查询充值机充值记录
|
||||
*
|
||||
* @param
|
||||
* @return 用户充值记录
|
||||
*/
|
||||
public List<NgUserRechargeRecords> selectNgUserRechargeRecordsBySerialNumber(NgUserRechargeRecords ngUserRechargeRecords);
|
||||
|
||||
/**
|
||||
* 查询用户充值记录列表
|
||||
|
||||
@@ -21,6 +21,13 @@ public interface UserConsumptionDetailsMapper extends BaseMapper<UserConsumption
|
||||
* @return
|
||||
*/
|
||||
public List<UserConsumptionDetails> selectUserConsumptionDetailsListById(String cardNumber);
|
||||
|
||||
/**
|
||||
* 根据卡号查询用户充值卡账单明细记录列表,判断是否为刷卡记录,billingType=1为刷卡
|
||||
* @param cardNumber
|
||||
* @return
|
||||
*/
|
||||
public List<UserConsumptionDetails> selectUserConsumptionDetailsSwipListByCardNumber(String cardNumber);
|
||||
/**
|
||||
* 查询用户充值卡账单明细记录
|
||||
* @param id
|
||||
|
||||
@@ -14,13 +14,30 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
public interface UserIrrigationRecordMapper
|
||||
{
|
||||
/**
|
||||
* 查询用户灌溉记录列表
|
||||
* 查询单用户灌溉记录列表
|
||||
*
|
||||
* @param cardNumber
|
||||
* @param
|
||||
* @return 灌溉记录集合
|
||||
*/
|
||||
public List<UserIrrigationRecord> selectUserIrrigationRecordListBycardNumber(String cardNumber);
|
||||
|
||||
|
||||
/**
|
||||
* 查询单用户灌溉记录列表
|
||||
*
|
||||
* @param
|
||||
* @return 灌溉记录集合
|
||||
*/
|
||||
public List<UserIrrigationRecord> selectUserIrrigationRecordShowListBycardNumber(UserIrrigationRecord userIrrigationRecord);
|
||||
|
||||
/**
|
||||
* 查询灌溉控制器灌溉记录列表
|
||||
*
|
||||
* @param deviceNumber
|
||||
* @return 灌溉记录集合
|
||||
*/
|
||||
public List<UserIrrigationRecord> selectUserIrrigationRecordListByDeviceNumber(String deviceNumber);
|
||||
|
||||
/**
|
||||
* 查询灌溉记录
|
||||
*
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.fastbee.rechargecard.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.fastbee.rechargecard.domain.NgUserRechargeRecords;
|
||||
import com.fastbee.rechargecard.mapper.NgUserRechargeRecordsMapper;
|
||||
|
||||
/**
|
||||
* 用户充值记录Service接口
|
||||
@@ -14,10 +15,18 @@ public interface INgUserRechargeRecordsService
|
||||
/**
|
||||
* 查询用户充值记录
|
||||
*
|
||||
* @param userId 用户id
|
||||
* @param
|
||||
* @return 用户充值记录
|
||||
*/
|
||||
public NgUserRechargeRecords selectNgUserRechargeRecordsById(Long userId);
|
||||
public List<NgUserRechargeRecords> selectNgUserRechargeRecordsByCardNumber(NgUserRechargeRecords ngUserRechargeRecords);
|
||||
|
||||
/**
|
||||
* 查询充值机充值记录
|
||||
*
|
||||
* @param
|
||||
* @return 用户充值记录
|
||||
*/
|
||||
public List<NgUserRechargeRecords> selectNgUserRechargeRecordsBySerialNumber(NgUserRechargeRecords ngUserRechargeRecords);
|
||||
|
||||
/**
|
||||
* 查询用户充值记录列表
|
||||
|
||||
@@ -14,6 +14,12 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
public interface IUserConsumptionDetailsService
|
||||
{
|
||||
/**
|
||||
* 根据卡号查询展示的账单信息
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
public List<UserConsumptionDetailsDto> selectUserConsumptionDetailsListByCardNumber(UserConsumptionDetails userConsumptionDetails);
|
||||
/**
|
||||
* 根据卡号查询用户充值卡账单明细记录列表
|
||||
*
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.fastbee.rechargecard.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fastbee.rechargecard.domain.UserConsumptionDetails;
|
||||
import com.fastbee.rechargecard.domain.UserIrrigationRecord;
|
||||
import com.fastbee.rechargecard.domain.dto.UserIrrigationRecordDto;
|
||||
|
||||
@@ -15,10 +17,18 @@ public interface IUserIrrigationRecordService
|
||||
/**
|
||||
* 查询用户灌溉展示记录列表
|
||||
*
|
||||
* @param cardNumber 卡号
|
||||
* @param
|
||||
* @return 灌溉记录
|
||||
*/
|
||||
//public List<UserIrrigationRecordDto> selectUserIrrigationRecordListShowBycardNumber(String cardNumber);
|
||||
public List<UserIrrigationRecordDto> selectUserIrrigationRecordShowListByCardNumber(UserIrrigationRecord userIrrigationRecord);
|
||||
|
||||
/**
|
||||
* 查询灌溉控制器灌溉展示记录列表
|
||||
*
|
||||
* @param deviceNumber 控制器编码
|
||||
* @return 灌溉记录
|
||||
*/
|
||||
public List<UserIrrigationRecord> selectUserIrrigationRecordShowListByDeviceNumber(String deviceNumber);
|
||||
|
||||
/**
|
||||
* 查询展示灌溉记录列表
|
||||
|
||||
@@ -23,13 +23,25 @@ public class NgUserRechargeRecordsServiceImpl implements INgUserRechargeRecordsS
|
||||
/**
|
||||
* 查询用户充值记录
|
||||
*
|
||||
* @param userId 用户id
|
||||
* @param
|
||||
* @return 用户充值记录
|
||||
*/
|
||||
@Override
|
||||
public NgUserRechargeRecords selectNgUserRechargeRecordsById(Long userId)
|
||||
public List<NgUserRechargeRecords> selectNgUserRechargeRecordsByCardNumber(NgUserRechargeRecords ngUserRechargeRecords)
|
||||
{
|
||||
return ngUserRechargeRecordsMapper.selectNgUserRechargeRecordsById(userId);
|
||||
return ngUserRechargeRecordsMapper.selectNgUserRechargeRecordsByCardNumber(ngUserRechargeRecords);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询充值机充值记录
|
||||
*
|
||||
* @param
|
||||
* @return 用户充值记录
|
||||
*/
|
||||
@Override
|
||||
public List<NgUserRechargeRecords> selectNgUserRechargeRecordsBySerialNumber(NgUserRechargeRecords ngUserRechargeRecords)
|
||||
{
|
||||
return ngUserRechargeRecordsMapper.selectNgUserRechargeRecordsBySerialNumber(ngUserRechargeRecords);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -27,6 +27,45 @@ public class UserConsumptionDetailsServiceImpl implements IUserConsumptionDetail
|
||||
@Autowired
|
||||
private SysUserMapper sysUserMapper;
|
||||
|
||||
@Override
|
||||
public List<UserConsumptionDetailsDto> selectUserConsumptionDetailsListByCardNumber(UserConsumptionDetails data) {
|
||||
List<UserConsumptionDetailsDto> result=new ArrayList<>();
|
||||
List<UserConsumptionDetails> value=userConsumptionDetailsMapper.selectUserConsumptionDetailsList(data);
|
||||
for(int i=0;i<value.size();i++)
|
||||
{
|
||||
UserConsumptionDetails userConsumptionDetails=value.get(i);
|
||||
UserConsumptionDetailsDto temp=new UserConsumptionDetailsDto();
|
||||
temp.setUserName(sysUserMapper.selectUserById(userConsumptionDetails.getUserId()).getUserName());
|
||||
temp.setId(userConsumptionDetails.getId());
|
||||
temp.setUserId(userConsumptionDetails.getUserId());
|
||||
temp.setDeviceNumber(userConsumptionDetails.getDeviceNumber());
|
||||
temp.setCardNumber(userConsumptionDetails.getCardNumber());
|
||||
temp.setProjectId(userConsumptionDetails.getProjectId());
|
||||
temp.setDeptId(userConsumptionDetails.getDeptId());
|
||||
temp.setBillingType(userConsumptionDetails.getBillingType());
|
||||
temp.setPumpTime(userConsumptionDetails.getPumpTime());
|
||||
temp.setUnitPrice(userConsumptionDetails.getUnitPrice());
|
||||
temp.setTotalPrice(userConsumptionDetails.getTotalPrice());
|
||||
temp.setDiscount(userConsumptionDetails.getDiscount());
|
||||
temp.setTaxAmount(userConsumptionDetails.getTaxAmount());
|
||||
temp.setAmountDue(userConsumptionDetails.getAmountDue());
|
||||
temp.setBillingPeriodDuration(userConsumptionDetails.getBillingPeriodDuration());
|
||||
temp.setBillingPeriodUnit(userConsumptionDetails.getBillingPeriodUnit());
|
||||
temp.setBillingDate(userConsumptionDetails.getBillingDate());
|
||||
temp.setStartTime(userConsumptionDetails.getStartTime());
|
||||
temp.setEndTime(userConsumptionDetails.getEndTime());
|
||||
temp.setPaymentMethod(userConsumptionDetails.getPaymentMethod());
|
||||
temp.setPaymentStatus(userConsumptionDetails.getPaymentStatus());
|
||||
temp.setPaymentTime(userConsumptionDetails.getPaymentTime());
|
||||
temp.setStatus(userConsumptionDetails.getStatus());
|
||||
temp.setAreaCode(userConsumptionDetails.getAreaCode());
|
||||
|
||||
result.add(temp);
|
||||
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据卡号查询用户充值卡账单明细记录列表
|
||||
*
|
||||
|
||||
@@ -6,6 +6,7 @@ import java.util.List;
|
||||
import com.fastbee.common.utils.DateUtils;
|
||||
import com.fastbee.iot.mapper.DeviceMapper;
|
||||
import com.fastbee.rechargecard.domain.NgIrrigationControllers;
|
||||
import com.fastbee.rechargecard.domain.UserConsumptionDetails;
|
||||
import com.fastbee.rechargecard.domain.dto.UserIrrigationRecordDto;
|
||||
import com.fastbee.rechargecard.mapper.NgIrrigationControllersMapper;
|
||||
import com.fastbee.system.mapper.SysUserMapper;
|
||||
@@ -32,6 +33,32 @@ public class UserIrrigationRecordServiceImpl implements IUserIrrigationRecordSer
|
||||
private NgIrrigationControllersMapper ngIrrigationControllersMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public List<UserIrrigationRecordDto> selectUserIrrigationRecordShowListByCardNumber(UserIrrigationRecord userIrrigationRecord) {
|
||||
List<UserIrrigationRecordDto> result=new ArrayList<>();
|
||||
List<UserIrrigationRecord> list=userIrrigationRecordMapper.selectUserIrrigationRecordShowListBycardNumber(userIrrigationRecord);
|
||||
for(int i=0;i<list.size();i++)
|
||||
{
|
||||
UserIrrigationRecordDto temp=new UserIrrigationRecordDto();
|
||||
temp.id=list.get(i).getId();
|
||||
temp.userName= sysUserMapper.selectUserById(list.get(i).getUserId()).getUserName()==null ? "" :sysUserMapper.selectUserById(list.get(i).getUserId()).getUserName();
|
||||
temp.deviceName=ngIrrigationControllersMapper.selectNgIrrigationControllersBySerialNumber(list.get(i).getDeviceNumber()).getControllerName() == null ? "":ngIrrigationControllersMapper.selectNgIrrigationControllersBySerialNumber(list.get(i).getDeviceNumber()).getControllerName();
|
||||
temp.cardNumber=list.get(i).getCardNumber() == null ? "" : list.get(i).getCardNumber();
|
||||
temp.flow=list.get(i).getCurFlow()==null ? BigDecimal.valueOf(0) :list.get(i).getCurFlow();
|
||||
temp.startTime=list.get(i).getStartTime()==null ? null : list.get(i).getStartTime();
|
||||
temp.endTime=list.get(i).getEndTime()==null ? null :list.get(0).getEndTime();
|
||||
result.add(temp);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserIrrigationRecord> selectUserIrrigationRecordShowListByDeviceNumber(String deviceNumber) {
|
||||
List<UserIrrigationRecord> list=userIrrigationRecordMapper.selectUserIrrigationRecordListByDeviceNumber(deviceNumber);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserIrrigationRecordDto> selectUserIrrigationRecordShowList(UserIrrigationRecord userIrrigationRecord) {
|
||||
List<UserIrrigationRecordDto> result=new ArrayList<>();
|
||||
|
||||
Reference in New Issue
Block a user