แก้การเช็คความพร้อมในการออกคำสั่ง
This commit is contained in:
parent
b75c3a2c47
commit
0c1a8f29cc
1 changed files with 35 additions and 8 deletions
|
|
@ -178,16 +178,43 @@ namespace BMA.EHR.Command.Service.Controllers
|
|||
var cover = command.Documents.FirstOrDefault(x => x.Category == GlobalConstants.TYPE_COVER);
|
||||
var attatchment = command.Documents.FirstOrDefault(x => x.Category == GlobalConstants.TYPE_ATTACHMENT);
|
||||
|
||||
if (command.CommandNo != "" &&
|
||||
command.CommandYear != null &&
|
||||
command.CommandExcecuteDate != null &&
|
||||
cover != null &&
|
||||
attatchment != null)
|
||||
switch (command.CommandType.CommandCode.ToUpper())
|
||||
{
|
||||
return Success(new { result = "Y" });
|
||||
case "C-PM-10":
|
||||
case "C-PM-11":
|
||||
case "C-PM-12":
|
||||
case "C-PM-16":
|
||||
case "C-PM-18":
|
||||
case "C-PM-19":
|
||||
case "C-PM-20":
|
||||
case "C-PM-21":
|
||||
{
|
||||
if (command.CommandNo != "" &&
|
||||
command.CommandYear != null &&
|
||||
command.CommandExcecuteDate != null &&
|
||||
cover != null)
|
||||
{
|
||||
return Success(new { result = "Y" });
|
||||
}
|
||||
else
|
||||
return Success(new { result = "N" });
|
||||
}
|
||||
default:
|
||||
{
|
||||
if (command.CommandNo != "" &&
|
||||
command.CommandYear != null &&
|
||||
command.CommandExcecuteDate != null &&
|
||||
cover != null &&
|
||||
attatchment != null)
|
||||
{
|
||||
return Success(new { result = "Y" });
|
||||
}
|
||||
else
|
||||
return Success(new { result = "N" });
|
||||
}
|
||||
}
|
||||
else
|
||||
return Success(new { result = "N" });
|
||||
|
||||
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue