Browse Source

Merge branch 'master' of http://dev.ccwin-in.com:6090/Win.Sfs.SmartSettlementSystem.PG

# Conflicts:
#	vue/src/views/login/index.vue
branch_ccpg_220107
44673626 3 years ago
parent
commit
e896b2a1b0
  1. 7
      .vs/VSWorkspaceState.json
  2. BIN
      .vs/Win.Sfs.SmartSettlementSystem.PG/v16/.suo
  3. BIN
      src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/btsecsummary/二次配套套打模板.xlsx
  4. BIN
      src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/btsecsummary/当月结算汇总模板.xlsx
  5. 1
      src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/secsummary/files/host/sec-summary-container/新建文本文档.txt
  6. BIN
      src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/secsummary/大众二配结算供应商明细清单模板.xlsx
  7. BIN
      src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/secsummary/大众二配结算供应商汇总清单模板.xlsx
  8. 34
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/InvoiceSettledDiffs/InvoiceSettledDiff.cs
  9. 84
      src/Modules/SettleAccount/src/SettleAccount.Domain/Reports/InvoiceSettledDiffs/InvoiceSettledDiff.cs
  10. 106
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/InvoiceSettledDiffDapperRepository.cs
  11. 2
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/PriceQtyDiffDapperReportRepository.cs
  12. 26
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/InvoiceSettledDiffExportService.cs
  13. 28
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/SettleAccount/SettleAccountImportService.cs
  14. 6
      vue/src/views/login/index.vue
  15. 5
      vue/static/config.js

7
.vs/VSWorkspaceState.json

@ -0,0 +1,7 @@
{
"ExpandedNodes": [
""
],
"SelectedNode": "\\WY.NewJit.sln (src\\Modules\\派格FIS\\WY.NewJit.sln)",
"PreviewInSolutionExplorer": false
}

BIN
.vs/Win.Sfs.SmartSettlementSystem.PG/v16/.suo

Binary file not shown.

BIN
src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/btsecsummary/二次配套套打模板.xlsx

Binary file not shown.

BIN
src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/btsecsummary/当月结算汇总模板.xlsx

Binary file not shown.

1
src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/secsummary/files/host/sec-summary-container/新建文本文档.txt

@ -1 +0,0 @@
无条码看板量差

BIN
src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/secsummary/大众二配结算供应商明细清单模板.xlsx

Binary file not shown.

BIN
src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/secsummary/大众二配结算供应商汇总清单模板.xlsx

Binary file not shown.

34
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/InvoiceSettledDiffs/InvoiceSettledDiff.cs

@ -24,19 +24,41 @@ namespace Win.Sfs.SettleAccount.Reports.InvoiceSettledDiffs
public class InvoiceSettledDiffExportDto
{
[ExporterHeader(DisplayName = "版本")]
// 期间 发运类型 物料组 SAP编码 工厂 零件号 零件号格式整理 零件名称 开票数量 开票 金额 开票单价 结算数量 CP7报废 索赔/退货 数量差异 定价 价格差异
[ExporterHeader(DisplayName = "期间")]
public string Version { get; set; }
[ExporterHeader(DisplayName = "物料组")]
public string SapMaterialGroup { get; set; }
[ExporterHeader(DisplayName = "SAP编号")]
public string SapMaterialCode { get; set; }
[ExporterHeader(DisplayName = "工厂")]
public string Factory { get; set; }
[ExporterHeader(DisplayName ="零件编号")]
public string MaterialCode { get; set; }
[ExporterHeader(DisplayName = "发票数量")]
[ExporterHeader(DisplayName = "零件名称")]
public string MaterialDesc { get; set; }
[ExporterHeader(DisplayName = "开票数量")]
public decimal InvoiceQty { get; set; }
[ExporterHeader(DisplayName = "金额")]
public decimal InvoiceAmt { get; set; }
[ExporterHeader(DisplayName = "开票单价")]
public decimal InvoicePrice { get; set; }
[ExporterHeader(DisplayName ="结算数量")]
public decimal SettleQty { get; set; }
[ExporterHeader(DisplayName = "差额量")]
[ExporterHeader(DisplayName = "数量差")]
public decimal DiffQty { get; set; }
[ExporterHeader(DisplayName = "CP7报废")]
public decimal CP7ScrapQty { get; set; }
[ExporterHeader(DisplayName = "索赔/退货")]
public decimal ClaimQty { get; set; }
[ExporterHeader(DisplayName = "定价")]
public decimal SalePrice { get; set; }
[ExporterHeader(DisplayName = "价格差异")]
public decimal DiffPrice { get; set; }
}

