diff --git a/AMESCoreStudio.WebApi/Controllers/AMES/SerialRulesController.cs b/AMESCoreStudio.WebApi/Controllers/AMES/SerialRulesController.cs
index d0e71017..59fdd10b 100644
--- a/AMESCoreStudio.WebApi/Controllers/AMES/SerialRulesController.cs
+++ b/AMESCoreStudio.WebApi/Controllers/AMES/SerialRulesController.cs
@@ -182,7 +182,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
                 System.Globalization.GregorianCalendar gc = new System.Globalization.GregorianCalendar();
                 DateTime datetime = DateTime.Now;
                 int week = gc.GetWeekOfYear(datetime, System.Globalization.CalendarWeekRule.FirstDay, DayOfWeek.Sunday);
-                serial = serial.Replace("[WW]", week.ToString());
+                serial = serial.Replace("[WW]", week.ToString().Length == 1 ? week.ToString().PadLeft(2, '0') : week.ToString());
 
                 if (serialRule.WNum != week)
                 {
@@ -293,7 +293,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
                         System.Globalization.GregorianCalendar gc = new System.Globalization.GregorianCalendar();
                         DateTime datetime = DateTime.Now;
                         int week = gc.GetWeekOfYear(datetime, System.Globalization.CalendarWeekRule.FirstDay, DayOfWeek.Sunday);
-                        serial = serial.Replace("[WW]", week.ToString());
+                        serial = serial.Replace("[WW]", week.ToString().Length == 1 ? week.ToString().PadLeft(2, '0') : week.ToString());
 
                         if (serialRule.WNum != week)
                         {
@@ -399,7 +399,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
                     System.Globalization.GregorianCalendar gc = new System.Globalization.GregorianCalendar();
                     DateTime datetime = DateTime.Now;
                     int week = gc.GetWeekOfYear(datetime, System.Globalization.CalendarWeekRule.FirstDay, DayOfWeek.Sunday);
-                    serial = serial.Replace("[WW]", week.ToString());
+                    serial = serial.Replace("[WW]", week.ToString().Length == 1 ? week.ToString().PadLeft(2, '0') : week.ToString());
 
                     if (serialRule.WNum != week)
                     {
@@ -542,7 +542,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
                 System.Globalization.GregorianCalendar gc = new System.Globalization.GregorianCalendar();
                 DateTime datetime = DateTime.Now;
                 int week = gc.GetWeekOfYear(datetime, System.Globalization.CalendarWeekRule.FirstDay, DayOfWeek.Sunday);
-                serial = serial.Replace("[WW]", week.ToString());
+                serial = serial.Replace("[WW]", week.ToString().Length == 1 ? week.ToString().PadLeft(2, '0') : week.ToString());
 
                 if (serialRule.WNum != week)
                 {
@@ -624,7 +624,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
                 System.Globalization.GregorianCalendar gc = new System.Globalization.GregorianCalendar();
                 DateTime datetime = DateTime.Now;
                 int week = gc.GetWeekOfYear(datetime, System.Globalization.CalendarWeekRule.FirstDay, DayOfWeek.Sunday);
-                serial = serial.Replace("[WW]", week.ToString());
+                serial = serial.Replace("[WW]", week.ToString().Length == 1 ? week.ToString().PadLeft(2, '0') : week.ToString());
 
                 if (serialRule.WNum != week)
                 {
diff --git a/AMESCoreStudio.WebApi/Controllers/AMES/WipInfosController.cs b/AMESCoreStudio.WebApi/Controllers/AMES/WipInfosController.cs
index b03fc921..c35d7fc8 100644
--- a/AMESCoreStudio.WebApi/Controllers/AMES/WipInfosController.cs
+++ b/AMESCoreStudio.WebApi/Controllers/AMES/WipInfosController.cs
@@ -66,7 +66,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
         /// <returns></returns>
         [Route("[action]")]
         [HttpGet]
-        public async Task<ResultModel<dynamic>> GetWipInfo4QRS009(string unitNo,string factoryNo)
+        public async Task<ResultModel<dynamic>> GetWipInfo4QRS009(string unitNo, string factoryNo)
         {
             ResultModel<dynamic> result = new ResultModel<dynamic>();
             var q = from q1 in _context.WipInfos
@@ -349,7 +349,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
             {
                 result.Msg = "NG:" + e1.Message;
                 result.Success = false;
-                
+
             }
 
             return result;
@@ -441,11 +441,11 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
                                 {
                                     await esun_conn.OpenAsync();
                                 }
-                                
+
                                 for (int j = 0; j < table.Rows.Count; j++)
                                 {
                                     string barcode_no = table.Rows[j]["BarcodeNo"].ToString();
-                                    
+
                                     string mac_sql = string.Format(@"select distinct a.工單編號 as mo_id,e.客戶工單編號 as customer_moid,a.工單序號 as product_sn,                        
                                case substring(f.avalue_kp_typeid, 1, 3) when 'MAC' then isnull(z.item_prefix,'')+b.SUB_ITEM_SN else b.SUB_ITEM_SN end as part_barcode,
                                f.avalue_kp_typeid as class,c.material_id,d.r_stn as routeid,'' as workerid,rtrim(g.sn_date) + ' ' + rtrim(g.sn_time) as create_date
@@ -692,7 +692,7 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
                         lineDesc = q3.LineDesc,
                         unitName = q4.UnitName,
                         wipType = q1.WipType,
-                        factoryNo=q1.WerksNO
+                        factoryNo = q1.WerksNO
                     };
 
 
@@ -1032,6 +1032,35 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
             return result;
         }
 
+        /// <summary>
+        /// 更新工單第一站完成數量
+        /// </summary>
+        /// <returns></returns>
+        [HttpPut("UpdateCompleteQty/ById/{id}")]
+        public async Task<ResultModel<WipInfo>> PutWipinfoByCompleteQTY(int id)
+        {
+            ResultModel<WipInfo> result = new ResultModel<WipInfo>();
+            result.Success = true;
+            var wipInfo = await _context.WipInfos.FindAsync(id);
+
+            if (wipInfo != null)
+            {
+                wipInfo.CompleteQTY += 1;
+                try
+                {
+                    await _context.SaveChangesAsync();
+                    result.Success = true;
+                    result.Msg = "OK";
+                }
+                catch (Exception ex)
+                {
+                    result.Success = false;
+                    result.Msg = ex.InnerException.Message;
+                }
+            }
+            return result;
+        }
+
         /// <summary>
         /// 删除工單相關資料
         /// </summary>
diff --git a/AMESCoreStudio.WebApi/Controllers/BLL/BarCodeCheckController.cs b/AMESCoreStudio.WebApi/Controllers/BLL/BarCodeCheckController.cs
index 4d8cdf96..512f5b09 100644
--- a/AMESCoreStudio.WebApi/Controllers/BLL/BarCodeCheckController.cs
+++ b/AMESCoreStudio.WebApi/Controllers/BLL/BarCodeCheckController.cs
@@ -649,13 +649,10 @@ namespace AMESCoreStudio.WebApi.Controllers.AMES
                         if (CheckNowFirstStation(barCodeCheckDto.wipNo, barCodeCheckDto.unitNo, barCodeCheckDto.stationID) == "Y")
                         {
                             WipInfosController wipInfosController = new WipInfosController(_context);
-                            var wipinfo = _context.WipInfos.FindAsync(barCodeCheckDto.wipID).Result;
-                            wipinfo.CompleteQTY += 1;
-                            var result_wipInfos = await wipInfosController.PutWipinfo(wipinfo);
+                            var result_wipInfos = await wipInfosController.PutWipinfoByCompleteQTY(barCodeCheckDto.wipID);
                             if (!result_wipInfos.Success)
                             {
                                 Msg += "wipInfos_Error:" + result_wipInfos.Msg + "<br/>";
-
                             }
                         }