在开关阀时刷卡记录中添加用户余额;修改刷卡记录中的刷卡时间格式;刷卡记录倒序
This commit is contained in:
@ -257,6 +257,7 @@ public class DeviceOtherMsgConsumer {
|
||||
|
||||
String cardNumber= String.valueOf(dataJson.getInt("cardId"));//解析cardId
|
||||
userIrrigationRecord.setCardNumber(cardNumber);//卡号
|
||||
System.err.println("cardNumber"+cardNumber);
|
||||
|
||||
String areaCode=dataJson.getStr("areaCode");
|
||||
userIrrigationRecord.setAreaCode(areaCode);//区域号
|
||||
@ -269,18 +270,22 @@ public class DeviceOtherMsgConsumer {
|
||||
.eq(UserRechargeCards::getCardNumber, cardNumber)
|
||||
// .ne(UserRechargeCards::getDeptId, null)
|
||||
.list();
|
||||
System.err.println("卡信息条数:"+cardList);
|
||||
// Long deptId= null;//获取deptId
|
||||
if(!cardList.isEmpty()){
|
||||
// if(cardList.get(0).getDeptId()!=null){
|
||||
// deptId= cardList.get(0).getDeptId();
|
||||
// }
|
||||
System.err.println("卡存在");
|
||||
//添加一条刷卡记录
|
||||
BigDecimal userBalance=dataJson.getBigDecimal("userBalance");//用户余额
|
||||
NgCardSwipeRecords ngCardSwipeRecords=new NgCardSwipeRecords();
|
||||
ngCardSwipeRecords.setCardNumber(cardNumber);//卡号
|
||||
ngCardSwipeRecords.setDeviceNumber(serialNumber);//设备编码
|
||||
ngCardSwipeRecords.setAreaCode(areaCode);//区域号
|
||||
ngCardSwipeRecords.setCardSwipeType(0);//开阀
|
||||
ngCardSwipeRecords.setCardSwipeTime(DateUtils.getNowDate());//刷卡时间
|
||||
ngCardSwipeRecords.setAmountDue(userBalance);//用户余额
|
||||
if(cardInfo!=null && cardInfo.getUserId()!=null){
|
||||
ngCardSwipeRecords.setUserId(cardList.get(0).getUserId());//用户id
|
||||
}
|
||||
@ -382,6 +387,7 @@ public class DeviceOtherMsgConsumer {
|
||||
ngCardSwipeRecords.setAreaCode(areaCode);//区域号
|
||||
ngCardSwipeRecords.setCardSwipeType(1);//关阀
|
||||
ngCardSwipeRecords.setCardSwipeTime(DateUtils.getNowDate());//刷卡时间
|
||||
ngCardSwipeRecords.setAmountDue(userBalance);//用户余额
|
||||
|
||||
// ngCardSwipeRecords.setUserId(cardList.get(0).getUserId());//用户id
|
||||
|
||||
|
Reference in New Issue
Block a user