CRZ
2 天以前 89fa5f03903ed6161474dcbe8528503f69f804d1
人员信息修改
已修改26个文件
111 ■■■■ 文件已修改
MES.Service/Dto/webApi/ErpOutWareDetails.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MES.Service/Modes/MesOutwareDetails.cs 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MES.Service/bin/Debug/net8.0/MES.Service.dll 补丁 | 查看 | 原始文档 | blame | 历史
MES.Service/bin/Debug/net8.0/MES.Service.pdb 补丁 | 查看 | 原始文档 | blame | 历史
MES.Service/bin/Release/net8.0/MES.Service.dll 补丁 | 查看 | 原始文档 | blame | 历史
MES.Service/bin/Release/net8.0/MES.Service.pdb 补丁 | 查看 | 原始文档 | blame | 历史
MES.Service/service/BasicData/MesStaffManager.cs 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MES.Service/service/Warehouse/MesOutwareManager.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
MES.Service/service/Warehouse/MesReturnwareManager.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MES.Service/service/WomcaaManager.cs 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MESApplication/Properties/PublishProfiles/FolderProfile.pubxml.user 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
MESApplication/bin/Debug/net8.0/MES.Service.dll 补丁 | 查看 | 原始文档 | blame | 历史
MESApplication/bin/Debug/net8.0/MES.Service.pdb 补丁 | 查看 | 原始文档 | blame | 历史
MESApplication/bin/Debug/net8.0/MESApplication.dll 补丁 | 查看 | 原始文档 | blame | 历史
MESApplication/bin/Debug/net8.0/MESApplication.exe 补丁 | 查看 | 原始文档 | blame | 历史
MESApplication/bin/Debug/net8.0/MESApplication.pdb 补丁 | 查看 | 原始文档 | blame | 历史
MESApplication/bin/Release/net8.0/MES.Service.dll 补丁 | 查看 | 原始文档 | blame | 历史
MESApplication/bin/Release/net8.0/MES.Service.pdb 补丁 | 查看 | 原始文档 | blame | 历史
MESApplication/bin/Release/net8.0/MESApplication.dll 补丁 | 查看 | 原始文档 | blame | 历史
MESApplication/bin/Release/net8.0/MESApplication.exe 补丁 | 查看 | 原始文档 | blame | 历史
MESApplication/bin/Release/net8.0/MESApplication.pdb 补丁 | 查看 | 原始文档 | blame | 历史
MESApplication/bin/Release/net8.0/publish/MES.Service.dll 补丁 | 查看 | 原始文档 | blame | 历史
MESApplication/bin/Release/net8.0/publish/MES.Service.pdb 补丁 | 查看 | 原始文档 | blame | 历史
MESApplication/bin/Release/net8.0/publish/MESApplication.dll 补丁 | 查看 | 原始文档 | blame | 历史
MESApplication/bin/Release/net8.0/publish/MESApplication.exe 补丁 | 查看 | 原始文档 | blame | 历史
MESApplication/bin/Release/net8.0/publish/MESApplication.pdb 补丁 | 查看 | 原始文档 | blame | 历史
MES.Service/Dto/webApi/ErpOutWareDetails.cs
@@ -26,5 +26,7 @@
    public string? CustBillNo { get; set; }
    public string? MachineType { get; set; }
    public string? FLot { get; set; }
    public string? FOver { get; set; }
    public string? FOveryy { get; set; }
}
MES.Service/Modes/MesOutwareDetails.cs
@@ -93,6 +93,11 @@
        [SugarColumn(ColumnName="TYPE"    )]
         public string? Type { get; set; }
        /// <summary>
        /// OVER
        ///</summary>
        [SugarColumn(ColumnName = "OVER")]
        public string? Over { get; set; }
        /// <summary>
        /// 备注 
        ///</summary>
         [SugarColumn(ColumnName="REMARKS"    )]