84
src/Modules/SettleAccount/src/SettleAccount.Domain/Reports/InvoiceSettledDiffs/InvoiceSettledDiff.cs

@ -1,4 +1,5 @@
using System;
using Magicodes.ExporterAndImporter.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@ -11,38 +12,69 @@ namespace Win.Sfs.SettleAccount.Reports.InvoiceSettledDiffs
{
public InvoiceSettledDiff()
{ }
public InvoiceSettledDiff(Guid Id,Guid parentId, string materialCode, decimal invoiceQty, decimal settleQty,string version, decimal diffqty):base(Id)
public InvoiceSettledDiff(string version, string sapMaterialGroup, string sapMaterialCode, string factory, string materialCode, string materialDesc, decimal invoiceQty, decimal invoiceAmt, decimal invoicePrice, decimal settleQty, decimal diffQty, decimal cP7ScrapQty, decimal claimQty, decimal salePrice, decimal diffPrice)
{
ParentId = parentId;
Version = version;
SapMaterialGroup = sapMaterialGroup;
SapMaterialCode = sapMaterialCode;
Factory = factory;
MaterialCode = materialCode;
MaterialDesc = materialDesc;
InvoiceQty = invoiceQty;
InvoiceAmt = invoiceAmt;
InvoicePrice = invoicePrice;
SettleQty = settleQty;
Version = version;
DiffQty = diffqty;
DiffQty = diffQty;
CP7ScrapQty = cP7ScrapQty;
ClaimQty = claimQty;
SalePrice = salePrice;
DiffPrice = diffPrice;
}
[ExporterHeader(DisplayName = "期间")]
public string Version { get; set; }
[ExporterHeader(DisplayName = "物料组")]
public string SapMaterialGroup { get; set; }
[ExporterHeader(DisplayName = "SAP编号")]
public string SapMaterialCode { get; set; }
[ExporterHeader(DisplayName = "工厂")]
public string Factory { get; set; }
[ExporterHeader(DisplayName = "零件编号")]
public string MaterialCode { get; set; }
[ExporterHeader(DisplayName = "零件名称")]
public string MaterialDesc { get; set; }
[ExporterHeader(DisplayName = "开票数量")]
public decimal InvoiceQty { get; set; }
[ExporterHeader(DisplayName = "金额")]
public decimal InvoiceAmt { get; set; }
[ExporterHeader(DisplayName = "开票单价")]
public decimal InvoicePrice { get; set; }
[ExporterHeader(DisplayName = "结算数量")]
public decimal SettleQty { get; set; }
[ExporterHeader(DisplayName = "数量差")]
public decimal DiffQty { get; set; }
[ExporterHeader(DisplayName = "CP7报废")]
public decimal CP7ScrapQty { get; set; }
[ExporterHeader(DisplayName = "索赔/退货")]
public decimal ClaimQty { get; set; }
[ExporterHeader(DisplayName = "定价")]
public decimal SalePrice { get; set; }
[ExporterHeader(DisplayName = "价格差异")]
public decimal DiffPrice { get; set; }
}
/// <summary>
/// 父ID
/// </summary>
public Guid ParentId { set; get; }
/// <summary>
/// 物料编码
/// </summary>
public string MaterialCode { set; get; }
/// <summary>
/// 发票数量
/// </summary>
public decimal InvoiceQty { set; get; }
/// <summary>
/// 结算数量
/// </summary>
public decimal SettleQty { set; get; }
public string Version { set; get; }
public decimal DiffQty { set; get; }
}
}

