刘磊
2026-01-17 f1d726e3de8f15cdfe30d4ca5fbba733d73a1e56
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
using AngleSharp.Dom;
using log4net.Core;
using Masuit.Tools;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Common;
using WIDESEA_Core;
using WIDESEA_Core.Const;
using WIDESEA_Core.Enums;
using WIDESEA_Core.Helper;
using WIDESEA_DTO;
using WIDESEA_DTO.WMS;
using WIDESEA_Model.Models;
using WIDESEA_StorageBasicRepository;
using WIDESEA_StorageOutOrderRepository;
 
namespace WIDESEA_StoragIntegrationServices
{
    public partial class MESService
    {
        public WebResponseContent pushWorkOrderInfo(object json)
        {
            WebResponseContent content = new WebResponseContent();
            try
            {
                if (string.IsNullOrEmpty(json.ToString())) throw new Exception("请求参数为空");
 
                var result = JsonConvert.DeserializeObject<pushWorkOrderInfo>(json.ToString());
 
                var paintingOrderInfos = new List<Dt_PaintingOrderInfo>();
                foreach (var item in result.list)
                {
                    Dt_PaintingOrderInfo paintingOrderInfo = new Dt_PaintingOrderInfo()
                    {
                        biwMaterial = item.biwMaterial,
                        carBodyCharacteristic = item.carBodyCharacteristic,
                        config1 = item.config1,
                        config3 = item.config3,
                        CreateDate = DateTime.Now,
                        Creater = "System",
                        pbMaterial = item.pbMaterial,
                        plantCode = item.plantCode,
                        pvi = item.pvi,
                        sequenceNo = item.sequenceNo,
                        skylightCharacteristic = item.skylightCharacteristic,
                        twoToneCharacteristic = item.twoToneCharacteristic,
                        vehicleCharacteristic = item.vehicleCharacteristic,
                        workOrderNo = item.workOrderNo,
                        workOrderSendStatus = item.workOrderSendStatus,
                        splitStrategy = item.splitStrategy,
                        workOrderType = item.workOrderType,
                        workshopCode = item.workshopCode,
                    };
 
                    paintingOrderInfos.Add(paintingOrderInfo);
                }
                _paintingOrderInfoRepository.AddData(paintingOrderInfos);
 
                LogFactory.GetLog("涂装工单信息").Info(true, $"\r\r--------------------------------------");
                LogFactory.GetLog("涂装工单信息").Info(true, result.ToJsonString());
                return content.OK();
            }
            catch (Exception ex)
            {
                LogFactory.GetLog("涂装工单信息").Info(true, $"\r\r--------------------------------------");
                LogFactory.GetLog("涂装工单信息").Info(true, ex.Message);
                return content.Error(ex.Message);
            }
        }
 
    }
}