560 lines
26 KiB
C#
560 lines
26 KiB
C#
using System.Data;
|
|
using YLErp.Commons;
|
|
using YLErp.DBModels.Consts;
|
|
using YLErp.DBModels.Enums;
|
|
using YLErp.Modules.SuperviseReportModule.SAC.Common;
|
|
using YLErp.Modules.SuperviseReportModule.SAC.Model;
|
|
using static YLErp.DBModels.Consts.ConsReport;
|
|
|
|
namespace YLErp.Modules.SuperviseReportModule.SAC.Service
|
|
{
|
|
/// <summary>
|
|
/// SAC主协议
|
|
/// </summary>
|
|
class ReportMasterAgrmtService : ReportBaseService
|
|
{
|
|
public ReportMasterAgrmtService(OptUserInfo optUser) : base(optUser)
|
|
{
|
|
}
|
|
|
|
protected override string _excelDataSourcePath => "协议相关\\";
|
|
|
|
protected override string _excelDataSourceFileName => "import_MasterAgrmt_template.xlsx";
|
|
|
|
protected override DataFlagsEnum BusiDataType => DataFlagsEnum.A1001;
|
|
|
|
private List<OptFlagsEnum> _validOperationType = null;
|
|
public override List<OptFlagsEnum> ValidOperationType
|
|
{
|
|
get
|
|
{
|
|
if (_validOperationType == null)
|
|
{
|
|
_validOperationType = new List<OptFlagsEnum>() {
|
|
OptFlagsEnum.A,
|
|
OptFlagsEnum.U,
|
|
OptFlagsEnum.D,
|
|
};
|
|
}
|
|
return _validOperationType;
|
|
}
|
|
}
|
|
|
|
protected override SuperviseReportTypeEnum ReportType => SuperviseReportTypeEnum.SAC_MasterAgrmt;
|
|
List<SACReportNotes> noteList = new List<SACReportNotes>();
|
|
|
|
protected override BodyModel GenerateBody(out bool noData, out List<string> fileList)
|
|
{
|
|
fileList = new List<string>();
|
|
BodyModel model = new BodyModel();
|
|
List<MasterAgrmtModel> dataList = new List<MasterAgrmtModel>();
|
|
if ((PS.Config.ErpElement.SAC_ReportDataSource & SAC_ReportDataSourceEnum.Template) == SAC_ReportDataSourceEnum.Template)
|
|
{
|
|
dataList = GetMasterAgrmtModelFromExcel(ref fileList);
|
|
}
|
|
if ((PS.Config.ErpElement.SAC_ReportDataSource & SAC_ReportDataSourceEnum.System) == SAC_ReportDataSourceEnum.System)
|
|
{
|
|
try
|
|
{
|
|
LogFactory.GetLogger("GenerateBody").Info($"System:1111x");
|
|
var resultList = GetMasterAgrmtModelFromDb(ref fileList);
|
|
if (resultList != null && resultList.Count() > 0)
|
|
{
|
|
LogFactory.GetLogger("GenerateBody").Info($"ok");
|
|
dataList.AddRange(resultList);
|
|
}
|
|
|
|
LogFactory.GetLogger("GenerateBody").Info($"System:2222x");
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogFactory.GetLogger("GenerateBody").Info($"System:1111x系统异常:" + ex.ToString());
|
|
}
|
|
}
|
|
|
|
|
|
LogFactory.GetLogger("GenerateBody").Info($"System:11112");
|
|
var subsystemDataList = loadSubsystemDataSource<MasterAgrmtModel>(fileList, AddSubsystemNote);
|
|
if (subsystemDataList != null && subsystemDataList.Count > 0)
|
|
dataList.AddRange(subsystemDataList);
|
|
noData = dataList.Count == 0;
|
|
model.MasterAgrmt = dataList;
|
|
return model;
|
|
}
|
|
|
|
public bool AddSubsystemNote(MasterAgrmtModel model, List<string> fileList, string tag)
|
|
{
|
|
SACReportNotes note = base.GetReportNotes(ReportType, formatInfoTag(model, true)).FirstOrDefault();//参数true要加,要不A和D会查到同一条记录,在D时候,就会和A相同的数据
|
|
if (note == null)
|
|
{
|
|
note = new SACReportNotes()
|
|
{
|
|
InfoCache = $"{{\"Tag\":\"{model.MasterAgrmtNo}\",\"Source\":\"Subsystem\",\"SubFileTag\":\"{tag}\",\"ExceID\":\"{model.ExceID}\"}}",
|
|
IsValid = true,
|
|
};
|
|
}
|
|
else//多次U的时候,每次用最新的tag来赋值SubFileTag
|
|
{
|
|
switch (model.OperationType)
|
|
{
|
|
case OptFlagsEnum.A:
|
|
return false;//新增数据已报送,跳过
|
|
case OptFlagsEnum.U:
|
|
//多次U的时候,每次用最新的tag来赋值SubFileTag
|
|
note.InfoCache = $"{{\"Tag\":\"{model.MasterAgrmtNo}\",\"Source\":\"Subsystem\",\"SubFileTag\":\"{tag}\",\"ExceID\":\"{model.ExceID}\"}}";
|
|
note.IsValid = true;
|
|
break;
|
|
case OptFlagsEnum.D://
|
|
note.IsValid = false;
|
|
break;
|
|
case OptFlagsEnum.NONE:
|
|
default:
|
|
throw new ServiceException("未知操作类型");
|
|
}
|
|
}
|
|
|
|
if (!string.IsNullOrWhiteSpace(model.MasterAgrmtAtt))
|
|
{
|
|
fileList.Add(model.MasterAgrmtAtt);
|
|
}
|
|
model.ExceID = base.formatExceID();
|
|
|
|
note.id = 0;
|
|
note.ExceId = model.ExceID;
|
|
note.CreateTime = DateTime.Now;
|
|
note.FileTag = FileTag;
|
|
note.ReportType = ReportType;
|
|
note.ReportDate = _reqInfo.ReportDate;
|
|
note.InfoTag = formatInfoTag(model, true);
|
|
note.OptTime = note.CreateTime;
|
|
note.RetCode = "";
|
|
note.RetMsg = "";
|
|
note.ReportResponse = false;
|
|
note.BizId = "";
|
|
note.changeStatus = false;
|
|
noteList.Add(note);
|
|
return true;
|
|
}
|
|
|
|
private IEnumerable<MasterAgrmtModel> GetMasterAgrmtModelFromDb(ref List<string> fileList)
|
|
{
|
|
var dataList = new List<MasterAgrmtModel>();
|
|
using (var baseDb = DbContextFactory.GetClientDbContext(null))
|
|
{
|
|
var nextDate = _reqInfo.ReportDate.AddDays(1);
|
|
var fileObjList = (from c in baseDb.client
|
|
join cf in baseDb.client_file
|
|
on c.id equals cf.ClientId
|
|
where c.ProcessStatus == "已开户" && cf.HasSent == false && cf.IsValid &&
|
|
cf.FileTypeName == ConsGlobal.ClientFileType.MainProtocol && cf.OptState == _operationType &&
|
|
((c.ProcessOptDate >= _reqInfo.ReportDate && c.ProcessOptDate < nextDate && cf.OptDate < nextDate) ||//如果这一天开户,则把这一天之前(含这一天)的所有文件都报送了
|
|
(cf.OptDate >= _reqInfo.ReportDate && cf.OptDate < nextDate && c.ProcessOptDate < _reqInfo.ReportDate))//如果这一天不是开户日期,则只在报送日期大于开户日期时,报送当日修改的文件
|
|
&& cf.ApprovalOrder < 1
|
|
select new
|
|
{
|
|
cf.id,
|
|
cf.ClientId,
|
|
cf.OptState,
|
|
cf.ProtocolNumber,
|
|
cf.SignDate,
|
|
cf.SignType,
|
|
cf.ReportorRole,
|
|
cf.FilePath,
|
|
cf.FileName,
|
|
cf.FileDesc,
|
|
c.Name,
|
|
c.CounterpartyCode,
|
|
c.Number,
|
|
c.ProperClientClass,
|
|
c.CustomerNature1,
|
|
c.NFICode,
|
|
c.RegisteredCapital,
|
|
c.ClientType
|
|
}).ToArray();
|
|
var clientIds = fileObjList.Select(O => O.ClientId);
|
|
var ct = baseDb.contactype.Where(O => O.ContactType == "联系人").FirstOrDefault();
|
|
ExpandoDictionary<int, ClientDuty> clientdutyDict = null;
|
|
if (ct != null)
|
|
{
|
|
clientdutyDict = new ExpandoDictionary<int, ClientDuty>(
|
|
(from cd in baseDb.clientduty.Where(t => t.ApprovalOrder < 1)
|
|
where clientIds.Contains(cd.ClientId ?? 0) && (cd.DeadLine == null || cd.DeadLine >= _reqInfo.ReportDate)
|
|
select cd)
|
|
.ToList()
|
|
.Where(O => O.ContactTypeIdsInt.Contains(ct.id)).GroupBy(O => O.ClientId ?? 0)
|
|
.ToDictionary(K => K.Key, V => V.FirstOrDefault()));
|
|
}
|
|
LogFactory.GetLogger("ReportMasterAgrmtService").Error("查询到: " + fileObjList.Length.ToString());
|
|
var cacheKey = $"{BusiDataType}";
|
|
foreach (var item in fileObjList)
|
|
{
|
|
var cacheValue = item.ProtocolNumber;
|
|
if (ReportStatus.CheckCacheInfo(cacheKey, cacheValue))
|
|
{
|
|
LogFactory.GetLogger("ReportMasterAgrmtService").Error("有重复编号跳过 " + item.ProtocolNumber);
|
|
continue;
|
|
}
|
|
try
|
|
{
|
|
var info = new MasterAgrmtModel();
|
|
info.OperationType = item.OptState;
|
|
info.MasterAgrmtNo = item.ProtocolNumber;
|
|
info.SigningDate = item.SignDate?.ToString("yyyy-MM-dd");
|
|
info.MasterAgrmtVer = ConsReport.MasterAgrmtVerMap[item.SignType ?? ""];
|
|
info.FillParty = ConsReport.FillPartyMap[item.ReportorRole ?? ""];
|
|
info.NameOfCounterparty = item.Name;
|
|
info.CounterpartyCode = item.Number;
|
|
info.ProCounterparty = item.ProperClientClass != null && item.ProperClientClass.Contains("专业") ? ProCounterpartyMap["专业"] : ProCounterpartyMap["非专业"];
|
|
info.CounterpartyType = CounterpartyTypeMap[item.CustomerNature1 ?? ""];
|
|
if ((info.CounterpartyType == CounterpartyTypeMap["境外金融机构"] || info.CounterpartyType == CounterpartyTypeMap["境外非金融机构"]))
|
|
{
|
|
info.LEI = item.CounterpartyCode;
|
|
}
|
|
else
|
|
{
|
|
info.CODS = item.CounterpartyCode;
|
|
}
|
|
if (item.CustomerNature1 != null && item.CustomerNature1.Contains("非金融机构"))
|
|
{
|
|
info.NFICode = item.NFICode;
|
|
}
|
|
info.CounterpartyRegdCptl = item.RegisteredCapital;
|
|
info.MasterAgrmtAtt = item.FileName;
|
|
info.MasterAgrmtRemark = item.FileDesc;
|
|
if (clientdutyDict != null && clientdutyDict.ContainsKey(item.ClientId))
|
|
{
|
|
info.CounterpartyInformationTuple = new List<CounterpartyInfomationModel>();
|
|
CounterpartyInfomationModel userInfo = new CounterpartyInfomationModel();
|
|
userInfo.Name = clientdutyDict[item.ClientId]?.ContactName;
|
|
userInfo.Title = clientdutyDict[item.ClientId] == null ? null : "联系人";
|
|
userInfo.Email = clientdutyDict[item.ClientId]?.Email;
|
|
userInfo.Telephone = clientdutyDict[item.ClientId]?.PhoneNumber;
|
|
//userInfo.Mobile = clientdutyDict[item.ClientId]?.PhoneNumber;
|
|
info.CounterpartyInformationTuple.Add(userInfo);
|
|
}
|
|
info.CounterpartyIdentity = item.ClientType == "机构" ? CounterpartyIdentityMap["自营"] : CounterpartyIdentityMap["产品管理人"];
|
|
|
|
SACReportNotes note = base.GetReportNotes(ReportType, formatInfoTag(info)).FirstOrDefault();
|
|
if (note == null && _operationType == OptFlagsEnum.A)
|
|
{
|
|
note = new SACReportNotes()
|
|
{
|
|
InfoCache = $"{{\"Tag\":\"{info.MasterAgrmtNo}\",\"Source\":\"System\"}}",
|
|
IsValid = true,
|
|
};
|
|
}
|
|
else
|
|
{
|
|
if (note == null)
|
|
{
|
|
LogFactory.GetLogger("ReportMasterAgrmtService").Error("未找到历史报送信息跳过 " + formatInfoTag(info));
|
|
continue;
|
|
}
|
|
switch (_operationType)
|
|
{
|
|
case OptFlagsEnum.A:
|
|
continue;//新增数据已报送,跳过
|
|
case OptFlagsEnum.U:
|
|
note.IsValid = true;
|
|
break;
|
|
case OptFlagsEnum.D:
|
|
note.IsValid = false;
|
|
break;
|
|
case OptFlagsEnum.NONE:
|
|
default:
|
|
throw new ServiceException("未知操作类型");
|
|
}
|
|
}
|
|
if (info.OperationType != OptFlagsEnum.A)
|
|
{
|
|
info.MasterAgrmtID = note.BizId;
|
|
}
|
|
if (!ReportStatus.CheckFileLength(item.FilePath))
|
|
{
|
|
break;
|
|
}
|
|
else
|
|
{
|
|
ReportStatus.AddCacheInfo(cacheKey, cacheValue);
|
|
}
|
|
info.ExceID = base.formatExceID();
|
|
dataList.Add(info);
|
|
fileList.Add(item.FilePath);
|
|
note.id = 0;
|
|
note.DataId = item.id.ToString();
|
|
note.ExceId = info.ExceID;
|
|
note.CreateTime = DateTime.Now;
|
|
note.FileTag = FileTag;
|
|
note.ReportType = ReportType;
|
|
note.ReportDate = _reqInfo.ReportDate;
|
|
note.InfoTag = formatInfoTag(info, true);
|
|
note.OptTime = note.CreateTime;
|
|
note.RetCode = "";
|
|
note.RetMsg = "";
|
|
note.ReportResponse = false;
|
|
note.BizId = "";
|
|
note.changeStatus = false;
|
|
noteList.Add(note);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogFactory.GetLogger("ReportMasterAgrmtService").Error(ex);
|
|
LogFactory.GetLogger("ReportMasterAgrmtService").Error(item.ToJson());
|
|
throw;
|
|
}
|
|
}
|
|
}
|
|
return dataList;
|
|
}
|
|
|
|
private List<MasterAgrmtModel> GetMasterAgrmtModelFromExcel(ref List<string> fileList)
|
|
{
|
|
List<MasterAgrmtModel> result = new List<MasterAgrmtModel>();
|
|
if (_excelDataSource != null && _excelDataSource.Tables.Contains("主协议"))
|
|
{
|
|
var cacheKey = $"{BusiDataType}";
|
|
string sourcePath = Path.Combine(_excelDataSourceRootPath, "附件");
|
|
DataTable dt = _excelDataSource.Tables["主协议"];
|
|
for (int i = 1; i < dt.Rows.Count; i++)
|
|
{
|
|
if (string.IsNullOrWhiteSpace(dt.Rows[i][0]?.ToString()))
|
|
{
|
|
//第一列空白说明数据结束了;
|
|
break;
|
|
}
|
|
var optType = OptFlagsEnum.NONE;
|
|
switch (dt.Rows[i][3]?.ToString())
|
|
{
|
|
case "首次":
|
|
optType = OptFlagsEnum.A;
|
|
break;
|
|
case "变更":
|
|
optType = OptFlagsEnum.U;
|
|
break;
|
|
case "废止":
|
|
optType = OptFlagsEnum.D;
|
|
break;
|
|
}
|
|
if (optType != _operationType)
|
|
{
|
|
continue;
|
|
}
|
|
|
|
MasterAgrmtModel model = generiterInfoFromExcel(dt, i, optType);
|
|
model.CounterpartyInformationTuple = GetCounterpartyInfomationModelFromExcel(model.MasterAgrmtNo);
|
|
string cacheValue = model.MasterAgrmtNo;
|
|
if (ReportStatus.CheckCacheInfo(cacheKey, cacheValue))
|
|
{
|
|
continue;
|
|
}
|
|
SACReportNotes note = base.GetReportNotes(ReportType, formatInfoTag(model)).FirstOrDefault();
|
|
if (note == null && _operationType == OptFlagsEnum.A)
|
|
{
|
|
note = new SACReportNotes()
|
|
{
|
|
InfoCache = $"{{\"Tag\":\"{model.MasterAgrmtNo}\",\"Source\":\"Template\"}}",
|
|
IsValid = true,
|
|
};
|
|
}
|
|
else
|
|
{
|
|
if (note == null)
|
|
{
|
|
continue;
|
|
}
|
|
switch (optType)
|
|
{
|
|
case OptFlagsEnum.A:
|
|
continue;//新增数据已报送,跳过
|
|
case OptFlagsEnum.U:
|
|
note.IsValid = true;
|
|
break;
|
|
case OptFlagsEnum.D:
|
|
note.IsValid = false;
|
|
break;
|
|
case OptFlagsEnum.NONE:
|
|
default:
|
|
throw new ServiceException("未知操作类型");
|
|
}
|
|
}
|
|
if (model.OperationType != OptFlagsEnum.A)
|
|
{
|
|
model.MasterAgrmtID = note.BizId;
|
|
}
|
|
|
|
if (!string.IsNullOrWhiteSpace(model.MasterAgrmtAtt))
|
|
{
|
|
model.ExceID = base.formatExceID();
|
|
string path = Path.Combine(sourcePath, model.MasterAgrmtAtt);
|
|
if (!ReportStatus.CheckFileLength(path))
|
|
{
|
|
break;
|
|
}
|
|
else
|
|
{
|
|
ReportStatus.AddCacheInfo(cacheKey, cacheValue);
|
|
}
|
|
result.Add(model);
|
|
fileList.Add(path);
|
|
note.id = 0;
|
|
note.ExceId = model.ExceID;
|
|
note.CreateTime = DateTime.Now;
|
|
note.FileTag = FileTag;
|
|
note.ReportType = ReportType;
|
|
note.ReportDate = _reqInfo.ReportDate;
|
|
note.InfoTag = formatInfoTag(model, true);
|
|
note.OptTime = note.CreateTime;
|
|
note.RetCode = "";
|
|
note.RetMsg = "";
|
|
note.ReportResponse = false;
|
|
note.BizId = "";
|
|
note.changeStatus = false;
|
|
noteList.Add(note);
|
|
}
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
private MasterAgrmtModel generiterInfoFromExcel(DataTable dt, int i, OptFlagsEnum optType)
|
|
{
|
|
var model = new MasterAgrmtModel();
|
|
model.MasterAgrmtNo = GetDataSetValue(dt, i, 0);
|
|
model.SigningDate = GetDataSetValue(dt, i, 1);
|
|
model.MasterAgrmtVer = ConsReport.MasterAgrmtVerMap[GetDataSetValue(dt, i, 2)];
|
|
model.OperationType = optType == OptFlagsEnum.A ? OptFlagsEnum.A : OptFlagsEnum.U;
|
|
model.FillParty = ConsReport.FillPartyMap[GetDataSetValue(dt, i, 4)];
|
|
model.NameOfCounterparty = GetDataSetValue(dt, i, 5);
|
|
model.CODS = GetDataSetValue(dt, i, 6);
|
|
model.CounterpartyCode = GetDataSetValue(dt, i, 7);
|
|
model.LEI = GetDataSetValue(dt, i, 8);
|
|
model.ProCounterparty = ConsReport.ProCounterpartyMap[GetDataSetValue(dt, i, 9)];
|
|
model.CounterpartyType = ConsReport.CounterpartyTypeMap[GetDataSetValue(dt, i, 10)];
|
|
model.NFICode = GetDataSetValue(dt, i, 11);
|
|
model.CounterpartyRegdCptl = GetDataSetValue(dt, i, 12);
|
|
model.MasterAgrmtRemark = GetDataSetValue(dt, i, 13);
|
|
model.MasterAgrmtAtt = GetDataSetValue(dt, i, 14);
|
|
model.CounterpartyIdentity = ConsReport.CounterpartyIdentityMap[GetDataSetValue(dt, i, 15)];
|
|
return model;
|
|
}
|
|
|
|
private string formatInfoTag(MasterAgrmtModel model, bool suffixType = false)
|
|
{
|
|
string result = $"{BusiDataType}_{model.MasterAgrmtNo.Replace("_", "-")}_";
|
|
if (suffixType)
|
|
{
|
|
result = $"{result}{_operationType}";
|
|
}
|
|
return result;
|
|
}
|
|
|
|
private List<CounterpartyInfomationModel> GetCounterpartyInfomationModelFromExcel(string masterAgrmtNo)
|
|
{
|
|
List<CounterpartyInfomationModel> result = new List<CounterpartyInfomationModel>();
|
|
if (_excelDataSource != null && _excelDataSource.Tables.Contains("填报方业务代表明细"))
|
|
{
|
|
DataTable dt = _excelDataSource.Tables["填报方业务代表明细"];
|
|
for (int i = 1; i < dt.Rows.Count; i++)
|
|
{
|
|
if (string.IsNullOrWhiteSpace(dt.Rows[i][0]?.ToString()))
|
|
{
|
|
//第一列空白说明数据结束了;
|
|
break;
|
|
}
|
|
if (dt.Rows[i][0]?.ToString() != masterAgrmtNo)
|
|
{
|
|
continue;
|
|
}
|
|
|
|
CounterpartyInfomationModel model = new CounterpartyInfomationModel();
|
|
|
|
model.Name = GetDataSetValue(dt, i, 1);
|
|
model.Title = GetDataSetValue(dt, i, 2);
|
|
model.Telephone = GetDataSetValue(dt, i, 3);
|
|
model.Mobile = GetDataSetValue(dt, i, 4);
|
|
model.Email = GetDataSetValue(dt, i, 5);
|
|
|
|
result.Add(model);
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
protected override List<SacInfo> CheckBodyValue(BodyModel model, out bool checkStatus)
|
|
{
|
|
List<SacInfo> result = new List<SacInfo>();
|
|
if (model?.MasterAgrmt != null)
|
|
{
|
|
CheckHelper<MasterAgrmtModel> helper = new Common.CheckHelper<MasterAgrmtModel>();
|
|
CheckHelper<CounterpartyInfomationModel> infoHelper = new Common.CheckHelper<CounterpartyInfomationModel>();
|
|
for (int i = 0; i < model.MasterAgrmt.Count; i++)
|
|
{
|
|
List<SacInfo> listRoot = new List<SacInfo>();
|
|
var item = model.MasterAgrmt[i];
|
|
if (item.IgnoreCheck) continue;
|
|
helper.ExecuteCheck(item, (name, value, msg) =>
|
|
{
|
|
listRoot.Add(new SacInfo(name, value, msg));
|
|
});
|
|
if (item.CounterpartyInformationTuple != null)
|
|
{
|
|
for (int j = 0; j < item.CounterpartyInformationTuple.Count; j++)
|
|
{
|
|
var listItem = new List<SacInfo>();
|
|
var tuple = item.CounterpartyInformationTuple[j];
|
|
infoHelper.ExecuteCheck(tuple, (name, value, msg) =>
|
|
{
|
|
listItem.Add(new SacInfo(name, value, msg));
|
|
});
|
|
if (listItem.Count > 0)
|
|
{
|
|
var temp = new SacInfo("CounterpartyInformationTuple", j);
|
|
temp.SubMaps = new List<SacInfo>(listItem);
|
|
listRoot.Add(temp);
|
|
}
|
|
}
|
|
}
|
|
if (listRoot.Count > 0)
|
|
{
|
|
var errMsg = new SacInfo("MasterAgrmt", i);
|
|
errMsg.SubMaps = new List<SacInfo>(listRoot);
|
|
result.Add(errMsg);
|
|
}
|
|
}
|
|
}
|
|
checkStatus = result.Count > 0;
|
|
return result;
|
|
}
|
|
|
|
public override bool BeforeOfGenerated(out string errMsg)
|
|
{
|
|
try
|
|
{
|
|
errMsg = "";
|
|
foreach (var file in xmlAttachmentList)
|
|
{
|
|
try
|
|
{
|
|
File.Delete(file);
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
LogFactory.GetLogger<ReportMasterAgrmtProductService>().Error(e);
|
|
};
|
|
}
|
|
for (int i = 0; i < noteList.Count; i++)
|
|
{
|
|
base.SaveReportNotes(noteList[i]);
|
|
}
|
|
return true;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogFactory.GetLogger<ReportMasterAgrmtService>().Error(ex);
|
|
errMsg = "修改主协议报送状态失败!";
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
}
|