@@ -140,6 +145,12 @@
        [SugarColumn(ColumnName = "MACHINE_TYPE")]
        public string? MachineType { get; set; }
        /// <summary>
        /// OVERYY
        ///</summary>
        [SugarColumn(ColumnName = "OVERYY")]
        public string? Overyy { get; set; }
    }
}
MES.Service/bin/Debug/net8.0/MES.Service.dll
Binary files differ
MES.Service/bin/Debug/net8.0/MES.Service.pdb
Binary files differ
MES.Service/bin/Release/net8.0/MES.Service.dll
Binary files differ
MES.Service/bin/Release/net8.0/MES.Service.pdb
Binary files differ
MES.Service/service/BasicData/MesStaffManager.cs
@@ -71,9 +71,12 @@
    private bool InsertOrUpdateStaff(SqlSugarScope db, SysUser sysUser,
        MesStaff entity)
    {
        try
        {
        var exists = db.Queryable<SysUser>().Any(u => u.Fcode == sysUser.Fcode);
        if (exists)
        {
                // 用户已存在,执行更新操作
            var updateUser = db.Updateable<SysUser>()   
                .SetColumns(s => s.Fname == sysUser.Fname)
                .SetColumns(s => s.Departmentid == sysUser.Departmentid) // 更新部门信息
@@ -82,23 +85,54 @@
                .ExecuteCommand();
            if (updateUser > 0)
            {
                var updateStaff = db.Updateable(entity).ExecuteCommand();
                    // 检查 MesStaff 是否已存在
                    var staffExists = db.Queryable<MesStaff>().Any(s => s.StaffNo == entity.StaffNo);
                    if (staffExists)
                    {
                        // 员工已存在,执行更新
                        var updateStaff = db.Updateable(entity)
                            .Where(s => s.StaffNo == entity.StaffNo)
                            .ExecuteCommand();
                if (updateStaff > 0)
                    return true;
            }
                        throw new NotImplementedException(
                            $"MES_STAFF表更新失败:员工 {entity.StaffNo}({entity.StaffName})");
        }
        else
        {
                        // 员工不存在,执行插入
                        var insertStaff = db.Insertable(entity).ExecuteCommand();
                        if (insertStaff > 0)
                            return true;
                        throw new NotImplementedException(
                            $"MES_STAFF表插入失败:员工 {entity.StaffNo}({entity.StaffName})");
                    }
                }
                throw new NotImplementedException(
                    $"SYS_USER表更新失败:用户 {sysUser.Fcode}({sysUser.Fname})");
            }
            else
            {
                // 用户不存在,执行插入操作
            var insertUser = db.Insertable(sysUser).ExecuteCommand();
            if (insertUser > 0)
            {
                var insertStaff = db.Insertable(entity).ExecuteCommand();
                if (insertStaff > 0)
                    return true;
                    throw new NotImplementedException(
                        $"MES_STAFF表插入失败:员工 {entity.StaffNo}({entity.StaffName})");
                }
                throw new NotImplementedException(
                    $"SYS_USER表插入失败:用户 {sysUser.Fcode}({sysUser.Fname})");
            }
        }
        return false;
        catch (Exception ex)
        {
            // 捕获并抛出详细的异常信息
            throw new NotImplementedException(
                $"员工 {entity.StaffNo}({entity.StaffName}) 同步失败:{ex.Message}", ex);
        }
    }
    // 删除员工的方法
@@ -128,7 +162,8 @@
            DepartmentName = staff.FPostDept,
            PositionName = staff.FPost,
            PhoneNumber = staff.FMobile,
            Remark = staff.FDescription,
            // 将 "None" 字符串转换为 null,避免数据库约束问题
            Remark = staff.FDescription == "None" ? null : staff.FDescription,
            FforbidStatus = staff.FForbidStatus
        };
