dev
dengyu 4 weeks ago
parent 5cf06d0fb2
commit 320fe626f0

@ -1017,7 +1017,16 @@ namespace DSWeb.Areas.Account.Controllers
public ContentResult SelLock(string data,int type, string AccDate = "", string isAccDate = "0")
{
var accdatesqlstr = "";
if (isAccDate == "1") accdatesqlstr = ",ACCDATE='" + AccDate + "'";
var DateAccdatesqlstr = "";
//if (isAccDate == "1")
// accdatesqlstr = ",ACCDATE='" + AccDate + "'";
if (isAccDate == "1")
{
accdatesqlstr = ",ACCDATE='" + AccDate + "'";
DateAccdatesqlstr = ",ACCDATE='" + AccDate + "-01'";
}
var FEELOCKUPDATEEXCHANGE = MsSysParamSetDAL.GetData("PARAMNAME='FEELOCKUPDATEEXCHANGE'");
var billData = JsonConvert.Deserialize<List<BSNOLB>>(data);
var json = JsonConvert.Serialize(new { Success = true, Message = "锁定成功" });
@ -1036,7 +1045,7 @@ namespace DSWeb.Areas.Account.Controllers
{
if (type == 2)
{
//type=2 业务锁定
//2017年4月10日16:50:29 需求编号:SR2017041000009
//Start
if (enumValue.OPLB.Equals("tMsWlPcHead"))
@ -1050,7 +1059,7 @@ namespace DSWeb.Areas.Account.Controllers
else if (enumValue.OPLB == "OP_WMS_FEEDUI")
{
var cmdUpdate = db.GetSqlStringCommand(
@"UPDATE OP_WMS_FEEDUI_STORAGE SET BillLock=1 WHERE Convert(varchar(50),WMSDUIID) in(select MASTERNO from v_op_bs where BSNO=@BSNO) ");
@"UPDATE OP_WMS_FEEDUI_STORAGE SET BillLock=1 " + DateAccdatesqlstr + " WHERE Convert(varchar(50),WMSDUIID) in(select MASTERNO from v_op_bs where BSNO=@BSNO) ");
cmdUpdate.Parameters.Clear();
db.AddInParameter(cmdUpdate, "@BSNO", DbType.String, enumValue.BSNO);
db.ExecuteNonQuery(cmdUpdate, tran);
@ -1059,7 +1068,7 @@ namespace DSWeb.Areas.Account.Controllers
else if (enumValue.OPLB == "OP_WMS_MOVE")
{
var cmdUpdate = db.GetSqlStringCommand(
@"UPDATE OP_WMS_MOVE SET BillLock=1 WHERE Convert(varchar(50),WMSDOID)=@BSNO ");
@"UPDATE OP_WMS_MOVE SET BillLock=1 " + accdatesqlstr + " WHERE Convert(varchar(50),WMSDOID)=@BSNO ");
cmdUpdate.Parameters.Clear();
db.AddInParameter(cmdUpdate, "@BSNO", DbType.String, enumValue.BSNO);
db.ExecuteNonQuery(cmdUpdate, tran);
@ -1068,7 +1077,7 @@ namespace DSWeb.Areas.Account.Controllers
else if (enumValue.OPLB == "OP_WMS_TRANSFERGOODS")
{
var cmdUpdate = db.GetSqlStringCommand(
@"UPDATE OP_WMS_TRANSFERGOODS SET BillLock=1 WHERE Convert(varchar(50),WMSTRANSFERGOODSID)=@BSNO ");
@"UPDATE OP_WMS_TRANSFERGOODS SET BillLock=1 " + accdatesqlstr + " WHERE Convert(varchar(50),WMSTRANSFERGOODSID)=@BSNO ");
cmdUpdate.Parameters.Clear();
db.AddInParameter(cmdUpdate, "@BSNO", DbType.String, enumValue.BSNO);
db.ExecuteNonQuery(cmdUpdate, tran);
@ -1077,7 +1086,7 @@ namespace DSWeb.Areas.Account.Controllers
else if (enumValue.OPLB == "OP_WMS_IN_DO")
{
var cmdUpdate = db.GetSqlStringCommand(
@"UPDATE OP_WMS_IN_DO SET BillLock=1 WHERE Convert(varchar(50),WMSDOID)=@BSNO ");
@"UPDATE OP_WMS_IN_DO SET BillLock=1 " + accdatesqlstr + " WHERE Convert(varchar(50),WMSDOID)=@BSNO ");
cmdUpdate.Parameters.Clear();
db.AddInParameter(cmdUpdate, "@BSNO", DbType.String, enumValue.BSNO);
db.ExecuteNonQuery(cmdUpdate, tran);
@ -1086,7 +1095,7 @@ namespace DSWeb.Areas.Account.Controllers
else if (enumValue.OPLB == "OP_WMS_OUT_DO")
{
var cmdUpdate = db.GetSqlStringCommand(
@"UPDATE OP_WMS_OUT_DO SET BillLock=1 WHERE Convert(varchar(50),WMSDOID)=@BSNO ");
@"UPDATE OP_WMS_OUT_DO SET BillLock=1 " + accdatesqlstr + " WHERE Convert(varchar(50),WMSDOID)=@BSNO ");
cmdUpdate.Parameters.Clear();
db.AddInParameter(cmdUpdate, "@BSNO", DbType.String, enumValue.BSNO);
db.ExecuteNonQuery(cmdUpdate, tran);
@ -1095,7 +1104,7 @@ namespace DSWeb.Areas.Account.Controllers
else if (enumValue.OPLB == "VW_OP_WMS_OUT_PLAN")
{
var cmdUpdate = db.GetSqlStringCommand(
@"UPDATE OP_WMS_OUT_PLAN SET BillLock=1 WHERE Convert(varchar(50),WMSPLANID)=@BSNO ");
@"UPDATE OP_WMS_OUT_PLAN SET BillLock=1 " + accdatesqlstr + " WHERE Convert(varchar(50),WMSPLANID)=@BSNO ");
cmdUpdate.Parameters.Clear();
db.AddInParameter(cmdUpdate, "@BSNO", DbType.String, enumValue.BSNO);
db.ExecuteNonQuery(cmdUpdate, tran);
@ -1104,7 +1113,7 @@ namespace DSWeb.Areas.Account.Controllers
else if (enumValue.OPLB == "OP_WMS_IN_PLAN")
{
var cmdUpdate = db.GetSqlStringCommand(
@"UPDATE OP_WMS_IN_PLAN SET BillLock=1 WHERE Convert(varchar(50),WMSPLANID)=@BSNO ");
@"UPDATE OP_WMS_IN_PLAN SET BillLock=1 " + accdatesqlstr + " WHERE Convert(varchar(50),WMSPLANID)=@BSNO ");
cmdUpdate.Parameters.Clear();
db.AddInParameter(cmdUpdate, "@BSNO", DbType.String, enumValue.BSNO);
db.ExecuteNonQuery(cmdUpdate, tran);
@ -1161,7 +1170,7 @@ namespace DSWeb.Areas.Account.Controllers
else if (enumValue.OPLB == "WMS_OUT")
{
var cmdUpdate = db.GetSqlStringCommand(
@"UPDATE " + enumValue.OPLB + " SET FEESTATUS=1 WHERE GID=@BSNO ");
@"UPDATE " + enumValue.OPLB + " SET FEESTATUS=1 WHERE GID=@BSNO ");
cmdUpdate.Parameters.Clear();
db.AddInParameter(cmdUpdate, "@BSNO", DbType.String, enumValue.BSNO);
db.ExecuteNonQuery(cmdUpdate, tran);
@ -1170,7 +1179,7 @@ namespace DSWeb.Areas.Account.Controllers
else if (enumValue.OPLB == "OP_WMS_FEEDUI")
{
var cmdUpdate = db.GetSqlStringCommand(
@"UPDATE OP_WMS_FEEDUI_STORAGE SET BillLock=1 WHERE Convert(varchar(50),WMSDUIID) in(select MASTERNO from v_op_bs where BSNO=@BSNO) ");
@"UPDATE OP_WMS_FEEDUI_STORAGE SET BillLock=1 " + DateAccdatesqlstr + " WHERE Convert(varchar(50),WMSDUIID) in(select MASTERNO from v_op_bs where BSNO=@BSNO) ");
cmdUpdate.Parameters.Clear();
db.AddInParameter(cmdUpdate, "@BSNO", DbType.String, enumValue.BSNO);
db.ExecuteNonQuery(cmdUpdate, tran);
@ -1179,7 +1188,7 @@ namespace DSWeb.Areas.Account.Controllers
else if (enumValue.OPLB == "OP_WMS_MOVE")
{
var cmdUpdate = db.GetSqlStringCommand(
@"UPDATE OP_WMS_MOVE SET BillLock=1 WHERE Convert(varchar(50),WMSDOID)=@BSNO ");
@"UPDATE OP_WMS_MOVE SET BillLock=1 " + accdatesqlstr + " WHERE Convert(varchar(50),WMSDOID)=@BSNO ");
cmdUpdate.Parameters.Clear();
db.AddInParameter(cmdUpdate, "@BSNO", DbType.String, enumValue.BSNO);
db.ExecuteNonQuery(cmdUpdate, tran);
@ -1188,7 +1197,7 @@ namespace DSWeb.Areas.Account.Controllers
else if (enumValue.OPLB == "OP_WMS_TRANSFERGOODS")
{
var cmdUpdate = db.GetSqlStringCommand(
@"UPDATE OP_WMS_TRANSFERGOODS SET BillLock=1 WHERE Convert(varchar(50),WMSTRANSFERGOODSID)=@BSNO ");
@"UPDATE OP_WMS_TRANSFERGOODS SET BillLock=1 " + accdatesqlstr + " WHERE Convert(varchar(50),WMSTRANSFERGOODSID)=@BSNO ");
cmdUpdate.Parameters.Clear();
db.AddInParameter(cmdUpdate, "@BSNO", DbType.String, enumValue.BSNO);
db.ExecuteNonQuery(cmdUpdate, tran);
@ -1197,7 +1206,7 @@ namespace DSWeb.Areas.Account.Controllers
else if (enumValue.OPLB == "OP_WMS_IN_DO")
{
var cmdUpdate = db.GetSqlStringCommand(
@"UPDATE OP_WMS_IN_DO SET BillLock=1 WHERE Convert(varchar(50),WMSDOID)=@BSNO ");
@"UPDATE OP_WMS_IN_DO SET BillLock=1 " + accdatesqlstr + " WHERE Convert(varchar(50),WMSDOID)=@BSNO ");
cmdUpdate.Parameters.Clear();
db.AddInParameter(cmdUpdate, "@BSNO", DbType.String, enumValue.BSNO);
db.ExecuteNonQuery(cmdUpdate, tran);
@ -1206,7 +1215,7 @@ namespace DSWeb.Areas.Account.Controllers
else if (enumValue.OPLB == "OP_WMS_OUT_DO")
{
var cmdUpdate = db.GetSqlStringCommand(
@"UPDATE OP_WMS_OUT_DO SET BillLock=1 WHERE Convert(varchar(50),WMSDOID)=@BSNO ");
@"UPDATE OP_WMS_OUT_DO SET BillLock=1 " + accdatesqlstr + " WHERE Convert(varchar(50),WMSDOID)=@BSNO ");
cmdUpdate.Parameters.Clear();
db.AddInParameter(cmdUpdate, "@BSNO", DbType.String, enumValue.BSNO);
db.ExecuteNonQuery(cmdUpdate, tran);
@ -1215,7 +1224,7 @@ namespace DSWeb.Areas.Account.Controllers
else if (enumValue.OPLB == "VW_OP_WMS_OUT_PLAN")
{
var cmdUpdate = db.GetSqlStringCommand(
@"UPDATE OP_WMS_OUT_PLAN SET BillLock=1 WHERE Convert(varchar(50),WMSPLANID)=@BSNO ");
@"UPDATE OP_WMS_OUT_PLAN SET BillLock=1 " + accdatesqlstr + " WHERE Convert(varchar(50),WMSPLANID)=@BSNO ");
cmdUpdate.Parameters.Clear();
db.AddInParameter(cmdUpdate, "@BSNO", DbType.String, enumValue.BSNO);
db.ExecuteNonQuery(cmdUpdate, tran);
@ -1224,7 +1233,7 @@ namespace DSWeb.Areas.Account.Controllers
else if (enumValue.OPLB == "OP_WMS_IN_PLAN")
{
var cmdUpdate = db.GetSqlStringCommand(
@"UPDATE OP_WMS_IN_PLAN SET BillLock=1 WHERE Convert(varchar(50),WMSPLANID)=@BSNO ");
@"UPDATE OP_WMS_IN_PLAN SET BillLock=1 " + accdatesqlstr + " WHERE Convert(varchar(50),WMSPLANID)=@BSNO ");
cmdUpdate.Parameters.Clear();
db.AddInParameter(cmdUpdate, "@BSNO", DbType.String, enumValue.BSNO);
db.ExecuteNonQuery(cmdUpdate, tran);
@ -1232,14 +1241,14 @@ namespace DSWeb.Areas.Account.Controllers
}
else {
var cmdUpdate = db.GetSqlStringCommand(
@"UPDATE " + enumValue.OPLB + " SET FEESTATUS=1 WHERE BSNO=@BSNO ");
@"UPDATE " + enumValue.OPLB + " SET FEESTATUS=1 " + accdatesqlstr + " WHERE BSNO=@BSNO ");
cmdUpdate.Parameters.Clear();
db.AddInParameter(cmdUpdate, "@BSNO", DbType.String, enumValue.BSNO);
db.ExecuteNonQuery(cmdUpdate, tran);
}
var cmdUpdateamend = db.GetSqlStringCommand(
@"UPDATE OP_AMEND SET FEESTATUS=1 WHERE BSNO=@BSNO ");
@"UPDATE OP_AMEND SET FEESTATUS=1 " + accdatesqlstr + " WHERE BSNO=@BSNO ");
cmdUpdateamend.Parameters.Clear();
db.AddInParameter(cmdUpdateamend, "@BSNO", DbType.String, enumValue.BSNO);
db.ExecuteNonQuery(cmdUpdateamend, tran);

