dev
hanxuntao 9 months ago
commit fcef5dfacb

@ -1458,7 +1458,6 @@ namespace DSWeb.Areas.Dispatch.Controllers
var pcheadid = Request.Form["gid"].ToString().Trim();
var openid = Request.Form["openid"].ToString().Trim();
var R_GID = Request.Form["r_gid"].ToString().Trim();
var _docname = Request.Form["docname"].ToString().Trim();
var condition = $" t.GId='{pcheadid}'";
@ -1855,7 +1854,7 @@ namespace DSWeb.Areas.Dispatch.Controllers
var FeeList = cdc.ch_fee_order.Where(x => x.BSNO == GId).ToList();
if (FeeList != null && FeeList.Count > 0)
{
dataList[0].FeeList = FeeList;
dataList[0].FeeList = FeeList.OrderBy(o=>o.ENTERDATE).ToList();
}
else {
dataList[0].FeeList = new List<ch_fee_order_md>();
@ -1890,7 +1889,7 @@ namespace DSWeb.Areas.Dispatch.Controllers
var FuelList = cdc.t_Truck_FHApp_Fuel.Where(x=> x.BSNO == GId).ToList();
if (FuelList != null && FuelList.Count > 0)
{
dataList[0].FuelList = FuelList;
dataList[0].FuelList = FuelList.OrderBy(o => o.ORDERID).ToList();
}
else
{
@ -2171,6 +2170,56 @@ namespace DSWeb.Areas.Dispatch.Controllers
}
}
public class FHParam_ : FHParam
{
public string GID { get; set; }
public MsWlPcHead_FH headData { get; set; }
public DBResult DoDelFuel()
{
var result = new DBResult();
try
{
var cdc = new Common.DB.CommonDataContext();
var DelFuellist = cdc.t_Truck_FHApp_Fuel.Where(x => x.GID == GID).ToList();
var canchange = CanChange(headData.gId);
if (canchange.Success == false)
{
return canchange;
}
//var condition = $" t.GId='{headData.gId}'";
//var currDataList = MsRptPcHeadEditDAL.GetWFSDList(condition, "", "", "", "", "");
//if (currDataList != null && currDataList.Count > 0)
//{
// var currHead = currDataList[0];
// if (currHead.isEnd == "1" || currHead.TASKSTATUS != "未提交")
// {
// result.SetErrorInfo("该状态不允许执行保存");
// return result;
// }
//}
if (DelFuellist != null && DelFuellist.Count > 0)
{
cdc.t_Truck_FHApp_Fuel.RemoveRange(DelFuellist);
cdc.SaveChanges();
result.OK();
return result;
}
}
catch (Exception e)
{
result.SetErrorInfo(e.Message);
return result;
}
return result;
}
}
public class FHParam_ : FHParam_
{
@ -2327,9 +2376,7 @@ namespace DSWeb.Areas.Dispatch.Controllers
var condition = $" t.GId='{GId}'";
if (!string.IsNullOrWhiteSpace(R_GID)) {
condition += $" t.R_GID='{R_GID}'";
}
var dataList = MsRptPcHeadEditDAL.GetWFSDList(condition, "", "", "", "", "");
@ -2350,6 +2397,12 @@ namespace DSWeb.Areas.Dispatch.Controllers
var driverinfo = cdc.tMsWlDriver.FirstOrDefault(x => x.OPENID == openid);
var doccondition = $" BSNO='{GId}' and MODIFIEDUSER='{driverinfo.DrvName}'";
if (!string.IsNullOrWhiteSpace(R_GID))
{
doccondition += $" and R_GID='{R_GID}'";
}
var doclist = ReceiptDocDAL.GetDocList(doccondition);
var paramset = MsSysParamSetDAL.GetDataByName("DS7URL");
@ -2446,6 +2499,7 @@ namespace DSWeb.Areas.Dispatch.Controllers
return result;
}
}
public FHParam getParamHelper(string jsonparam) {
var _param= JsonConvert.DeserializeObject<FHParam>(jsonparam);
@ -2481,7 +2535,12 @@ namespace DSWeb.Areas.Dispatch.Controllers
return result;
}
if (_param.formname == "删除加油")
{
var result = JsonConvert.DeserializeObject<FHParam_>(jsonparam);
return result;
}
if (_param.formname == "提交审核")
{
var result = JsonConvert.DeserializeObject<FHParam_>(jsonparam);
@ -2512,7 +2571,6 @@ namespace DSWeb.Areas.Dispatch.Controllers
return _param;
}
[HttpPost]
public ActionResult FHDriverInterface()
{
@ -2568,6 +2626,13 @@ namespace DSWeb.Areas.Dispatch.Controllers
return BasicDataRefDAL.GetContentResult(_r);
}
if (param.formname == "删除加油")
{
var pr = (FHParam_)param;
var _r = pr.DoDelFuel();
return BasicDataRefDAL.GetContentResult(_r);
}
if (param.formname == "提交审核")
{
var pr = (FHParam_)param;

@ -619,6 +619,9 @@ Zi.LAN.PS_ETDDATEBGN = "从ETD";
Zi.LAN.PS_ETDDATEEND = "到ETD";
Zi.LAN.PS_AUDITDATEBGN = "从审核日期";
Zi.LAN.PS_AUDITDATEEND = "到审核日期";
Zi.LAN.PS_MONTH = "统计月份";
Zi.LAN.SaveQuery = "记忆查询条件";
//Zi.LAN.HideQuery = "隐藏查询";
//Zi.LAN.SearchBtn2 = "显示查询";

@ -618,6 +618,9 @@ Zi.LAN.PS_ETDDATEBGN = "从ETD";
Zi.LAN.PS_ETDDATEEND = "到ETD";
Zi.LAN.PS_AUDITDATEBGN = "从审核日期";
Zi.LAN.PS_AUDITDATEEND = "到审核日期";
Zi.LAN.PS_MONTH = "统计月份";
Zi.LAN.SaveQuery = "记忆查询条件";
//Zi.LAN.HideQuery = "隐藏查询";
//Zi.LAN.SearchBtn2 = "显示查询";

Loading…
Cancel
Save