@@ -297,8 +332,21 @@
    {
        foreach (var sysUser in userList)
        {
            try
            {
            var entity = staffList.First(s => s.StaffNo == sysUser.Fcode);
            if (!InsertOrUpdateStaff(db, sysUser, entity)) return false;
                if (!InsertOrUpdateStaff(db, sysUser, entity))
                {
                    throw new NotImplementedException(
                        $"同步失败:员工编号 {entity.StaffNo}({entity.StaffName}) 更新或插入操作失败");
                }
            }
            catch (Exception ex)
            {
                // 抛出详细的异常信息,包含员工编号和具体错误
                throw new NotImplementedException(
                    $"同步失败:员工编号 {sysUser.Fcode}({sysUser.Fname}) 处理异常 - {ex.Message}", ex);
            }
        }
        return true;
MES.Service/service/Warehouse/MesOutwareManager.cs
@@ -192,7 +192,9 @@
                    CustItemName = dto.CustItemName,
                    CustItemModel = dto.CustItemModel,
                    CustBillNo = dto.CustBillNo,
                    MachineType = dto.MachineType
                    MachineType = dto.MachineType,
                    Over = dto.FOver,
                    Overyy = dto.FOveryy
                };
MES.Service/service/Warehouse/MesReturnwareManager.cs
@@ -226,7 +226,9 @@
                    // 重新计算并更新相关销售订单的over状态(与生成时逻辑相同)
                    if (returnDetailsToDelete.Any())
                    {
                        UpdateSalesOrderOverStatusAfterDelete(db, returnDetailsToDelete);
                        //UpdateSalesOrderOverStatusAfterDelete(db, returnDetailsToDelete);
                        Console.WriteLine($"退货通知单已删除,已跳过销售订单状态自动更新");
                    }
                    
                    return 1;
@@ -271,7 +273,7 @@
                    Console.WriteLine($"生成检验单成功: {message}");
                    
                    // 生成检验单成功后,更新相关销售订单的over字段
                    UpdateSalesOrderOverStatus(db, mesReturnwareDetails);
                    //UpdateSalesOrderOverStatus(db, mesReturnwareDetails);
                }
            }
            catch (Exception ex)
MES.Service/service/WomcaaManager.cs
@@ -88,29 +88,15 @@
                                it.SrcBillType == mesWomcaa.SrcBillType)
                   .ExecuteCommand();
                };
            if (mesWomcabs.Count > 0)
            {
            var mesWomcab = mesWomcabs.Select(s => new { CAB001 = s.Cab001, CAB002 = s.Cab002, CAB003 = s.Cab003 }).ToList();
            //var mesWomcab = mesWomcabs.Select(s => new { CAB001 = s.Cab001, CAB002 = s.Cab002}).ToList();
            // 删除该任务单的所有WOMCAB记录(BOM明细)
            // 这样可以确保WOMCAB与JSON完全一致
            db.Deleteable<Womcab>()
                .Where(it => mesWomcab
                .Any(p => p.CAB001 == it.Cab001
                && p.CAB002 == it.Cab002
                && p.CAB003 == it.Cab003))
           .Where(it => it.Cab001 == mesWomcaa.Caa001 &&
                        it.Cab002 == mesWomcaa.SrcBillType)
                .ExecuteCommand();
            //db.Deleteable<Womcab>()
            //    .Where(it => mesWomcab
            //    .Any(p => p.CAB001 == it.Cab001
            //    && p.CAB002 == it.Cab002))
            //    .ExecuteCommand();
        };
        }
        ;
           
            var orUpdate = db.Insertable(mesWomcaa).ExecuteCommand();