@ -48,6 +48,7 @@ using DSWeb.Areas.Dispatch.Models;
using DSWeb.MvcShipping.Models.MsChFee;
using static DSWeb.Areas.CommMng.DAL.PublicAPIDAL.OAHelper;
using Microsoft.AspNet.SignalR.Hosting;
using DSWeb.MvcShipping.Helper.Repository;
//using System.Web.Http;
namespace DSWeb.Areas.Dispatch.Controllers
@ -224,6 +225,12 @@ namespace DSWeb.Areas.Dispatch.Controllers
[HttpPost]
public ActionResult GetEnumList(EnumQueryInfo QueryInfo)
{
Stream postData = Request.InputStream;
StreamReader sRead = new StreamReader(postData);
string postContent = sRead.ReadToEnd();
sRead.Close();
var cdc = new Common.DB.CommonDataContext();
#region 正式逻辑
var openidok = BasicDataRefDAL.GetWxappUserInfo(QueryInfo.AuthCode);
@ -248,7 +255,18 @@ namespace DSWeb.Areas.Dispatch.Controllers
if (QueryInfo.formname == "CUSTOMERNAME") {
var _condition = $"CODENAME like '%{QueryInfo.condition}%' or SHORTNAME like '%{QueryInfo.condition}%'";
var _condition = " 1=1 ";
if (!string.IsNullOrWhiteSpace(QueryInfo.condition)) {
_condition += $" and CODENAME like '%{QueryInfo.condition}%' or SHORTNAME like '%{QueryInfo.condition}%'";
}
var searchParams = JsonConvert.DeserializeObject<List<SearchParam>>(postContent);
var _condition2= SearchParam.getcondition(searchParams);
_condition += " and " + _condition2;
var customerList = BasicDataRefDAL.GetCustomRefList(_condition,"0", userinfo.USERID,"0","");
@ -474,17 +492,7 @@ namespace DSWeb.Areas.Dispatch.Controllers
try
{
var bsno= QueryInfo.bsno;
var List = DSWeb.MvcShipping.DAL.MsChFeeDAL.MsChFeeDAL.GetDataList($" bsno='{bsno}' ", 1, "", userinfo.USERID, userinfo.SHOWNAME, userinfo.COMPANYID);
var List = DSWeb.MvcShipping.DAL.MsChFeeDAL.MsChFeeDAL.GetDataList($" bsno='{bsno}' ", 2, "", userinfo.USERID, userinfo.SHOWNAME, userinfo.COMPANYID);
var evList = new List<DSWeb.MvcShipping.Models.MsChFee.MsChFee>();
if (List != null && List.Count > 0) {
evList.AddRange(List);
}
if (List != null && List.Count > 0)
{
evList.AddRange(List);
}
var evList = DSWeb.MvcShipping.DAL.MsChFeeDAL.MsChFeeDAL.GetDataList($" bsno='{bsno}' ", 1, "", userinfo.USERID, userinfo.SHOWNAME, userinfo.COMPANYID);
_result = Json(new
{
@ -3244,7 +3252,6 @@ namespace DSWeb.Areas.Dispatch.Controllers
#endregion
#region 销售订舱审核 环亚捷运
/// <summary>
@ -3379,9 +3386,9 @@ namespace DSWeb.Areas.Dispatch.Controllers
var condition = SearchParam.getcondition(searchParams);
var datalist = MsSeaeOrderDAL.GetAuditDataList( condition, userinfo.USERID, userinfo.CODENAME, userinfo.COMPANYID, QueryInfo.start, QueryInfo.limit);
var datalist = MsSeaeOrderDAL.GetAuditDataList( condition, userinfo.USERID, userinfo.SHOWNAME, userinfo.COMPANYID, QueryInfo.start, QueryInfo.limit);
var totalcount = MsSeaeOrderDAL.getAuditCount(condition, userinfo.USERID, userinfo.CODENAME, userinfo.COMPANYID);
var totalcount = MsSeaeOrderDAL.getAuditCount(condition, userinfo.USERID, userinfo.SHOWNAME, userinfo.COMPANYID);
return Json(new { ErrorCode = 0, start = QueryInfo.start, limit = QueryInfo.limit, totalcount = totalcount, Data = datalist });
}
@ -3433,6 +3440,50 @@ namespace DSWeb.Areas.Dispatch.Controllers
}
}
/// <summary>
/// 销售订舱审核页 查询数量
/// </summary>
/// <param name="logininfo"></param>
/// <returns></returns>
[System.Web.Http.HttpPost]
public ActionResult GetAuditOrderCount(EnumQueryInfo QueryInfo)
{
try
{
Stream postData = Request.InputStream;
StreamReader sRead = new StreamReader(postData);
string postContent = sRead.ReadToEnd();
sRead.Close();
var searchParams = JsonConvert.DeserializeObject<List<SearchParam>>(postContent);
var cdc = new Common.DB.CommonDataContext();
#region 正式逻辑
var openidok = BasicDataRefDAL.GetWxappUserInfo(QueryInfo.AuthCode);
if (!openidok.Success)
{
return Json(new { ErrorCode = 500, Message = $"发生错误:{openidok.Message}" }, JsonRequestBehavior.AllowGet);
}
var userinfo = (VW_user_md)openidok.Data;
#endregion
var condition = SearchParam.getcondition(searchParams);
var data = MsSeaeOrderDAL.getAuditCount(condition, userinfo.USERID, userinfo.SHOWNAME, userinfo.COMPANYID);
return Json(new { ErrorCode = 0, start = QueryInfo.start, limit = QueryInfo.limit, totalcount = data, Data = data });
}
catch (Exception e)
{
return Json(new { ErrorCode = 500, Message = "发生错误:" + e.Message });
}
}
/// <summary>
/// 获取ctn列表
/// </summary>
@ -3774,6 +3825,7 @@ namespace DSWeb.Areas.Dispatch.Controllers
if (result.Success)
{
//删除 ch_fee_order
return Json(new { ErrorCode = 0, Message = result.Message, Data = result.Data });
}
else
@ -3835,6 +3887,8 @@ namespace DSWeb.Areas.Dispatch.Controllers
if (result.Success)
{
//生成ch_fee_order
return Json(new { ErrorCode = 0, Message = result.Message, Data = result.Data });
}
else
@ -3896,6 +3950,7 @@ namespace DSWeb.Areas.Dispatch.Controllers
if (result.Success)
{
//删除ch_fee_order
return Json(new { ErrorCode = 0, Message = result.Message, Data = result.Data });
}
else
@ -3911,7 +3966,7 @@ namespace DSWeb.Areas.Dispatch.Controllers
}
/// <summary>
/// 驳回提交
/// 确认订舱
/// </summary>
/// <param name="QueryInfo"></param>
/// <returns></returns>
@ -3973,7 +4028,216 @@ namespace DSWeb.Areas.Dispatch.Controllers
}
}
/// <summary>
/// 获取费用列表
/// </summary>
/// <param name="CUSTOMERNAME"></param>
/// <returns></returns>
[HttpPost]
public ActionResult GetOrderFeeList(EnumQueryInfo QueryInfo)
{
var cdc = new Common.DB.CommonDataContext();
#region 正式逻辑
var openidok = BasicDataRefDAL.GetWxappUserInfo(QueryInfo.AuthCode);
if (!openidok.Success)
{
return Json(new { ErrorCode = 500, Message = $"发生错误:{openidok.Message}" }, JsonRequestBehavior.AllowGet);
}
var userinfo = (VW_user_md)openidok.Data;
#endregion
#region 测试逻辑
//var userinfo = cdc.VW_user .Where(x => x.CODENAME.ToUpper() == "ADMIN").FirstOrDefault();
#endregion
var _result = Json(new { });
try
{
var bsno = QueryInfo.bsno;
var evList = DSWeb.MvcShipping.DAL.MsChFeeDAL.MsChFeeDAL.GetOrderDataList($" bsno='{bsno}' ");
_result = Json(new
{
ErrorCode = 0,
Message = "获取成功",
BaseInfo = evList
});
return _result;
}
catch (Exception e)
{
BasicDataRefDAL.SaveLog(JsonConvert.SerializeObject(e), e.Message, "wxapp", "查询错误");
_result = Json(new
{
ErrorCode = 500,
Message = e.Message,
Data = e
});
}
return Json(new { ErrorCode = 500, Message = "发生错误" }, JsonRequestBehavior.AllowGet);
}
/// <summary>
/// 保存费用列表
/// </summary>
/// <param name="CUSTOMERNAME"></param>
/// <returns></returns>
[HttpPost]
public ActionResult SaveOrderFeeList(EnumQueryInfo QueryInfo)
{
try
{
Stream postData = Request.InputStream;
StreamReader sRead = new StreamReader(postData);
string postContent = sRead.ReadToEnd();
sRead.Close();
var cdc = new Common.DB.CommonDataContext();
#region 正式逻辑
var openidok = BasicDataRefDAL.GetWxappUserInfo(QueryInfo.AuthCode);
if (!openidok.Success)
{
return Json(new { ErrorCode = 500, Message = $"发生错误:{openidok.Message}" }, JsonRequestBehavior.AllowGet);
}
var userinfo = (VW_user_md)openidok.Data;
#endregion
string LANGUAGES = "";
string userid = userinfo.USERID;
var aaa = "";
var saveinfo = JsonConvert.DeserializeObject<SaveOrderFeeListParam>(postContent);
var bodyList = saveinfo.Body;
var chfeeBodyList = bodyList;
var chfeeDelBodyList = JsonConvert.DeserializeObject<List<MsOrderFee>>("");
var modb = new DSWeb.TruckMng.Helper.Repository.ModelObjectRepository();
DBResult result = modb.SaveComm("BsNo", QueryInfo.bsno,
DSWeb.MvcShipping.Helper.ModelObjectConvert<MsOrderFee>.ToModelObjectList(chfeeBodyList),
DSWeb.MvcShipping.Helper.ModelObjectConvert<MsOrderFee>.ToModelObjectList(chfeeDelBodyList)
);
if (result.Success)
{
return Json(new { ErrorCode = 0, Message = result.Message, Data = result.Data });
}
else
{
return Json(new { ErrorCode = 500, Message = "保存错误:" + result.Message });
}
}
catch (Exception e)
{
return Json(new { ErrorCode = 500, Message = "发生错误:" + e.Message });
}
}
/// <summary>
/// 删除费用列表
/// </summary>
/// <param name="CUSTOMERNAME"></param>
/// <returns></returns>
[HttpPost]
public ActionResult DelOrderFeeList(EnumQueryInfo QueryInfo)
{
try
{
Stream postData = Request.InputStream;
StreamReader sRead = new StreamReader(postData);
string postContent = sRead.ReadToEnd();
sRead.Close();
var searchParams = JsonConvert.DeserializeObject<DelFeeListParam>(postContent);
var cdc = new Common.DB.CommonDataContext();
#region 正式逻辑
var openidok = BasicDataRefDAL.GetWxappUserInfo(QueryInfo.AuthCode);
if (!openidok.Success)
{
return Json(new { ErrorCode = 500, Message = $"发生错误:{openidok.Message}" }, JsonRequestBehavior.AllowGet);
}
var userinfo = (VW_user_md)openidok.Data;
#endregion
string LAN = Convert.ToString(Session["LANGUAGES"]);
var shanchuchenggong = "删除成功!";
if (LAN == "en-us")
{
shanchuchenggong = "Successfully deleted";
}
int iResult = 0;
//前端传递的feeids是一个id
//如果将来需要删除多个 id则传递多个id以','分隔
var bodyList = searchParams.feeids;
var result = new DBResult();
if (bodyList != "" || bodyList != null)
{
//iResult = DSWeb.MvcShipping.DAL.MsChFeeDAL.MsChFeeDAL.DeleteFee(bodyList);
//DSWeb.MvcShipping.DAL.MsChFeeDAL.MsChFeeDAL.p_op_gain(searchParams.bsno, userinfo.USERID);
iResult = DSWeb.MvcShipping.DAL.MsChFeeDAL.MsChFeeDAL.DeleteOrderFee("'"+bodyList+ "'");
//DSWeb.MvcShipping.DAL.MsChFeeDAL.MsChFeeDAL.p_op_gain(searchParams.bsno, userinfo.USERID);
}
if (iResult == 1)
{
result.Success = true;
result.Message = shanchuchenggong;
}
else if (iResult == 0)
{
result.Success = false;
result.Message = "出现错误,未删除!";
}
else if (iResult == -1)
{
result.Success = false;
result.Message = "有异常,删除失败!";
}
else if (iResult == -2)
{
result.Success = false;
result.Message = "删除异常,事务已回滚成功!";
}
return Json(new { ErrorCode = 0, result.Message });
}
catch (Exception e)
{
return Json(new { ErrorCode = 500, Message = "发生错误:" + e.Message });
}
}
#endregion
}
@ -4060,6 +4324,12 @@ namespace DSWeb.Areas.Dispatch.Controllers
public List<MsChFee> Body { get; set; }
}
public class SaveOrderFeeListParam : SaveParam
{
public string bsno { get; set; }
public List<MsOrderFee> Body { get; set; }
}
public class DelFeeListParam : SaveParam
{
public string bsno { get; set; }

@ -1445,6 +1445,8 @@ namespace DSWeb.MvcShipping.Controllers
}
var jsonRespose = new JsonResponse
{
Success = result.Success,

@ -1000,7 +1000,7 @@ namespace DSWeb.MvcShipping.DAL.MsChFeeDAL
//2017年5月2日14:31:54 需求编号SR2017041800010 -2
//start
string rangstr = "";
if (!optype.Equals(string.Empty))
if (string.IsNullOrWhiteSpace( optype))
{
rangstr=GetRangDAStr(type, optype, userid, username, companyid);
}

@ -695,7 +695,7 @@ namespace DSWeb.MvcShipping.DAL.MsSeaeOrderDAL
static public List<MsSeaeOrderCtn> GetBodyList(string strCondition)
{
var strSql = new StringBuilder();
strSql.Append("SELECT [CTN_ID],[ORDNO],[CTNNUM],[CTNALL],[REMARK] from crm_seaeorderctn");
strSql.Append("SELECT [CTN_ID],[ORDNO],[CTNNUM],[CTNALL],[REMARK],isnull([Price_YS],0)Price_YS,isnull([Price_YF],0)Price_YF from crm_seaeorderctn");
if (strCondition.Trim() != String.Empty)
{
strSql.Append(" where " + strCondition);
@ -719,6 +719,8 @@ namespace DSWeb.MvcShipping.DAL.MsSeaeOrderDAL
data.CTNNUM = Convert.ToInt32(reader["CTNNUM"]);//箱量
data.CTNALL = Convert.ToString(reader["CTNALL"]);//表现形式
data.REMARK = Convert.ToString(reader["REMARK"]);//备注
data.Price_YS = Convert.ToDecimal(reader["Price_YS"]);//备注
data.Price_YF = Convert.ToDecimal(reader["Price_YF"]);//备注
#endregion
bodyList.Add(data);
}
@ -748,12 +750,20 @@ namespace DSWeb.MvcShipping.DAL.MsSeaeOrderDAL
if (enumValue.ORDNO == "*")
{
var cmdInsert = db.GetSqlStringCommand(@"insert into crm_seaeorderctn (CTN_ID,ORDNO,CTNNUM,CTNALL,REMARK) values (newid(),'" + headData.ORDNO + "'," + enumValue.CTNNUM + ",'" + enumValue.CTNALL + "','" + enumValue.REMARK + "')");
var _str = @"insert into crm_seaeorderctn (CTN_ID,ORDNO,CTNNUM,CTNALL,REMARK,Price_YS,Price_YF) values (newid(),'"
+ headData.ORDNO + "'," + enumValue.CTNNUM + ",'"
+ enumValue.CTNALL + "','" + enumValue.REMARK + "',"
+ (enumValue.Price_YS == null ? "0" : enumValue.Price_YS.ToString()) + ","
+ (enumValue.Price_YF == null ? "0" : enumValue.Price_YF.ToString()) + ")";
var cmdInsert = db.GetSqlStringCommand(_str);
db.ExecuteNonQuery(cmdInsert, tran);
}
else
{
var cmdUpdate = db.GetSqlStringCommand(@"update crm_seaeorderctn set CTNNUM=" + enumValue.CTNNUM + ",CTNALL='" + enumValue.CTNALL + "',REMARK='" + enumValue.REMARK + "' where ORDNO='" + enumValue.ORDNO + "' AND CTN_ID='" + enumValue.CTN_ID + "'");
var cmdUpdate = db.GetSqlStringCommand(@"update crm_seaeorderctn set CTNNUM=" + enumValue.CTNNUM + ",CTNALL='" + enumValue.CTNALL + "',REMARK='" + enumValue.REMARK + "' where ORDNO='" + enumValue.ORDNO + "' AND CTN_ID='" + enumValue.CTN_ID + "' AND Price_YS=" + enumValue.Price_YS + " AND Price_YF=" + enumValue.Price_YF + "");
db.ExecuteNonQuery(cmdUpdate, tran);
}
@ -768,7 +778,7 @@ namespace DSWeb.MvcShipping.DAL.MsSeaeOrderDAL
tran.Commit();
}
catch (Exception)
catch (Exception e)
{
tran.Rollback();
result.Success = false;
@ -825,7 +835,42 @@ namespace DSWeb.MvcShipping.DAL.MsSeaeOrderDAL
return result;
}
public static DBResult MakeHYF(string ORDNO)
{
var result = new DBResult();
Database db = DatabaseFactory.CreateDatabase();
try
{
var bodyList = GetBodyList("ORDNO='" + ORDNO + "'");
var cntr = "";
if (bodyList != null)
{
foreach (var enumValue in bodyList)
{
cntr = cntr + enumValue.CTNALL + '*' + enumValue.CTNNUM + "/";
}
}
//根据不同箱型和应收应付单价
//查看目前有没有
}
catch (Exception)
{
result.Success = false;
result.Message = "保存出现错误,请重试或联系系统管理员";
return result;
}
result.Success = true;
result.Message = "保存成功" + result.Message;
return result;
}
//判断单号是否重复
static public int GetRdCount(string strCondition)
{

@ -64,7 +64,10 @@ namespace DSWeb.MvcShipping.Models.MsSeaeOrder
set { _remark = value; }
}
[ModelDB]
public decimal? Price_YS { get; set; } = 0;
[ModelDB]
public decimal? Price_YF { get; set; } = 0;
#endregion
public MsSeaeOrderCtn()

@ -1322,7 +1322,29 @@ Ext.extend(Shipping.MsSeaeOrderEdit, Ext.Panel, {
allowBlank: false,
selectOnFocus: true
}
}, {
}, {
dataIndex: 'Price_YS',
header: '应收单价',
width: 50,
editor: {
xtype: 'numberfield',
allowBlank: false,
allowDecimals: true, //允许输入小数
decimalPrecision: 2,
selectOnFocus: true
}
}, {
dataIndex: 'Price_YF',
header: '应付单价',
width: 50,
editor: {
xtype: 'numberfield',
allowBlank: false,
allowDecimals: true, //允许输入小数
decimalPrecision: 2,
selectOnFocus: true
}
}, {
dataIndex: 'REMARK',
header: '备注',
width: 150,

@ -295,11 +295,13 @@ Ext.define('MsSeaeOrderCtn', {
extend: 'Ext.data.Model',
idProperty: 'ORDNO,CTN_ID',
fields: [
{ name: 'CTN_ID', type: 'string' },
{ name: 'ORDNO', type: 'string' },
{ name: 'CTNNUM', type: 'int' },
{ name: 'CTNALL', type: 'string' },
{ name: 'REMARK', type: 'string' }
{ name: 'CTN_ID', type: 'string' },
{ name: 'ORDNO', type: 'string' },
{ name: 'CTNNUM', type: 'int' },
{ name: 'CTNALL', type: 'string' },
{ name: 'REMARK', type: 'string' },
{ name: 'Price_YS', type: 'decimal' },
{ name: 'Price_YF', type: 'decimal' }
]
});

Loading…
Cancel
Save