wanggang 1 year ago
parent
commit
b71f7f4a6b
  1. 8
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/material-relationship.js
  2. 0
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/tb_re-parts-relationship_service.js
  3. 525
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js
  4. 0
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/tb_re-parts-relationship.js
  5. 80
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Boms/BomAppService.cs

8
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/material-relationship.js

@ -1,5 +1,5 @@
const schema = {
title: "物料主数据",
title: "客户零件关系",
type: "object",
properties: {
erpMaterialCode: {
@ -19,8 +19,10 @@ const schema = {
const baseUrl = "settleaccount/material-relationship";
const queryUrl = `${baseUrl}/get-list`;
const importUrl = `${baseUrl}/import`;
const exportUrl = `${baseUrl}/export`;
const queryMethod = "POST";
const importMethod = "POST";
const exportMethod = "POST";
export default function () {
@ -30,7 +32,7 @@ export default function () {
url: queryUrl,
method: queryMethod,
schema: {
title: "物料主数据",
title: "客户零件关系",
type: "object",
properties: {
filters: {
@ -82,8 +84,10 @@ export default function () {
},
edit: {
queryUrl,
importUrl,
exportUrl,
queryMethod,
importMethod,
exportMethod,
schema: schema,
},

0
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/tb_re-parts-relationship_service.js

525
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js

@ -24,7 +24,7 @@ export default [
},
},
{
path: "bbac_se_detail",
path: "bbac_se_detail_service",
meta: {
type: "page",
title: "JIS发运数据",
@ -32,7 +32,7 @@ export default [
},
},
{
path: "bbac_se_edi",
path: "bbac_se_edi_service",
meta: {
type: "page",
title: "EDI数据",
@ -41,37 +41,544 @@ export default [
},
],
},
{
path: "contrast",
meta: {
type: "group",
title: "数据对比",
icon: "folder",
},
children: [
{
path: "bbac_sa_detail_jobservice",
meta: {
type: "page",
title: "EDI与发运数据对比",
icon: "file",
},
},
{
path: "bbac_sa_detail_jobservice",
meta: {
type: "page",
title: "EDI、发运与结算比对",
icon: "file",
},
},
{
path: "bbac_sa_detail_jobservice",
meta: {
type: "page",
title: "发运与结算数据二次比对",
icon: "file",
},
},
{
path: "bbac_sa_detail_jobservice",
meta: {
type: "page",
title: "买单件发运与结算数据三次比对",
icon: "file",
},
},
],
/* path: "business",
},
{
path: "settlement",
meta: {
type: "group",
title: "结算开票",
icon: "folder",
},
children: [
{
path: "bbac_can_sa_service",
meta: {
type: "page",
title: "BBAC可结算单",
icon: "file",
},
},
{
path: "bbac_not_sa_service",
meta: {
type: "page",
title: "不可结算单",
icon: "file",
},
},
{
path: "bbac_ba_service",
meta: {
type: "page",
title: "商务审批",
icon: "file",
},
},
{
path: "bbac_pd_service",
meta: {
type: "page",
title: "寄售库库存扣减审批",
icon: "file",
},
},
],
},
],
},
{
path: "jis-hbpo",
meta: {
type: "group",
title: "JIS-HBPO",
icon: "folder",
},
path: "business",
children: [
{
path: "input",
meta: {
type: "group",
title: "数据输入",
icon: "folder",
},
children: [
{
path: "hbpo_sa_service",
meta: {
type: "page",
title: "JIS结算数据",
icon: "file",
},
},
{
path: "hbpo_se_detail_service",
meta: {
type: "page",
title: "JIS发运数据",
icon: "file",
},
},
{
path: "hbpo_se_edi_service",
meta: {
type: "page",
title: "EDI数据",
icon: "file",
},
},
],
},
{
path: "contrast",
meta: {
type: "group",
title: "数据对比",
icon: "folder",
},
children: [
{
path: "hbpo_sa_detail_jobservice",
meta: {
type: "page",
title: "EDI与发运数据对比",
icon: "file",
},
},
{
path: "hbpo_sa_detail_jobservice",
meta: {
type: "page",
title: "EDI、发运与结算比对",
icon: "file",
},
},
{
path: "hbpo_sa_detail_jobservice",
meta: {
type: "page",
title: "发运与结算数据二次比对",
icon: "file",
},
},
],
},
{
path: "settlement",
meta: {
type: "group",
title: "结算开票",
icon: "folder",
},
children: [
{
path: "hbpo_can_sa_service",
meta: {
type: "page",
title: "可结算单",
icon: "file",
},
},
{
path: "hbpo_not_sa_service",
meta: {
type: "page",
title: "不可结算单",
icon: "file",
},
},
{
path: "hbpo_ba_service",
meta: {
type: "page",
title: "商务审批",
icon: "file",
},
},
{
path: "hbpo_pd_service",
meta: {
type: "page",
title: "寄售库库存扣减审批",
icon: "file",
},
},
],
},
],
},
{
path: "jit",
meta: {
type: "group",
title: "直供件",
icon: "folder",
},
path: "business",
children: [
{
path: "input",
meta: {
type: "group",
title: "数据输入",
icon: "folder",
},
children: [
{
path: "pub_sa_service",
meta: {
type: "page",
title: "结算数据",
icon: "file",
},
},
{
path: "pub_se_detail_service",
meta: {
type: "page",
title: "发运数据",
icon: "file",
},
},
],
},
{
path: "contrast",
meta: {
type: "group",
title: "数据对比",
icon: "folder",
},
children: [
{
path: "pub_sa_detail_jobservice",
meta: {
type: "page",
title: "发运与结算比对",
icon: "file",
},
},
{
path: "pub_sa_detail_jobservice",
meta: {
type: "page",
title: "发运与结算二次比对",
icon: "file",
},
},
],
},
{
path: "settlement",
meta: {
type: "group",
title: "结算开票",
icon: "folder",
},
children: [
{
path: "pub_can_sa_service",
meta: {
type: "page",
title: "可结算单",
icon: "file",
},
},
{
path: "pub_not_sa_service",
meta: {
type: "page",
title: "不可结算单",
icon: "file",
},
},
{
path: "pub_ba_service",
meta: {
type: "page",
title: "商务审批",
icon: "file",
},
},
{
path: "pub_pd_service",
meta: {
type: "page",
title: "寄售库库存扣减审批",
icon: "file",
},
},
],
},
],
},
{
path: "bj",
meta: {
type: "group",
title: "备件",
icon: "folder",
},
path: "business",
children: [
{
path: "input",
meta: {
type: "group",
title: "数据输入",
icon: "folder",
},
children: [
{
path: "pub_sa_service",
meta: {
type: "page",
title: "结算数据",
icon: "file",
},
},
{
path: "pub_se_detail_service",
meta: {
type: "page",
title: "发运数据",
icon: "file",
},
},
],
},
{
path: "contrast",
meta: {
type: "group",
title: "数据对比",
icon: "folder",
},
children: [
{
path: "pub_sa_detail_jobservice",
meta: {
type: "page",
title: "发运与结算比对",
icon: "file",
},
},
{
path: "pub_sa_detail_jobservice",
meta: {
type: "page",
title: "发运与结算二次比对",
icon: "file",
},
},
],
},
{
path: "settlement",
meta: {
type: "group",
title: "结算开票",
icon: "folder",
},
children: [
{
path: "pub_can_sa_service",
meta: {
type: "page",
title: "可结算单",
icon: "file",
},
},
{
path: "pub_not_sa_service",
meta: {
type: "page",
title: "不可结算单",
icon: "file",
},
},
{
path: "pub_ba_service",
meta: {
type: "page",
title: "商务审批",
icon: "file",
},
},
{
path: "pub_pd_service",
meta: {
type: "page",
title: "寄售库库存扣减审批",
icon: "file",
},
},
],
},
],
},
{
path: "in",
meta: {
type: "group",
title: "印度件",
icon: "folder",
},
path: "business",
children: [
{
path: "input",
meta: {
type: "group",
title: "数据输入",
icon: "folder",
},
children: [
{
path: "pub_sa_service",
meta: {
type: "page",
title: "结算数据",
icon: "file",
},
},
{
path: "pub_se_detail_service",
meta: {
type: "page",
title: "发运数据",
icon: "file",
},
},
],
},
{
path: "contrast",
meta: {
type: "group",
title: "数据对比",
icon: "folder",
},
children: [
{
path: "pub_sa_detail_jobservice",
meta: {
type: "page",
title: "发运与结算比对",
icon: "file",
},
},
{
path: "pub_sa_detail_jobservice",
meta: {
type: "page",
title: "发运与结算二次比对",
icon: "file",
},
},
],
},
{
path: "settlement",
meta: {
type: "group",
title: "结算开票",
icon: "folder",
},
children: [
{
path: "pub_can_sa_service",
meta: {
type: "page",
title: "可结算单",
icon: "file",
},
},
{
path: "pub_not_sa_service",
meta: {
type: "page",
title: "不可结算单",
icon: "file",
},
},
{
path: "pub_ba_service",
meta: {
type: "page",
title: "商务审批",
icon: "file",
},
},
{
path: "pub_pd_service",
meta: {
type: "page",
title: "寄售库库存扣减审批",
icon: "file",
},
},
],
},
],
},
{
path: "inspect",
meta: {
type: "group",
title: "商务审核",
icon: "folder",
}, */
},
children: [
{
path: "invoice_grp_dto",
meta: {
type: "page",
title: "财务管理审核",
icon: "file",
},
},
],
},
];

0
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/tb_re-parts-relationship.js

80
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Boms/BomAppService.cs

@ -27,12 +27,12 @@ namespace Win.Sfs.SettleAccount.Boms
public class BomAppService : SettleAccountApplicationBase<Bom>
{
/// <summary>
/// BOM�ִ�
/// BOM仓储
/// </summary>
private readonly INormalEfCoreRepository<Bom, Guid> _repository;
/// <summary>
/// ����
/// 构造
/// </summary>
public BomAppService(
INormalEfCoreRepository<Bom, Guid> repository,
@ -45,9 +45,9 @@ namespace Win.Sfs.SettleAccount.Boms
_repository = repository;
}
#region ����
#region 导出
/// <summary>
/// ����
/// 导出
/// </summary>
[HttpPost]
public virtual async Task<string> ExportAsync(BomRequestDto input)
@ -57,14 +57,14 @@ namespace Win.Sfs.SettleAccount.Boms
0, true);
var dtoDetails = ObjectMapper.Map<List<Bom>, List<BomExportDto>>(entities);
//������������
//声明导出容器
ExportImporter _exportImporter = new ExportImporter();
var result = await _exportImporter.ExcelExporter(dtoDetails);
result.ShouldNotBeNull();
//���浼���ļ�����������ɶ�����
//保存导出文件到服务器存成二进制
await _excelImportService.SaveBlobAsync(
new SaveExcelImportInputDto
{
@ -78,7 +78,7 @@ namespace Win.Sfs.SettleAccount.Boms
#region CURD
/// <summary>
/// ��ȡ�б�
/// 获取列表
/// </summary>
[HttpPost]
public async Task<PagedResultDto<BomDto>> GetListAsync(BomRequestDto input)
@ -90,13 +90,13 @@ namespace Win.Sfs.SettleAccount.Boms
}
#endregion
#region ԭ������������
// #region ���뵼������
#region 原方法(废弃)
// #region 导入导出功能
// /// <summary>
// /// ���빦��
// /// 导入功能
// /// </summary>
// /// <param name="files">�ϴ����ļ�(ǰ���Ѿ�����ֻ���ϴ�һ������)</param>
// /// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
// /// <returns></returns>
// [HttpPost]
// [Route("ExcelImport-Map")]
@ -121,7 +121,7 @@ namespace Win.Sfs.SettleAccount.Boms
// {
// if (itm.Count > 1)
// {
// checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, string.Empty, string.Empty, string.Format("���ܵ��븸����{0},�ӱ���{1}���ظ�����", itm.ParentItmeCode, itm.ChildItemCode), string.Empty));
// checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, string.Empty, string.Empty, string.Format("不能导入父编码{0},子编码{1}有重复数据", itm.ParentItmeCode, itm.ChildItemCode), string.Empty));
// }
// }
// var _id = GuidGenerator.Create();
@ -131,7 +131,7 @@ namespace Win.Sfs.SettleAccount.Boms
// {
// if (!_matList.Any(p => p.MaterialCode == itm.ParentItemCode))
// {
// checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, itm.ParentItemCode, string.Empty, string.Format("���������ݲ��������Ϻ�{0}��", itm.ParentItemCode), string.Empty));
// checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, itm.ParentItemCode, string.Empty, string.Format("物料主数据不存在物料号{0}!", itm.ParentItemCode), string.Empty));
// continue;
// }
// itm.SetValue(GuidGenerator.Create(), branchId, year, period, version, _id, factory);
@ -150,9 +150,9 @@ namespace Win.Sfs.SettleAccount.Boms
// /// <summary>
// /// ���빦��
// /// 导入功能
// /// </summary>
// /// <param name="files">�ϴ����ļ�(ǰ���Ѿ�����ֻ���ϴ�һ������)</param>
// /// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
// /// <returns></returns>
// [HttpPost]
// [Route("ExcelImport")]
@ -176,7 +176,7 @@ namespace Win.Sfs.SettleAccount.Boms
// {
// if (itm.Count > 1)
// {
// checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, string.Empty, string.Empty, string.Format("���ܵ��븸����{0},�ӱ���{1}���ظ�����", itm.ParentItmeCode, itm.ChildItemCode), string.Empty));
// checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, string.Empty, string.Empty, string.Format("不能导入父编码{0},子编码{1}有重复数据", itm.ParentItmeCode, itm.ChildItemCode), string.Empty));
// }
// }
// var _id = GuidGenerator.Create();
@ -186,7 +186,7 @@ namespace Win.Sfs.SettleAccount.Boms
// {
// if (!_matList.Any(p => p.MaterialCode == itm.ParentItemCode))
// {
// checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, itm.ParentItemCode, string.Empty, string.Format("���������ݲ��������Ϻ�{0}��", itm.ParentItemCode), string.Empty));
// checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, itm.ParentItemCode, string.Empty, string.Format("物料主数据不存在物料号{0}!", itm.ParentItemCode), string.Empty));
// continue;
// }
// itm.SetValue(GuidGenerator.Create(),branchId,year,period,version,_id,factory);
@ -201,7 +201,7 @@ namespace Win.Sfs.SettleAccount.Boms
// return ApplicationConsts.SuccessStr;
// }
// /// <summary>
// /// �����ļ�
// /// 导出文件
// /// </summary>
// /// <param name="input"></param>
// /// <returns></returns>
@ -212,7 +212,7 @@ namespace Win.Sfs.SettleAccount.Boms
// {
// IExporter _csv = new CsvExporter();
// IExporter _excel = new ExcelExporter();
// //�������ϰ汾��������������ȫ����
// //导出加上版本过滤条件,不能全导出
// if (input.ParentId != Guid.Empty)
// {
// input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "ParentId", Logic = EnumFilterLogic.And, Value = input.ParentId.ToString() });
@ -225,23 +225,23 @@ namespace Win.Sfs.SettleAccount.Boms
// 0, true);
// var dtoDetails = ObjectMapper.Map<List<Bom>, List<BomExportDto>>(entities);
// string _fileName = string.Empty;
// //������������
// //声明导出容器
// byte[] result = null;
// switch (input.FileType)
// {
// case 0:
// _fileName = string.Format("��Ʒ�ṹ_{0}.csv", input.UserId.ToString());
// _fileName = string.Format("产品结构_{0}.csv", input.UserId.ToString());
// result = await _csv.ExportAsByteArray(dtoDetails);
// break;
// case 1:
// _fileName = string.Format("��Ʒ�ṹ_{0}.xlsx", input.UserId.ToString());
// _fileName = string.Format("产品结构_{0}.xlsx", input.UserId.ToString());
// result = await _excel.ExportAsByteArray(dtoDetails);
// break;
// }
// result.ShouldNotBeNull();
// //���浼���ļ�����������ɶ�����
// //保存导出文件到服务器存成二进制
// await _excelImportService.SaveBlobAsync(
// new SaveExcelImportInputDto
// {
@ -254,13 +254,13 @@ namespace Win.Sfs.SettleAccount.Boms
// #endregion
// /// <summary>
// /// ��ID��ȡΨһʵ��
// /// 按ID获取唯一实体
// /// </summary>
// /// <remarks>
// /// ����ʵ��ȫ������
// /// 返回实体全部属性
// /// </remarks>
// /// <param name="id">ID</param>
// /// <returns>ʵ��DTO</returns>
// /// <returns>实体DTO</returns>
// [HttpGet]
// [Route("{id}")]
//[Authorize(SettleAccountPermissions.Boms.Default)]
@ -291,9 +291,9 @@ namespace Win.Sfs.SettleAccount.Boms
// }
// /// <summary>
// /// ��ȡʵ������
// /// 获取实体总数
// /// </summary>
// /// <returns>ʵ������</returns>
// /// <returns>实体总数</returns>
// [HttpGet]
// [Route("count")]
//[Authorize(SettleAccountPermissions.Boms.Default)]
@ -305,10 +305,10 @@ namespace Win.Sfs.SettleAccount.Boms
// /// <summary>
// /// ɾ��ʵ��
// /// 删除实体
// /// </summary>
// /// <param name="id">ID</param>
// /// <returns>��</returns>
// /// <returns></returns>
// [HttpDelete]
// [Route("{id}")]
//[Authorize(SettleAccountPermissions.Boms.Delete)]
@ -320,10 +320,10 @@ namespace Win.Sfs.SettleAccount.Boms
// }
// /// <summary>
// /// ��IDsɾ��ʵ���б�
// /// 按IDs删除实体列表
// /// </summary>
// /// <param name="ids">IDs</param>
// /// <returns>�Ƿ�ִ�гɹ�</returns>
// /// <returns>是否执行成功</returns>
// [HttpPost]
// [Route("delete")]
//[Authorize(SettleAccountPermissions.Boms.Delete)]
@ -342,13 +342,13 @@ namespace Win.Sfs.SettleAccount.Boms
// ///// <summary>
// /// <summary>
// /// ����ɸѡ������ȡʵ���б�
// /// 根据筛选条件获取实体列表
// /// </summary>
// /// <remarks>
// /// ������������:ɸѡ�����б�,��������,��������,ҳ��
// /// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
// /// </remarks>
// /// <param name="input">��������</param>
// /// <returns>ʵ��DTO�б�</returns>
// /// <param name="input">请求条件</param>
// /// <returns>实体DTO列表</returns>
// [HttpPost]
// [Route("list")]
// [Authorize(SettleAccountPermissions.Boms.Default)]
@ -372,13 +372,13 @@ namespace Win.Sfs.SettleAccount.Boms
// ///// <summary>
// /// <summary>
// /// ����ɸѡ������ȡʵ���б�
// /// 根据筛选条件获取实体列表
// /// </summary>
// /// <remarks>
// /// ������������:ɸѡ�����б�,��������,��������,ҳ��
// /// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
// /// </remarks>
// /// <param name="input">��������</param>
// /// <returns>ʵ��DTO�б�</returns>
// /// <param name="input">请求条件</param>
// /// <returns>实体DTO列表</returns>
// [HttpPost]
// [Route("listVersion")]
// [Authorize(SettleAccountPermissions.Boms.Default)]

Loading…
Cancel
Save