2026.3.26 口门门禁

master^2
xufei 2026-03-26 15:23:39 +08:00
parent d363c40408
commit 4f263b5ce0
13 changed files with 119 additions and 73 deletions

View File

@ -2,6 +2,7 @@ import 'dart:convert';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:qhd_prevention/customWidget/search_bar_widget.dart'; import 'package:qhd_prevention/customWidget/search_bar_widget.dart';
import 'package:qhd_prevention/http/ApiService.dart'; import 'package:qhd_prevention/http/ApiService.dart';
import 'package:qhd_prevention/http/modules/doorAndCar_api.dart';
import 'package:qhd_prevention/services/SessionService.dart'; import 'package:qhd_prevention/services/SessionService.dart';
import '../tools/tools.dart'; // SessionService import '../tools/tools.dart'; // SessionService
@ -21,8 +22,8 @@ class CategoryEnterpriseType {
factory CategoryEnterpriseType.fromJson(Map<String, dynamic> json) { factory CategoryEnterpriseType.fromJson(Map<String, dynamic> json) {
return CategoryEnterpriseType( return CategoryEnterpriseType(
id: json['id'] != null ? json['id'].toString() : "", id: json['jurisdictionalCorpId'] != null ? json['jurisdictionalCorpId'].toString() : "",
name: json['corpName'] != null ? json['corpName'].toString() : "", name: json['jurisdictionalCorpName'] != null ? json['jurisdictionalCorpName'].toString() : "",
pdId: json['parentId'] != null ? json['parentId'].toString() : "", pdId: json['parentId'] != null ? json['parentId'].toString() : "",
children: _safeParseChildren(json['childrenList']), children: _safeParseChildren(json['childrenList']),
); );
@ -106,7 +107,7 @@ class _DepartmentPickerEnterpriseState extends State<DepartmentPickerEnterprise>
// raw = result['data']; // raw = result['data'];
// } // }
final result = await HiddenDangerApi.getCorpInfoListTree(); final result = await DoorAndCarApi.getJurisdictionalAuthorityListTree(widget.jurisdictionalAuthorityId);
raw = result['data']; raw = result['data'];
setState(() { setState(() {

View File

@ -224,7 +224,17 @@ class DoorAndCarApi {
} }
///
static Future<Map<String, dynamic>> getJurisdictionalAuthorityListTree(String id) {
return HttpManager().request(
'${ApiService.basePath}/primeport',
'/closedArea/listAllByhgAuthArea?hgAuthArea=$id',
method: Method.get,
data: {
},
);
}

View File

@ -40,17 +40,17 @@ class HiddenDangerApi {
); );
} }
/// // ///
static Future<Map<String, dynamic>> getCorpInfoListTree() { // static Future<Map<String, dynamic>> getCorpInfoListTree() {
return HttpManager().request( // return HttpManager().request(
ApiService.basePath, // ApiService.basePath,
'/basicInfo/corpInfo/listAll', // '/basicInfo/corpInfo/listAll',
method: Method.get, // method: Method.get,
data: { // data: {
"inType": '0,1', // "inType": '0,1',
}, // },
); // );
} // }
/// ///
static Future<Map<String, dynamic>> getHiddenTreatmentListTree(String id) { static Future<Map<String, dynamic>> getHiddenTreatmentListTree(String id) {

View File

@ -829,7 +829,7 @@ class _DoorareaCarAddPageState extends State<DoorareaCarAddPage> {
return; return;
} }
if(addData['vehicleBelongType'].isEmpty){ if(addData['vehicleTypeName'].isEmpty){
ToastUtil.showNormal(context, '请选择车辆类型'); ToastUtil.showNormal(context, '请选择车辆类型');
return; return;
} }
@ -887,7 +887,7 @@ class _DoorareaCarAddPageState extends State<DoorareaCarAddPage> {
LoadingDialogHelper.show(); LoadingDialogHelper.show();
final result = await DoorAndCarApi.enclosedAreaCarSave(addData); final result = await DoorAndCarApi.enclosedAreaCarSave(addData);
LoadingDialogHelper.hide(); LoadingDialogHelper.hide();
if (result['success'] == true) { if (result['success'] ) {
ToastUtil.showNormal(context, '提交成功'); ToastUtil.showNormal(context, '提交成功');
Navigator.pop(context); Navigator.pop(context);
} else { } else {
@ -938,7 +938,7 @@ class _DoorareaCarAddPageState extends State<DoorareaCarAddPage> {
"projectId": "", //id "projectId": "", //id
"projectName": "", // "projectName": "", //
"applyReason": "", // "applyReason": "", //
"entourage": "", // // "entourage": null, //
"informSignId": "", // "informSignId": "", //
"drivingLicenseId": "", // "drivingLicenseId": "", //
"attachmentId": "", // "attachmentId": "", //

View File

@ -767,7 +767,7 @@ class _FirstlevelCarAddPageState extends State<FirstlevelCarAddPage> {
return; return;
} }
if(addData['vehicleBelongType'].isEmpty){ if(addData['vehicleTypeName'].isEmpty){
ToastUtil.showNormal(context, '请选择车辆类型'); ToastUtil.showNormal(context, '请选择车辆类型');
return; return;
} }
@ -859,7 +859,7 @@ class _FirstlevelCarAddPageState extends State<FirstlevelCarAddPage> {
"licenceNo": "", // "licenceNo": "", //
"vehicleType": "", // "vehicleType": "", //
"vehicleTypeName": "", //- "vehicleTypeName": "", //-
"vehicleBelongType": "", // 1-2-3-4- 5- 6:7 "vehicleBelongType": "5", // 1-2-3-4- 5- 6:7
"gateLevelAuthArea": "", // "gateLevelAuthArea": "", //
"visitStartTime": "", //访 "visitStartTime": "", //访
"visitEndTime": "", //访 "visitEndTime": "", //访

View File

@ -158,7 +158,7 @@ class _OnlylookCarApplicationState extends State<OnlylookCarApplication> {
label: '审核人员:', label: '审核人员:',
isEditable: false, isEditable: false,
horizontalnum: 0, horizontalnum: 0,
text: personnelList[0]['auditUserName'] ?? '', text: personnelList.isNotEmpty? personnelList[0]['auditUserName'] ?? '':'',
onTap: () {}, onTap: () {},
), ),
const Divider(), const Divider(),
@ -234,6 +234,8 @@ class _OnlylookCarApplicationState extends State<OnlylookCarApplication> {
_buildPhotoItem(2,attachmentList), _buildPhotoItem(2,attachmentList),
const Divider(), const Divider(),
// _buildPhotoItem(3), // _buildPhotoItem(3),
if(signList.isNotEmpty)
Container( Container(
height: 150, height: 150,
padding: EdgeInsets.all(8), padding: EdgeInsets.all(8),
@ -351,8 +353,9 @@ class _OnlylookCarApplicationState extends State<OnlylookCarApplication> {
Future<void> _getXgfApplyInfoById() async { Future<void> _getXgfApplyInfoById() async {
try { try {
LoadingDialogHelper.show();
final Map<String, dynamic> result= await DoorAndCarApi.getLevelCarInfoById(widget.id); final Map<String, dynamic> result= await DoorAndCarApi.getLevelCarInfoById(widget.id);
LoadingDialogHelper.hide();
if (result['success'] ) { if (result['success'] ) {
// final dynamic newList = result['data'] ; // final dynamic newList = result['data'] ;
@ -387,6 +390,7 @@ class _OnlylookCarApplicationState extends State<OnlylookCarApplication> {
// _showMessage('加载数据失败'); // _showMessage('加载数据失败');
} }
} catch (e) { } catch (e) {
LoadingDialogHelper.hide();
// Toast // Toast
print('加载数据失败:$e'); print('加载数据失败:$e');
} }

View File

@ -354,6 +354,7 @@ class _OnlylookDoorareaCarState extends State<OnlylookDoorareaCar> {
// ), // ),
const Divider(), const Divider(),
if(signList.isNotEmpty)
Container( Container(
height: 150, height: 150,
padding: EdgeInsets.all(8), padding: EdgeInsets.all(8),
@ -402,8 +403,9 @@ class _OnlylookDoorareaCarState extends State<OnlylookDoorareaCar> {
Future<void> _getXgfApplyInfoById() async { Future<void> _getXgfApplyInfoById() async {
try { try {
LoadingDialogHelper.show();
final Map<String, dynamic> result= await DoorAndCarApi.getEnclosedCarById(widget.id); final Map<String, dynamic> result= await DoorAndCarApi.getEnclosedCarById(widget.id);
LoadingDialogHelper.hide();
if (result['success'] ) { if (result['success'] ) {
// final dynamic newList = result['data'] ; // final dynamic newList = result['data'] ;
@ -438,6 +440,7 @@ class _OnlylookDoorareaCarState extends State<OnlylookDoorareaCar> {
// _showMessage('加载数据失败'); // _showMessage('加载数据失败');
} }
} catch (e) { } catch (e) {
LoadingDialogHelper.hide();
// Toast // Toast
print('加载数据失败:$e'); print('加载数据失败:$e');
} }

View File

@ -70,7 +70,7 @@ class _DoorareaTypePageState extends State<DoorareaTypePage> {
} }
}, },
text: '', text: ' ',
), ),
const Divider(), const Divider(),
@ -90,7 +90,7 @@ class _DoorareaTypePageState extends State<DoorareaTypePage> {
} }
}, },
text: '', text: ' ',
), ),
const Divider(), const Divider(),

View File

@ -767,7 +767,9 @@ class _DoorareaPersonApplyPageState extends State<DoorareaPersonApplyPage> {
} }
// List<Person> List<Map<String, dynamic>> // List<Person> List<Map<String, dynamic>>
addData['entourage'] = _personList.map((person) => person.toJson()).toList(); List<Map<String, dynamic>> jsonList = _personList.map((person) => person.toJson()).toList();
// JSON
addData['entourage'] = jsonEncode(jsonList);
if(signImages.isEmpty){ if(signImages.isEmpty){
ToastUtil.showNormal(context, '请阅读《安全进港须知》并签字'); ToastUtil.showNormal(context, '请阅读《安全进港须知》并签字');

View File

@ -218,7 +218,7 @@ class _DoorareaPersonRecordPageState extends State<DoorareaPersonRecordPage> {
break; break;
case 5: case 5:
case 6: case 6:
await pushPage(OnlylookCarApplication(4,item['id']), context); await pushPage(OnlylookCarApplication(4,item['vehicleApplyId']), context);
break; break;
case 7: case 7:
case 8: case 8:
@ -251,7 +251,7 @@ class _DoorareaPersonRecordPageState extends State<DoorareaPersonRecordPage> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text( Text(
item['projectName'], item['projectName']??'',
// '${item['name']??''}', // '${item['name']??''}',
style: const TextStyle( style: const TextStyle(
fontSize: 16, fontSize: 16,
@ -261,7 +261,10 @@ class _DoorareaPersonRecordPageState extends State<DoorareaPersonRecordPage> {
const SizedBox(height: 8), const SizedBox(height: 8),
Text('申请人:${item['applyUserName']??""}',), if(widget.type==1||widget.type==2||widget.type==5||widget.type==6)
Text('审核人:${item['auditUserName']??""}',),
if(widget.type==3||widget.type==4||widget.type==7||widget.type==8)
Text('审核人:${item['auditPersonUserName']??""}',),
if(widget.type==5||widget.type==6||widget.type==7||widget.type==8)...[ if(widget.type==5||widget.type==6||widget.type==7||widget.type==8)...[
const SizedBox(height: 8), const SizedBox(height: 8),
Text('车牌号:${item['licenceNo']??""}',), Text('车牌号:${item['licenceNo']??""}',),
@ -272,7 +275,7 @@ class _DoorareaPersonRecordPageState extends State<DoorareaPersonRecordPage> {
Text('时间范围:自${item['visitStartTime']??""}${item['visitEndTime']??""}'), Text('时间范围:自${item['visitStartTime']??""}${item['visitEndTime']??""}'),
const SizedBox(height: 8), const SizedBox(height: 8),
Text('审核状态:${_getReviewStatus(item)}',), Text('审核状态:${_getReviewStatus(item)}',),
if(widget.type==2||widget.type==4||widget.type==6||widget.type==8&&(item['reasonsRefusal']??"").isNotEmpty)...[ if((widget.type==2||widget.type==4||widget.type==6||widget.type==8)&&(item['reasonsRefusal']??"").isNotEmpty)...[
const SizedBox(height: 8), const SizedBox(height: 8),
Text('驳回原因:${item['reasonsRefusal']??""}',), Text('驳回原因:${item['reasonsRefusal']??""}',),
], ],
@ -366,33 +369,33 @@ class _DoorareaPersonRecordPageState extends State<DoorareaPersonRecordPage> {
child: Row( child: Row(
children: [ children: [
// //
GestureDetector( // GestureDetector(
onTap: () { // onTap: () {
// // //
}, // },
child: Container( // child: Container(
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4), // padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
child: Row( // child: Row(
children: [ // children: [
Text( // Text(
'筛选', // '筛选',
style: TextStyle( // style: TextStyle(
fontSize: 14, // fontSize: 14,
color: Colors.black, // color: Colors.black,
), // ),
), // ),
const SizedBox(width: 2), // const SizedBox(width: 2),
Icon( // Icon(
Icons.expand_more, // Icons.expand_more,
size: 20, // size: 20,
color: Colors.black, // color: Colors.black,
), // ),
//
], // ],
), // ),
), // ),
), // ),
const SizedBox(width: 8), // const SizedBox(width: 8),
// //
Expanded( Expanded(
child: SearchBarWidget( child: SearchBarWidget(
@ -426,7 +429,9 @@ class _DoorareaPersonRecordPageState extends State<DoorareaPersonRecordPage> {
String _getAccessArea(final item) { String _getAccessArea(final item) {
//(1:;2; 34) //(1:;2; 34)
String type = item["gateLevelAuthArea"]??''; String type ='';
if(widget.type==1||widget.type==2||widget.type==5||widget.type==6){
type = item["gateLevelAuthArea"]??'';
if(type.isNotEmpty){ if(type.isNotEmpty){
// JSON // JSON
Map<String, dynamic> jsonData = json.decode(type); Map<String, dynamic> jsonData = json.decode(type);
@ -437,11 +442,22 @@ class _DoorareaPersonRecordPageState extends State<DoorareaPersonRecordPage> {
}else{ }else{
return ''; return '';
} }
}else{
return item["closedAreaName"]??'';
}
} }
String _getReviewStatus(final item) { String _getReviewStatus(final item) {
//(1:;2; 34) //(1:;2; 34)
int type = item['auditFlag']??""; // int type = item['auditFlag']??"";
int type =0;
if(widget.type==1||widget.type==2||widget.type==3||widget.type==4){
type = int.tryParse(item['auditFlag']?.toString() ?? '') ?? 0;
}else{
type = int.tryParse(item['auditStatus']?.toString() ?? '') ?? 0;
}
if (1 == type) { if (1 == type) {
return "待审核"; return "待审核";
} else if (2 == type) { } else if (2 == type) {

View File

@ -246,6 +246,7 @@ class _OnlylookDoorareaPersonState extends State<OnlylookDoorareaPerson> {
// //
...personnelList.map((person) => _buildPersonCard(person)), ...personnelList.map((person) => _buildPersonCard(person)),
if(signList.isNotEmpty)
Container( Container(
height: 150, height: 150,
padding: EdgeInsets.all(8), padding: EdgeInsets.all(8),
@ -352,8 +353,9 @@ class _OnlylookDoorareaPersonState extends State<OnlylookDoorareaPerson> {
Future<void> _getXgfApplyInfoById() async { Future<void> _getXgfApplyInfoById() async {
try { try {
LoadingDialogHelper.show();
final Map<String, dynamic> result= await DoorAndCarApi.getEnclosedPersonById(widget.id); final Map<String, dynamic> result= await DoorAndCarApi.getEnclosedPersonById(widget.id);
LoadingDialogHelper.hide();
if (result['success'] ) { if (result['success'] ) {
// final dynamic newList = result['data'] ; // final dynamic newList = result['data'] ;
@ -380,6 +382,7 @@ class _OnlylookDoorareaPersonState extends State<OnlylookDoorareaPerson> {
// _showMessage('加载数据失败'); // _showMessage('加载数据失败');
} }
} catch (e) { } catch (e) {
LoadingDialogHelper.hide();
// Toast // Toast
print('加载数据失败:$e'); print('加载数据失败:$e');
} }

View File

@ -10,6 +10,7 @@ import 'package:qhd_prevention/http/ApiService.dart';
import 'package:qhd_prevention/http/modules/doorAndCar_api.dart'; import 'package:qhd_prevention/http/modules/doorAndCar_api.dart';
import 'package:qhd_prevention/pages/my_appbar.dart'; import 'package:qhd_prevention/pages/my_appbar.dart';
import 'package:qhd_prevention/tools/h_colors.dart'; import 'package:qhd_prevention/tools/h_colors.dart';
import 'package:qhd_prevention/tools/tools.dart';
class OnlylookPersonApplication extends StatefulWidget { class OnlylookPersonApplication extends StatefulWidget {
@ -31,7 +32,7 @@ class _OnlylookPersonApplicationState extends State<OnlylookPersonApplication> {
List<dynamic> personnelList = []; List<dynamic> personnelList = [];
// //
List<String> signList = []; late List<String> signList = [];
@override @override
void initState() { void initState() {
@ -62,6 +63,7 @@ class _OnlylookPersonApplicationState extends State<OnlylookPersonApplication> {
// //
...personnelList.map((person) => _buildPersonCard(person)), ...personnelList.map((person) => _buildPersonCard(person)),
if (signList.isNotEmpty)
Container( Container(
height: 150, height: 150,
padding: EdgeInsets.all(8), padding: EdgeInsets.all(8),
@ -215,7 +217,7 @@ class _OnlylookPersonApplicationState extends State<OnlylookPersonApplication> {
); );
} }
Widget _buildPersonCard(Map<String, String> person) { Widget _buildPersonCard(Map<String, dynamic> person) {
return Card( return Card(
margin: EdgeInsets.only(bottom: 12), margin: EdgeInsets.only(bottom: 12),
color: Colors.white, color: Colors.white,
@ -255,8 +257,9 @@ class _OnlylookPersonApplicationState extends State<OnlylookPersonApplication> {
// _buildInfoItem('部门:', person['部门'] ?? ''), // _buildInfoItem('部门:', person['部门'] ?? ''),
], ],
), ),
SizedBox(height: 12),
SizedBox(height: 12),
// //
Row( Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -272,6 +275,7 @@ class _OnlylookPersonApplicationState extends State<OnlylookPersonApplication> {
), ),
], ],
), ),
], ],
), ),
), ),
@ -344,8 +348,9 @@ class _OnlylookPersonApplicationState extends State<OnlylookPersonApplication> {
Future<void> _getXgfApplyInfoById() async { Future<void> _getXgfApplyInfoById() async {
try { try {
LoadingDialogHelper.show();
final Map<String, dynamic> result= await DoorAndCarApi.getXgfAuditInfoById(widget.id); final Map<String, dynamic> result= await DoorAndCarApi.getXgfAuditInfoById(widget.id);
LoadingDialogHelper.hide();
if (result['success'] ) { if (result['success'] ) {
// final dynamic newList = result['data'] ; // final dynamic newList = result['data'] ;
@ -372,6 +377,7 @@ class _OnlylookPersonApplicationState extends State<OnlylookPersonApplication> {
// _showMessage('加载数据失败'); // _showMessage('加载数据失败');
} }
} catch (e) { } catch (e) {
LoadingDialogHelper.hide();
// Toast // Toast
print('加载数据失败:$e'); print('加载数据失败:$e');
} }

View File

@ -114,7 +114,7 @@ class _PersonSelectionPageState extends State<PersonSelectionPage> {
groupedPersons = {}; groupedPersons = {};
for (var item in list) { for (var item in list) {
String id = item['id']??''; String id = item['userId']??'';
String name = item['userName']??''; String name = item['userName']??'';
// 使lpinyin // 使lpinyin
@ -506,6 +506,7 @@ class _PersonSelectionPageState extends State<PersonSelectionPage> {
if(widget.isMoreSelect){ if(widget.isMoreSelect){
selectedStates[person.employeePersonUserId] = value ?? false; selectedStates[person.employeePersonUserId] = value ?? false;
_updateGroupSelection(person.group);
}else{ }else{
// //
for (var group in groupedPersons.keys) { for (var group in groupedPersons.keys) {
@ -517,7 +518,7 @@ class _PersonSelectionPageState extends State<PersonSelectionPage> {
selectedStates[person.employeePersonUserId] = true; selectedStates[person.employeePersonUserId] = true;
} }
_updateGroupSelection(person.group);
}); });
}, },