|
|
|
@ -206,23 +206,26 @@ namespace DSWeb.Areas.CommMng.DAL
|
|
|
|
|
|
|
|
|
|
var CurrChfeelist = cdc.ch_fee.Where(x => x.BSNO == BSNO && x.BXGID=="GMY").ToList();
|
|
|
|
|
|
|
|
|
|
foreach (var item in FeeHead.COSTS) {
|
|
|
|
|
|
|
|
|
|
//20230103 导入费用时先删除所有能删的费用
|
|
|
|
|
//20230103 导入费用时先删除所有能删的费用
|
|
|
|
|
|
|
|
|
|
var 当前现存费用 = cdc.ch_fee.Where(x => x.BSNO == BSNO ).ToList();
|
|
|
|
|
var 当前现存费用 = cdc.ch_fee.Where(x => x.BSNO == BSNO).ToList();
|
|
|
|
|
|
|
|
|
|
var delgidListstr = "";
|
|
|
|
|
foreach (var item2 in 当前现存费用) {
|
|
|
|
|
if( MsChFeeDAL.ChFeeCanChange(item2)) {
|
|
|
|
|
var delgidstr = "'" + item2.GID + "'";
|
|
|
|
|
if (delgidListstr != "") delgidListstr += ",";
|
|
|
|
|
delgidListstr += delgidstr;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (delgidListstr != "") {
|
|
|
|
|
delgidListstr += BasicDataRefDAL.ExecSql($"delete from ch_fee where gid in({delgidListstr})");
|
|
|
|
|
var delgidListstr = "";
|
|
|
|
|
foreach (var item2 in 当前现存费用)
|
|
|
|
|
{
|
|
|
|
|
if (MsChFeeDAL.ChFeeCanChange(item2))
|
|
|
|
|
{
|
|
|
|
|
var delgidstr = "'" + item2.GID + "'";
|
|
|
|
|
if (delgidListstr != "") delgidListstr += ",";
|
|
|
|
|
delgidListstr += delgidstr;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (delgidListstr != "")
|
|
|
|
|
{
|
|
|
|
|
delgidListstr += BasicDataRefDAL.ExecSql($"delete from ch_fee where gid in({delgidListstr})");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
foreach (var item in FeeHead.COSTS) {
|
|
|
|
|
|
|
|
|
|
var customername= cdc.code_cust_edi.FirstOrDefault(x => x.EDINAME == "关贸云" && x.EDICODE == item.COAGENT_ID);
|
|
|
|
|
CUSTOMER = cdc.info_client.FirstOrDefault(x => x.SHORTNAME == customername.CUST);
|
|
|
|
|