关贸云调整几个字段对应,和委托单位未对应的报警

DS7_JingHan
ddlucky 2 years ago
parent f3d51fe14b
commit 6f1188220b

3
.gitignore vendored

@ -53,4 +53,5 @@ BookingWeb/Properties/PublishProfiles/FolderProfile.pubxml.user
DSWeb/DSWeb.csproj.user
BookingJieFeng/BookingJieFeng.csproj.user
DispatchWeb/DispatchWeb.csproj.user
DSWeb/Properties/PublishProfiles/FolderProfile.pubxml
DSWeb/Properties/PublishProfiles/FolderProfile.pubxml
/UpdateSQL/update.ldb

@ -44,7 +44,13 @@ namespace DSWeb.Areas.CommMng.DAL
var admin = cdc.VW_user.First(x => x.CODENAME == "admin");
var OpapplyHead = getHeadInfo(head, "add", admin);
var _r2 = getHeadInfo(head, "add", admin);
if (!_r2.Success) {
result = new JsonResponse { Success = _r2.Success, Message = _r2.Message, Data = _r2.Data };
return result;
}
var OpapplyHead = (MsOpApply)_r2.Data;
var OpapplyGoodsDetailList = new List<MsOpApplyDetail>();
@ -65,7 +71,16 @@ namespace DSWeb.Areas.CommMng.DAL
if (_count == 0)
{
OpapplyHead = getHeadInfo(head,"add",admin);
var _r3 = getHeadInfo(head, "add", admin);
if (!_r3.Success)
{
result = new JsonResponse { Success = _r3.Success, Message = _r3.Message, Data = _r3.Data };
return result;
}
OpapplyHead = (MsOpApply)_r3.Data;
OpapplyHead.DbOperationType = DbOperationType.DbotIns;
@ -101,7 +116,16 @@ namespace DSWeb.Areas.CommMng.DAL
}
else {
OpapplyHead = getHeadInfo(head, "update");
//OpapplyHead = getHeadInfo(head, "update");
var _r4 = getHeadInfo(head, "update");
if (!_r4.Success)
{
result = new JsonResponse { Success = _r4.Success, Message = _r4.Message, Data = _r4.Data };
return result;
}
OpapplyHead = (MsOpApply)_r4.Data;
OpapplyHead.DbOperationType = DbOperationType.DbotUpd;
@ -327,10 +351,12 @@ namespace DSWeb.Areas.CommMng.DAL
}
public static MsOpApply getHeadInfo(GuanMaoYun_Head headinfo,string opstatus,VW_user_md userinfo=null)
public static DBResult getHeadInfo(GuanMaoYun_Head headinfo,string opstatus,VW_user_md userinfo=null)
{
var result = new MsOpApply();
var result = new MsOpApply();
var returnresult = new DBResult();
if (opstatus == "add")
{
@ -347,7 +373,26 @@ namespace DSWeb.Areas.CommMng.DAL
result.MASTERNO = headinfo.BUSINESS_ORDER_INFO.WORK_NO;
result.CUSCIQNO = head.EPROT_NO;
result.CUSTOMERNAME = headinfo.BUSINESS_ORDER_INFO.EXPORT_NAME;
var cdc = new CommonDataContext();
//委托单位使用BUSINESS_ORDER_INFO.EXPORT_CODE和code_cust_edi中ediname=关贸云的数据相关联 如无则返回错误
var code = headinfo.BUSINESS_ORDER_INFO.EXPORT_CODE;
var customernameList = cdc.code_cust_edi.Where(x => x.EDINAME == "关贸云" && code==x.EDICODE).ToList();
var CUSTOMER = new info_client_md();
if (customernameList.Count > 0)
{
result.CUSTOMERNAME = customernameList[0].CUST;
}
else
{
returnresult.SetErrorInfo($"[{委托单位关贸云code}]没有做代码对应ediname=关贸云,edicode=关贸云的用户id");
return returnresult;
}
//result.CUSTOMERNAME = headinfo.BUSINESS_ORDER_INFO.EXPORT_NAME;
//E出口 I进口
if (head.IE_TYPE == "E") result.BSTYPE = "2";
@ -395,6 +440,8 @@ namespace DSWeb.Areas.CommMng.DAL
result.ENTERP = head.EXPORT_NAME; //经营单位名称
result.ENTERPID = head.EXPORT_CODE; //经营单位代码
result.BOOKNO = head.HAND_BOOK_NO;//手册备案号
result.CONTRACTNO = head.CONTR_NO;//合同号
@ -420,7 +467,11 @@ namespace DSWeb.Areas.CommMng.DAL
result.CUSTOMSNUM = headinfo.GOODS_LIST.Count();
return result;
result.OP = headinfo.BUSINESS_ORDER_INFO.PROJECT_NO;//操作 2023-1-13
returnresult.OK("", result);
return returnresult;
}

@ -1209,7 +1209,6 @@ namespace DSWeb.Areas.CommMng.Models
/// </summary>
public string ORIG_BOX_FLAG { get; set; }
public bool () {
return IE_TYPE == "I";
}
@ -1432,6 +1431,8 @@ namespace DSWeb.Areas.CommMng.Models
///
/// </summary>
public string EXPORT_NAME { get; set; }
public string PROJECT_NO { get; set; }
}
public class DECL_USER

@ -61,6 +61,12 @@ namespace HcUtility.Comm
success = true;
message += _message + ";";
}
public void OK(string _message,object data)
{
success = true;
message += _message + ";";
Data=data;
}
public void SetErrorInfo(string message, bool success = false, object data = null)
{

Loading…
Cancel
Save