فهرست منبع

修改调用网址

callm 1 هفته پیش
والد
کامیت
d96926f231

+ 1 - 1
UAS_MES_ZKLH/DataOperate/DataHelper.cs

@@ -14,7 +14,7 @@ namespace UAS_MES_NEW.DataOperate
 
         //public static readonly string ERPAddesss = "http://15033224.uttcare.com:8099/mes/";
 
-        public static readonly string ERPAddesss = "http://172.16.1.80:8099/mes/";
+        public static readonly string ERPAddesss = "https://mes.lihantech.cn/mes/";
 
         //用户选择的数据库的连接字符串
         public static string DBConnectionString;

+ 1 - 1
UAS_MES_ZKLH/FunctionCode/Make/Make_CustomLabelPrint.cs

@@ -167,7 +167,7 @@ namespace UAS_MES_NEW.Make
                                             string fp_path = label.Rows[0]["FP_PATH"].ToString().Replace("/app/uas/webapps/", "");
                                             fp_name = label.Rows[0]["fp_name"].ToString();
                                             WebClient wc = new WebClient();
-                                            wc.DownloadFile("http://172.16.1.80:8099/" + fp_path, @"C:\打印标签\" + fp_name);
+                                            wc.DownloadFile("https://mes.lihantech.cn/" + fp_path, @"C:\打印标签\" + fp_name);
                                         }
                                     }
                                 }

+ 6 - 1
UAS_MES_ZKLH/FunctionCode/Query/Query_SOP.Designer.cs

@@ -314,7 +314,7 @@ namespace UAS_MES_NEW.Query
             this.X.Size = new System.Drawing.Size(120, 35);
             this.X.TabIndex = 33;
             this.X.Value = new decimal(new int[] {
-            20,
+            4,
             0,
             0,
             0});
@@ -325,6 +325,11 @@ namespace UAS_MES_NEW.Query
             this.Y.Name = "Y";
             this.Y.Size = new System.Drawing.Size(120, 35);
             this.Y.TabIndex = 34;
+            this.Y.Value = new decimal(new int[] {
+            5,
+            0,
+            0,
+            0});
             // 
             // label8
             // 

+ 25 - 12
UAS_MES_ZKLH/FunctionCode/Query/Query_SOP.cs

@@ -72,11 +72,11 @@ namespace UAS_MES_NEW.Query
                 ps_code.Text = code;
                 if (VaildDate.Checked)
                 {
-                    dh.ExecuteSql("insert into productsop(ps_id,ps_code,ps_prodcode,ps_indate,ps_inman,ps_status,ps_statuscode,ps_vailddate)values(productsop_seq.nextval,'" + code + "','" + ps_prodcode.Text + "',sysdate,'" + usercode + "','在录入','ENTERING',to_date('" + DateCode.Value.ToString("yyyy-MM-dd") + "','yyyy-mm-dd'))", "insert");
+                    dh.ExecuteSql("insert into productsop(ps_id,ps_code,ps_prodcode,ps_indate,ps_inman,ps_status,ps_statuscode,ps_vailddate)values(productsop_seq.nextval,'" + code + "','" + ps_prodcode.Text + "',sysdate,'" + User.UserName + "','在录入','ENTERING',to_date('" + DateCode.Value.ToString("yyyy-MM-dd") + "','yyyy-mm-dd'))", "insert");
                 }
                 else
                 {
-                    dh.ExecuteSql("insert into productsop(ps_id,ps_code,ps_prodcode,ps_indate,ps_inman,ps_status,ps_statuscode)values(productsop_seq.nextval,'" + code + "','" + ps_prodcode.Text + "',sysdate,'" + usercode + "','在录入','ENTERING')", "insert");
+                    dh.ExecuteSql("insert into productsop(ps_id,ps_code,ps_prodcode,ps_indate,ps_inman,ps_status,ps_statuscode)values(productsop_seq.nextval,'" + code + "','" + ps_prodcode.Text + "',sysdate,'" + User.UserName + "','在录入','ENTERING')", "insert");
                 }
             }
             else
@@ -88,7 +88,16 @@ namespace UAS_MES_NEW.Query
             Workbook workbook = new Workbook(FilePath.Text);
             List<Worksheet> list = new List<Worksheet>();
             List<string> filename = new List<string>();