106
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/InvoiceSettledDiffDapperRepository.cs

@ -20,39 +20,93 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob
public virtual List<InvoiceSettledDiff> GetInvoiceSettledDiffReportList(string version,string year, string tablename ,string materialcode)
{
string str = string.Empty;
str += " where 1=1 ";
//if (!string.IsNullOrEmpty(year))
//string str = string.Empty;
//str += " where 1=1 ";
////if (!string.IsNullOrEmpty(year))
////{
//// str += string.Format(" and year='{0}' ", year);
////}
//if (!string.IsNullOrEmpty(version))
//{
// str += string.Format(" and year='{0}' ", year);
// str += string.Format(" and version='{0}' ", version);
//}
if (!string.IsNullOrEmpty(version))
{
str += string.Format(" and version='{0}' ", version);
}
//// string sqlString = "select "+ string.Format(" {0} as Version ,",version) + "a.MaterialCode,isnull(b.qty,0) InvoiceQty,isnull(c.qty,0) SettleQty, (isnull(b.qty,0)-isnull(c.qty,0)) as DiffQty from (\n" +
//// " select distinct MaterialCode from( \n"+
////"select distinct MaterialCode from Set_Invoice {0}\n" +
//// "union all\n" +
//// "select distinct MaterialCode from {1} {0}\n" +
//// ") temp \n"+
//// ") as a\n" +
//// "left join\n" +
//// "\n" +
//// "(select SUM(QTY) qty,MaterialCode from Set_Invoice {0} GROUP BY MaterialCode) b on a.MaterialCode=b.MaterialCode\n" +
//// "\n" +
//// "left join\n" +
//// "(select SUM(QTY) qty,MaterialCode from {1} {0} GROUP BY MaterialCode) c on a.MaterialCode=c.MaterialCode";
string sqlString =
"SELECT \n" + string.Format(" '{0}' as Version ,", version) + "\n" +
" b.*,\n" +
" ISnull(\n" +
" c.Qty,\n" +
" IsNull( d.qty, 0 )) SettleQty,\n" +
"CASE\n" +
" \n" +
" WHEN e.Type = 'CP7报废' THEN\n" +
" isnull( e.Qty, 0 ) ELSE 0 \n" +
" END AS CP7ScrapQty,\n" +
"CASE\n" +
" \n" +
" WHEN e.Type = '索赔' THEN\n" +
" isnull( e.Qty, 0 ) ELSE 0 \n" +
" END AS ClaimQty,\n" +
" (\n" +
" b.InvoiceQty - ISnull(\n" +
" c.Qty,\n" +
" IsNull( d.qty, 0 ))) DiffQty,\n" +
" Isnull( f.Price, 0 ) SalePrice,\n" +
" b.InvoicePrice - Isnull( f.Price, 0 ) DiffPrice,\n" +
" '' AS SapMaterialCode \n" +
"FROM\n" +
" (\n" +
" SELECT\n" +
" Factory, MaterialCode,\n" +
" SUM( QTY ) InvoiceQty,\n" +
" sum( amt ) InvoiceAmt,\n" +
" sum( amt )/ sum( Qty ) InvoicePrice \n" +
" FROM\n" +
" Set_Invoice \n" +
" WHERE\n" +
" version = '{0}' \n" +
" GROUP BY\n" +
" MaterialCode,Factory \n" +
" ) b\n" +
" LEFT JOIN ( SELECT SUM( QTY ) Qty, MaterialCode FROM Set_settle WHERE version = '{0}' GROUP BY MaterialCode ) c ON b.MaterialCode = c.MaterialCode\n" +
" LEFT JOIN ( SELECT SUM( QTY ) qty, MaterialCode FROM Set_KanbanSettle WHERE version = '{0}' GROUP BY MaterialCode ) d ON b.MaterialCode = d.MaterialCode\n" +
" LEFT JOIN ( SELECT * FROM Set_ScrapClaims WHERE version = '{0}' ) e ON b.MaterialCode = e.MaterialCode\n" +
" LEFT JOIN ( SELECT * FROM Set_PriceList WHERE version = '{0}' ) f ON b.MaterialCode = f.MaterialCode";
string _sql = string.Format(sqlString, version);
var _query = DbConnection.Query<InvoiceSettledDiff>(_sql);
var _list = _query.ToList();
if (!string.IsNullOrEmpty(materialcode))
{
str += string.Format(" and materialcode='{0}' ", materialcode);
_list= _list.Where(p => p.MaterialCode == materialcode).ToList();
}
string sqlString = "select "+ string.Format(" {0} as Version ,",version) + "a.MaterialCode,isnull(b.qty,0) InvoiceQty,isnull(c.qty,0) SettleQty, (isnull(b.qty,0)-isnull(c.qty,0)) as DiffQty from (\n" +
" select distinct MaterialCode from( \n"+
"select distinct MaterialCode from Set_Invoice {0}\n" +
"union all\n" +
"select distinct MaterialCode from {1} {0}\n" +
") temp \n"+
") as a\n" +
"left join\n" +
"\n" +
"(select SUM(QTY) qty,MaterialCode from Set_Invoice {0} GROUP BY MaterialCode) b on a.MaterialCode=b.MaterialCode\n" +
"\n" +
"left join\n" +
"(select SUM(QTY) qty,MaterialCode from {1} {0} GROUP BY MaterialCode) c on a.MaterialCode=c.MaterialCode";
string _sql = string.Format(sqlString, str, tablename);
var _query = DbConnection.Query<InvoiceSettledDiff>(_sql);
return _query.ToList();
return _list;
}
//public virtual async Task<List<string>> GetUpFileAsync(string taskid)

2
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/PriceQtyDiffDapperReportRepository.cs

@ -46,7 +46,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" FROM(SELECT DISTINCT MaterialCode " +
" FROM(SELECT DISTINCT MaterialCode " +
" FROM Set_Invoice " +
" WHERE(Version = '{0}') " +
" WHERE(Version = '{0}') " +
" UNION ALL " +
" SELECT DISTINCT b.SettleMaterialCode AS MaterialCode " +
" FROM Set_item_invoice_price AS a INNER JOIN " +

26
src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/InvoiceSettledDiffExportService.cs

@ -56,12 +56,26 @@ namespace SettleAccount.Job.Services
//_list.Add(new InvoiceSettledDiff(Guid.NewGuid(), _id, itm.MaterialCode, itm.InvoiceQty, itm.SettleQty));
_lsExport.Add(new InvoiceSettledDiffExportDto()
{
Version=itm.Version,
MaterialCode = itm.MaterialCode,
InvoiceQty = itm.InvoiceQty,
SettleQty = itm.SettleQty,
DiffQty=itm.DiffQty
});
Version =itm. Version ,
MaterialCode =itm. MaterialCode ,
InvoiceQty =itm. InvoiceQty ,
InvoiceAmt =itm. InvoiceAmt ,
InvoicePrice =itm. InvoicePrice ,
SettleQty =itm. SettleQty ,
CP7ScrapQty =itm. CP7ScrapQty ,
ClaimQty =itm. ClaimQty ,
DiffQty =itm. DiffQty ,
SalePrice =itm. SalePrice ,
DiffPrice =itm. DiffPrice ,
SapMaterialCode =itm.SapMaterialCode ,
Factory = itm.Factory
});
}

28
src/Modules/SettleAccount/src/SettleAccount.Job/Services/SettleAccount/SettleAccountImportService.cs

