Commit 5aecc32fea7a5e59d9e6f8b93ee5a7d5f04a35db

Authored by wdn127929
1 parent 34d63e60

时间parse问题

@@ -548,7 +548,7 @@ @@ -548,7 +548,7 @@
548 CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements; 548 CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements;
549 CODE_SIGN_IDENTITY = "Apple Development"; 549 CODE_SIGN_IDENTITY = "Apple Development";
550 CODE_SIGN_STYLE = Automatic; 550 CODE_SIGN_STYLE = Automatic;
551 - CURRENT_PROJECT_VERSION = 5320; 551 + CURRENT_PROJECT_VERSION = 5321;
552 DEVELOPMENT_TEAM = 8J59HM8B82; 552 DEVELOPMENT_TEAM = 8J59HM8B82;
553 ENABLE_BITCODE = NO; 553 ENABLE_BITCODE = NO;
554 FLUTTER_BUILD_MODE = release; 554 FLUTTER_BUILD_MODE = release;
@@ -696,7 +696,7 @@ @@ -696,7 +696,7 @@
696 CODE_SIGN_ENTITLEMENTS = "Runner/一键订Debug.entitlements"; 696 CODE_SIGN_ENTITLEMENTS = "Runner/一键订Debug.entitlements";
697 CODE_SIGN_IDENTITY = "Apple Development"; 697 CODE_SIGN_IDENTITY = "Apple Development";
698 CODE_SIGN_STYLE = Automatic; 698 CODE_SIGN_STYLE = Automatic;
699 - CURRENT_PROJECT_VERSION = 5320; 699 + CURRENT_PROJECT_VERSION = 5321;
700 DEVELOPMENT_TEAM = 8J59HM8B82; 700 DEVELOPMENT_TEAM = 8J59HM8B82;
701 ENABLE_BITCODE = NO; 701 ENABLE_BITCODE = NO;
702 FLUTTER_BUILD_MODE = release; 702 FLUTTER_BUILD_MODE = release;
@@ -732,7 +732,7 @@ @@ -732,7 +732,7 @@
732 CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; 732 CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
733 CODE_SIGN_IDENTITY = "Apple Development"; 733 CODE_SIGN_IDENTITY = "Apple Development";
734 CODE_SIGN_STYLE = Automatic; 734 CODE_SIGN_STYLE = Automatic;
735 - CURRENT_PROJECT_VERSION = 5320; 735 + CURRENT_PROJECT_VERSION = 5321;
736 DEVELOPMENT_TEAM = 8J59HM8B82; 736 DEVELOPMENT_TEAM = 8J59HM8B82;
737 ENABLE_BITCODE = NO; 737 ENABLE_BITCODE = NO;
738 FLUTTER_BUILD_MODE = release; 738 FLUTTER_BUILD_MODE = release;
@@ -807,9 +807,9 @@ class _NoteBookChangeFPageOnlyState extends State<NoteBookChangeFPageOnly> { @@ -807,9 +807,9 @@ class _NoteBookChangeFPageOnlyState extends State<NoteBookChangeFPageOnly> {
807 // ' ${datas[0]}:00'); //选中餐段开始时间戳 807 // ' ${datas[0]}:00'); //选中餐段开始时间戳
808 DateTime selectEtime = DateTime.parse('${time.year}' + 808 DateTime selectEtime = DateTime.parse('${time.year}' +
809 '-' + 809 '-' +
810 - '${time.month}' + 810 + Utils.addZeroNumber(time.month) +
811 '-' + 811 '-' +
812 - '${time.day}' + 812 + Utils.addZeroNumber(time.day) +
813 ' ${datas[1]}:00'); //选中餐段结束时间戳 813 ' ${datas[1]}:00'); //选中餐段结束时间戳
814 // 过去的餐段界定 814 // 过去的餐段界定
815 if (selectEtime.isBefore(DateTime.now())) { 815 if (selectEtime.isBefore(DateTime.now())) {
@@ -843,9 +843,9 @@ class _NoteBookChangeFPageOnlyState extends State<NoteBookChangeFPageOnly> { @@ -843,9 +843,9 @@ class _NoteBookChangeFPageOnlyState extends State<NoteBookChangeFPageOnly> {
843 843
844 DateTime reserveStime = DateTime.parse('${reservedate.year}' + 844 DateTime reserveStime = DateTime.parse('${reservedate.year}' +
845 '-' + 845 '-' +
846 - '${reservedate.month}' + 846 + Utils.addZeroNumber(reservedate.month) +
847 '-' + 847 '-' +
848 - '${reservedate.day}' + 848 + Utils.addZeroNumber(reservedate.day) +
849 ' ${datasreserve[0]}:00'); //订单餐段开始时间戳 849 ' ${datasreserve[0]}:00'); //订单餐段开始时间戳
850 850
851 String timesnow; 851 String timesnow;
@@ -862,17 +862,14 @@ class _NoteBookChangeFPageOnlyState extends State<NoteBookChangeFPageOnly> { @@ -862,17 +862,14 @@ class _NoteBookChangeFPageOnlyState extends State<NoteBookChangeFPageOnly> {
862 //将要选中的餐段和时间 862 //将要选中的餐段和时间
863 DateTime nowStime = DateTime.parse('${dateTime.year}' + 863 DateTime nowStime = DateTime.parse('${dateTime.year}' +
864 '-' + 864 '-' +
865 - '${dateTime.month}' + 865 + Utils.addZeroNumber(dateTime.month) +
866 '-' + 866 '-' +
867 - '${dateTime.day}' + 867 + Utils.addZeroNumber(dateTime.day) +
868 ' ${datanow[1]}:00'); //选中餐段结束时间戳 868 ' ${datanow[1]}:00'); //选中餐段结束时间戳
869 869
  870 + //选中的时间+餐段组合的时间戳结束日期和现在比较,< 现在,则会变更到过去
870 871
871 - //选中的时间+餐段组合的时间戳结束日期和现在比较,< 现在,则会变更到过去  
872 -  
873 -  
874 -  
875 - if (nowStime.isBefore(reserveStime)&&nowStime.isBefore(DateTime.now())) { 872 + if (nowStime.isBefore(reserveStime) && nowStime.isBefore(DateTime.now())) {
876 // 变更到过去餐段 873 // 变更到过去餐段
877 return true; 874 return true;
878 } else { 875 } else {
@@ -1139,9 +1136,9 @@ class _NoteBookChangeFPageOnlyState extends State<NoteBookChangeFPageOnly> { @@ -1139,9 +1136,9 @@ class _NoteBookChangeFPageOnlyState extends State<NoteBookChangeFPageOnly> {
1139 DateTime selectEtime = DateTime.parse( 1136 DateTime selectEtime = DateTime.parse(
1140 '${dateTime.year}' + 1137 '${dateTime.year}' +
1141 '-' + 1138 '-' +
1142 - '${dateTime.month}' + 1139 + Utils.addZeroNumber(dateTime.month) +
1143 '-' + 1140 '-' +
1144 - '${dateTime.day}' + 1141 + Utils.addZeroNumber(dateTime.day) +
1145 ' ${datas[1]}:00'); //选中餐段结束时间戳 1142 ' ${datas[1]}:00'); //选中餐段结束时间戳
1146 // 过去的餐段界定 1143 // 过去的餐段界定
1147 if (selectEtime.isBefore(DateTime.now())) { 1144 if (selectEtime.isBefore(DateTime.now())) {
@@ -1201,23 +1198,26 @@ class _NoteBookChangeFPageOnlyState extends State<NoteBookChangeFPageOnly> { @@ -1201,23 +1198,26 @@ class _NoteBookChangeFPageOnlyState extends State<NoteBookChangeFPageOnly> {
1201 DateTime selectEtime = DateTime.parse( 1198 DateTime selectEtime = DateTime.parse(
1202 '${day.year}' + 1199 '${day.year}' +
1203 '-' + 1200 '-' +
1204 - '${day.month}' + 1201 + Utils.addZeroNumber(day.month) +
1205 '-' + 1202 '-' +
1206 - '${day.day}' + 1203 + Utils.addZeroNumber(day.day) +
1207 ' ${datas[1]}:00'); //选中餐段结束时间戳 1204 ' ${datas[1]}:00'); //选中餐段结束时间戳
1208 1205
1209 if (DateTime.parse('${day.year}' + 1206 if (DateTime.parse('${day.year}' +
1210 '-' + 1207 '-' +
1211 - '${day.month}' + 1208 + Utils.addZeroNumber(
  1209 + day.month) +
1212 '-' + 1210 '-' +
1213 - '${day.day}' + 1211 + Utils.addZeroNumber(day.day) +
1214 ' 00:00:00') 1212 ' 00:00:00')
1215 .isBefore(DateTime.parse( 1213 .isBefore(DateTime.parse(
1216 '${reservedate.year}' + 1214 '${reservedate.year}' +
1217 '-' + 1215 '-' +
1218 - '${reservedate.month}' + 1216 + Utils.addZeroNumber(
  1217 + reservedate.month) +
1219 '-' + 1218 '-' +
1220 - '${reservedate.day}' + 1219 + Utils.addZeroNumber(
  1220 + reservedate.day) +
1221 ' 00:00:00')) && 1221 ' 00:00:00')) &&
1222 selectEtime 1222 selectEtime
1223 .isBefore(DateTime.now())) { 1223 .isBefore(DateTime.now())) {
@@ -809,9 +809,9 @@ class TableManagerPageState extends State<TableManagerPage> { @@ -809,9 +809,9 @@ class TableManagerPageState extends State<TableManagerPage> {
809 // ' ${datas[0]}:00'); //选中餐段开始时间戳 809 // ' ${datas[0]}:00'); //选中餐段开始时间戳
810 DateTime selectEtime = DateTime.parse('${dateTimeSelect.year}' + 810 DateTime selectEtime = DateTime.parse('${dateTimeSelect.year}' +
811 '-' + 811 '-' +
812 - '${dateTimeSelect.month}' + 812 + Utils.addZeroNumber(dateTimeSelect.month) +
813 '-' + 813 '-' +
814 - '${dateTimeSelect.day}' + 814 + Utils.addZeroNumber(dateTimeSelect.day) +
815 ' ${datas[1]}:00'); //选中餐段结束时间戳 815 ' ${datas[1]}:00'); //选中餐段结束时间戳
816 // 过去的餐段界定 816 // 过去的餐段界定
817 if (selectEtime.isBefore(DateTime.now())) { 817 if (selectEtime.isBefore(DateTime.now())) {