app-starlock/lib/main/lockDetail/checkingIn/checkingInSetWorkTime/checkingInSetWorkTime_logic.dart
魏少阳 fe7cb98cf9 1、修改关于时间的3点讨论结果
a,领锁,点击+号时,如果获取网络时间失败,不进入下一页,提示必须联网
b. 开锁时:有网络时间则同步,无网络则不同步时间
c. 同步时间功能:必须有网才同步时间,确定和通通锁不一致
2、修改登录、注册、修改密码选择跟当前ip不是用一个国家的时候,弹窗提示
2024-06-07 10:53:24 +08:00

29 lines
1022 B
Dart
Executable File

import 'package:get/get.dart';
import 'package:star_lock/tools/baseGetXController.dart';
import '../../../../network/api_repository.dart';
import 'checkingInSetWorkTime_state.dart';
class CheckingInSetWorkTimeLogic extends BaseGetXController{
CheckingInSetWorkTimeState state = CheckingInSetWorkTimeState();
// 编辑考勤设置信息
Future<void> editCheckInSetInfoData() async{
var entity = await ApiRepository.to.editCheckInSetInfoData(
attendanceType: state.checkingInSetInfo.value.attendanceType.toString(),
companyId: state.checkingInSetInfo.value.companyId.toString(),
type: '2',
companyName: state.checkingInSetInfo.value.companyName ?? '',
workEndTime: state.endTimeTimestamp.value.toString(),
workStartTime: state.beginTimeTimestamp.value.toString(),
workDay:state.checkingInSetInfo.value.workDay!,
);
if(entity.errorCode!.codeIsSuccessful){
showToast('修改成功', something: (){
Get.back(result: 'scuess');
});
}
}
}