MongoDB
Data Structure
| Collection Name |
|: ------------------------------:|
| cashChange|
| feeRateTableDailyCashUnit|
| discountTicket|
| serviceTime|
| feeRateTable|
| inLaneChatRoom|
| invoiceNumber|
| lotSpace|
| monthlyCarCashJournal|
| monthlyCarPlateText|
| monthlyCarType|
| specialDayCollection|
| yuTsaiLprCashJournal|
1.cashChange
required:
| | | | | |
|:------------------:|:------------------:|:----------------:|:---------------:|:----------------:|
|"changeTimeStart" | "changeTimeEnd" | "sIdNumberStart" | "sIdNumberEnd" | "checkoutCount" |
|"invoiceNumberStart"| "invoiceNumberEnd"| "invoiceCount" | "receivable" | "cash" |
|"discountAmount" | "discountCount" | "machineType" | "machineNumber"| |
{
"changeTimeStart" : "2022-01-18T23:59:59",
"changeTimeEnd" : "2022-01-19T23:59:59",
"sIdNumberStart" : 3375,
"sIdNumberEnd" : 3387,
"checkoutCount" : 13,
"invoiceNumberStart" : "WZ56609935",
"invoiceNumberEnd" : "WZ56610061",
"invoiceCount" : 11,
"receivable" : 1300,
"cash" : 820,
"discountAmount" : 480,
"discountCount" : 4,
"machineType" : "APS",
"machineNumber" : "002"
//not required:
"chungyoVIPDiscountAmount" : 0,
"chungyoVIPDiscountCount" : 0,
"dailyChungyoDiscountNumber" : 1586,
"chungyoZeroTime" : "",
"chungyoDiscountAmount" : 0,
"chungyoDiscountCount" : 0,
"storeDiscountAmount" : 0,
"storeDiscountCount" : 0,
"storeExtraTicketCount" : 0,
"mixDiscountChungyoCount" : 0,
"mixDiscountStoreCount" : 0,
"mixDiscountTotalCash" : 0,
"mixDiscountTotalCount" : 0,
"freeCarCount" : 0,
"monthlyCarCount" : 3,
"employeeCarCount" : 0,
"vendorCarCount" : 0,
"noStopCarCount" : 0,
"halfHourCount" : 0,
"halfHourCashAmount" : 0,
"otherMonthlyCarCash" : 0,
"otherMonthlyCarCount" : 0,
"otherCash" : 0,
"otherCashCount" : 0,
"otherTotalCash" : 0,
"creditCardCount" : 0,
"creditCardCash" : 0,
"easyCardCount" : 0,
"easyCardCash" : 0,
"iPassCount" : 0,
"iPassCash" : 0,
"iCashCount" : 0,
"iCashCash" : 0,
"happyCashCount" : 0,
"happyCashCash" : 0,
"twinCardCount" : 0,
"twinCardCash" : 0,
"stayCarCount" : 16,
"classNode" : "",
"ecrIndicator" : "false",
"cardExpDate" : "",
"transAmt" : 0,
"transDateTime" : "",
}
2.feeRateTableDailyCashUnit
required:
|: --------------|: --------------|: --------------|: --------------|: ----------------:|
"mon" |"tues" |"wed" |"thur" |"fri"
"sat" |"sun" |"weekday" |"holiday" |
{
"mon": {"tableID":"001","cashUnit":"1"},
"tues" : {"tableID":"001","cashUnit":"1"},
"wed" : {"tableID":"001","cashUnit":"1"},
"thur" : {"tableID":"001","cashUnit":"1"},
"fri" : {"tableID":"001","cashUnit":"1"},
"sat" : {"tableID":"001","cashUnit":"2"},
"sun" : {"tableID":"001","cashUnit":"2"},
"weekday" : {"tableID":"001","cashUnit":"2"},
"holiday" : {"tableID":"001","cashUnit":"1"},
}
3.discountTicket
{
//not required:
"localDate" : "20220120",
"localTime" : "180308",
"carid" : "220120163138AUW2970",
"plateText" : "AUW2970",
"inTime" : "202201201631",
"discountTicket" : "660200339480",
"machineType" : "APS",
"machineNo" : "001",
"messageType" : "0200",
"ticketSerialNo" : "00067",
"store" : "chungyo",
"usedDiscountMin" : "120",
"ticketVaildMin" : "360",
"discountCash" : 80,
"paymentId" : ObjectId("61e9335c336ed3a7d9d8c09d"),
"status" : "1",
"dateTime" : "2022-01-20T18:03:08.839"
}
4.serviceTime
required:
|: --------------|: --------------|: ----------------:|
"freeTime"| "graceTime"| "lagTime"
{
"freeTime" : 3,
"graceTime" : 5,
"lagTime" : 15
}
5.feeRateTable
required:
|: --------------|: ----------------:|
"feeCountCode" |"tableID"
{
"feeCountCode" : [
["A",60,40,60,0,0,0,0,1,"B","0"],
["B",30,20,30,0,0,0,0,0,"B","0"],
["C",0,0,0,0,0,0,0,0,"C","0"],
["D",0,0,0,0,0,0,0,0,"D","0"],
["E",60,30,0,0,0,0,0,1,"F","0"],
["F",60,60,0,0,0,0,0,1,"G","0"],
["G",60,80,0,0,0,0,0,0,"G","0"],
["H",0,0,0,0,0,0,0,0,"H","0"],
["I",0,0,0,0,0,0,0,0,"I","0"],
["J",0,0,0,0,0,0,0,0,"J","0"]
],
"tableID" : "001"
}
6.inLaneChatRoom
required:
|: --------------|: --------------|: --------------|: ----------------:|
"plateText" |"inTime" |"inCarJpg" |"status"
{//img to base64
"plateText" : "",
"inTime" : "2022-01-20T11:10:38",
"inCarJpg" :"http://ysnas01.yushei.com.tw:9999/images/
chatRoomImages/2022-01-20/inLane001-(del:2022-01-20-)11-10-38.jpg",
"status" : "5",
//not required:
"cameraSource" : "999"
}
7.invoiceNumber
required:
|: --------------|: --------------|: --------------|: ----------------:|
"timeTerm" |"invoiceNumber" |"status" |"insertTime"
{
"timeTerm" : "20220102", //期別,加上年份
"invoiceNumber" : "WZ56630249",
"status" : "0",
"insertTime" : "2021-12-29T23:09:47.935Z"
}
8.lotSpace
required:
|: --------------|: ----------------:|
"totalSpace" |"inLot"
{
"totalSpace" : 210,
"inLot" : 65
}
9.monthlyCarCashJournal
required:
|: --------------|: --------------|: ----------------:|
"plateText" |"userName" |"phoneNumber"
{
"plateText":"ABC1234",
"userName":"Tom",
"phoneNumber": "0909123321",
//not required:
"carCompany":"kymco",
"parkingSpaceNumber": "001"
"carColor": "black",
"checkoutTime":"2022-01-20T12:34:56",
"sex": "male",
"startDate": "2022-02-01T00:00:00",
"endDate": "2022-03-01T00:00:00",
"rentCash": "3000",
"keyDeposit": "500",
"customerCompanyId": "",
"status": "0",
}
10.monthlyCarPlateText
required:
|: --------------|: --------------|: --------------|: ----------------:|
"plateText" |"startDate" |"endDate" |"monthlyCarType"
{
"plateText" : "RDH8905",
"startDate" : "2022-01-24",
"endDate" : "2022-02-23",
"monthlyCarType" : "0"
"paymentID":'1232345r35r325r235r',
}
11.monthlyCarType
required:
|: --------------|: --------------|: --------------|: --------------|: ----------------:|
"rule" |"type" |"startTime" |"endTime"
"cashUnit" |"executeRow" |"tableID"
{
"rule": {"priority":'selectDay',"value":[1,2,3,4,5]},
//priority:'selectDay' or 'specialDay'
"type": "0",
"startTime" : "05:00",
"endTime" : "22:30",
"cashUnit" : "10",
"executeRow" : "",
"tableID" : "",
//not required:
"ps" : "timeSlotFee填10,executeRow、table留空白"
},
{
"rule": {"priority":'specialDay',"value":[1,2,3,4,5]},
"type": "1",
"startTime" : "16:00",
"endTime" : "04:00",
"cashUnit" : "10",
"executeRow" : "",
"tableID" : "",
"ps" : ""
},
{
"rule": {"priority":'specialDay',"value":[0,1,2,3,4,5,6]}, //value 全選時,無視priority
"type": "2",
"startTime" : "",
"endTime" : "",
"cashUnit" : "",
"executeRow" : "",
"tableID" : "",
"ps" : ""
},
{
"rule": {"priority":'specialDay',"value":[2,3,4,5]},
"type": "3",
"startTime" : "",
"endTime" : "",
"cashUnit" : "",
"executeRow" : "",
"tableID" : "",
"ps" : ""
},
{
"rule": {"priority":'specialDay',"value":[1,2,3,4]},
"type": "4",
"startTime" : "",
"endTime" : "",
"cashUnit" : "",
"executeRow" : "",
"tableID" : "",
"ps" : ""
},
{
"rule": {"priority":'specialDay',"value":[3,4,5]},
"type": "5",
"startTime" : "00:00",
"endTime" : "23:59",
"cashUnit" : "10",
"executeRow" : "",
"tableID" : "",
"ps" : ""
}
12.specialDayCollection
{
"2022-12-31" : "holiday"
},
{
"2022-01-22" : "weekday"
}
13.stayCar
{
//set redis and add
"stayCar":true,
"plateText" : "EAA8613",
"inTime" : "2022-01-19T06:51:27",
"inCarJpg" : "/2022/01/19/06/002361125.jpg",
"status" : "0",
"changeStatus" : ""
}
14.yuTsaiLprCashJournal
required:
|: --------------|: --------------|: --------------|: --------------|: --------------|:----------------:|
"plateText" |"inTime" |"inCarJpg" |"outTime" |"payTime" |"sIdNumber"
"receivable" |"discount" | "cash" |"rateType" |"customerCompanyId" |"invoiceNumber"
"invoicePrintTime"|"invoiceVehicleNumber" |"invoiceDonationNumber" |"status" |"carType" |"feeType"
"randomNumber"| "invoiceVoidTime" |"machineType" |"machineNumber"
{
"plateText" : "1882ZV",
"inTime" : "2022-01-20T18:04:28",
"inCarJpg" : "/2022/01/20/18/002363043.jpg",
"outTime" : "2022-01-20T19:45:59",
"payTime" : "2022-01-20T19:30:27",
"sIdNumber" : 98229,
"receivable" : 60,
"discount" : 40,
"cash" : 20,
"rateType" : "",
"customerCompanyId" : "",
"invoiceNumber" : "WZ56610151",
"invoicePrintTime" : "2022-01-20T19:31:28.773Z",
"invoiceVehicleNumber" : "",
"invoiceDonationNumber" : "",
"status" : "0",
"carType" : "1",
"feeType" : "S",
"randomNumber" : "9453",
"invoiceVoidTime" : "2022-01-21T09:30:27",
"machineType" : "APS",
"machineNumber" : "001"
//not required:
"outCarJpg" : "",
"inCameraSource" : "006",
"outCameraSource" : "",
"discountObj": {
"chungyo": {"hours": 1, "cash": 40}
},
"chungyoNumber" : "",
"monthlyCarPlateText" : "",
"keyDeposit" : "0",
"paymentMethod" : "",
"receiptNo" : "",
"approvalNo" : "",
"cardNo" : "",
"terminalId" : "",
"waveCardIndicator" : "",
}
Data Structure 2024-06-16
yutsailpr_cash_journal
{
"_id": ObjectId,
"carId": ObjectId,
"isUserCreate" : Boolean,
"isMonthlyRentalFee" : Boolean,
"machineName" : String,
"payTime" : DateTime String,
"receivable" : Integer,
"sIdNumber" : String,
"isVoid" : Boolean
}
einvoice
{
"cash" : Integer,
"customerCompanyId" : String,
"invoiceNumber" : String,
"invoicePrintTime" : DateTime String,
"randomNumber" : String,
"invoiceVehicleNumber" : String,
"invoiceDonationNumber" : String,
"yuTsaiLprCashJournalId":ObjectId
}
car_in_out
{
"plateText" : String,
"inTime" : DateTime String,
"inCamersSource" : String,
"outTime" : DateTime String,
"outCameraSource" : String,
"carType" : String
}
nfc_pay
{
"_id": ObjectId,
"amount" : Integer,
"paymentMethod" : String,
"receiptNo" : String,
"approvalNo" : String,
"cardNo" : String,
"terminalId" : String,
"waveCardIndicator" : String,
"yuTsaiLprCashJournalId":ObjectId
}
scan_pay
{
"_id" : ObjectId,
"BuyerID" : String,
"TxType" : String,
"ResponseCode" : String,
"ErrorCode" : String,
"Message" : String,
"BillNumber" : String,
"OrderNumber" : String,
"TransactionID" : String,
"PSP" : String,
"PSPName" : String,
"Amount" : Integer,
"ReceiptAmount" : Integer,
"CouponAmount" : Integer,
"LocalDate" : Date String,
"LocalTime" : Time String,
"Carrier" : String,
"yuTsaiLprCashJournalId" : ObjectId
}
parking_process
#search license plate and pay
#The documents in this collection will set expire time
{
"_id": ObjectId,
"plateText": String,
"imageId": ObjectId, //Lookup images collection
"cameraSource": String,
"inTime": DateTime String,
"carType": String,
"isExit": Boolean,
"cash": Integer,
"discount": Integer,
"outTime": DateTime,
"discountTicketData": Array
}
images
#The documents in this collection will set expire time
{
"_id": ObjectId,
"image": base64 string
}