@ -53,6 +53,7 @@ namespace TaskJob.Services
var factory = customConditions.Where(p => p.Name == "Factory").FirstOrDefault().Value;
//_versionRepository.Delete(version);
//_repository.Delete(version);
List<Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount> _setls = new List<Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount>();
var _id = Guid.NewGuid();
foreach (var itm in fileName)
@ -62,7 +63,7 @@ namespace TaskJob.Services
var filePath = fileSavePath + itm;//获取到导入的excel
var exten = Path.GetExtension(fileSavePath);
List<Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount> _setls = new List<Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount>();
List<string> _errorList = new List<string>();
var checkList = new List<ErrorExportDto>();
@ -130,29 +131,22 @@ namespace TaskJob.Services
else
{
// _setls= _inputService.Input<Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount>(filePath);
var errorlist=new List<ErrorExportDto>();
var dtoList = _inputService.Input<SettleAccountImportDto>(filePath,null,errorlist);
var errorlist = new List<ErrorExportDto>();
var dtoList = _inputService.Input<SettleAccountImportDto>(filePath, null, errorlist);
foreach (var dto in dtoList)
{
if (dto.KENNCode.Length == 6)
{
dto.KENNCode = "0" + dto.KENNCode;
}
var _settleaccount=new Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount(Guid.NewGuid(), Guid.NewGuid(),dto.SettleYear, dto.KENNCode,
var _settleaccount = new Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount(Guid.NewGuid(), Guid.NewGuid(), dto.SettleYear, dto.KENNCode,
dto.ChassisNumber, dto.Model, dto.CP5A, dto.CP7,
dto.MaterialCode, dto.Qty, dto.SettlementID, dto.SettlementSupplier,
DateTime.Now.Month.ToString(), dto.SettleYear, _id, version, DateTime.Now,Guid.NewGuid());
DateTime.Now.Month.ToString(), dto.SettleYear, _id, version, DateTime.Now, Guid.NewGuid());
_setls.Add(_settleaccount);
}
}
var _ls = _setls;
var a = _ls.Where(p => string.IsNullOrEmpty(p.KENNCode));
var query = from arc in _ls
group arc by new { arc.ChassisNumber, arc.MaterialCode } into g
where g.Count() > 1
select g;
_repository.Insert(_setls);
_versionRepository.Insert(_id,version, customerCode, customerCode);
@ -169,6 +163,14 @@ namespace TaskJob.Services
throw e;
}
}
_setls = _setls.GroupBy(p => new { p.ChassisNumber, p.MaterialCode, p.KENNCode }).Select(p => p.FirstOrDefault()).ToList();
_repository.Insert(_setls);
_versionRepository.Insert(_id, version, customerCode, customerCode);
return id.ToString();
}
}

6
vue/src/views/login/index.vue

@ -1,14 +1,18 @@
<template>
<div class="wrapper">
<div class="left">
<<<<<<< .mine
<div class="container"><span class="one">SAS/JIT-长春派格汽车塑料技术有限公司结算管理系统</span><span class="two"></span></div>
=======
<div class="container"><span class="one">闻荫科技-长春派格结算管理系统</span><span class="two"></span></div>
>>>>>>> .theirs
<div class="left-pic"/>
<div class="">
<div class="copyright">
长春市闻荫科技
<a
target="_blank"
href="http://www.ccwin-in.com">©2021 闻荫科技-长春派格汽车塑料有限公司结算管理系统</a>
href="http://www.ccwin-in.com">©2021 闻荫科技-长春派格结算管理系统</a>
</div>
</div>
</div>

5
vue/static/config.js

@ -17,7 +17,7 @@ if (process.env.NODE_ENV === 'development') {
public_port: '44378',
backend_port: '44378', */
ip: 'http://192.168.0.214',
ip: 'http://192.168.0.140',
// ip: 'http://149.223.116.5',
auth_port: '8066',
public_port: '8092',
@ -50,7 +50,8 @@ if (process.env.NODE_ENV === 'development') {
// 发布环境
configJSON = {
base: {
ip: 'http://192.168.0.214',
ip: 'http://192.168.0.140',
//ip: 'http://192.168.0.214',
//ip: 'http://149.223.116.5',
//ip: 'http://114.116.225.148',
//ip: 'http://10.123.148.162',

Loading…
Cancel
Save