MESApplication/Properties/PublishProfiles/FolderProfile.pubxml.user
@@ -5,7 +5,7 @@
<Project>
  <PropertyGroup>
    <_PublishTargetUrl>D:\crz\Desktop\接口\RD\RD_MES_Api\MESApplication\bin\Release\net8.0\publish\</_PublishTargetUrl>
    <History>True|2025-12-02T06:00:12.1806616Z||;True|2025-12-02T13:54:31.6495898+08:00||;True|2025-11-19T16:50:57.5297396+08:00||;True|2025-11-19T16:50:48.3510519+08:00||;True|2025-11-19T16:19:48.5826220+08:00||;True|2025-11-19T13:22:56.6277898+08:00||;True|2025-11-19T10:36:19.5039173+08:00||;True|2025-11-03T09:31:29.9960278+08:00||;True|2025-10-24T10:18:03.9765680+08:00||;True|2025-10-22T09:45:29.8581213+08:00||;True|2025-09-28T14:01:09.8976598+08:00||;True|2025-09-27T18:21:38.6643161+08:00||;True|2025-09-25T09:36:17.3207590+08:00||;True|2025-09-24T17:48:11.4770370+08:00||;True|2025-09-24T10:00:27.2652137+08:00||;True|2025-09-22T17:09:16.2235067+08:00||;True|2025-09-07T15:57:42.6492991+08:00||;True|2025-09-02T14:07:59.4933772+08:00||;True|2025-08-22T10:11:31.0216372+08:00||;True|2025-08-18T08:28:20.1447738+08:00||;True|2025-08-12T09:51:50.2822756+08:00||;True|2025-08-10T16:28:17.3559399+08:00||;True|2025-08-06T09:47:19.1451217+08:00||;True|2025-08-06T09:46:51.2621129+08:00||;True|2025-08-03T18:48:37.3295098+08:00||;True|2025-08-01T17:29:02.4576952+08:00||;True|2025-03-27T23:22:42.3501020+08:00||;True|2025-03-10T16:49:08.3476948+08:00||;True|2024-12-24T15:39:58.5366570+08:00||;True|2024-11-26T18:32:03.9568766+08:00||;True|2024-11-21T02:11:35.8050745+08:00||;True|2024-09-21T16:35:22.6651659+08:00||;True|2024-09-21T16:14:11.3450387+08:00||;True|2024-09-19T17:16:11.7338751+08:00||;True|2024-09-19T17:11:21.0116707+08:00||;True|2024-09-19T13:54:25.7455472+08:00||;True|2024-09-15T13:55:51.7095153+08:00||;True|2024-09-12T17:10:20.4734556+08:00||;True|2024-09-10T15:54:07.7463519+08:00||;True|2024-09-06T14:40:56.3762241+08:00||;True|2024-08-20T17:12:00.2924570+08:00||;True|2024-08-17T10:57:05.6670396+08:00||;True|2024-08-17T10:56:46.8068041+08:00||;True|2024-08-16T14:09:17.0526491+08:00||;True|2024-08-15T08:40:32.8134665+08:00||;True|2024-08-14T10:00:27.7017207+08:00||;True|2024-08-14T08:54:44.8284031+08:00||;True|2024-08-07T10:32:10.3689256+08:00||;True|2024-08-05T15:45:03.0864530+08:00||;True|2024-08-03T09:59:13.7916520+08:00||;True|2024-07-31T17:27:28.1965929+08:00||;True|2024-07-31T15:27:34.7943845+08:00||;True|2024-07-30T15:04:50.5849235+08:00||;True|2024-07-30T14:09:06.2877325+08:00||;True|2024-07-29T16:11:30.4493940+08:00||;True|2024-07-23T14:30:34.4591002+08:00||;True|2024-07-22T14:17:39.8186158+08:00||;True|2024-04-10T12:55:31.3963752+08:00||;True|2024-04-08T13:59:25.5487203+08:00||;True|2024-04-06T09:30:09.5350539+08:00||;True|2024-04-06T08:46:05.8814658+08:00||;True|2024-04-05T14:06:52.0448024+08:00||;True|2024-04-05T12:47:46.0561601+08:00||;True|2024-02-26T08:46:22.0988887+08:00||;True|2024-02-24T19:17:13.6770376+08:00||;True|2024-02-24T14:32:37.4450337+08:00||;True|2024-02-23T10:22:06.5150173+08:00||;True|2024-02-22T13:19:56.6997993+08:00||;True|2024-02-22T10:53:17.7929585+08:00||;True|2024-02-21T17:08:06.5553444+08:00||;True|2024-02-19T16:24:37.4912012+08:00||;True|2024-02-02T10:07:23.2726075+08:00||;True|2024-02-02T08:36:49.2904460+08:00||;True|2024-01-29T17:44:43.6800769+08:00||;True|2024-01-23T09:47:26.7811926+08:00||;True|2024-01-18T16:23:30.3373836+08:00||;True|2024-01-17T14:22:04.2552286+08:00||;True|2024-01-16T16:54:42.2316892+08:00||;True|2024-01-16T16:37:23.8028858+08:00||;True|2024-01-16T09:25:24.4007775+08:00||;True|2024-01-15T10:18:57.3362616+08:00||;True|2024-01-15T10:07:14.2044763+08:00||;True|2024-01-10T14:03:36.4451130+08:00||;True|2024-01-09T16:45:32.9601815+08:00||;True|2024-01-06T14:16:34.2732220+08:00||;True|2024-01-06T14:11:45.2134717+08:00||;True|2024-01-06T11:30:58.9198887+08:00||;</History>
    <History>True|2025-12-15T07:31:47.3166611Z||;True|2025-12-10T20:03:55.9695546+08:00||;True|2025-12-04T11:27:56.1218308+08:00||;True|2025-12-04T08:31:18.7116721+08:00||;True|2025-12-02T14:00:12.1806616+08:00||;True|2025-12-02T13:54:31.6495898+08:00||;True|2025-11-19T16:50:57.5297396+08:00||;True|2025-11-19T16:50:48.3510519+08:00||;True|2025-11-19T16:19:48.5826220+08:00||;True|2025-11-19T13:22:56.6277898+08:00||;True|2025-11-19T10:36:19.5039173+08:00||;True|2025-11-03T09:31:29.9960278+08:00||;True|2025-10-24T10:18:03.9765680+08:00||;True|2025-10-22T09:45:29.8581213+08:00||;True|2025-09-28T14:01:09.8976598+08:00||;True|2025-09-27T18:21:38.6643161+08:00||;True|2025-09-25T09:36:17.3207590+08:00||;True|2025-09-24T17:48:11.4770370+08:00||;True|2025-09-24T10:00:27.2652137+08:00||;True|2025-09-22T17:09:16.2235067+08:00||;True|2025-09-07T15:57:42.6492991+08:00||;True|2025-09-02T14:07:59.4933772+08:00||;True|2025-08-22T10:11:31.0216372+08:00||;True|2025-08-18T08:28:20.1447738+08:00||;True|2025-08-12T09:51:50.2822756+08:00||;True|2025-08-10T16:28:17.3559399+08:00||;True|2025-08-06T09:47:19.1451217+08:00||;True|2025-08-06T09:46:51.2621129+08:00||;True|2025-08-03T18:48:37.3295098+08:00||;True|2025-08-01T17:29:02.4576952+08:00||;True|2025-03-27T23:22:42.3501020+08:00||;True|2025-03-10T16:49:08.3476948+08:00||;True|2024-12-24T15:39:58.5366570+08:00||;True|2024-11-26T18:32:03.9568766+08:00||;True|2024-11-21T02:11:35.8050745+08:00||;True|2024-09-21T16:35:22.6651659+08:00||;True|2024-09-21T16:14:11.3450387+08:00||;True|2024-09-19T17:16:11.7338751+08:00||;True|2024-09-19T17:11:21.0116707+08:00||;True|2024-09-19T13:54:25.7455472+08:00||;True|2024-09-15T13:55:51.7095153+08:00||;True|2024-09-12T17:10:20.4734556+08:00||;True|2024-09-10T15:54:07.7463519+08:00||;True|2024-09-06T14:40:56.3762241+08:00||;True|2024-08-20T17:12:00.2924570+08:00||;True|2024-08-17T10:57:05.6670396+08:00||;True|2024-08-17T10:56:46.8068041+08:00||;True|2024-08-16T14:09:17.0526491+08:00||;True|2024-08-15T08:40:32.8134665+08:00||;True|2024-08-14T10:00:27.7017207+08:00||;True|2024-08-14T08:54:44.8284031+08:00||;True|2024-08-07T10:32:10.3689256+08:00||;True|2024-08-05T15:45:03.0864530+08:00||;True|2024-08-03T09:59:13.7916520+08:00||;True|2024-07-31T17:27:28.1965929+08:00||;True|2024-07-31T15:27:34.7943845+08:00||;True|2024-07-30T15:04:50.5849235+08:00||;True|2024-07-30T14:09:06.2877325+08:00||;True|2024-07-29T16:11:30.4493940+08:00||;True|2024-07-23T14:30:34.4591002+08:00||;True|2024-07-22T14:17:39.8186158+08:00||;True|2024-04-10T12:55:31.3963752+08:00||;True|2024-04-08T13:59:25.5487203+08:00||;True|2024-04-06T09:30:09.5350539+08:00||;True|2024-04-06T08:46:05.8814658+08:00||;True|2024-04-05T14:06:52.0448024+08:00||;True|2024-04-05T12:47:46.0561601+08:00||;True|2024-02-26T08:46:22.0988887+08:00||;True|2024-02-24T19:17:13.6770376+08:00||;True|2024-02-24T14:32:37.4450337+08:00||;True|2024-02-23T10:22:06.5150173+08:00||;True|2024-02-22T13:19:56.6997993+08:00||;True|2024-02-22T10:53:17.7929585+08:00||;True|2024-02-21T17:08:06.5553444+08:00||;True|2024-02-19T16:24:37.4912012+08:00||;True|2024-02-02T10:07:23.2726075+08:00||;True|2024-02-02T08:36:49.2904460+08:00||;True|2024-01-29T17:44:43.6800769+08:00||;True|2024-01-23T09:47:26.7811926+08:00||;True|2024-01-18T16:23:30.3373836+08:00||;True|2024-01-17T14:22:04.2552286+08:00||;True|2024-01-16T16:54:42.2316892+08:00||;True|2024-01-16T16:37:23.8028858+08:00||;True|2024-01-16T09:25:24.4007775+08:00||;True|2024-01-15T10:18:57.3362616+08:00||;True|2024-01-15T10:07:14.2044763+08:00||;True|2024-01-10T14:03:36.4451130+08:00||;True|2024-01-09T16:45:32.9601815+08:00||;True|2024-01-06T14:16:34.2732220+08:00||;True|2024-01-06T14:11:45.2134717+08:00||;True|2024-01-06T11:30:58.9198887+08:00||;</History>
    <LastFailureDetails />
  </PropertyGroup>
