yangle
2024-11-01 a337884d722031d546303d9e8cafd9fb21a108da
单品过站扫条码优化
进站单优化
钉钉同步优化
6个文件已修改
85 ■■■■ 已修改文件
LMES/LMES.csproj 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/CJGL/Cj_SingleStationController.cs 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SCGL/Sc_MESBeginWorkBillController.cs 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/数据同步/钉钉同步/DD_DataSynchronizationController.cs 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/DLL/ClsSc_MESBeginWorkBill.cs 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LMES/LMES.csproj
@@ -12,6 +12,7 @@
    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
    <FileAlignment>512</FileAlignment>
    <IsWebBootstrapper>false</IsWebBootstrapper>
    <TargetFrameworkProfile />
    <PublishUrl>publish\</PublishUrl>
    <Install>true</Install>
    <InstallFrom>Disk</InstallFrom>
@@ -26,7 +27,6 @@
    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
    <UseApplicationTrust>false</UseApplicationTrust>
    <BootstrapperEnabled>true</BootstrapperEnabled>
    <TargetFrameworkProfile />
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <PlatformTarget>AnyCPU</PlatformTarget>
WebAPI/Controllers/CJGL/Cj_SingleStationController.cs
@@ -732,6 +732,23 @@
            try
            {
                ds = oCN.RunProcReturn(@"select * from h_v_Gy_BarCodeBill WITH(NOLOCK) where HBarCode='" + HBarCode + "'", "h_v_Gy_BarCodeBill");
                //判断条码是否存在条码档案
                if (ds.Tables[0].Rows.Count > 0)
                {
                    string HSourceBillNo = ds.Tables[0].Rows[0]["HSourceBillNo"].ToString();
                    DataSet dataTable = oCN.RunProcReturn(@"select * from Sc_ProcessExchangeBillMain where HBillNo='" + HSourceBillNo + "'", "Sc_ProcessExchangeBillMain");
                    //判断条码的源单 æµè½¬å¡æ˜¯å¦è¢«åˆ é™¤
                    if (dataTable.Tables[0].Rows.Count == 0)
                    {
                        //如果源单已经删除  åˆ™æ¡ç ä¹Ÿåˆ é™¤é‡æ–°ç”Ÿæˆ
                        oCN.RunProc("delete from Gy_BarCodeBill where HBarCode='" + HBarCode + "'");
                        //重新查询条码档案 è¿›å…¥æ–°å¢žæ–¹æ³•
                        ds = oCN.RunProcReturn(@"select * from Gy_BarCodeBill where HBarCode='" + HBarCode + "'", "Gy_BarCodeBill");
                    }
                }
                if (ds.Tables[0].Rows.Count == 0)
                {
                    //判断长度是否为29位 æ— å°˜è½¦é—´
WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs
@@ -238,7 +238,22 @@
                //得到信息
                {
                    case "HCX"://生产资源码
                        ds = oCN.RunProcReturn("select * from h_v_Gy_SourceList  where æ¡ç ç¼–号 = '" + BillNo + "'", "h_v_Gy_SourceList");
                    case "htt"://生产资源码
                        string sErr = "";
                        if (oSystemParameter.ShowBill(ref sErr))
                        {
                            if (oSystemParameter.omodel.WMS_CampanyName == "杭州斯莫尔")
                            {
                                ds = oCN.RunProcReturn(@"select  s.HItemID,s.HName ç”Ÿäº§èµ„源名称,s.HNumber  from Gy_EquipFileBillMain a
                                        left join Gy_Source s on a.HSourceID = s.HItemID
                                        where HBarCode = '" + BillNo_PGD + "'", "Gy_EquipFileBillMain");
                            }
                            else {
                                ds = oCN.RunProcReturn("select * from h_v_Gy_SourceList  where æ¡ç ç¼–号 = '" + BillNo + "'", "h_v_Gy_SourceList");
                            }
                        }
                        break;
                    case "SBM"://设备码
                        ds = oCN.RunProcReturn("select * from h_v_Gy_EquipMentList  where HItemID = '" + BillNo + "'", "h_v_Gy_EquipMentList");
WebAPI/Controllers/SCGL/Sc_MESBeginWorkBillController.cs
@@ -761,6 +761,8 @@
                return objJsonResult;
            }
            LogService.Write("开工:1"+ msg1);
            ListModels oListModels = new ListModels();
            try
            {
@@ -869,13 +871,15 @@
                    oBill.DetailCol2.Add(oItemSub);
                }
                LogService.Write("开工:2" + msg1);
                //保存
                //保存完毕后处理
                bool bResult;
                if (oBill.omodel.HInterID == 0)
                {
                        bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
                    LogService.Write("开工:2.1" + msg1);
                    bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
                    if (bResult)
                    {
                        objJsonResult.HInterID = DBUtility.ClsPub.sExeReturnInfo; //返回主ID
@@ -883,6 +887,7 @@
                        string sReturn = "";
                        if (oSystemParameter.ShowBill(ref sReturn) == true)
                        {
                            LogService.Write("开工:2.8");
                            objJsonResult.Verify = "Y";
                            //if (oSystemParameter.omodel.Sc_ICMOBillWorkQtyStatus_AutoCheck == "Y") //系统参数  è‡ªåŠ¨å®¡æ ¸ 
                            //{
@@ -901,6 +906,9 @@
                    bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
                    objJsonResult.Verify = "N";
                }
                LogService.Write("开工:3" + msg1);
                if (bResult)
                {
WebAPI/Controllers/Êý¾Ýͬ²½/¶¤¶¤Í¬²½/DD_DataSynchronizationController.cs
@@ -2074,7 +2074,7 @@
                            if (getInstanceByIdResponse.Body.InstanceStatus != "COMPLETED")
                            {
                                //continue;
                                continue;
                            }
                            //开单日期
@@ -2168,7 +2168,7 @@
                            if (keys.Contains("selectField_lq3idkvg"))
                            {
                                string HDate_Temp = response.Body.Result[i].FormData["selectField_lq3idkvg"].ToString();
                                DataSet ds = oCN.RunProcReturn("select * from Gy_MouldFileMain with(nolock)  where HNumber='" + HDate_Temp + "'", "Gy_MouldFileMain");
                                DataSet ds = oCN.RunProcReturn("select * from Gy_MouldFileMain with(nolock)  where HMouldNo='" + HDate_Temp + "'", "Gy_MouldFileMain");
                                string HMouldID = "0";
                                if (ds.Tables[0].Rows.Count > 0)
                                {
@@ -2182,7 +2182,7 @@
                                ds = oCN.RunProcReturn(@"select  a.HInterID,a.HBillNo from  Sc_MouldMaintainPlanBillMain a
                                    inner join Sc_MouldMaintainPlanBillSub b on a.HInterID = b.HInterID
                                    where a.HMouldID =" + oItem.HMouldID + " and a.HMaintainLevID = " + oItem.HMaintainLevID, "Sc_MouldMaintainPlanBillMain");
                                oItem.HPlanInterID = "";
                                if (ds.Tables[0].Rows.Count > 0) {
                                    oItem.HPlanInterID = ds.Tables[0].Rows[0]["HInterID"].ToString();
                                    oItem.HPlanNo = ds.Tables[0].Rows[0]["HInterID"].ToString();
@@ -2404,18 +2404,18 @@
                            string sql_main = "Insert Into Sc_MouldMaintainBillMain " +
                "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate" +
                ",HYear,HPeriod,HRemark,HUpDateDate" +
                ",HPlanNo,HPlanInterID,HMouldID,HBeginDate" +
                ",HMouldID,HBeginDate" +
                ",HEndDate" +
                ",HInnerBillNo,HExplanation,HMouldMaintainRuleInterID,HMaintainLevID,HLastResult" +
                ",HInnerBillNo,HExplanation,HMouldMaintainRuleInterID,HLastResult" +
                ",HRequestComDate,HRecentMainModule,HCumulativeModule,HProductionModule" +
                ",HPlanInterID,HPlanNo,HMaintainLevID)" +
                "values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + oItem.HBillNo + "','"+ oItem.HDate + "','" + oItem.HOriginator + "','" + oItem.HMakeDate + "'" +
                      ",'" + DateTime.Now.Year + "','" + DateTime.Now.Month + "','"+ oItem.HRemark + "','" + oItem.HUpdateDate + "'" +
                      ",'','0','" + oItem.HMouldID + "','" + oItem.HRepairBeginDate + "'" +
                      ",'" + oItem.HMouldID + "','" + oItem.HRepairBeginDate + "'" +
                      ",'" + oItem.HRepairEndDate + "'" +
                      ",'" + oItem.HInstanceID + "','',"+ HMouldMaintainRuleInterID + ",0,'OK'" +
                      ",'" + oItem.HInstanceID + "','',"+ HMouldMaintainRuleInterID + ",'OK'" +
                      ",'"+ oItem.HRequestComDate + "'," + oItem.HRecentMainModule + "," + oItem.HCumulativeModule + "," + oItem.HProductionModule + "" +
                      "," + oItem.HPlanInterID + "," + oItem.HPlanNo + "," + oItem.HMaintainLevID + ")";
                      "," + (oItem.HPlanInterID == "" ? "0" : oItem.HPlanInterID) + ",'" + oItem.HPlanNo + "'," + oItem.HMaintainLevID + ")";
                            LogService.Write(sql_main);
                            oCN.RunProc(sql_main);
                            int i = 1;
@@ -2562,9 +2562,9 @@
                                continue;
                            }
                            if (oItem.HInstanceID != "9b6e108c-b7bf-45e4-910d-5629ac30d4aa") {
                                continue;
                            }
                            //if (oItem.HInstanceID != "9b6e108c-b7bf-45e4-910d-5629ac30d4aa") {
                            //    continue;
                            //}
                            //设备编码
                            if (keys.Contains("textField_lfg9hgys"))
WebAPI/DLL/ClsSc_MESBeginWorkBill.cs
@@ -67,6 +67,8 @@
            try
            {
                DataSet Ds = oCn.RunProcReturn("Exec h_p_Sc_MESBeginWorkBill_AfterSaveCtrl " + HInterID.ToString() + "," + HICMOInterID.ToString() + "," + HICMOEntryID.ToString() + ",'" + HICMOBillNo + "'," + OperationType.ToString(), "h_p_Sc_MESBeginWorkBill_AfterSaveCtrl");
                LogService.Write("开工:2.6.1");
                if (Ds == null || Ds.Tables[0].Rows.Count == 0)
                {
                    sReturn = "保存后判断失败!";
@@ -74,9 +76,12 @@
                }
                else
                {
                    LogService.Write("开工:2.6.2"+ Ds.Tables[0].Rows[0]["HBack"]);
                    if (DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HBack"]) == 1)
                    {
                        LogService.Write("开工:2.6.3");
                        sReturn = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark"]);
                        LogService.Write("开工:2.6.4");
                        return false;
                    }
                }
@@ -253,6 +258,7 @@
        {
            try
            {
                LogService.Write("开工:2.2");
                DataSet ds;
                //得到mainid
                omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
@@ -263,7 +269,7 @@
                {
                    return false;
                }
                LogService.Write("开工:2.3");
                //主表
                oCn.RunProc("Insert Into Sc_MESBeginWorkBillMain " +
                "(HBillType,HBillSubType,HInterID,HBillNo,HBillStatus,HDate,HMaker,HMakeDate" +
@@ -314,7 +320,7 @@
                    oCn.RunProc(subSql);
                }
                LogService.Write("开工:2.4");
                //再次验证 ä¿å­˜æ˜¯å¦ åˆç†
                ds = oCn.RunProcReturn("exec h_p_JIT_MESBeginWorkBill_SaveCtrl @HInterId=" + omodel.HInterID + "", "h_p_JIT_MESBeginWorkBill_SaveCtrl");
                if (ds == null || ds.Tables[0].Rows.Count <= 0) 
@@ -329,6 +335,7 @@
                    oCn.RollBack();
                    return false;
                }
                LogService.Write("开工:2.5");
                //获取最近的上模单  æŠŠå·¥å•跟模具进行绑定
                ds = oCn.RunProcReturn(@"select  HICMOInterID,HICMOEntryID,HSourceInterID,HSourceEntryID,HSourceID from Sc_ICMOBillStatus_Tmp where HInterID=" + omodel.HMainSourceInterID.ToString(), "Sc_ICMOBillStatus_Tmp");
@@ -357,14 +364,14 @@
                        }
                    }
                }
                LogService.Write("开工:2.6  " + omodel.HInterID + "," + omodel.HICMOInterID + ", " + omodel.HICMOEntryID + ", " + omodel.HICMOBillNo + ", 1");
                //保存后控制
                if (!AfterSave(omodel.HInterID, omodel.HICMOInterID, omodel.HICMOEntryID, omodel.HICMOBillNo, 1, ref sReturn))
                {
                    oCn.RollBack();
                    return false;
                }
                LogService.Write("开工:2.7");
                sReturn = omodel.HInterID.ToString();
                oCn.Commit();
                return true;