Browse Source

1.修改直通率,汇总,明细的时间条件一律改为wip_info的wip_schedule_date

2.修改料号流程维护,修改更新用户编号==登入人员编号
PTD
Marvin 2 years ago
parent
commit
e1ace479a0
  1. 13
      AMESCoreStudio.Web/Controllers/BASController.cs
  2. 2
      AMESCoreStudio.Web/Views/BAS/BAS012U.cshtml
  3. 4
      AMESCoreStudio.WebApi/Controllers/AMES/WipInfosController.cs
  4. 16
      AMESCoreStudio.WebApi/Controllers/AMES/WipStationController.cs

13
AMESCoreStudio.Web/Controllers/BASController.cs

@ -2030,16 +2030,29 @@ namespace AMESCoreStudio.Web.Controllers
[HttpPost] [HttpPost]
public async Task<IActionResult> BAS012SaveAsync(MaterialFlow model) public async Task<IActionResult> BAS012SaveAsync(MaterialFlow model)
{ {
var userID = "";
HttpContext.Request.Cookies.TryGetValue("UserID", out userID);
int user_id = 0;
if (userID != null)
{
if (int.Parse(userID.ToString()) >= 0)
{
user_id = int.Parse(userID.ToString());
}
}
if (ModelState.IsValid) if (ModelState.IsValid)
{ {
IResultModel result; IResultModel result;
if (model.MFID == 0) if (model.MFID == 0)
{ {
model.CreateUserID = user_id;
result = await _basApi.PostMaterialFlows(JsonConvert.SerializeObject(model)); result = await _basApi.PostMaterialFlows(JsonConvert.SerializeObject(model));
} }
else else
{ {
model.UpdateUserID = user_id;
result = await _basApi.PutMaterialFlows(model.MFID, JsonConvert.SerializeObject(model)); result = await _basApi.PutMaterialFlows(model.MFID, JsonConvert.SerializeObject(model));
} }

2
AMESCoreStudio.Web/Views/BAS/BAS012U.cshtml

@ -18,7 +18,7 @@
<input type="hidden" asp-for="MFID" /> <input type="hidden" asp-for="MFID" />
<input type="hidden" asp-for="CreateUserID" /> <input type="hidden" asp-for="CreateUserID" />
<input type="hidden" asp-for="CreateDate" /> <input type="hidden" asp-for="CreateDate" />
<input type="hidden" asp-for="UpdateUserID" value="0" /> <input type="hidden" asp-for="UpdateUserID" />
<input type="hidden" asp-for="UpdateDate" value="@System.DateTime.Now" /> <input type="hidden" asp-for="UpdateDate" value="@System.DateTime.Now" />
<input type="hidden" id="ItemID" asp-for="ItemID" /> <input type="hidden" id="ItemID" asp-for="ItemID" />
<input type="hidden" asp-for="MaterialFlowStatus" /> <input type="hidden" asp-for="MaterialFlowStatus" />

4
AMESCoreStudio.WebApi/Controllers/AMES/WipInfosController.cs

@ -1532,7 +1532,7 @@ FROM [SFIS].[dbo].[ZPDKeyPart] B WHERE B.[IsActive] = 1 AND B.[ProductSN] = (S
q1.LineID, q1.LineID,
q1.FlowRuleID, q1.FlowRuleID,
q1.StatusNO, q1.StatusNO,
q1.CreateDate, q1.WipScheduleDate,
q2.ItemNO, q2.ItemNO,
q2.ModelNO, q2.ModelNO,
q3.LineDesc, q3.LineDesc,
@ -1563,7 +1563,7 @@ FROM [SFIS].[dbo].[ZPDKeyPart] B WHERE B.[IsActive] = 1 AND B.[ProductSN] = (S
} }
if (dateStart != null && dateStart != "" && dateEnd != null && dateEnd != "") if (dateStart != null && dateStart != "" && dateEnd != null && dateEnd != "")
{ {
q = q.Where(w => w.CreateDate >= DateTime.Parse(dateStart) && w.CreateDate <= DateTime.Parse(dateEnd).AddDays(1)); q = q.Where(w => w.WipScheduleDate >= DateTime.Parse(dateStart) && w.WipScheduleDate <= DateTime.Parse(dateEnd).AddDays(1));
} }
//紀錄筆數 //紀錄筆數

16
AMESCoreStudio.WebApi/Controllers/AMES/WipStationController.cs

@ -219,7 +219,7 @@ FROM JHAMES.WIP_STATION";
q1.StationID, q1.StationID,
q1.RuleStatus, q1.RuleStatus,
q1.FirstCnt, q1.FirstCnt,
q1.CreateDate q2.WipScheduleDate
}; };
if (itemNo != null) if (itemNo != null)
@ -245,7 +245,7 @@ FROM JHAMES.WIP_STATION";
{ {
if (dateStart != "" && dateEnd != "") if (dateStart != "" && dateEnd != "")
{ {
q = q.Where(w => w.CreateDate >= DateTime.Parse(dateStart) && w.CreateDate <= DateTime.Parse(dateEnd)); q = q.Where(w => w.WipScheduleDate >= DateTime.Parse(dateStart) && w.WipScheduleDate <= DateTime.Parse(dateEnd));
} }
} }
@ -295,7 +295,7 @@ FROM JHAMES.WIP_STATION";
q4.StationName, q4.StationName,
q1.RuleStatus, q1.RuleStatus,
q1.FirstCnt, q1.FirstCnt,
q1.CreateDate q2.WipScheduleDate
}; };
q = q.Where(w => w.CustomerMedical == "N" && w.UnitNO == "S"); q = q.Where(w => w.CustomerMedical == "N" && w.UnitNO == "S");
@ -324,7 +324,7 @@ FROM JHAMES.WIP_STATION";
{ {
if (dateStart != "" && dateEnd != "") if (dateStart != "" && dateEnd != "")
{ {
q = q.Where(w => w.CreateDate >= DateTime.Parse(dateStart) && w.CreateDate <= DateTime.Parse(dateEnd)); q = q.Where(w => w.WipScheduleDate >= DateTime.Parse(dateStart) && w.WipScheduleDate <= DateTime.Parse(dateEnd));
} }
} }
@ -375,7 +375,7 @@ FROM JHAMES.WIP_STATION";
q4.StationName, q4.StationName,
q1.RuleStatus, q1.RuleStatus,
q1.FirstCnt, q1.FirstCnt,
q1.CreateDate q2.WipScheduleDate
}; };
q = q.Where(w => w.CustomerMedical == "N" && w.UnitNO == "B"); q = q.Where(w => w.CustomerMedical == "N" && w.UnitNO == "B");
@ -404,7 +404,7 @@ FROM JHAMES.WIP_STATION";
{ {
if (dateStart != "" && dateEnd != "") if (dateStart != "" && dateEnd != "")
{ {
q = q.Where(w => w.CreateDate >= DateTime.Parse(dateStart) && w.CreateDate <= DateTime.Parse(dateEnd)); q = q.Where(w => w.WipScheduleDate >= DateTime.Parse(dateStart) && w.WipScheduleDate <= DateTime.Parse(dateEnd));
} }
} }
@ -455,7 +455,7 @@ FROM JHAMES.WIP_STATION";
q4.StationName, q4.StationName,
q1.RuleStatus, q1.RuleStatus,
q1.FirstCnt, q1.FirstCnt,
q1.CreateDate q2.WipScheduleDate
}; };
q = q.Where(w => w.CustomerMedical == "Y"); q = q.Where(w => w.CustomerMedical == "Y");
@ -484,7 +484,7 @@ FROM JHAMES.WIP_STATION";
{ {
if (dateStart != "" && dateEnd != "") if (dateStart != "" && dateEnd != "")
{ {
q = q.Where(w => w.CreateDate >= DateTime.Parse(dateStart) && w.CreateDate <= DateTime.Parse(dateEnd)); q = q.Where(w => w.WipScheduleDate >= DateTime.Parse(dateStart) && w.WipScheduleDate <= DateTime.Parse(dateEnd));
} }
} }

Loading…
Cancel
Save