Commit 96045529 authored by solho's avatar solho

1.新增運營辦步驟

2.程序撤回增加清結算日
3.過時func fixed
parent 56e3218f
......@@ -142,7 +142,7 @@ namespace WebAPI.Controllers
CommandText = @" select a.ConfirmTime
,Case When a.ConfirmUserClass='PG' Then '程序' When a.ConfirmUserClass='PE' Then '承辦人' When a.ConfirmUserClass='Leader' Then '主管' else '其他' End as ConfirmUserClass
,Case When a.ConfirmMethod='CF' Then '確認' When a.ConfirmMethod='RJ' Then '退回' When a.ConfirmMethod='RV' Then '撤回'
When a.ConfirmMethod='RJTOp' Then '轉運營辦' When a.ConfirmMethod='CFTLd' Then '轉運營辦確認' else '其他' End as ConfirmMethod
When a.ConfirmMethod='RJTOp' Then '轉運營辦' When a.ConfirmMethod='CFTLd' Then '待轉運營辦' else '其他' End as ConfirmMethod
,a.Create_time,d.cn_name as Create_User_Name,b.Step_Text as ""From"",c.Step_Text as ""To"",a.Description
from esn_Todos_flow_his a
left join esn_todos_Flow_StepType b on a.FromType_id = b.id
......@@ -514,6 +514,11 @@ namespace WebAPI.Controllers
//CStepTypeCur.id = CStepTypeNext.id; //回復與下一步 同ID
//Tsql = Tsql + CStepTypeNext.Map_Class + "_IsConfirm =" + IsConfirm + ",";
CStepTypeNext = AllStepType.Where(p => p.id == StepType_id_Previous).FirstOrDefault();
if (JtSn["validclass"].ToString()=="PG")
{
RJTOp += String.Format(@"update esn_todos_points set date_points_settlement=null where sn=" + dsr["sn"] + ";");
RJTOp += String.Format(@"update esn_todos_Flow set Is_Settlement=0 where esn_todos_sn=" + dsr["sn"] + ";");
}
}
else if (Confirm_Method == "RJTOp")
{
......@@ -630,59 +635,6 @@ namespace WebAPI.Controllers
}
[Route("rpt_PerformanceMonth_Flow")]
[CorsHandle]
[HttpPost]
[HttpGet]
public HttpResponseMessage rpt_PerformanceMonth_Flow(ParamModel param)
{
if (param != null && param.Input != null && !string.IsNullOrWhiteSpace((param.Input.ToString())))
{
string input = param.Input.ToString();
try
{
using (SqlConnection Conn = new SqlConnection(connString))
{
SqlCommand cmd = new SqlCommand("", Conn)
{
CommandText = @"
Declare @p_ReportType varchar(20),@p_ReportType2 varchar(20), @p_Date_settlement_begin DateTime,@p_Date_settlement_end DateTime
DECLARE @Emp_ID VARCHAR(50),@Emp_ItemNo VARCHAR(20),@QryEmpItem VARCHAR(20)= '' ,@QryEmpDS VARCHAR(20)= '' ,@p_isComfirm varchar(1),@p_gtPoint int
,@IsPG bit=0,@PGJoin varchar(max)='',@p_flow_user_id_also VARCHAR(50);
select * into #tb_Split from ufn_split(@p_params,',')
select @p_ReportType=value from #tb_Split where id=1
select @p_isComfirm=value from #tb_Split where id=2
select @p_gtPoint=value from #tb_Split where id=3
select @p_Date_settlement_begin=value from #tb_Split where id=4
select @p_Date_settlement_end=value from #tb_Split where id=5
select @p_ReportType2=value from #tb_Split where id=6
"
};
//cmd.Parameters.AddWithValue("@SaveData", obj_input["SaveData"].ToString());
//cmd.Parameters.AddWithValue("@gUserID_wade", obj_input["gUserID_wade"].ToString());
//cmd.Parameters.AddWithValue("@Country", obj_input["Country"].ToString());
DataTable dt = SqlToDt(cmd);
response.Code = "1";
response.Msg = "匯出完畢";
}
}
catch (Exception e)
{
response.Code = "0";
response.Msg = "Exception:" + e.StackTrace;
}
}
else
{
response.Code = "0";
response.Msg = "no input or format error";
}
result.Content = new StringContent(JsonConvert.SerializeObject(response), System.Text.Encoding.UTF8, "application/json");
return result;
}
}
}
......@@ -67,12 +67,12 @@ namespace WebAPI.Controllers
{
@wherecase2 += " and Settle_Date between @Settle_Date and @Settle_Date ";
strsql += " and Settle_Date between @Settle_Date and @Settle_Date ";
cmd.Parameters.Add("@Settle_Date", obj_input["Settle_Date"].ToString());
cmd.Parameters.AddWithValue("@Settle_Date", obj_input["Settle_Date"].ToString());
}
if (obj_input["isClosed"] != null)
{
@wherecase2 += " and isClosed=@isClosed ";
cmd.Parameters.Add("@isClosed", (obj_input["isClosed"].ToString() == "1" ? true : false));
cmd.Parameters.AddWithValue("@isClosed", (obj_input["isClosed"].ToString() == "1" ? true : false));
}
if (objPermission_furtherSql["firmID"] != null && !String.IsNullOrEmpty(objPermission_furtherSql["firmID"].ToString()))
{
......@@ -139,13 +139,13 @@ namespace WebAPI.Controllers
{
strsql += " and Settle_Date between @Settle_Date_begin and @Settle_Date_end ";
DateTime Settle_Date = Convert.ToDateTime(obj_input["Settle_Date"].ToString());
cmd.Parameters.Add("@Settle_Date_begin", Settle_Date );
cmd.Parameters.Add("@Settle_Date_end", Settle_Date.AddMonths(1).AddDays(-1) );
cmd.Parameters.AddWithValue("@Settle_Date_begin", Settle_Date );
cmd.Parameters.AddWithValue("@Settle_Date_end", Settle_Date.AddMonths(1).AddDays(-1) );
}
if (obj_input["isClosed"] != null )
{
strsql += " and isClosed=@isClosed ";
cmd.Parameters.Add("@isClosed", (obj_input["isClosed"].ToString()=="1"?true:false));
cmd.Parameters.AddWithValue("@isClosed", (obj_input["isClosed"].ToString()=="1"?true:false));
}
if (objPermission_furtherSql["firmID"] != null && !String.IsNullOrEmpty(objPermission_furtherSql["firmID"].ToString()))
{
......@@ -308,9 +308,9 @@ namespace WebAPI.Controllers
}
}
cmd.Parameters.Add("@Settle_Date", Settle_Date);
cmd.Parameters.Add("@Settle_DateNext", Settle_Date.AddMonths(1));
cmd.Parameters.Add("@isClosed", (obj_input["isClosed"].ToString() == "1" ? true : false));
cmd.Parameters.AddWithValue("@Settle_Date", Settle_Date);
cmd.Parameters.AddWithValue("@Settle_DateNext", Settle_Date.AddMonths(1));
cmd.Parameters.AddWithValue("@isClosed", (obj_input["isClosed"].ToString() == "1" ? true : false));
cmd.Parameters.AddWithValue("@gUserID_wade", obj_input["gUserID_wade"].ToString());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment