1
huangxiaoqiang
2025-05-26 41702c7ce4c88ad70f52d83d153dd4c596ff69d5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
using WIDESEA_Core;
using WIDESEA_Core.BaseRepository;
using WIDESEA_Core.BaseServices;
using WIDESEA_IBusinessesRepository;
using WIDESEA_IBusinessServices;
using WIDESEA_IStorageSocketServices;
using WIDESEA_Model.Models;
using WIDESEA_Repository;
using WIDESEA_StorageSocketServices;
 
namespace WIDESEA_BusinessServices
{
    public class Dt_HandAutomaticService : ServiceBase<Dt_HandAutomatic, IDt_HandAutomaticRepository>, IDt_HandAutomaticService
    {
        private readonly IUnitOfWorkManage _unitOfWorkManage;
        public SocketClientService _Socket { get; set; }
        public Dt_HandAutomaticService(IDt_HandAutomaticRepository BaseDal, IUnitOfWorkManage unitOfWorkManage, SocketClientService socketClientService) : base(BaseDal)
        {
            _unitOfWorkManage = unitOfWorkManage;
            _Socket = socketClientService;
        }
        public bool GetAutoStatus()
        {
            var HandAutomatic = BaseDal.QueryFirst(x => true && x.HandAutomatic == "Automatic");
            if (HandAutomatic != null)
            {
                return true;
            }
            return false;
        }
        public WebResponseContent AutoStatus(string auto)
        {
            WebResponseContent content = new WebResponseContent();
            var HandAutomatic = BaseDal.QueryFirst(x => true);
            if (auto == "true")
            {
                HandAutomatic.HandAutomatic = "Automatic";
                BaseDal.UpdateData(HandAutomatic);
                return content.OK();
            }
            else
            {
                HandAutomatic.HandAutomatic = "Manual";
                BaseDal.UpdateData(HandAutomatic);
                return content.Error();
            }
        }
    }
}