Commit 9d543f85 authored by YONG-LIN SU's avatar YONG-LIN SU

1. 新增技術文件

2. 調整費率計算公式
parent b2f7cb8f
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="deploymentTargetDropDown">
<runningDeviceTargetSelectedWithDropDown>
<Target>
<type value="RUNNING_DEVICE_TARGET" />
<deviceKey>
<Key>
<type value="SERIAL_NUMBER" />
<value value="577125220043" />
</Key>
</deviceKey>
</Target>
</runningDeviceTargetSelectedWithDropDown>
<timeTargetWasSelectedWithDropDown value="2022-08-18T02:22:35.164972600Z" />
</component>
</project>
\ No newline at end of file
package ecom.android.newparkapp.dao;
import androidx.lifecycle.LiveData;
import androidx.room.Dao;
import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.Query;
import java.util.List;
import ecom.android.newparkapp.entity.SpaceFee;
@Dao
public interface SpaceFeeDao {
@Query("SELECT * FROM spacefee")
List<SpaceFee> getAll();
@Query("SELECT * FROM spacefee")
LiveData<List<SpaceFee>> getAllLiveData();
@Query("SELECT * FROM spacefee WHERE id IN (:Ids)")
List<SpaceFee> loadAllByIds(int[] Ids);
@Query("SELECT * FROM spacefee WHERE space_rate_id=:spaceRateId AND vehicle_type_id=:vehicleTypeId LIMIT 1")
SpaceFee findByName(int spaceRateId, int vehicleTypeId);
@Insert
void insertAll(SpaceFee... spaceFees);
@Delete
void delete(SpaceFee spacefee);
@Query("DELETE FROM spacefee")
void deleteAll();
}
......@@ -16,6 +16,7 @@ import ecom.android.newparkapp.dao.CaseDao;
import ecom.android.newparkapp.dao.CasePhotoDao;
import ecom.android.newparkapp.dao.RoadDao;
import ecom.android.newparkapp.dao.SpaceDao;
import ecom.android.newparkapp.dao.SpaceFeeDao;
import ecom.android.newparkapp.dao.SpaceRateDao;
import ecom.android.newparkapp.dao.UserDao;
import ecom.android.newparkapp.dao.UserPermissionDao;
......@@ -27,6 +28,7 @@ import ecom.android.newparkapp.entity.CasePhoto;
import ecom.android.newparkapp.converter.LocationConverter;
import ecom.android.newparkapp.entity.Road;
import ecom.android.newparkapp.entity.Space;
import ecom.android.newparkapp.entity.SpaceFee;
import ecom.android.newparkapp.entity.SpaceRate;
import ecom.android.newparkapp.converter.TimestampConverter;
import ecom.android.newparkapp.entity.User;
......@@ -36,7 +38,7 @@ import ecom.android.newparkapp.entity.VehicleColor;
import ecom.android.newparkapp.entity.VehicleType;
// DataBase 一個資料庫一個,並涵蓋多個資料表
@Database(entities = {Case.class, CasePhoto.class, Road.class, Space.class, SpaceRate.class, User.class, UserPermission.class, VehicleBrand.class, VehicleColor.class, VehicleType.class},
@Database(entities = {Case.class, CasePhoto.class, Road.class, Space.class, SpaceRate.class, SpaceFee.class, User.class, UserPermission.class, VehicleBrand.class, VehicleColor.class, VehicleType.class},
version = 1)
@TypeConverters({LocationConverter.class, TimestampConverter.class, SpaceTypeConverter.class, SpaceStatusConverter.class, CaseStatusConverter.class, ShiftConverter.class})
public abstract class InfoDatabase extends RoomDatabase {
......@@ -45,6 +47,7 @@ public abstract class InfoDatabase extends RoomDatabase {
public abstract RoadDao roadDao();
public abstract SpaceDao spaceDao();
public abstract SpaceRateDao spaceRateDao();
public abstract SpaceFeeDao spaceFeeDao();
public abstract UserDao userDao();
public abstract VehicleBrandDao vehicleBrandDao();
public abstract VehicleColorDao vehicleColorDao();
......
......@@ -41,6 +41,9 @@ public class Case {
@Embedded(prefix = "space_")
public Space space;
@ColumnInfo(name = "final_space_fee")
public int space_fee; // 基於 車種 及 車格費率 轉換後的停車費
@ColumnInfo(name = "plate_number")
public String plateNumber;
......@@ -95,13 +98,14 @@ public class Case {
@Ignore
public String uploadPath;
public Case(String billingNumber2, String billingNumber1, User user, Date terminateDate, Date caseTime, Space space, String plateNumber, VehicleType vehicleType, VehicleColor vehicleColor, VehicleBrand vehicleBrand, float periodHour, int finalExpenses, Location location, int photoCount, Date updateDate, Date finalTime, Boolean autoPay, String agency, Shift shift, CaseStatus caseStatus) {
public Case(String billingNumber2, String billingNumber1, User user, Date terminateDate, Date caseTime, Space space, int space_fee,String plateNumber, VehicleType vehicleType, VehicleColor vehicleColor, VehicleBrand vehicleBrand, float periodHour, int finalExpenses, Location location, int photoCount, Date updateDate, Date finalTime, Boolean autoPay, String agency, Shift shift, CaseStatus caseStatus) {
this.billingNumber2 = billingNumber2;
this.billingNumber1 = billingNumber1;
this.user = user;
this.terminateDate = terminateDate;
this.caseTime = caseTime;
this.space = space;
this.space_fee = space_fee;
this.plateNumber = plateNumber;
this.vehicleType = vehicleType;
this.vehicleColor = vehicleColor;
......@@ -274,7 +278,7 @@ public class Case {
* @return 分級停車金額
*/
public int getPricing() {
return this.space.fee;
return this.space_fee;
}
......
......@@ -23,9 +23,6 @@ public class Space implements Parcelable {
@ColumnInfo(name = "space_type")
public SpaceType spaceType;
@ColumnInfo(name = "fee")
public int fee;
@Embedded(prefix = "space_rate_")
public SpaceRate spaceRate;
......@@ -38,11 +35,10 @@ public class Space implements Parcelable {
@ColumnInfo(name = "space_status")
public SpaceStatus spaceStatus;
public Space(String id, Road road, SpaceType spaceType, int fee, SpaceRate spaceRate, float latitude, float longitude, SpaceStatus spaceStatus) {
public Space(String id, Road road, SpaceType spaceType, SpaceRate spaceRate, float latitude, float longitude, SpaceStatus spaceStatus) {
this.id = id;
this.road = road;
this.spaceType = spaceType;
this.fee = fee;
this.spaceRate = spaceRate;
this.latitude = latitude;
this.longitude = longitude;
......@@ -53,7 +49,6 @@ public class Space implements Parcelable {
id = in.readString();
road = in.readParcelable(Road.class.getClassLoader());
spaceType = in.readParcelable(SpaceType.class.getClassLoader());
fee = in.readInt();
spaceRate = in.readParcelable(SpaceRate.class.getClassLoader());
latitude = in.readFloat();
longitude = in.readFloat();
......@@ -65,7 +60,6 @@ public class Space implements Parcelable {
dest.writeString(id);
dest.writeParcelable(road, flags);
dest.writeParcelable(spaceType, flags);
dest.writeInt(fee);
dest.writeParcelable(spaceRate, flags);
dest.writeFloat(latitude);
dest.writeFloat(longitude);
......
package ecom.android.newparkapp.entity;
import androidx.room.ColumnInfo;
import androidx.room.Embedded;
import androidx.room.Entity;
import androidx.room.PrimaryKey;
@Entity
public class SpaceFee {
@PrimaryKey(autoGenerate = true)
public int id;
@Embedded(prefix = "vehicle_type_")
public VehicleType vehicleType;
@Embedded(prefix = "space_rate_")
public SpaceRate spaceRate;
@ColumnInfo(name = "fee")
public int fee;
public SpaceFee(int id, VehicleType vehicleType, SpaceRate spaceRate, int fee) {
this.id = id;
this.vehicleType = vehicleType;
this.spaceRate = spaceRate;
this.fee = fee;
}
}
......@@ -16,8 +16,11 @@ import com.sewoo.port.android.BluetoothPort;
import java.io.IOException;
import java.io.OutputStream;
import java.util.Calendar;
import ecom.android.newparkapp.Common;
import ecom.android.newparkapp.entity.Case;
import ecom.android.newparkapp.entity.SpaceType;
public class CarPrinter_LKP34L{
private ExtendCPCLPrinter cpclPrinter;
......@@ -42,58 +45,164 @@ public class CarPrinter_LKP34L{
// LK-P34L dpi 為 203,最大高度為 1155 px,最大寬度為 448px
int nLineWidth = 448;
cpclPrinter.setForm(102, 203, 203, 1155, nLineWidth,1);
int paper_type = 0; // 0 -> Gas Paper, 1 -> Black Mark Paper, 2 -> Continuous Paper
int paper_type = 1; // 0 -> Gas Paper, 1 -> Black Mark Paper, 2 -> Continuous Paper
cpclPrinter.setMedia(paper_type);
// 列印 billNumber1 Code 39
String billNumber1 = carCase.billingNumber1;
cpclPrinter.setCPCLBarcode(7,0,0);
cpclPrinter.printCPCLBarcode(CPCLConst.LK_CPCL_0_ROTATION, CPCLConst.LK_CPCL_BCS_39,1,CPCLConst.LK_CPCL_BCS_1RATIO, 60, 0, 0, billNumber1, 0);
if (carCase.autoPay){
// 自動扣繳
String autoPayTitle = "※本車已約定金融、電信帳戶代繳,\n請勿重複繳費、並維持正常扣繳;\n如扣繳失敗請依背面說明補單繳款。";
cpclPrinter.printAndroidFont(0,10, Typeface.SANS_SERIF, autoPayTitle, nLineWidth, 20);
}else {
// 列印 billNumber1 Code 39
String billNumber1 = carCase.billingNumber1;
cpclPrinter.setCPCLBarcode(7,0,0);
cpclPrinter.printCPCLBarcode(CPCLConst.LK_CPCL_0_ROTATION, CPCLConst.LK_CPCL_BCS_39,1,CPCLConst.LK_CPCL_BCS_1RATIO, 60, 0, 0, billNumber1, 0);
}
// 列印 車號
String plateNumber = "8052-LZ";
String plateNumber = carCase.plateNumber;
cpclPrinter.printAndroidFont(110,100, Typeface.SANS_SERIF, plateNumber, nLineWidth, 35);
// 列印 車格編號
String spaceWithRoad = "A213 中山路A";
String spaceWithRoad = carCase.space.id + " " + carCase.space.road.name;
cpclPrinter.printAndroidFont(110,150, Typeface.SANS_SERIF, spaceWithRoad, nLineWidth, 35);
// 列印 停車日期
String parkingDate = "111年08月03日";
Calendar parkingDateCalendar = Calendar.getInstance();
parkingDateCalendar.setTime(carCase.caseTime);
String rocParkingDate = Common.getDate(parkingDateCalendar, true);
String parkingDate = rocParkingDate.substring(0,3) + "年" + rocParkingDate.substring(3,5) + "月" + rocParkingDate.substring(5,7) + "日";
cpclPrinter.printAndroidFont(110,200,Typeface.SANS_SERIF, parkingDate, nLineWidth, 35);
// 列印 billNumber2 Code 39
String billNumber2 = "77B18300298";
String billNumber2 = carCase.billingNumber2;
cpclPrinter.setCPCLBarcode(7,0,0);
cpclPrinter.printCPCLBarcode(CPCLConst.LK_CPCL_0_ROTATION, CPCLConst.LK_CPCL_BCS_39,1,CPCLConst.LK_CPCL_BCS_1RATIO, 70, 0, 260, billNumber2, 0);
// 列印 繳費期限
String terminateYear = "111";
String terminateMonth = "08";
String terminateDay = "29";
Calendar terminateDateCalendar = Calendar.getInstance();
terminateDateCalendar.setTime(carCase.terminateDate);
String rocTerminateDate = Common.getDate(terminateDateCalendar, true);
String terminateYear = rocTerminateDate.substring(0, 3);
String terminateMonth = rocTerminateDate.substring(3, 5);
String terminateDay = rocTerminateDate.substring(5, 7);
cpclPrinter.printAndroidFont(103, 380, Typeface.SANS_SERIF, terminateYear, nLineWidth, 25);
cpclPrinter.printAndroidFont(203, 380, Typeface.SANS_SERIF, terminateMonth, nLineWidth, 25);
cpclPrinter.printAndroidFont(303, 380, Typeface.SANS_SERIF, terminateDay, nLineWidth, 25);
// 列印 停車時間
String parkingTime = "14:58";
String parkingFee = "25";
String userName = "系統測試";
Calendar nowCalendar = (Calendar)parkingDateCalendar.clone();
int nHour = parkingDateCalendar.get(Calendar.HOUR_OF_DAY);
boolean b60Min = false;
String parkingTime,parkingFee, userName;
int printYMovement = 50;
int printY = 480;
// 開單累積最多 4 次
for (int i = 0; i < 4; i++){
// TODO: 2022/8/18 超過上班時間,則停止列印
if (i == 0){
// 繳費金額
cpclPrinter.printAndroidFont(130, printY, Typeface.SANS_SERIF, parkingFee, nLineWidth, 30);
// 簽章
cpclPrinter.printAndroidFont(240, printY, Typeface.SANS_SERIF, userName, nLineWidth, 30);
// 停車時間
parkingTime = nHour+ ":" + nowCalendar.get(Calendar.MINUTE);
// 停車費
parkingFee = String.valueOf(carCase.getPricing());
// 使用者名稱
userName = carCase.user.name;
}else {
printY+=printYMovement;
// 停車時間
parkingTime = ( nHour + (b60Min ? 1 : 0) )+ ":" + ( b60Min ? 0 : (nowCalendar.get(Calendar.MINUTE) + 1) );
// 停車費
parkingFee = "";
// 使用者名稱
userName="________";
}
// 停車時間
cpclPrinter.printAndroidFont(15, printY, Typeface.SANS_SERIF, parkingTime, nLineWidth, 30);
// 簽章
cpclPrinter.printAndroidFont(240, printY, Typeface.SANS_SERIF, "________", nLineWidth, 30);
// 身障車格判斷
if (carCase.space.spaceType == SpaceType.HANDICAPPED_SPACE){
if (carCase.vehicleType.id == 12) // 身心障礙(府-2)
{
// TODO: 2022/8/18 身心障礙 (府-2) 優惠處理
if (i == 0){
// 停車時間
parkingTime = nHour+ ":" + nowCalendar.get(Calendar.MINUTE);
// 停車費
parkingFee = String.valueOf(carCase.getPricing());
// 使用者名稱
userName = carCase.user.name;
}else if (i == 1 ){
// 停車時間
parkingTime = ( nHour + (b60Min ? 1 : 0) )+ ":" + ( b60Min ? 0 : (nowCalendar.get(Calendar.MINUTE) + 1) );
// 停車費
parkingFee = String.valueOf(carCase.getPricing());
// 使用者名稱
userName="________";
}else {
// 停車時間
parkingTime = ( nHour + (b60Min ? 1 : 0) )+ ":" + ( b60Min ? 0 : (nowCalendar.get(Calendar.MINUTE) + 1) );
// 停車費
parkingFee = "";
// 使用者名稱
userName="________";
}
}
else if (carCase.vehicleType.id == 13) // 身心障礙(社-4)
{
// TODO: 2022/8/18 身心障礙(社-4) 優惠處理
if (i == 0){
// 停車時間
parkingTime = nHour+ ":" + nowCalendar.get(Calendar.MINUTE);
// 停車費
parkingFee = String.valueOf(carCase.getPricing());
// 使用者名稱
userName = carCase.user.name;
}else {
// 停車時間
parkingTime = ( nHour + (b60Min ? 1 : 0) )+ ":" + ( b60Min ? 0 : (nowCalendar.get(Calendar.MINUTE) + 1) );
// 停車費
parkingFee = String.valueOf(carCase.getPricing());
// 使用者名稱
userName="________";
}
}
}
// 列印繳費金額
if (!parkingFee.trim().isEmpty()){
cpclPrinter.printAndroidFont(130, printY, Typeface.SANS_SERIF, parkingFee, nLineWidth, 30);
}
// 列印停車時間
if (!parkingTime.trim().isEmpty()){
cpclPrinter.printAndroidFont(15, printY, Typeface.SANS_SERIF, parkingTime, nLineWidth, 30);
}
// 列印簽章 或 底線
if (!userName.trim().isEmpty()){
cpclPrinter.printAndroidFont(240, printY, Typeface.SANS_SERIF, userName, nLineWidth, 30);
}
// 累加下一圈
nowCalendar.add(Calendar.MINUTE, carCase.space.getAddMinutes());
nHour = nowCalendar.get(Calendar.HOUR_OF_DAY);
b60Min = nowCalendar.get(Calendar.MINUTE) == 59;
}
// 開始列印
......
......@@ -10,6 +10,7 @@ import ecom.android.newparkapp.dao.CaseDao;
import ecom.android.newparkapp.dao.CasePhotoDao;
import ecom.android.newparkapp.dao.RoadDao;
import ecom.android.newparkapp.dao.SpaceDao;
import ecom.android.newparkapp.dao.SpaceFeeDao;
import ecom.android.newparkapp.dao.SpaceRateDao;
import ecom.android.newparkapp.dao.UserDao;
import ecom.android.newparkapp.dao.UserPermissionDao;
......@@ -31,6 +32,7 @@ public class InfoRepository {
public UserPermissionDao userPermissionDao;
public SpaceRateDao spaceRateDao;
public SpaceFeeDao spaceFeeDao;
public RoadDao roadDao;
public SpaceDao spaceDao;
public CaseDao caseDao;
......@@ -47,6 +49,7 @@ public class InfoRepository {
userPermissionDao = infoDatabase.userPermissionDao();
spaceRateDao = infoDatabase.spaceRateDao();
spaceFeeDao = infoDatabase.spaceFeeDao();
roadDao = infoDatabase.roadDao();
spaceDao = infoDatabase.spaceDao();
caseDao = infoDatabase.caseDao();
......
......@@ -482,7 +482,7 @@ public class T02StartActivity extends AppCompatActivity {
// 累加時間試算
int newAddCount = t02StartViewModel.calcPeriodHourCount(tempCase);
float newPeriodHour = newAddCount * tempCase.space.spaceRate.perHours;
int newFinalExpenses = newAddCount * tempCase.space.fee;
int newFinalExpenses = newAddCount * tempCase.space_fee;
// 顯示 試算 停車時數 停車費
t03CumulativeTimeDataBinding.diaParkingExpensesTextView.setText(String.valueOf(newFinalExpenses));
......
......@@ -331,8 +331,12 @@ public class BlueToothPortViewModel extends AndroidViewModel {
return;
}
String powerPercentFull = printer.getPowerPercentFull();
if (powerPercentFull != null || !powerPercentFull.trim().isEmpty()){
String purePowerPercentFull = powerPercentFull.substring(1, powerPercentFull.length() - 2);
if (powerPercentFull != null){
//String purePowerPercentFull = powerPercentFull.substring(1, powerPercentFull.length() - 2);
String purePowerPercentFull = powerPercentFull.replaceAll("[\"%]","");
if (purePowerPercentFull.trim().isEmpty()){
return;
}
float purePowerPercentFullFloat = Float.parseFloat(purePowerPercentFull);
printerPowerPercentFull.postValue(purePowerPercentFullFloat);
}
......
......@@ -22,6 +22,7 @@ import ecom.android.newparkapp.R;
import ecom.android.newparkapp.converter.SpaceStatusConverter;
import ecom.android.newparkapp.entity.Road;
import ecom.android.newparkapp.entity.Space;
import ecom.android.newparkapp.entity.SpaceFee;
import ecom.android.newparkapp.entity.SpaceType;
import ecom.android.newparkapp.entity.SpaceRate;
import ecom.android.newparkapp.entity.SpaceStatus;
......@@ -221,16 +222,15 @@ public class T01ImportDbViewModel extends AndroidViewModel {
infoRepository.spaceDao.deleteAll();
for (int i = 0; i < lines.length; i++) {
String[] columnString = lines[i].trim().split("[ ]");
if (columnString.length != 8){ break; }
if (columnString.length != 7){ break; }
int fee,spaceRateId,spaceTypeId, spaceStatusId;
float latitude,longitude;
try {
spaceRateId = Integer.parseInt(columnString[2]);
fee = Integer.parseInt(columnString[3]);
spaceTypeId = Integer.parseInt(columnString[4]);
latitude = Float.parseFloat(columnString[5]);
longitude = Float.parseFloat(columnString[6]);
spaceStatusId = Integer.parseInt(columnString[7]);
spaceTypeId = Integer.parseInt(columnString[3]);
latitude = Float.parseFloat(columnString[4]);
longitude = Float.parseFloat(columnString[5]);
spaceStatusId = Integer.parseInt(columnString[6]);
}catch (NumberFormatException e){
break;
}
......@@ -249,11 +249,41 @@ public class T01ImportDbViewModel extends AndroidViewModel {
SpaceStatus newSpaceStatus = SpaceStatusConverter.toSpaceStatus(spaceStatusId);
Space newSpace = new Space(newId, newRoad, newSpaceType, fee, newSpaceRate, latitude, longitude, newSpaceStatus);
Space newSpace = new Space(newId, newRoad, newSpaceType, newSpaceRate, latitude, longitude, newSpaceStatus);
infoRepository.spaceDao.insertAll(newSpace);
}
});
break;
case SpaceFee:
infoRepository.executorService.execute(()->{
infoRepository.spaceFeeDao.deleteAll();
for (int i = 0; i < lines.length; i++) {
String[] columnString = lines[i].trim().split("[ ]");
if (columnString.length != 3){
continue;
}
int vehicleTypeId,spaceRateId, fee;
try {
vehicleTypeId = Integer.parseInt(columnString[0]);
spaceRateId = Integer.parseInt(columnString[1]);
fee = Integer.parseInt(columnString[2]);
}catch (NumberFormatException e){
continue;
}
List<VehicleType> vehicleTypeList = infoRepository.vehicleTypeDao.loadAllByIds(new int[]{vehicleTypeId});
if (vehicleTypeList.size() == 0){continue;}
VehicleType vehicleType = vehicleTypeList.get(0);
List<SpaceRate> spaceRateList = infoRepository.spaceRateDao.loadAllByIds(new int[]{spaceRateId});
if (spaceRateList.size() == 0){continue;}
SpaceRate spaceRate = spaceRateList.get(0);
SpaceFee spaceFee = new SpaceFee(0, vehicleType, spaceRate, fee);
infoRepository.spaceFeeDao.insertAll(spaceFee);
}
});
break;
default:
message = dbTableName.name() + " 為無效方法";
break;
......@@ -262,6 +292,6 @@ public class T01ImportDbViewModel extends AndroidViewModel {
}
public enum DBTableName {
UserPermission,User, VehicleBrand, VehicleColor, VehicleType,SpaceRate,Road,Space
UserPermission,User, VehicleBrand, VehicleColor, VehicleType,SpaceRate,Road,Space,SpaceFee
}
}
\ No newline at end of file
......@@ -35,6 +35,7 @@ import ecom.android.newparkapp.entity.CaseStatus;
import ecom.android.newparkapp.entity.Road;
import ecom.android.newparkapp.entity.Shift;
import ecom.android.newparkapp.entity.Space;
import ecom.android.newparkapp.entity.SpaceFee;
import ecom.android.newparkapp.entity.User;
import ecom.android.newparkapp.entity.VehicleType;
import ecom.android.newparkapp.repository.InfoRepository;
......@@ -104,9 +105,12 @@ public class T02StartViewModel extends AndroidViewModel {
public boolean isLastCase(){ return (caseCursor.getValue()+1) >= cases.size();}
public void setCurrentUser(User user){ currentUser.setValue(user);};
public LiveData<Case> getCurrentCase(){return currentCase;}
public void setVehicleType(VehicleType vehicleType){
Case tempCase = currentCase.getValue();
tempCase.vehicleType = vehicleType;
// 取得車格後,更新費用及時間
getSpaceFee(tempCase);
currentCase.setValue(tempCase);
}
......@@ -115,13 +119,21 @@ public class T02StartViewModel extends AndroidViewModel {
tempCase.space = space;
// 取得車格後,更新費用及時間
if (tempCase.caseStatus == CaseStatus.NEW){
getSpaceFee(tempCase);
currentCase.setValue(tempCase);
}
private void getSpaceFee(Case tempCase){
if (tempCase.caseStatus == CaseStatus.NEW && tempCase.space != null && tempCase.vehicleType != null){
Space space = tempCase.space;
VehicleType vehicleType = tempCase.vehicleType;
SpaceFee spaceFee = infoRepository.spaceFeeDao.findByName(space.spaceRate.id, vehicleType.id);
tempCase.space_fee = spaceFee==null ? 20: spaceFee.fee;
int addCount = calcPeriodHourCount(tempCase);
tempCase.periodHour = addCount * space.spaceRate.perHours;
tempCase.finalExpenses = addCount * space.fee;
tempCase.finalExpenses = addCount * tempCase.space_fee;
}
currentCase.setValue(tempCase);
}
/**
......@@ -566,7 +578,7 @@ public class T02StartViewModel extends AndroidViewModel {
// 更新累加時間
int addCount = calcPeriodHourCount(tempCase);
tempCase.periodHour = addCount * tempCase.space.spaceRate.perHours;
tempCase.finalExpenses = addCount * tempCase.space.fee;
tempCase.finalExpenses = addCount * tempCase.space_fee;
// 取得完整路徑
final String path = photoFile.getAbsolutePath();
......
A209 A 02 30 01 23.4799691 120.448693 01
A211 A 02 30 01 23.4799691 120.448693 01
A213 A 02 30 01 23.4799791 120.4486883 01
A215 A 02 30 01 23.4799762 120.4486685 01
N066 N 02 40 02 23.4894827 120.4303129 01
N068 N 02 40 02 23.4895994 120.4303028 01
N070 N 02 40 02 23.4900085 120.4301186 01
A209 A 01 01 23.4799691 120.448693 01
A211 A 01 01 23.4799691 120.448693 01
A213 A 01 01 23.4799791 120.4486883 01
A215 A 01 01 23.4799762 120.4486685 01
N066 N 02 02 23.4894827 120.4303129 01
N068 N 02 02 23.4895994 120.4303028 01
N070 N 02 02 23.4900085 120.4301186 01
1 2 20
2 2 20
3 2 20
4 2 20
5 2 20
6 2 20
7 2 20
8 2 20
9 2 20
10 2 20
11 2 40
12 2 20
13 2 20
14 2 40
1 1 25
2 1 25
3 1 25
4 1 25
5 1 25
6 1 25
7 1 25
8 1 25
9 1 25
10 1 25
11 1 50
12 1 15
13 1 15
14 1 50
......@@ -6,11 +6,9 @@
06 大自客貨
07 遊覽車
08 大營貨
09 大型機車
10 計程車
11 交通車
12 身心障礙(府-2)
13 身心障礙(社-4)
14 其他
31 輕機
32 重機
\ No newline at end of file
31 輕機
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment