Browse Source

合并冲突

master
学 赵 1 year ago
parent
commit
3a9f3c3993
  1. 70
      .drone.yml
  2. 3
      README.md
  3. 2
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/_check.js
  4. 33
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs
  5. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/MaterialRelationships/MaterialRelationshipAppService.cs
  6. 21
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs
  7. 10
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs
  8. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Syncs/TM_BJBMPT_OTHER_RECORD.cs
  9. 1
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/JisBBACSaSeEdiCompareExportService.cs
  10. 1
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/JisHBPOSaSeEdiCompareExportService.cs
  11. 1
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SaSeEdiCompareExportBaseService.cs

70
.drone.yml

@ -12,12 +12,11 @@ steps:
image: mcr.microsoft.com/dotnet/sdk:6.0 image: mcr.microsoft.com/dotnet/sdk:6.0
commands: commands:
- cd ./build - cd ./build
- pwd
- ls
- chmod 755 ./build.sh - chmod 755 ./build.sh
#- ./build.sh #- ./build.sh
- mkdir publish - mkdir publish
- echo "${DRONE_BUILD_NUMBER}-${DRONE_COMMIT_AUTHOR}-${DRONE_REPO_BRANCH}-${DRONE_COMMIT_SHA:0:8}">./publish/version.txt - echo "${DRONE_BUILD_NUMBER}-${DRONE_COMMIT_AUTHOR}-${DRONE_REPO_BRANCH}-${DRONE_COMMIT_SHA:0:8}\n">./publish/version.txt
- echo ${DRONE_COMMIT_MESSAGE}>./publish/version.txt
- ls publish - ls publish
# - name: publish # - name: publish
@ -41,57 +40,32 @@ steps:
password: Microsoft@2022 password: Microsoft@2022
command_timeout: 10m command_timeout: 10m
script: script:
- scp help - cd /d/BQ-JS/publish
- cd D:/BQ-JS/test - ./stop.cmd
# - stop.cmd - sleep 3s
- cd .. - cd ..
- rm test -Recurse - rm -rf publish
- mkdir publish
# - name: deploy
# image: cschlosser/drone-ftps
# environment:
# FTP_USERNAME: Administrator
# FTP_PASSWORD: Microsoft@2022
# PLUGIN_SECURE: false
# PLUGIN_VERIFY: false
# PLUGIN_HOSTNAME: sftp://dev.ccwin-in.com:16085
# PLUGIN_SRC_DIR: /build/publish
# PLUGIN_DEST_DIR: D:/BQ-JS/test
# PLUGIN_AUTO_CONFIRM: true
# PLUGIN_DEBUG: true
# PLUGIN_ONLY_NEWER: true
- name: deploy - name: deploy
image: appleboy/drone-scp image: hypervtechnics/drone-sftp
settings: settings:
host: dev.ccwin-in.com host: dev.ccwin-in.com
port: 16085 port: 16085
username: Administrator username: Administrator
password: Microsoft@2022 password: Microsoft@2022
command_timeout: 10m source: ./build/publish
target: D:\BQ-JS\test target: /d/BQ-JS/publish
source: build/publish
# - name: deploy - name: start
# image: atmoz/sftp image: appleboy/drone-ssh
# settings: settings:
# host: dev.ccwin-in.com host: dev.ccwin-in.com
# port: 16085 port: 16085
# username: username: Administrator
# from_secret: username password: Microsoft@2022
# password: command_timeout: 10m
# from_secret: password script:
# source: build/publish - cd /d/BQ-JS/publish
# target: D:/BQ-JS/test - ./start.cmd
# - name: start - echo ok
# image: appleboy/drone-ssh
# settings:
# host: dev.ccwin-in.com
# port: 16085
# username: Administrator
# password: Microsoft@2022
# command_timeout: 10m
# script:
# - cd D:/BQ-JS/test
# - start.cmd
# - echo ok

3
README.md

@ -0,0 +1,3 @@
# 说明
在提交中添加 [CI SKIP] 避免自动构建、发布和部署

2
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/_check.js

@ -243,7 +243,7 @@ export default {
}, },
lu: { lu: {
type: "string", type: "string",
title: "零件号", title: "客户零件号",
}, },
partDesc: { partDesc: {
type: "string", type: "string",

33
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs

@ -124,6 +124,10 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
/// <summary> /// <summary>
/// 导入 /// 导入
/// </summary> /// </summary>
/// <remarks>
/// 直供件BBAC、直供件HBPO、备件、印度件
/// 业务结算数据导入
/// </remarks>
[HttpPost] [HttpPost]
public async Task<IActionResult> ImportAsync([FromForm] PUB_SAImportRequestDto pubSaImportRequestDto) public async Task<IActionResult> ImportAsync([FromForm] PUB_SAImportRequestDto pubSaImportRequestDto)
{ {
@ -168,6 +172,12 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
/// <summary> /// <summary>
/// 删除 /// 删除
/// </summary> /// </summary>
/// <remarks>
/// 同时删除
/// 结算主表、明细表
/// 可结算主表、明细表
/// 不可结算明细表(不可结算又没主表)
/// </remarks>
[HttpPost] [HttpPost]
public async Task<IActionResult> DeleteListAsync(List<Guid> ids) public async Task<IActionResult> DeleteListAsync(List<Guid> ids)
{ {
@ -230,6 +240,11 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
/// <summary> /// <summary>
/// 直供件BBAC导入 /// 直供件BBAC导入
/// </summary> /// </summary>
/// <remarks>
/// 导入数据过滤
/// * 筛选 Vendor 为15663496的数据
/// HandleSaDetails方法处理导入的数据
/// </remarks>
private async Task<IActionResult> ImportZhiGongJianBBACAsync([FromForm] IFormFileCollection files) private async Task<IActionResult> ImportZhiGongJianBBACAsync([FromForm] IFormFileCollection files)
{ {
#region 导入数据转换 #region 导入数据转换
@ -359,6 +374,10 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
/// <summary> /// <summary>
/// 数据校验 /// 数据校验
/// </summary> /// </summary>
/// <remarks>
/// 验证结算分组号是否已存在
/// 验证
/// </remarks>
private async Task<List<ErrorExportDto>> CheckAsync(List<PUB_SA_DETAIL> pubSaDetails) private async Task<List<ErrorExportDto>> CheckAsync(List<PUB_SA_DETAIL> pubSaDetails)
{ {
#region 数据校验 #region 数据校验
@ -399,6 +418,11 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
/// <summary> /// <summary>
/// 处理结算数据 /// 处理结算数据
/// </summary> /// </summary>
/// <remarks>
/// 零件号(Lu)格式处理
/// 零件号可能存在颜色码 颜色码和塑件码中间用同一用6个空格替换
/// PN有0开头的数据过滤 '‘’符号
/// </remarks>
private List<PUB_SA_DETAIL> HandleSaDetails(List<PUB_SA_DETAIL> pubSaDetails) private List<PUB_SA_DETAIL> HandleSaDetails(List<PUB_SA_DETAIL> pubSaDetails)
{ {
pubSaDetails.ForEach(pubSaDetail => pubSaDetails.ForEach(pubSaDetail =>
@ -419,6 +443,10 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
/// <summary> /// <summary>
/// 结算数据分组Pn、Lu /// 结算数据分组Pn、Lu
/// </summary> /// </summary>
/// <remarks>
/// 导入文件中可能存在PN+LU相同的数据
/// 根据PN+LU分组合计数量后导入
/// </remarks>
private List<PUB_SA_DETAIL> GroupPnLu(List<PUB_SA_DETAIL> pubSaDetails) private List<PUB_SA_DETAIL> GroupPnLu(List<PUB_SA_DETAIL> pubSaDetails)
{ {
return pubSaDetails.GroupBy(t => new { t.PN, t.LU }).Select(t => return pubSaDetails.GroupBy(t => new { t.PN, t.LU }).Select(t =>
@ -587,6 +615,11 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
/// <summary> /// <summary>
/// 获取结算关联项 /// 获取结算关联项
/// </summary> /// </summary>
/// <remarks>
/// 根据结算主表Id获取关联的结算主表、结算明细表、可结算主表、可结算明细表、不可结算明细表要删除的数据
/// 验证可结算主表状态
/// 只有可结算主表状态为未结状态时才可以删除结算数据
/// </remarks>
private async Task<(List<PUB_SA> pubSas, List<PUB_SA_DETAIL> pubSaDetails, List<PUB_CAN_SA> pubCanSas, List<PUB_CAN_SA_DETAIL> pubCanSaDetails, List<PUB_NOT_SA_DETAIL> pubNotSaDetails)> GetPubSaDelItemsAsync(Guid id) private async Task<(List<PUB_SA> pubSas, List<PUB_SA_DETAIL> pubSaDetails, List<PUB_CAN_SA> pubCanSas, List<PUB_CAN_SA_DETAIL> pubCanSaDetails, List<PUB_NOT_SA_DETAIL> pubNotSaDetails)> GetPubSaDelItemsAsync(Guid id)
{ {
//结算主表 //结算主表

4
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/MaterialRelationships/MaterialRelationshipAppService.cs

@ -51,6 +51,10 @@ public class MaterialRelationshipAppService : SettleAccountApplicationBase<Mater
/// <summary> /// <summary>
/// 导入 /// 导入
/// </summary> /// </summary>
/// <remarks>
/// 数据校验
/// * 根据客户零件号分组判断是否有客户零件号重复的数据
/// </remarks>
[HttpPost] [HttpPost]
public async Task<IActionResult> ImportAsync([FromForm] MaterialRelationshipImportRequestDto materialRelationshipImportRequestDto) public async Task<IActionResult> ImportAsync([FromForm] MaterialRelationshipImportRequestDto materialRelationshipImportRequestDto)
{ {

21
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs

@ -54,19 +54,19 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
} }
#region 导入、导出 #region 导入、导出
///// <summary>
///// 获取导入模板
///// </summary>
//[HttpPost("import-template")]
//public virtual async Task<IActionResult> ImportTemplateAsync()
//{
// await Task.CompletedTask;
// return new Microsoft.AspNetCore.Mvc.OkResult();
//}
/// <summary> /// <summary>
/// 导入 /// 导入
/// </summary> /// </summary>
/// <remarks>
/// * 销售价格单筛选 Plant(客户编码) 为(1040、1046、104T)的数据
/// * 客户零件号为 PartNo+6个空格+ES1+ES2
/// * 根据 合同日期、客户编码、零件号、开始时间、结束时间分组导入(过滤重复数据)
/// 数据校验
/// * 同一合同日期、客户编码、零件号 不能存在时间交集
/// * 判断同一个零件号时间区间是否连续
/// 作废旧合同日期的数据
/// * 比较新导入的数据和数据库中老数据(同一零件号、旧合同日期的数据修改状态为作废)
/// </remarks>
[HttpPost] [HttpPost]
public virtual async Task<IActionResult> ImportAsync([FromForm] IFormFileCollection files, string version) public virtual async Task<IActionResult> ImportAsync([FromForm] IFormFileCollection files, string version)
{ {
@ -247,6 +247,7 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
/// <summary> /// <summary>
/// 修改实体 /// 修改实体
/// 修改作废状态
/// </summary> /// </summary>
[HttpPost] [HttpPost]
public async Task<PriceListDto> UpdateAsync(PriceListUpdateDto input) public async Task<PriceListDto> UpdateAsync(PriceListUpdateDto input)

10
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs

@ -51,6 +51,16 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
/// <summary> /// <summary>
/// 导入 /// 导入
/// </summary> /// </summary>
/// <remarks>
/// * 备件价格单筛选 Plant(客户编码) 为(1049)的数据
/// * 客户零件号为 PartNo+6个空格+ES1+ES2
/// * 根据 合同日期、客户编码、零件号、开始时间、结束时间分组导入(过滤重复数据)
/// 数据校验
/// * 同一合同日期、客户编码、零件号 不能存在时间交集
/// * 判断同一个零件号时间区间是否连续
/// 作废旧合同日期的数据
/// * 比较新导入的数据和数据库中老数据(同一零件号、旧合同日期的数据修改状态为作废)
/// </remarks>
[HttpPost] [HttpPost]
public async Task<IActionResult> ImportAsync([FromForm] IFormFileCollection files, string version) public async Task<IActionResult> ImportAsync([FromForm] IFormFileCollection files, string version)
{ {

2
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Syncs/TM_BJBMPT_OTHER_RECORD.cs

@ -11,7 +11,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
#if DEBUG #if DEBUG
[Table("TM_BJBMPT_OTHER_RECORD")] [Table("TM_BJBMPT_OTHER_RECORD")]
#else #else
[Table("EX_BJBMPT_JIS_RECORD")] [Table("EX_BJBMPT_OTHER_RECORD")]
#endif #endif
public class TM_BJBMPT_OTHER_RECORD public class TM_BJBMPT_OTHER_RECORD
{ {

1
code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/JisBBACSaSeEdiCompareExportService.cs

@ -93,6 +93,7 @@ namespace SettleAccount.Job.Services.Report
#region 结算数据处理 #region 结算数据处理
HandleSaDetails<BBAC_CAN_SA_DETAIL, BBAC_NOT_SA_DETAIL>(saSeEdiCompareDiffs, businessType, version); HandleSaDetails<BBAC_CAN_SA_DETAIL, BBAC_NOT_SA_DETAIL>(saSeEdiCompareDiffs, businessType, version);
HandleSaDetailsMain<BBAC_SA_DETAIL>(saSeEdiCompareDiffs, businessType, version);
#endregion #endregion
if (string.IsNullOrEmpty(lu) == false) if (string.IsNullOrEmpty(lu) == false)

1
code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/JisHBPOSaSeEdiCompareExportService.cs

@ -92,6 +92,7 @@ namespace SettleAccount.Job.Services.Report
#region 结算数据处理 #region 结算数据处理
HandleSaDetails<HBPO_CAN_SA_DETAIL, HBPO_NOT_SA_DETAIL>(saSeEdiCompareDiffs, businessType, version); HandleSaDetails<HBPO_CAN_SA_DETAIL, HBPO_NOT_SA_DETAIL>(saSeEdiCompareDiffs, businessType, version);
HandleSaDetailsMain<HBPO_SA_DETAIL>(saSeEdiCompareDiffs, businessType, version);
#endregion #endregion
if (string.IsNullOrEmpty(lu) == false) if (string.IsNullOrEmpty(lu) == false)

1
code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SaSeEdiCompareExportBaseService.cs

@ -181,6 +181,7 @@ namespace SettleAccount.Job.Services.Report
/// </summary> /// </summary>
public virtual void HandleSaDetailsMain<T>(List<SaSeEdiCompareDiff> saSeEdiCompareDiff, EnumBusinessType businessType, int version) where T : SA_BASE public virtual void HandleSaDetailsMain<T>(List<SaSeEdiCompareDiff> saSeEdiCompareDiff, EnumBusinessType businessType, int version) where T : SA_BASE
{ {
return;
var haveSaHaveSes = saSeEdiCompareDiff.FindAll(t => t.Category == EnumSaSeEdiCompareCategory.HaveSaHaveSeHaveEdi || t.Category == EnumSaSeEdiCompareCategory.HaveSaHaveSeNotHaveEdi); var haveSaHaveSes = saSeEdiCompareDiff.FindAll(t => t.Category == EnumSaSeEdiCompareCategory.HaveSaHaveSeHaveEdi || t.Category == EnumSaSeEdiCompareCategory.HaveSaHaveSeNotHaveEdi);
if (haveSaHaveSes.Any()) if (haveSaHaveSes.Any())
{ {

Loading…
Cancel
Save