-            dh.ExecuteSql("update ProductSOP set ps_attachsop='' where ps_prodcode='" + ps_prodcode.Text + "'", "update");
+
+            if (VaildDate.Checked)
+            {
+                dh.ExecuteSql("update ProductSOP set ps_attachsop='',ps_inman='" + User.UserName + "',ps_vailddate=to_date('" + DateCode.Value.ToString("yyyy-MM-dd") + "','yyyy-mm-dd') where ps_prodcode='" + ps_prodcode.Text + "'", "update");
+            }
+            else
+            {
+                dh.ExecuteSql("update ProductSOP set ps_attachsop='',ps_inman='" + User.UserName + "' where ps_prodcode='" + ps_prodcode.Text + "'", "update");
+            }
+
             OperatResult.AppendText("一共Sheet: " + workbook.Worksheets.Count + "\n");
             for (int i = 0; i < workbook.Worksheets.Count; i++)
             {
@@ -110,14 +119,12 @@ namespace UAS_MES_NEW.Query
                             Directory.CreateDirectory(Application.StartupPath + @"\" + ps_prodcode.Text);
                         }
                         string sheetname = she.Name;
-
                         // 获取工作表中的所有图片
                         List<Picture> pictures = new List<Picture>();
                         foreach (Aspose.Cells.Drawing.Picture picture in she.Pictures)
                         {
                             pictures.Add(picture);
                         }
-
                         // 获取使用的行数
                         int totalRows = she.Cells.MaxDataRow + 1;
                         int imageIndex = 1;
@@ -135,10 +142,16 @@ namespace UAS_MES_NEW.Query
                             she.PageSetup.PrintArea = $"A{startRow + 1}:{lastColLetter}{endRow + 1}";
                             if (File.Exists(PrintPath.Text))
                             {
-                                //if (startRow == 0)
-                                //{
-                                she.Pictures.Add(startRow + int.Parse(Y.Value.ToString()), int.Parse(X.Value.ToString()), PrintPath.Text);
-                                //}
+                                if (startRow == 0)
+                                {
+                                    she.Pictures.Add(startRow + int.Parse(Y.Value.ToString()), int.Parse(X.Value.ToString()), PrintPath.Text);
+
+                                }
+                                else
+                                {
+                                    she.Pictures.Add(startRow - 4 + int.Parse(Y.Value.ToString()), int.Parse(X.Value.ToString()), PrintPath.Text);
+
+                                }
                             }
                             // 创建SheetRender对象
                             SheetRender sr = new SheetRender(she, options);
@@ -178,7 +191,7 @@ namespace UAS_MES_NEW.Query
                             dic.Add("em_code", "ADMIN");
                             dic.Add("caller", "ProductSOP");
                             OperatResult.AppendText("上传文件【" + imagePath + ".jpg" + "】\n");
-                            string fp_id = UploadFilesToRemoteUrl("http://172.16.1.80:8099/mes/MEScommon/uploadFiles.action?_noc=1", Application.StartupPath + @"\" + ps_prodcode.Text + @"\" + imagename, dic);
+                            string fp_id = UploadFilesToRemoteUrl("https://mes.lihantech.cn/mes/MEScommon/uploadFiles.action?_noc=1", Application.StartupPath + @"\" + ps_prodcode.Text + @"\" + imagename, dic);
                             string ps_id = dh.getFieldDataByCondition("ProductSOP", "ps_id", "ps_prodcode='" + ps_prodcode.Text + "'").ToString();
                             dh.ExecuteSql("insert into ProductSOPdetail(psd_id,psd_psid,psd_attach) select ProductSOPdetail_seq.nextval,ps_id,'" + imagename + ";" + fp_id + "' from ProductSOP where ps_prodcode='" + ps_prodcode.Text + "'", "insert");
                         }
@@ -337,8 +350,8 @@ namespace UAS_MES_NEW.Query
                     Dictionary<string, object> map = new Dictionary<string, object>();
                     string path;
                     string pathroot = dh.GetConfig("filePathUrl", "sys").ToString();
-                    dh.ExecuteSql("insert into soprelease(SR_ID, sr_pscode, SR_STATUS, SR_MACHINETYPE)" +
-                   "values(soprelease_seq.nextval,'" + ps_code.Text + "',0,'" + ps_prodcode.Text + "') ", "insert");
+                    dh.ExecuteSql("insert into soprelease(SR_ID, sr_pscode, SR_STATUS, SR_MACHINETYPE,sr_releaseman,sr_readman)" +
+                   "select soprelease_seq.nextval,'" + ps_code.Text + "',0,'" + ps_prodcode.Text + "','" + User.UserName + "',em_code from employee ", "insert");
                     LogicHandler.DoCommandLog("SOP", usercode, "", "", sourcecode, "广播SOP", "广播成功", ps_prodcode.Text, "");
                     MessageBox.Show("文档[" + ps_prodcode.Text + "]下放成功");
                 }

+ 2 - 2
UAS_MES_ZKLH/PublicMethod/Print.cs

@@ -285,7 +285,7 @@ namespace UAS_MES_NEW.PublicMethod
                                 string fp_path = label.Rows[0]["FP_PATH"].ToString().Replace("/app/uas/webapps/", "");
                                 fp_name = label.Rows[0]["fp_name"].ToString();
                                 WebClient wc = new WebClient();
-                                wc.DownloadFile("http://172.16.1.80:8099/" + fp_path, @"C:\打印标签\" + fp_name);
+                                wc.DownloadFile("https://mes.lihantech.cn/" + fp_path, @"C:\打印标签\" + fp_name);
                             }
                         }
                     }
@@ -314,7 +314,7 @@ namespace UAS_MES_NEW.PublicMethod
                                     string fp_path = label.Rows[0]["FP_PATH"].ToString().Replace("/app/uas/webapps/", "");
                                     fp_name = label.Rows[0]["fp_name"].ToString();
                                     WebClient wc = new WebClient();
-                                    wc.DownloadFile("http://172.16.1.80:8099/" + fp_path, @"C:\打印标签\" + fp_name);
+                                    wc.DownloadFile("https://mes.lihantech.cn/" + fp_path, @"C:\打印标签\" + fp_name);
                                     FileInfo file = new FileInfo(@"C:\打印标签\" + fp_name);
                                     file.CreationTime = Convert.ToDateTime(filelastwritetime);
                                 }