</Project>
MESApplication/bin/Debug/net8.0/MES.Service.dll
Binary files differ
MESApplication/bin/Debug/net8.0/MES.Service.pdb
Binary files differ
MESApplication/bin/Debug/net8.0/MESApplication.dll
Binary files differ
MESApplication/bin/Debug/net8.0/MESApplication.exe
Binary files differ
MESApplication/bin/Debug/net8.0/MESApplication.pdb
Binary files differ
MESApplication/bin/Release/net8.0/MES.Service.dll
Binary files differ
MESApplication/bin/Release/net8.0/MES.Service.pdb
Binary files differ
MESApplication/bin/Release/net8.0/MESApplication.dll
Binary files differ
MESApplication/bin/Release/net8.0/MESApplication.exe
Binary files differ
MESApplication/bin/Release/net8.0/MESApplication.pdb
Binary files differ
MESApplication/bin/Release/net8.0/publish/MES.Service.dll
Binary files differ
MESApplication/bin/Release/net8.0/publish/MES.Service.pdb
Binary files differ
MESApplication/bin/Release/net8.0/publish/MESApplication.dll
Binary files differ
MESApplication/bin/Release/net8.0/publish/MESApplication.exe
Binary files differ
MESApplication/bin/Release/net8.0/publish/MESApplication.pdb
Binary files differ