From 5b53adb69a33b5e4e929a6e0bb23c7fb57804a03 Mon Sep 17 00:00:00 2001
From: 44673626 <44673626@qq.com>
Date: Thu, 18 Nov 2021 16:12:54 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E4=BC=97=E6=9C=AA=E7=BB=93=E6=98=8E?=
=?UTF-8?q?=E7=BB=86=E5=AF=BC=E5=85=A5=E5=90=8E=E7=AB=AF=E6=9C=8D=E5=8A=A1?=
=?UTF-8?q?=E5=92=8C=E5=89=8D=E7=AB=AF=E7=95=8C=E9=9D=A2=E7=9A=84=E5=AF=BC?=
=?UTF-8?q?=E5=85=A5=E5=92=8C=E5=AF=BC=E5=87=BA=E7=AD=89=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../UnSettleAccountImportDto.cs | 2 +-
.../UnSettleAccountAppService.cs | 6 ++--
...ttleAccountApplicationAutoMapperProfile.cs | 28 ++++++++--------
.../UnSettleAccounts/UnSettleAccount.cs | 6 ++--
.../UnSettleAccountVersionRepository.cs | 33 +++++++++++++++----
.../UnSettleAccountImportService.cs | 4 +--
.../SettleAccountJobModule.cs | 5 ++-
vue/src/router/modules/vwFisData.js | 2 +-
.../views/ux/vw/dataInput/r3-open/index.vue | 7 ++--
vue/src/views/ux/vw/dataInput/r3/index.vue | 2 +-
vue/static/tableFieldForSearch.json | 10 +++---
11 files changed, 65 insertions(+), 40 deletions(-)
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnSettleAccounts/UnSettleAccountImportDto.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnSettleAccounts/UnSettleAccountImportDto.cs
index 9a41e069..1b2eb0be 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnSettleAccounts/UnSettleAccountImportDto.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/UnSettleAccounts/UnSettleAccountImportDto.cs
@@ -49,7 +49,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
/// CP7
///
[ImporterHeader(Name = "CP7日期")]
- public virtual DateTime CP7 { set; get; }
+ public virtual DateTime? CP7 { set; get; }
///
/// 零件号
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/UnSettleAccounts/UnSettleAccountAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/UnSettleAccounts/UnSettleAccountAppService.cs
index f2a94aa1..f3a36da0 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/UnSettleAccounts/UnSettleAccountAppService.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/UnSettleAccounts/UnSettleAccountAppService.cs
@@ -101,13 +101,15 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
[Route("ExcelImport")]
[DisableRequestSizeLimit]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
- public async Task UnSettleAccountUploadExcelImport([FromForm] IFormFileCollection files, Guid branchId, string year, string period, string version, string customerCode, string factory)
+ public async Task UnSettleAccountUploadExcelImport([FromForm] IFormFileCollection files, Guid branchId,
+ string year, string period, string version, string customerCode, string factory)
{
List customConditionList = new List();
customConditionList.Add(new CustomCondition() { Name = "Version", Value = version });
customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value = customerCode });
- customConditionList.Add(new CustomCondition() { Name = "Factory", Value = customerCode });
+ customConditionList.Add(new CustomCondition() { Name = "Year", Value = year });
+ customConditionList.Add(new CustomCondition() { Name = "Factory", Value = factory });
var _taskid = await _service.ImportEnqueueAsync(files, "大众FIS未结算明细", CurrentUser, typeof(UnSettleAccountImportService), customConditionList, (rs) => {
});
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs
index 0e1cbd89..c2e7c21c 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs
@@ -201,8 +201,10 @@ namespace Win.Sfs.SettleAccount
CreateMapScrapClaimsVersion();
CreateMapSparePart();
CreateMapSparePartVersion();
+
CreateMapSettleAccount();
CreateMapSettleAccountVersion();
+
CreateMapUnSettleAccount();
CreateMapUnSettleAccountVersion();
@@ -353,27 +355,23 @@ namespace Win.Sfs.SettleAccount
///
private void CreateMapUnSettleAccount()
{
- CreateMap().ReverseMap();
- CreateMap();
- CreateMap();
-
- CreateMap();
-
-
-
- CreateMap();
- CreateMap();
+ CreateMap().ReverseMap();
+ CreateMap();
+ CreateMap();
+ CreateMap();
+ CreateMap();
+ CreateMap();
}
///
/// 大众FIS未结算明细导入-版本
///
private void CreateMapUnSettleAccountVersion()
{
- CreateMap().ReverseMap();
- CreateMap();
- CreateMap();
- CreateMap();
- CreateMap();
+ CreateMap().ReverseMap();
+ CreateMap();
+ CreateMap();
+ CreateMap();
+ CreateMap();
}
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/UnSettleAccounts/UnSettleAccount.cs b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/UnSettleAccounts/UnSettleAccount.cs
index e88e0e8a..9b48cbf2 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/UnSettleAccounts/UnSettleAccount.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/UnSettleAccounts/UnSettleAccount.cs
@@ -47,9 +47,9 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
///
public DateTime CP5A { set; get; }
///
- /// CP7日期
+ /// CP7日期,可空
///
- public DateTime CP7 { set; get; }
+ public DateTime? CP7 { set; get; }
///
/// 零件号
@@ -102,7 +102,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
public UnSettleAccount(
Guid id,
Guid branchId,
- string year, string kENNCode, string chassisNumber, string model, DateTime cP5A, DateTime cP7, string materialCode, decimal qty, string settlementID, string settlementSupplier, string period,string settleYear, Guid parentId,string version , DateTime creationTime, Guid guid,string reason) :base(id)
+ string year, string kENNCode, string chassisNumber, string model, DateTime cP5A, DateTime? cP7, string materialCode, decimal qty, string settlementID, string settlementSupplier, string period,string settleYear, Guid parentId,string version , DateTime creationTime, Guid guid,string reason) :base(id)
{
BranchId = branchId;
Year = year;
diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/UnSettleAccount/UnSettleAccountVersionRepository.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/UnSettleAccount/UnSettleAccountVersionRepository.cs
index 392ba228..4da812ae 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/UnSettleAccount/UnSettleAccountVersionRepository.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/UnSettleAccount/UnSettleAccountVersionRepository.cs
@@ -17,7 +17,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccount
{
- public class UnSettleAccountVersionRepository : EfCoreRepository, ITransientDependency
+ public class UnSettleAccountVersionRepository : EfCoreRepository, ITransientDependency
{
public UnSettleAccountVersionRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider)
{
@@ -37,19 +37,18 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccount
}
return true;
}
-
- public virtual bool Insert(string p_version,string p_customCode,string p_factory)
+ public virtual bool Insert(Guid guid, string p_version, string p_customCode, string p_factory)
{
try
{
DbContext.Database.SetCommandTimeout(1200);
- var _first= GetQueryable().FirstOrDefault(p => p.Version == p_version);
+ var _first = GetQueryable().FirstOrDefault(p => p.Version == p_version);
if (_first == null)
{
- var version = new SettleAccountVersion(GuidGenerator.Create(), GuidGenerator.Create(), DateTime.Now.Year.ToString(), DateTime.Now.Month.ToString(), p_version, p_customCode, p_factory);
- List _ls = new List();
+ var version = new UnSettleAccountVersion(guid, GuidGenerator.Create(), DateTime.Now.Year.ToString(), DateTime.Now.Month.ToString(), p_version, p_customCode, p_factory);
+ List _ls = new List();
_ls.Add(version);
- DbContext.BulkInsert(_ls) ;
+ DbContext.BulkInsert(_ls);
}
}
catch (Exception e)
@@ -58,5 +57,25 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccount
}
return true;
}
+ //public virtual bool Insert(string p_version,string p_customCode,string p_factory)
+ //{
+ // try
+ // {
+ // DbContext.Database.SetCommandTimeout(1200);
+ // var _first= GetQueryable().FirstOrDefault(p => p.Version == p_version);
+ // if (_first == null)
+ // {
+ // var version = new UnSettleAccountVersion(GuidGenerator.Create(), GuidGenerator.Create(), DateTime.Now.Year.ToString(), DateTime.Now.Month.ToString(), p_version, p_customCode, p_factory);
+ // List _ls = new List();
+ // _ls.Add(version);
+ // DbContext.BulkInsert(_ls) ;
+ // }
+ // }
+ // catch (Exception e)
+ // {
+ // throw e;
+ // }
+ // return true;
+ //}
}
}
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/UnSettleAccount/UnSettleAccountImportService.cs b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/UnSettleAccount/UnSettleAccountImportService.cs
index 9322831d..fcc1167c 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/UnSettleAccount/UnSettleAccountImportService.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/UnSettleAccount/UnSettleAccountImportService.cs
@@ -42,7 +42,7 @@ namespace TaskJob.Services
var version = customConditions.Where(p => p.Name == "Version").FirstOrDefault().Value;
var customerCode = customConditions.Where(p => p.Name == "CustomerCode").FirstOrDefault().Value;
var year = customConditions.Where(p => p.Name == "Year").FirstOrDefault().Value;
- var period = customConditions.Where(p => p.Name == "Period").FirstOrDefault().Value;
+ //var period = customConditions.Where(p => p.Name == "Period").FirstOrDefault().Value;
var factory = customConditions.Where(p => p.Name == "Factory").FirstOrDefault().Value;
//_versionRepository.Delete(version);
//_repository.Delete(version);
@@ -85,7 +85,7 @@ namespace TaskJob.Services
where g.Count() > 1
select g;
_repository.Insert(_setls);
- _versionRepository.Insert(version, customerCode, customerCode);
+ _versionRepository.Insert(_id, version, customerCode, customerCode);
#region
diff --git a/src/Modules/SettleAccount/src/SettleAccount.Job/SettleAccountJobModule.cs b/src/Modules/SettleAccount/src/SettleAccount.Job/SettleAccountJobModule.cs
index fe54a625..03164267 100644
--- a/src/Modules/SettleAccount/src/SettleAccount.Job/SettleAccountJobModule.cs
+++ b/src/Modules/SettleAccount/src/SettleAccount.Job/SettleAccountJobModule.cs
@@ -56,7 +56,10 @@ namespace Win.Sfs.SettleAccount
{
return implementationFactory.GetService();
}
-
+ if (key.Equals(typeof(UnSettleAccountImportService).FullName))
+ {
+ return implementationFactory.GetService();
+ }
if (key.Equals(typeof(InvoiceImportService).FullName))
{
return implementationFactory.GetService();
diff --git a/vue/src/router/modules/vwFisData.js b/vue/src/router/modules/vwFisData.js
index 213c3609..51e0a383 100644
--- a/vue/src/router/modules/vwFisData.js
+++ b/vue/src/router/modules/vwFisData.js
@@ -17,7 +17,7 @@ const vwFisDataRouter = {
},
children: [
{
- path: '/settleAccount',
+ path: '/unSettleAccount',
component: () => import('@/views/ux/vw/dataInput/r3-open'),
name: 'SettleAccount',//命名路由
meta: {
diff --git a/vue/src/views/ux/vw/dataInput/r3-open/index.vue b/vue/src/views/ux/vw/dataInput/r3-open/index.vue
index 49e10a41..5da23df7 100644
--- a/vue/src/views/ux/vw/dataInput/r3-open/index.vue
+++ b/vue/src/views/ux/vw/dataInput/r3-open/index.vue
@@ -394,7 +394,7 @@ export default {
}
console.log("R3已结导出:" + JSON.stringify(this.versionValueVerson));
this.$axios
- .gets("/api/settleaccount/UnSettleAccount/Export", {
+ .posts("/api/settleaccount/UnSettleAccount/Export", {
version: this.versionValueVerson,
})
.then((res) => {
@@ -429,7 +429,10 @@ export default {
}
this.listLoading = false;
});
- });
+ })
+ .catch(() => {
+ this.listLoading = false;
+ });;
},
getList() {
this.listLoading = true;
diff --git a/vue/src/views/ux/vw/dataInput/r3/index.vue b/vue/src/views/ux/vw/dataInput/r3/index.vue
index c32408dc..17371498 100644
--- a/vue/src/views/ux/vw/dataInput/r3/index.vue
+++ b/vue/src/views/ux/vw/dataInput/r3/index.vue
@@ -416,7 +416,7 @@ export default {
}
console.log("R3已结导出:" + JSON.stringify(this.versionValueVerson));
this.$axios
- .gets("/api/settleaccount/SettleAccount/Export", {
+ .posts("/api/settleaccount/SettleAccount/Export", {
version: this.versionValueVerson,
})
.then((res) => {
diff --git a/vue/static/tableFieldForSearch.json b/vue/static/tableFieldForSearch.json
index f7e2ddd1..386df8d8 100644
--- a/vue/static/tableFieldForSearch.json
+++ b/vue/static/tableFieldForSearch.json
@@ -1898,17 +1898,17 @@
{
"fieldId": 0,
"formType": "text",
- "name": "物料凭证",
+ "name": "工厂",
"type": 1,
"value": "",
"fieldType": 1,
- "fieldName": "textCode",
+ "fieldName": "factory",
"setting": []
},
{
"fieldId": 1,
"formType": "text",
- "name": "物料编号",
+ "name": "物料号",
"type": 1,
"value": "",
"fieldType": 1,
@@ -1918,11 +1918,11 @@
{
"fieldId": 1,
"formType": "text",
- "name": "工厂",
+ "name": "零件名称",
"type": 1,
"value": "",
"fieldType": 1,
- "fieldName": "factory",
+ "fieldName": "materialDesc",
"setting": []
}
]