Browse Source

更新

master
学 赵 1 year ago
parent
commit
a6fbfc0e3f
  1. 24
      code/.gitignore
  2. 6
      code/WebApp/vanilla/api/user.js
  3. 5
      code/WebApp/vanilla/app.js
  4. 50
      code/WebApp/vanilla/components/form/form-input.js
  5. 20
      code/WebApp/vanilla/components/form/form-item.js
  6. 26
      code/WebApp/vanilla/components/icon/index.js
  7. 127
      code/WebApp/vanilla/components/list/index.js
  8. 1
      code/WebApp/vanilla/config/settings.js
  9. 86
      code/WebApp/vanilla/models/code-setting.js
  10. 2
      code/WebApp/vanilla/models/login.js
  11. 2
      code/WebApp/vanilla/models/role.js
  12. 64
      code/WebApp/vanilla/models/user.js
  13. 22
      code/WebApp/vanilla/request/index.js
  14. 13
      code/WebApp/vanilla/router/index.js
  15. 87
      code/WebApp/vanilla/router/routes.js
  16. 25
      code/WebApp/vanilla/utils/index.js
  17. 113
      code/WebApp/vanilla/utils/validation.js
  18. 28
      code/WebApp/vanilla/views/base-data/code-setting.js
  19. 13
      code/WebApp/vanilla/views/base-data/user.js
  20. 29
      code/WebApp/vanilla/views/login.js
  21. 2
      code/src/AuthServer/AuthServer.Host/appsettings.json
  22. 14
      code/src/Modules/BaseService/BaseService.Application.Contracts/Systems/UserManagement/IUserAppService.cs
  23. 2
      code/src/Modules/BaseService/BaseService.Application/BaseService.Application.csproj
  24. 55
      code/src/Modules/BaseService/BaseService.Application/UserManagement/TokenAppService.cs
  25. 21
      code/src/Modules/BaseService/BaseService.Application/UserManagement/UserAppService.cs
  26. 12
      code/src/Modules/BaseService/BaseService.Host/.config/dotnet-tools.json
  27. 72
      code/src/Modules/BaseService/BaseService.Host/BaseServiceHostModule.cs
  28. 21
      code/src/Modules/BaseService/BaseService.Host/appsettings.json
  29. 2
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Properties/launchSettings.json
  30. 2
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/SettleAccountHttpApiHostModule.cs
  31. 155
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_SE_DETAIL_DTO.cs
  32. 136
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_SE_EDI_DTO.cs
  33. 166
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_SE_DETAIL_DTO.cs
  34. 65
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PURCHASE_PRICE_DTO.cs
  35. 8
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/RequestDto.cs
  36. 104
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/TB_RePartsRelationship_DTO.cs
  37. 30
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Controls/CentralizedControlDtoBase.cs
  38. 20
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/MaterialRelationship/IMaterialRelationshipAppService.cs
  39. 127
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/MaterialRelationship/MaterialRelationshipDtoBase.cs
  40. 80
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SE_DETAIL_Service.cs
  41. 69
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SE_EDI_Service.cs
  42. 77
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SE_DETAIL_SERVICE.cs
  43. 3
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SE_EDI_SERVICE.cs
  44. 129
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PURCHASE_PRICE_SERVICE.cs
  45. 126
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/TB_RePartsRelationship_SERVICE.cs
  46. 148
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Boms/BomAppService.cs
  47. 25
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/CodeSettingTables/CodeSettingAppService.cs
  48. 67
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Controls/CentralizedControlAppService.cs
  49. 1
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/ErpShipping/ErpShippingAppService.cs
  50. 1
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/ErrorListBill/ErrorBillAppService.cs
  51. 1
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/FISes/FISAppService.cs
  52. 3
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Factories/FactoryAppService.cs
  53. 1
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Inventories/InventoryDetailAppService.cs
  54. 1
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Invoices/InvoiceAppService.cs
  55. 1
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/ItemInvoicePrices/ItemInvoicePriceAppService.cs
  56. 621
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/MaterialRelationships/MaterialRelationshipAppService.cs
  57. 1
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/MaterialRelationships/MaterialRelationshipTHAppService.cs
  58. 57
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Materials/MaterialAppService.cs
  59. 1
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prebatch/PrebatchAppService.cs
  60. 361
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs
  61. 60
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs
  62. 1
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/SecMatch/SecMatchAppService.cs
  63. 1
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/SettleAccounts/SettleAccountAppService.cs
  64. 1
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/SettlementParts/SettlementPartAppService.cs
  65. 1
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/UnHQSettleAccounts/UnHQSettleAppService.cs
  66. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.csproj
  67. 71
      code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs
  68. 32
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/PURCHASE_PRICE.cs
  69. 17
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/TB_RePartsRelationship.cs
  70. 7
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/Controls/CentralizedControl.cs
  71. 35
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/MaterialRelationships/MaterialRelationship.cs
  72. 36
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs
  73. 3807
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230711073528_20230711-2.Designer.cs
  74. 39
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230711073528_20230711-2.cs
  75. 3870
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230712032712_20230712-1.Designer.cs
  76. 41
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230712032712_20230712-1.cs
  77. 120
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/SettleAccountDbContextModelSnapshot.cs
  78. 4
      code/src/Shared/Win.Abp.Snowflakes/obj/Debug/netcoreapp5/.NETCoreApp,Version=v5.0.AssemblyAttributes.cs
  79. 20
      code/src/Shared/Win.Abp.Snowflakes/obj/Debug/netcoreapp5/Win.Abp.Snowflakes.AssemblyInfo.cs
  80. 1
      code/src/Shared/Win.Abp.Snowflakes/obj/Debug/netcoreapp5/Win.Abp.Snowflakes.AssemblyInfoInputs.cache
  81. 11
      code/src/Shared/Win.Abp.Snowflakes/obj/Debug/netcoreapp5/Win.Abp.Snowflakes.GeneratedMSBuildEditorConfig.editorconfig
  82. BIN
      code/src/Shared/Win.Abp.Snowflakes/obj/Debug/netcoreapp5/Win.Abp.Snowflakes.assets.cache
  83. BIN
      code/src/Shared/Win.Abp.Snowflakes/obj/Debug/netcoreapp5/Win.Abp.Snowflakes.csproj.AssemblyReference.cache
  84. 74
      code/src/Shared/Win.Abp.Snowflakes/obj/Win.Abp.Snowflakes.csproj.nuget.dgspec.json
  85. 16
      code/src/Shared/Win.Abp.Snowflakes/obj/Win.Abp.Snowflakes.csproj.nuget.g.props
  86. 2
      code/src/Shared/Win.Abp.Snowflakes/obj/Win.Abp.Snowflakes.csproj.nuget.g.targets
  87. 3105
      code/src/Shared/Win.Abp.Snowflakes/obj/project.assets.json
  88. 64
      code/src/Shared/Win.Abp.Snowflakes/obj/project.nuget.cache
  89. 4
      code/src/Shared/Win.Abp/Win.Abp.SerialNumber.Test/obj/Debug/netcoreapp3.1/.NETCoreApp,Version=v3.1.AssemblyAttributes.cs
  90. 23
      code/src/Shared/Win.Abp/Win.Abp.SerialNumber.Test/obj/Debug/netcoreapp3.1/Win.Abp.SerialNumber.Test.AssemblyInfo.cs
  91. 1
      code/src/Shared/Win.Abp/Win.Abp.SerialNumber.Test/obj/Debug/netcoreapp3.1/Win.Abp.SerialNumber.Test.AssemblyInfoInputs.cache
  92. BIN
      code/src/Shared/Win.Abp/Win.Abp.SerialNumber.Test/obj/Debug/netcoreapp3.1/Win.Abp.SerialNumber.Test.assets.cache
  93. 0
      code/src/Shared/Win.Abp/Win.Abp.SerialNumber.Test/obj/Debug/netcoreapp3.1/Win.Abp.SerialNumber.Test.csproj.CopyComplete
  94. 1
      code/src/Shared/Win.Abp/Win.Abp.SerialNumber.Test/obj/Debug/netcoreapp3.1/Win.Abp.SerialNumber.Test.csproj.CoreCompileInputs.cache
  95. 73
      code/src/Shared/Win.Abp/Win.Abp.SerialNumber.Test/obj/Debug/netcoreapp3.1/Win.Abp.SerialNumber.Test.csproj.FileListAbsolute.txt
  96. BIN
      code/src/Shared/Win.Abp/Win.Abp.SerialNumber.Test/obj/Debug/netcoreapp3.1/Win.Abp.SerialNumber.Test.csprojAssemblyReference.cache
  97. BIN
      code/src/Shared/Win.Abp/Win.Abp.SerialNumber.Test/obj/Debug/netcoreapp3.1/Win.Abp.SerialNumber.Test.dll
  98. 1
      code/src/Shared/Win.Abp/Win.Abp.SerialNumber.Test/obj/Debug/netcoreapp3.1/Win.Abp.SerialNumber.Test.genruntimeconfig.cache
  99. BIN
      code/src/Shared/Win.Abp/Win.Abp.SerialNumber.Test/obj/Debug/netcoreapp3.1/Win.Abp.SerialNumber.Test.pdb
  100. BIN
      code/src/Shared/Win.Abp/Win.Abp.SerialNumber.Test/obj/Debug/netcoreapp3.1/apphost.exe

24
code/.gitignore

@ -1,24 +1,5 @@
<<<<<<< HEAD
################################################################################
# 此 .gitignore 文件已由 Microsoft(R) Visual Studio 自动创建。
################################################################################
/src/.vs/SettleAccount/DesignTimeBuild/.dtbcache.v2
/.vs/slnx.sqlite
/src/.vs/SmartFactorySuite/DesignTimeBuild/.dtbcache.v2
/src/.vs/SmartFactorySuite/v16/.suo
/src/.vs/SettleAccount/v16/.suo
/*.rar
/src/Shared
/.vs/Win.Sfs.SmartSettlementSystem.PG/v17/.suo
/src/.vs/SettleAccount/v17/.suo
/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Logs/log-20220226.txt
/src/.vs/SettleAccount/v17/.futdcache.v1
/src/.vs/SettleAccount/v17/fileList.bin
=======
*.bak
*.log
#fe
node_modules/
@ -28,10 +9,11 @@ dist/
.vs/
bin/
obj/
[Ll]og/
[Ll]ogs/
*.suo
*.user
*.db
*.db-shm
*.db-wal
>>>>>>> c0f08a7ed0ffc663a2852d4c0da54a983f033a2f

6
code/WebApp/vanilla/api/user.js

@ -1,5 +1,5 @@
import router from "../router/index.js";
import { get, post } from "../request/index.js";
import request, { get, post } from "../request/index.js";
import jwt_decode from "../lib/jwt-decode/jwt-decode.esm.js";
import qs from "../lib/qs/shim.js";
import { useAppStore } from "../store/index.js";
@ -46,7 +46,9 @@ const logout = () => {
};
const getUser = async () => {
const result = await get("abp/application-configuration");
const result = await request("abp/application-configuration", null, {
method: "GET",
});
const data = result.data;
const user = {};
user.id = data.currentUser.id;

5
code/WebApp/vanilla/app.js

@ -6,12 +6,11 @@ import { Suspense, reactive, onMounted } from "vue";
export default {
components: { ElConfigProvider, Suspense },
template: html`<suspense>
template: html`
<el-config-provider :locale="localeMap.get($i18n.locale)">
<router-view></router-view>
</el-config-provider>
<template #fallback> Loading... </template>
</suspense>`,
`,
setup() {
const localeMap = reactive(
new Map([

50
code/WebApp/vanilla/components/form/form-input.js

@ -1,15 +1,16 @@
import html from "html";
import { ref, reactive, watch } from "vue";
import { ref, reactive, watch, onMounted } from "vue";
import { dayjs } from "element-plus";
import { post } from "../../request/index.js";
import request, { post } from "../../request/index.js";
export default {
template: html`
<template v-if="getDisabled()">
<template v-if="model[prop]!==null">
<el-switch disabled v-model="model[prop]" type="checked" v-if="schema.type==='boolean'" />
<template v-else-if="schema.format==='datetime'">{{dayjs(model[prop]).format('YYYY-MM-DD HH:mm:ss')}}</template>
<template v-else-if="schema.format==='date'">{{dayjs(model[prop]).format('YYYY-MM-DD')}}</template>
<template v-else-if="schema.input==='datetime'">{{dayjs(model[prop]).format('YYYY-MM-DD HH:mm:ss')}}</template>
<template v-else-if="schema.input==='date'">{{dayjs(model[prop]).format('YYYY-MM-DD')}}</template>
<template v-else-if="schema.input==='password'">******</template>
<template v-else>{{model[prop]}}</template>
</template>
</template>
@ -55,28 +56,25 @@ export default {
v-model="model[prop]"
type="password"
show-password
v-if="schema.format==='password'"
v-if="schema.input==='password'"
/>
<el-input :disabled="getDisabled()" :placeholder="schema.title" v-model="model[prop]" type="text" v-else />
</template>
</template>
`,
props: ["modelValue", "schema", "prop", "isReadOnly"],
props: ["modelValue", "schema", "prop", "isReadOnly", "mode"],
emit: ["update:modelValue"],
async setup(props, context) {
setup(props, context) {
const model = reactive(props.modelValue);
watch(model, (value) => {
context.emit("update:modelValue", value);
});
/*start*/
const getDisabled = () => {
if (props.isReadOnly && props.isReadOnly === true) {
if (props.mode === "details") {
return true;
}
if (props.schema.displayOnly) {
return true;
}
if (props.mode === "update" && props.schema.addOnly) {
if (props.mode === "update" && props.schema.readOnly) {
return true;
}
return false;
@ -89,20 +87,22 @@ export default {
const selectProps = ref({});
const selectValues = ref([]);
const options = ref([]);
if (props.schema.options) {
options.value = props.schema.options;
} else if (props.schema.url) {
try {
const url = `${props.schema.url}`;
const result = await post(url, { queryAll: true, query: { isReadonly: null, isDisabled: null, order: null } });
options.value = result.data?.items.map((o) => ({
value: o[props.schema.value],
label: o[props.schema.label],
}));
} catch (error) {
console.log(error);
onMounted(async () => {
if (props.schema.options) {
options.value = props.schema.options;
} else if (props.schema.url) {
try {
const url = `${props.schema.url}`;
const result = await request(url, null, { method: "GET" });
options.value = result.data?.items.map((o) => ({
value: o[props.schema.value],
label: o[props.schema.label],
}));
} catch (error) {
console.log(error);
}
}
}
});
return {
model,
getDisabled,

20
code/WebApp/vanilla/components/form/form-item.js

@ -1,11 +1,13 @@
import html from "html";
import { defineAsyncComponent, ref, reactive, watch } from "vue";
import { format } from "../../utils/index.js";
import { messages } from "../../utils/validation.js";
export default {
name: "formItem",
components: { AppFormInput: defineAsyncComponent(() => import("./form-input.js")) },
template: html`
<template v-if="showItem()">
<template v-if="!schema.hidden">
<template v-if="schema.type==='object'"></template>
<template v-else-if="schema.type!=='array'||schema.items.type!=='array'">
<el-form-item
@ -15,14 +17,14 @@ export default {
:rules="getRules(parentSchema,schema,model)"
:error="mode==='query'?null:getError(prop)"
>
<app-form-input :schema="schema" :prop="prop" v-model="model" :isReadOnly="mode==='details'" />
<app-form-input :schema="schema" :prop="prop" v-model="model" :mode="mode" />
</el-form-item>
</template>
</template>
`,
props: ["modelValue", "mode", "parentSchema", "schema", "prop", "errors"],
emit: ["update:modelValue"],
async setup(props, context) {
setup(props, context) {
const model = reactive(props.modelValue);
watch(model, (value) => {
context.emit("update:modelValue", value);
@ -63,18 +65,18 @@ export default {
}
if (!rule.message) {
if (rule.required) {
rule.message = format(schema.messages.required, property.title);
rule.message = format(messages.required, property.title);
} else if (rule.pattern) {
rule.message = format(schema.messages.pattern, property.title);
rule.message = format(messages.pattern, property.title);
} else if (property.type === "string" || property.type === "number" || property.type === "array") {
if (rule.len) {
rule.message = format(schema.messages[property.type].len, property.title, rule.len);
rule.message = format(messages[property.type].len, property.title, rule.len);
} else if (rule.min) {
rule.message = format(schema.messages[property.type].min, property.title, rule.min);
rule.message = format(messages[property.type].min, property.title, rule.min);
} else if (rule.max) {
rule.message = format(schema.messages[property.type].max, property.title, rule.max);
rule.message = format(messages[property.type].max, property.title, rule.max);
} else if (rule.range) {
rule.message = format(schema.messages[property.type].range, property.title, rule.range);
rule.message = format(messages[property.type].range, property.title, rule.range);
}
}
}

26
code/WebApp/vanilla/components/icon/index.js

@ -14,29 +14,23 @@ export default {
default: "file",
},
},
async setup(props) {
setup(props) {
const svg = ref(null);
const appStore = useAppStore();
onMounted(async () => {
if (!props.name.startsWith("ep-")) {
try {
const url = `./assets/icons/${props.name}.svg`;
navigator.locks.request(url, async () => {
const appStore = useAppStore();
if (appStore.cache.has(url)) {
svg.value = appStore.cache.get(url);
} else {
const response = await fetch(url);
if (response.ok && response.status === 200) {
svg.value = await response.text();
appStore.cache.set(url, svg.value);
}
}
});
if (!appStore.cache.has(url)) {
const response = await fetch(url);
const result = await response.text();
appStore.cache.set(url, result);
}
svg.value = appStore.cache.get(url);
} catch (error) {
console.log(error);
if (!svg.value) {
svg.value = `<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32zm0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32zm448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32zm-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32zM195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0zm-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"></path></svg>`;
}
} finally {
svg.value ??= `<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32zm0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32zm448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32zm-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32zM195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0zm-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"></path></svg>`;
}
}
});

127
code/WebApp/vanilla/components/list/index.js

@ -3,10 +3,11 @@ import request, { get, post } from "../../request/index.js";
import { defineAsyncComponent, ref, reactive, onMounted } from "vue";
import { useRoute, useRouter } from "vue-router";
import { useI18n } from "vue-i18n";
import { listToTree, schemaToModel } from "../../utils/index.js";
import { listToTree, schemaToModel, importFunction } from "../../utils/index.js";
import qs from "../../lib/qs/shim.js";
import VueOfficeExcel from "@vue-office/excel";
import { camelCase, capitalize } from "lodash";
import { useAppStore } from "../../store/index.js";
export default {
name: "AppList",
@ -40,6 +41,7 @@ export default {
:class="item.meta.htmlClass??'el-button--primary'"
v-if="item.meta.isTop"
@click="click(item,selectedRows)"
:disabled="item.meta.disabled && item.meta.disabled(selectedRows)"
>
<el-icon v-if="item.meta.icon"><svg-icon :name="item.meta.icon" /></el-icon>
<span>{{item.meta.title}}</span>
@ -68,7 +70,7 @@ export default {
border
fit
>
<el-table-column fixed="left" type="selection" />
<el-table-column fixed="left" type="selection" :selectable="config.table.selectable" />
<el-table-column type="index" :label="$t('rowIndex')">
<template #default="scope">
{{ (pageModel.pageIndex - 1) * pageModel.pageSize + scope.$index + 1 }}
@ -89,7 +91,7 @@ export default {
<el-table-column :prop="key" :label="item.title">
<template #default="scope">
<el-link type="primary" @click="showList(scope.row[key],item.oneToMany)">
<app-form-input :isReadOnly="true" :schema="item" :prop="key" v-model="scope.row" />
<app-form-input mode="details" :schema="item" :prop="key" v-model="scope.row" />
</el-link>
</template>
</el-table-column>
@ -99,7 +101,7 @@ export default {
<el-table-column :prop="key" sortable="custom" :sort-orders="['descending', 'ascending', null]">
<template #header="scope">{{item.title}}</template>
<template #default="scope">
<app-form-input :isReadOnly="true" :schema="item" :prop="key" v-model="scope.row" />
<app-form-input mode="details" :schema="item" :prop="key" v-model="scope.row" />
</template>
</el-table-column>
</template>
@ -120,6 +122,7 @@ export default {
:class="item.meta.htmlClass??'el-button--primary'"
v-if="!item.meta.isTop"
@click="click(item,[scope.row])"
:disabled="item.meta.disabled && item.meta.disabled(scope.row)"
>
<el-icon v-if="item.meta.icon"><svg-icon :name="item.meta.icon" /></el-icon>
<span>{{item.meta.title}}</span>
@ -136,7 +139,7 @@ export default {
<el-row>
<el-col>
<el-pagination
v-if="tableData.length&&pageModel.pageSize<pageModel.totalCount"
v-if="pageModel.pageSize<pageModel.total"
v-model:currentPage="pageModel.pageIndex"
v-model:page-size="pageModel.pageSize"
:total="pageModel.total"
@ -211,9 +214,9 @@ export default {
inline
label-position="left"
:hideButton="true"
:schema="editFormSchema"
:schema="config.edit.schema"
v-model="editFormModel"
v-if="editFormSchema&&editFormMode"
style="height:100%;"
/>
</template>
<template v-else-if="editFormMode==='export'">
@ -321,13 +324,13 @@ export default {
</style>`,
props: ["modelValue", "config", "querySchema", "controller", "query", "buttons"],
emits: ["command"],
async setup(props, context) {
// 变量定义
//// 配置
const config = ref(props.config);
//// 分页
setup(props, context) {
/*变量定义*/
// 配置
const config = reactive(props.config);
// 分页
const pageModel = reactive({
sizeList: [20, 50, 100],
sizeList: [1, 50, 100],
pageIndex: 1,
pageSize: 10,
total: 0,
@ -348,9 +351,12 @@ export default {
const route = useRoute();
const router = useRouter();
const { t } = useI18n();
const appStore = useAppStore();
// 注释一下代码暂停权限验证
// const buttons = ref(props.buttons ?? route.meta.children.filter((o) => o.meta.hasPermission));
// 添加下行代码暂停权限验证
const buttons = ref(props.buttons ?? route.meta.children);
const baseUrl = props.controller ?? `${route.meta.path}`;
const indexUrl = props.indexUrl ?? `${baseUrl}/index`;
const queryModel = ref({});
const sortColumns = ref(new Map());
const querySchema = ref(props.querySchema);
@ -405,7 +411,7 @@ export default {
queryModel.value.orderBy = Array.from(sortColumns.value)
.map((o) => capitalize(o[0]) + (o[1] === "ascending" ? "" : ` DESC`))
.join(",");
await load(indexUrl);
await load();
};
const showColumn = (item, prop) => {
return (
@ -417,10 +423,16 @@ export default {
};
const handleSelectionChange = (rows) => (selectedRows.value = rows);
const load = async (url) => {
const load = async () => {
tableLoading.value = true;
try {
const url = config.value.query.url;
const url = config.query.url;
const method = config.query.method;
//
queryModel.value = schemaToModel(config.query.schema);
queryModel.value.maxResultCount = pageModel.pageSize;
queryModel.value.skipCount = (pageModel.pageIndex - 1) * pageModel.pageSize;
//
const postData = JSON.parse(JSON.stringify(queryModel.value));
postData.filters = queryList.value.filter((o) => o.property && o.value);
if (postData.items) {
@ -429,60 +441,62 @@ export default {
if (postData.query?.id) {
delete postData.query["id"];
}
const listData = (await request(url, postData, { method: config.value.query.method.toUpperCase() })).data;
const listData = (await request(url, postData, { method })).data;
const items = listData.items;
if (tableSchema.value.isTree) {
items = listToTree(listData.items);
}
tableData.value = items;
pageModel.total = listData.totalCount;
//data.value = listData;
queryModel.tableKey.value = !tableKey.value;
tableKey.value = !tableKey.value;
} catch (error) {
console.log(error);
} finally {
tableLoading.value = false;
}
};
const onPageIndexChange = async () => {
await load(indexUrl);
};
const onPageSizeChange = async () => await load(indexUrl);
const onPageIndexChange = async () => await load();
const onPageSizeChange = async () => await load();
const click = async (item, rows) => {
editFormloading.value = true;
editFormMode.value = item.path ?? item;
context.emit("command", item, rows);
if (item.path === "index") {
//list
await load(indexUrl);
await load();
} else if (item.path === "details") {
//details
const url = `${baseUrl}/${item.path}?${qs.stringify({ id: rows[0].id })}`;
editFormSchema.value = (await get(url)).data;
editFormModel.value = (await post(url)).data;
editFormTitle.value = `${querySchema.value?.title}${t("details")}`;
editFormTitle.value = `${config.edit.schema.title}${t("details")}`;
dialogVisible.value = true;
} else if (item.path === "create" || item.path === "update") {
//create
let url = `${baseUrl}/${item.path}`;
if (item.path === "update") {
url = `${url}?${qs.stringify({ id: rows[0].id })}`;
if (item.path === "create") {
editFormModel.value = schemaToModel(config.edit.schema);
} else {
const url = `${config.edit.updateUrl ?? config.query.url}/${rows[0].id}`;
editFormModel.value = (await request(url, null, { method: "GET" })).data;
editFormModel.value.id = rows[0].id;
}
const vm = (await get(url)).data;
editFormSchema.value = vm.schema;
editFormModel.value = vm.model;
editFormTitle.value = `${t(item.path)}${querySchema.value?.title}`;
editFormTitle.value = `${t(item.path)}${config.edit.schema.title}`;
dialogVisible.value = true;
} else if (item.path === "delete") {
//delete
if (!rows.length) {
if (item.meta.isTop) {
// 批量删除
return;
} else {
// 单个删除
}
const url = `${baseUrl}/${item.path}`;
await post(
url,
rows.map((o) => o.id)
);
await load(indexUrl);
// await post(
// url,
// rows.map((o) => o.id)
// );
await load();
} else if (item.path === "export") {
//export
editFormTitle.value = `${t(item.path)}${querySchema.value?.title}`;
@ -505,12 +519,17 @@ export default {
const valid = await editFormRef.value.validate();
if (valid) {
editFormloading.value = true;
const url = `${baseUrl}/${editFormMode.value}`;
const result = await post(url, editFormModel.value);
let url =
(editFormMode.value === "create" ? config.edit.createUrl : config.edit.updateUrl) ?? config.query.url;
if (editFormMode.value === "update") {
url = `${url}/${editFormModel.value.id}`;
}
const method = editFormMode.value === "create" ? config.edit.createMethod : config.edit.updateMethod;
const result = await request(url, editFormModel.value, { method });
if (result.errors) {
model.errors = result.errors; //??
} else {
await load(indexUrl);
await load();
editFormMode.value = null;
dialogVisible.value = false;
}
@ -543,9 +562,9 @@ export default {
const response = await post(url, formData);
editFormloading.value = false;
dialogVisible.value = false;
await load(indexUrl);
await load();
} else if (editFormMode.value === "filter") {
await load(indexUrl);
await load();
dialogVisible.value = false;
}
};
@ -596,7 +615,21 @@ export default {
const handleChange = (uploadFile, uploadFiles) => {
fileList.value = uploadFiles;
};
const getButtonDisabled = async (src, row) => {
if (src) {
const method = await importFunction(src);
return src.startsWith("async") ? await method(row) : method(row);
}
return false;
};
onMounted(async () => {
if (route.meta.children?.length) {
for (const item of route.meta.children) {
if (item.meta.disabled?.constructor === String) {
item.meta.disabled = await importFunction(item.meta.disabled);
}
}
}
pushQueryList();
// if (!querySchema.value) {
// const vm = (await get(indexUrl)).data;
@ -609,17 +642,16 @@ export default {
// getSortModel(data.value);
// getColumns(vm.schema.properties.query);
// }
if (!config.value) {
if (!config) {
//
}
getColumns(config.value.table.schema);
queryModel.value = schemaToModel(config.value.query.schema);
getColumns(config.table.schema);
if (props.query) {
Object.assign(queryModel.value.query, props.query);
}
// getSortModel(data.value);
// getColumns(vm.schema.properties.query);
await load(indexUrl);
await load();
});
return {
config,
@ -664,6 +696,7 @@ export default {
pushQueryList,
fileList,
handleChange,
getButtonDisabled,
};
},
};

1
code/WebApp/vanilla/config/settings.js

@ -1,4 +1,5 @@
export default {
enableLocale: false,
baseURL: "http://dev.ccwin-in.com:10582/api",
//baseURL: "http://localhost:10130/api",
};

86
code/WebApp/vanilla/models/code-setting.js

@ -0,0 +1,86 @@
const schema = {
title: "通用代码",
type: "object",
properties: {
userName: {
title: "项目",
type: "string",
readOnly: true,
showForList: true,
rules: [
{
required: true,
},
],
},
userName: {
title: "值",
type: "string",
readOnly: true,
showForList: true,
rules: [
{
required: true,
},
],
},
name: {
title: "描述",
type: "string",
showForList: true,
rules: [
{
required: true,
},
],
},
},
};
const url = "base/code-settings";
const createUrl = url;
const updateUrl = url;
const deleteUrl = url;
const method = "GET";
const createMethod = "POST";
const updateMethod = "PUT";
const deleteMethod = "DELETE";
export default function () {
return {
query: {
url,
method,
schema: {
title: "通用代码",
type: "object",
properties: {
filter: {
title: "项目",
type: "string",
},
skipCount: {
hidden: true,
default: 0,
},
maxResultCount: {
hidden: true,
default: 10,
},
},
},
},
table: {
schema: schema,
},
edit: {
createUrl,
updateUrl,
deleteUrl,
createMethod,
updateMethod,
deleteMethod,
schema: schema,
},
};
}

2
code/WebApp/vanilla/models/login.js

@ -20,7 +20,7 @@ export default function () {
password: {
title: "密码",
type: "string",
format: "password",
input: "password",
rules: [
{
required: true,

2
code/WebApp/vanilla/models/role.js

@ -23,7 +23,7 @@ export default function () {
return {
query: {
url: "identity/roles",
method: "get",
method: "GET",
schema: {
title: "用户",
type: "object",

64
code/WebApp/vanilla/models/user.js

@ -5,6 +5,7 @@ const schema = {
userName: {
title: "用户名",
type: "string",
readOnly: true,
showForList: true,
rules: [
{
@ -16,16 +17,11 @@ const schema = {
},
],
},
phoneNumber: {
title: "电话",
password: {
title: "密码",
type: "string",
readOnly: true,
input: "password",
showForList: true,
rules: [
{
required: true,
},
],
},
name: {
title: "姓名",
@ -37,8 +33,8 @@ const schema = {
},
],
},
email: {
title: "邮箱",
phoneNumber: {
title: "电话",
type: "string",
showForList: true,
rules: [
@ -47,31 +43,45 @@ const schema = {
},
],
},
roleNames: {
title: "角色",
type: "array",
input: "select",
multiple: true,
},
password: {
title: "密码",
email: {
title: "邮箱",
type: "string",
input: "password",
showForList: true,
rules: [
{
required: true,
message: "密码不能为空",
},
],
},
// roleNames: {
// title: "角色",
// type: "array",
// input: "select",
// multiple: true,
// url: "identity/roles/all",
// value: "name",
// label: "name",
// items: {
// type: "string",
// },
// },
},
};
const url = "base/user";
const createUrl = url;
const updateUrl = url;
const deleteUrl = "api/identity/users";
const method = "GET";
const createMethod = "POST";
const updateMethod = "PUT";
const deleteMethod = "DELETE";
export default function () {
return {
query: {
url: "base/user",
method: "get",
url,
method,
schema: {
title: "用户",
type: "object",
@ -93,6 +103,16 @@ export default function () {
},
table: {
schema: schema,
selectable: (o) => o.name !== "admin",
},
edit: {
createUrl,
updateUrl,
deleteUrl,
createMethod,
updateMethod,
deleteMethod,
schema: schema,
},
};
}

22
code/WebApp/vanilla/request/index.js

@ -17,7 +17,7 @@ const addToken = async (options) => {
};
const getUrl = (url) => {
if (url.indexOf("/") === 0) {
if (url.startsWith("http")) {
return url;
}
let result = settings.baseURL;
@ -111,13 +111,27 @@ async function request(url, data, options, withoutToken = false) {
url = getUrl(url);
let defaultOptions = {
method: "POST",
headers: { "Accept-Language": "zh-Hans" },
headers: {
"Accept-Language": "zh-Hans",
},
};
if (options) {
Object.assign(defaultOptions, options);
}
if (defaultOptions.method !== "GET" && !(data instanceof FormData)) {
defaultOptions.headers["Content-Type"] = "application/json";
if (defaultOptions.method === "GET" && data) {
url = `${url}?${qs.stringify(data)}`;
} else {
if (defaultOptions.headers["Content-Type"]?.startsWith("application/x-www-form-urlencoded")) {
defaultOptions.body = qs.stringify(data);
} else if (defaultOptions.headers["Content-Type"]?.startsWith("application/json")) {
defaultOptions.body = JSON.stringify(data);
} else if (data instanceof FormData) {
delete defaultOptions.headers["Content-Type"];
defaultOptions.body = data;
} else if (data) {
defaultOptions.headers["Content-Type"] = "application/json";
defaultOptions.body = JSON.stringify(data);
}
}
if (!withoutToken) {
await addToken(defaultOptions);

13
code/WebApp/vanilla/router/index.js

@ -49,11 +49,14 @@ router.beforeEach(async (to, from, next) => {
if (!(await isLogin())) {
next({ path: "/login", query: { redirect: to.fullPath } });
} else {
if (!to.meta.public && to.meta.hasPermission === false) {
next({ path: "/403", query: { redirect: to.fullPath } });
} else {
next();
}
// 注释以下代码暂停权限验证
// if (!to.meta.public && to.meta.hasPermission === false) {
// next({ path: "/403", query: { redirect: to.fullPath } });
// } else {
// next();
// }
// 添加一下代码暂停权限验证
next();
}
} else {
next();

87
code/WebApp/vanilla/router/routes.js

@ -52,50 +52,71 @@ export default [
title: "删除",
icon: "file",
permission: "AbpIdentity.Users.Delete",
},
},
],
},
{
path: "role",
meta: {
type: "page",
title: "角色管理",
icon: "file",
permission: "AbpIdentity.Users",
},
children: [
{
path: "create",
meta: {
type: "button",
title: "新建",
icon: "file",
permission: "AbpIdentity.Users.Create",
isTop: true,
},
},
{
path: "update",
path: "%s/reset-password",
meta: {
type: "button",
title: "编辑",
icon: "file",
htmlClass: "el-button--primary",
permission: "AbpIdentity.Users.Update",
},
},
{
path: "delete",
meta: {
type: "button",
title: "删除",
title: "重置密码",
icon: "file",
permission: "AbpIdentity.Users.Delete",
permission: "reset-password?",
method: "PUT",
},
},
],
},
// {
// path: "role",
// meta: {
// type: "page",
// title: "角色管理",
// icon: "file",
// permission: "AbpIdentity.Users",
// },
// children: [
// {
// path: "create",
// meta: {
// type: "button",
// title: "新建",
// icon: "file",
// permission: "AbpIdentity.Users.Create",
// isTop: true,
// },
// },
// {
// path: "update",
// meta: {
// type: "button",
// title: "编辑",
// icon: "file",
// htmlClass: "el-button--primary",
// permission: "AbpIdentity.Users.Update",
// disabled: `(o) => o.isStatic`,
// },
// },
// {
// path: "delete",
// meta: {
// type: "button",
// title: "删除",
// icon: "file",
// permission: "AbpIdentity.Users.Delete",
// disabled: `(o) => o.isStatic`,
// },
// },
// ],
// },
{
path: "code-setting",
meta: {
type: "page",
title: "通用代码",
icon: "file",
},
},
],
},
];

25
code/WebApp/vanilla/utils/index.js

@ -120,5 +120,28 @@ function getFileName(contentDisposition) {
return decodeURIComponent(/filename\*=UTF-8''([\w%\-\.]+)(?:; ?|$)/i.exec(contentDisposition)[1]);
}
async function importModule(input) {
const dataUri = `data:text/javascript;charset=utf-8,${encodeURIComponent(input)}`;
const result = await import(dataUri /* @vite-ignore */);
return result.default;
}
// await importFunction('()=>console.log(123)');
async function importFunction(input) {
const src = input ?? `()=>{}`;
const result = await importModule(`export default ${src}`);
return result;
}
export default html;
export { persentFormat, bytesFormat, format, schemaToModel, listToTree, treeToList, getProp, getFileName };
export {
persentFormat,
bytesFormat,
format,
schemaToModel,
listToTree,
treeToList,
getProp,
getFileName,
importFunction,
};

113
code/WebApp/vanilla/utils/validation.js

@ -0,0 +1,113 @@
const messages = {
default: "%s验证失败",
required: "%s是必填项",
enum: "%s必须是%s之一",
whitespace: "%s不能为空",
// date: {
// format: '%s date %s is invalid for format %s',
// parse: '%s date could not be parsed, %s is invalid ',
// invalid: '%s date %s is invalid',
// },
types: {
string: "%s不是有效的字符串",
method: "%s不是有效的函数",
array: "%s不是有效的数组",
object: "%s不是有效的对象",
number: "%s不是有效的数字",
date: "%s不是有效的日期",
boolean: "%s不是有效的布尔值",
integer: "%s不是有效的整数",
float: "%s不是有效的浮点数",
regexp: "%s不是有效的正则表达式",
email: "%s不是有效的邮箱",
url: "%s不是有效的 url",
hex: "%s不是有效的十六进制",
},
string: {
len: "%s长度必须是%s",
min: "%s最小长度为%s",
max: "%s最大长度为%s",
range: "%s长度必须在%s和%s之间",
},
number: {
len: "%s必须等于%s",
min: "%s不小于%s",
max: "%s不大于%s",
range: "%s必须在%s和%s之间",
},
array: {
len: "%s的数量必须是%s",
min: "%s的数量不小于%s",
max: "%s的数量不大于%s",
range: "%s的数量必须在%s和%s之间",
},
pattern: {
mismatch: "%s的值 %s 不匹配模式 %s",
},
clone: function clone() {
const cloned = JSON.parse(JSON.stringify(this));
cloned.clone = this.clone;
return cloned;
},
//
compare: "%s 和 %s 输入必须一致",
true: "%s必须选中",
remote: "%s远程验证失败",
};
const validators = {
compare(rule, value, callback, source, options) {
const errors = [];
if (value && value !== rule.data[rule.compare]) {
const message = format(options.messages.compare, rule.title, rule.schema.properties[rule.compare].title);
errors.push(new Error(message));
}
callback(errors);
},
true(rule, value, callback, source, options) {
const errors = [];
if (!value) {
const message = format(options.messages.true, rule.title);
errors.push(new Error(message));
}
callback(errors);
},
remote(rule, value, callback, source, options) {
const errors = [];
const message = format(options.messages.remote, rule.title);
if (!value) {
callback(errors);
} else {
const config = {
url: rule.url,
method: rule.method ?? "GET",
};
const data = { [rule.field]: value };
if (config.method === "GET") {
config.params = data;
} else {
config.data = data;
}
request
.request(config)
.then((response) => {
if (response.status === 200) {
if (response.data.code) {
if (response.data.code !== 200) {
errors.push(new Error(1 + response.data.message));
}
}
} else {
errors.push(new Error(2 + response.data));
}
callback(errors);
})
.catch((o) => {
errors.push(o.response?.data?.message ?? message ?? o.message);
callback(errors);
});
}
},
};
export { messages };

28
code/WebApp/vanilla/views/base-data/code-setting.js

@ -0,0 +1,28 @@
import AppList from "../../components/list/index.js";
import html from "html";
import useConfig from "../../models/code-setting.js";
import request from "../../request/index.js";
import { format } from "../../utils/index.js";
import { ElMessage } from "element-plus";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
// 变量定义
const config = useConfig();
// 函数定义
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
if (item.path === "%s/reset-password") {
const url = format(item.path, rows[0].id);
await request(`base/user/${url}`, null, { method: item.meta.method });
ElMessage({
type: "info",
message: format("用户%s的密码已经成功重置为123456", rows[0].userName),
});
}
};
return { config, onCommand };
},
};

13
code/WebApp/vanilla/views/base-data/user.js

@ -1,6 +1,9 @@
import AppList from "../../components/list/index.js";
import html from "html";
import useConfig from "../../models/user.js";
import request from "../../request/index.js";
import { format } from "../../utils/index.js";
import { ElMessage } from "element-plus";
export default {
components: { AppList },
@ -9,8 +12,16 @@ export default {
// 变量定义
const config = useConfig();
// 函数定义
const onCommand = (item, rows) => {
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
if (item.path === "%s/reset-password") {
const url = format(item.path, rows[0].id);
await request(`base/user/${url}`, null, { method: item.meta.method });
ElMessage({
type: "info",
message: format("用户%s的密码已经成功重置为123456", rows[0].userName),
});
}
};
return { config, onCommand };
},

29
code/WebApp/vanilla/views/login.js

@ -3,7 +3,7 @@ import { ref, reactive } from "vue";
import AppForm from "../components/form/index.js";
import { login, setRefreshToken, getUser, setAccessToken } from "../api/user.js";
import router, { refreshRouter } from "../router/index.js";
import { post } from "../request/index.js";
import request, { post } from "../request/index.js";
import LayoutLogo from "../layouts/logo.js";
import LayoutLocale from "../layouts/locale.js";
import LayoutFooter from "../layouts/footer.js";
@ -26,27 +26,24 @@ export default {
</div>
</el-main>
</el-container>`,
async setup() {
setup() {
const schema = reactive(useLoginModel());
const model = reactive(schemaToModel(schema));
const submit = async (callback, loading) => {
try {
const url = "connect-token";
const url = "base/token";
const appStore = useAppStore();
const result = await post(
url,
model,
{ headers: { "Content-Type": "application/x-www-form-urlencoded" } },
true
);
const result = await request(url, model, { method: "POST" }, true);
if (!result.errors) {
appStore.token = result.data.access_token;
setAccessToken(appStore.token);
//setRefreshToken(result.data.refresh_token);
appStore.user = await getUser();
await refreshRouter();
const redirect = router.currentRoute.value.query?.redirect ?? "/";
router.push(redirect);
appStore.token = result.data.accessToken;
if (appStore.token) {
setAccessToken(appStore.token);
//setRefreshToken(result.data.refresh_token);
appStore.user = await getUser();
await refreshRouter();
const redirect = router.currentRoute.value.query?.redirect ?? "/";
router.push(redirect);
}
}
callback(result.errors);
} catch (error) {

2
code/src/AuthServer/AuthServer.Host/appsettings.json

@ -1,6 +1,6 @@
{
"ConnectionStrings": {
"Default": "Server=dev.ccwin-in.com,13319;Database=BJABP;User ID=ccwin-in;Password=Microsoft@2022;Trusted_Connection=False;TrustServerCertificate=True"
"Default": "Server=localhost;Database=BJABP;User ID=sa;Password=aA123456!;Trusted_Connection=False;TrustServerCertificate=True"
},
"CorsOrigins": "http://localhost:9527,http://dev.ccwin-in.com:10588,http://localhost:44307",
"ElasticSearch": {

14
code/src/Modules/BaseService/BaseService.Application.Contracts/Systems/UserManagement/IUserAppService.cs

@ -1,9 +1,7 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using BaseService.BaseData.Permissions.Dto;
using BaseService.BaseData.Permissions.Dto;
using BaseService.RelationData.Dto;
using System;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Volo.Abp.Identity;
@ -17,7 +15,7 @@ namespace BaseService.Systems.UserManagement
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
Task<IdentityUserDto> GetAsync(Guid id);
Task<IdentityUserUpdateDto> GetAsync(Guid id);
/// <summary>
/// 获取当前登录用户信息
@ -61,7 +59,6 @@ namespace BaseService.Systems.UserManagement
/// <returns></returns>
Task<ApplicationAuthes> GetAuthConfigAsync(Guid branchId);
/// <summary>
/// 重置当前登录用户的密码
/// </summary>
@ -70,6 +67,5 @@ namespace BaseService.Systems.UserManagement
/// <returns></returns>
//Task<IdentityUserDto> ResetPasswordCurrentUser(Guid id, IdentityUserCreateDto input);
Task<IdentityUserDto> ResetPasswordAsync(Guid id);
}
}
}

2
code/src/Modules/BaseService/BaseService.Application/BaseService.Application.csproj

@ -7,7 +7,9 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="IdentityModel" Version="5.1.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" />
<PackageReference Include="ValueInjecter" Version="3.2.0" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="4.3.3" />
<PackageReference Include="Volo.Abp.Identity.Application" Version="4.3.3" />
<PackageReference Include="Volo.Abp.PermissionManagement.Application" Version="4.3.3" />

55
code/src/Modules/BaseService/BaseService.Application/UserManagement/TokenAppService.cs

@ -0,0 +1,55 @@
using IdentityModel.Client;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using System.ComponentModel.DataAnnotations;
using System.Net.Http;
using System.Threading.Tasks;
using Volo.Abp.Application.Services;
namespace BaseService.UserManagement
{
[Route("api/base/token")]
public class UserAppService : ApplicationService
{
private readonly IHttpClientFactory _httpClientFactory;
private readonly IConfiguration _configuration;
public UserAppService(IHttpClientFactory httpClientFactory, IConfiguration configuration)
{
this._httpClientFactory = httpClientFactory;
this._configuration = configuration;
}
[HttpPost, AllowAnonymous, IgnoreAntiforgeryToken]
public async Task<TokenResponse> CreateAsync(LoginModel model)
{
var address = _configuration["AuthServer:Authority"];
var clientId = _configuration["AuthServer:ClientId"];
var clientSecret = _configuration["AuthServer:ClientSecret"];
var result = await _httpClientFactory.CreateClient().RequestPasswordTokenAsync(new PasswordTokenRequest
{
Address = $"{address.TrimEnd('/')}/connect/token",
GrantType = "password",
ClientId = clientId,
ClientSecret = clientSecret,
UserName = model.UserName,
Password = model.Password
}).ConfigureAwait(false);
return result;
}
public class LoginModel
{
[Display]
[Required]
public string UserName { get; set; }
[Display]
[Required]
public string Password { get; set; }
}
}
}

21
code/src/Modules/BaseService/BaseService.Application/UserManagement/UserAppService.cs

@ -1,16 +1,15 @@
using BaseService.BaseData;
using BaseService.Permissions;
using BaseService.BaseData.Permissions.Dto;
using BaseService.RelationBaseData;
using BaseService.RelationData.Dto;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Omu.ValueInjecter;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using BaseService.BaseData.Permissions.Dto;
using BaseService.RelationData.Dto;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
@ -38,6 +37,7 @@ namespace BaseService.Systems.UserManagement
//权限提供者类
private readonly IAbpAuthorizationPolicyProvider _abpAuthorizationPolicyProvider;
private readonly IAuthorizationService _authorizationService;
protected ICurrentUser CurrentUsers { get; }
@ -71,9 +71,11 @@ namespace BaseService.Systems.UserManagement
[HttpGet]
[Route("{id}")]
public async Task<IdentityUserDto> GetAsync(Guid id)
public async Task<IdentityUserUpdateDto> GetAsync(Guid id)
{
var dto = ObjectMapper.Map<IdentityUser, IdentityUserDto>(await UserManager.GetByIdAsync(id));
var user = await UserManager.GetByIdAsync(id);
var dto = Mapper.Map<IdentityUserUpdateDto>(user);
dto.RoleNames = (await UserRepository.GetRoleNamesAsync(id)).ToArray();
return dto;
}
@ -196,7 +198,7 @@ namespace BaseService.Systems.UserManagement
//获取用户的所有分支
var branchRoles = await GetUserBranchRolesAsync(CurrentUsers.GetId());
var groupBranchRoles = branchRoles.GroupBy(x => x.BranchId)
.Select(y => new {xx = new {BranchId = y.Key}, items = y});
.Select(y => new { xx = new { BranchId = y.Key }, items = y });
foreach (var group in groupBranchRoles
)
{
@ -225,7 +227,7 @@ namespace BaseService.Systems.UserManagement
//获取用户的所有分支
var branchRoles = await GetUserBranchRolesAsync(userId);
var groupBranchRoles = branchRoles.GroupBy(x => x.BranchId)
.Select(y => new {xx = new {BranchId = y.Key}, items = y});
.Select(y => new { xx = new { BranchId = y.Key }, items = y });
foreach (var group in groupBranchRoles)
{
var mybranchrole = new BranchRoleDto
@ -241,8 +243,6 @@ namespace BaseService.Systems.UserManagement
return new ListResultDto<BranchRoleDto>(branchList);
}
/// <summary>
/// 根据用户ID,获取当前登录用户的所有权限信息,带角色名称
/// </summary>
@ -373,7 +373,6 @@ namespace BaseService.Systems.UserManagement
return authConfig;
}
/// <summary>
/// 重置密码功能
/// </summary>

12
code/src/Modules/BaseService/BaseService.Host/.config/dotnet-tools.json

@ -0,0 +1,12 @@
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-ef": {
"version": "7.0.8",
"commands": [
"dotnet-ef"
]
}
}
}

72
code/src/Modules/BaseService/BaseService.Host/BaseServiceHostModule.cs

@ -1,39 +1,40 @@
using System.Linq;
using BaseService.EntityFrameworkCore;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.DataProtection;
using Microsoft.AspNetCore.Identity;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using StackExchange.Redis;
using Microsoft.OpenApi.Models;
using StackExchange.Redis;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Claims;
using Volo.Abp;
using Volo.Abp.AspNetCore.MultiTenancy;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.AntiForgery;
using Volo.Abp.AspNetCore.Serilog;
using Volo.Abp.Auditing;
using Volo.Abp.Autofac;
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.Identity;
using Volo.Abp.Localization;
using Volo.Abp.Modularity;
using Volo.Abp.AspNetCore.MultiTenancy;
using System;
using Volo.Abp.TenantManagement;
using Volo.Abp.Threading;
using Volo.Abp.Data;
using Volo.Abp.AspNetCore.Serilog;
using Volo.Abp.PermissionManagement.HttpApi;
using Microsoft.AspNetCore.Cors;
using Volo.Abp.MultiTenancy;
using BaseService.EntityFrameworkCore;
using System.Collections.Generic;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Volo.Abp.PermissionManagement.HttpApi;
using Volo.Abp.Security.Claims;
using System.Security.Claims;
using Volo.Abp.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using Microsoft.AspNetCore.Identity;
using Volo.Abp.TenantManagement;
using Volo.Abp.Threading;
//using Win.Sfs.SettleAccount;
//using Win.Sfs.BaseData;
//using BaseData;
namespace BaseService
{
[DependsOn(
@ -45,8 +46,8 @@ namespace BaseService
typeof(AbpPermissionManagementHttpApiModule),
typeof(AbpTenantManagementHttpApiModule),
typeof(AbpIdentityHttpApiModule),
// typeof(BaseDataHttpApiModule),
//typeof(BaseDataApplicationContractsModule),
// typeof(BaseDataHttpApiModule),
//typeof(BaseDataApplicationContractsModule),
//typeof(SettleAccountHttpApiModule),
typeof(AbpAspNetCoreSerilogModule)
)]
@ -56,12 +57,15 @@ namespace BaseService
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddHttpClient();
Configure<AbpAntiForgeryOptions>(O => O.AutoValidate = false);
var configuration = context.Services.GetConfiguration();
ConfigureConventionalControllers();
ConfigureMultiTenancy();
ConfigureJwt(context, configuration);
ConfigureSwagger(context);
@ -73,7 +77,7 @@ namespace BaseService
ConfigureAuditing();
ConfigureCros(context, configuration);
ConfigureLocalization();
ConfigurePasswordSet(context);
@ -87,6 +91,7 @@ namespace BaseService
options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文"));
});
}
/// <summary>
/// 设置密码强度
/// </summary>
@ -148,7 +153,6 @@ namespace BaseService
var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]);
context.Services.AddDataProtection()
.PersistKeysToStackExchangeRedis(redis, "DataProtection-Keys");
}
private void ConfigureDbContext()
@ -160,15 +164,15 @@ namespace BaseService
{
context.Services.AddSwaggerGen(options =>
{
options.SwaggerDoc("v1", new OpenApiInfo {Title = "BaseService Service API", Version = "v1"});
options.SwaggerDoc("v1", new OpenApiInfo { Title = "BaseService Service API", Version = "v1" });
options.DocInclusionPredicate((docName, description) => true);
options.CustomSchemaIds(type => type.FullName);
options.AddSecurityDefinition("Bearer", new OpenApiSecurityScheme
{
Description = "请输入JWT令牌,例如:Bearer 12345abcdef",
Description = "请输入 JWT Token",
Name = "Authorization",
In = ParameterLocation.Header,
Type = SecuritySchemeType.ApiKey,
Type = SecuritySchemeType.Http,
Scheme = "Bearer"
});
@ -177,16 +181,9 @@ namespace BaseService
{
new OpenApiSecurityScheme
{
Reference = new OpenApiReference
{
Type = ReferenceType.SecurityScheme,
Id = "Bearer"
},
Scheme = "oauth2",
Name = "Bearer",
In = ParameterLocation.Header,
Reference = new OpenApiReference {Type = ReferenceType.SecurityScheme, Id = "Bearer"}
},
new List<string>()
new string[] { }
}
});
});
@ -224,6 +221,7 @@ namespace BaseService
;
});
}
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
var app = context.GetApplicationBuilder();
@ -273,4 +271,4 @@ namespace BaseService
});
}
}
}
}

21
code/src/Modules/BaseService/BaseService.Host/appsettings.json

@ -1,11 +1,15 @@
{
"AuthServer": {
"Authority": "http://dev.ccwin-in.com:10580"
"Authority": "http://dev.ccwin-in.com:10580",
//"Authority": "http://localhost:10130",
"ClientId": "basic-web",
"ClientSecret": "1q2w3e*"
},
"App": {
"CorsOrigins": "http://localhost:9527,http://dev.ccwin-in.com:10588,http://localhost:44307"
},
"ConnectionStrings": {
//"Default": "Server=localhost;Database=BJABP;User ID=sa;Password=aA123456!;Trusted_Connection=False;TrustServerCertificate=True",
"Default": "Server=dev.ccwin-in.com,13319;Database=BJABP;User ID=ccwin-in;Password=Microsoft@2022;Trusted_Connection=False;TrustServerCertificate=True"
},
"ElasticSearch": {
@ -19,22 +23,7 @@
"Default": "Warning"
}
},
<<<<<<< HEAD
//"Settings": {
// "Abp.Localization.DefaultLanguage": "zh-Hans",
// "Abp.Identity.Password.RequireNonAlphanumeric": "false", //ȥĸ
// "Abp.Identity.Password.RequireUppercase": "false", //ȥд
// "Abp.Identity.Password.RequireLowercase": "false", //ȥСд
// "Abp.Identity.Password.RequiredLength": "1",
// "Abp.Identity.SignIn.RequireConfirmedEmail": "true",
// //û
// "Abp.Identity.Lockout.AllowedForNewUsers": "true",
// "Abp.Identity.Lockout.MaxFailedAccessAttempts": "3"
//},
"AllowedHosts": "*"
=======
"AllowedHosts": "*",
"RePassword": "111111"
>>>>>>> 1c2946500765850db29fa7d216f5e55e2e4de888
}

2
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Properties/launchSettings.json

@ -6,7 +6,7 @@
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "http://localhost:44379"
"applicationUrl": "http://localhost:44378"
},
"Docker": {
"commandName": "Docker",

2
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/SettleAccountHttpApiHostModule.cs

@ -358,7 +358,7 @@ namespace Win.Sfs.SettleAccount
var xmlapppath = Path.Combine(AppContext.BaseDirectory, "SettleAccount.Application.xml");
if (File.Exists(xmlapppath))
{
options.IncludeXmlComments(xmlapppath);
options.IncludeXmlComments(xmlapppath, true);
}
xmlapppath = Path.Combine(AppContext.BaseDirectory, "SettleAccount.Application.Contracts.xml");

155
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_SE_DETAIL_DTO.cs

@ -0,0 +1,155 @@
using Magicodes.ExporterAndImporter.Core;
using System;
using System.ComponentModel.DataAnnotations;
namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
{
/// <summary>
/// BBAC发运
/// </summary>
public class BBAC_SE_DETAIL_DTO
{
/// <summary>
/// 期间
/// </summary>
[Display(Name = "期间")]
public int Version { set; get; }
/// <summary>
/// 发货时间
/// </summary>
[Display(Name = "发货时间")]
public DateTime ShippingDate { set; get; }
/// <summary>
/// 发运单号
/// </summary>
[Display(Name = "发运单号")]
public string WmsBillNum { set; get; }
/// <summary>
/// 零件号
/// </summary>
[Display(Name = "零件号")]
public string LU { get; set; }
/// <summary>
/// 生产号
/// </summary>
[Display(Name = "生产号")]
public string PN { get; set; }
/// <summary>
/// 组合键值(LU+PN)
/// </summary>
[Display(Name = "组合键值(LU+PN)")]
public string KeyCode { get; set; }
/// <summary>
/// 数量
/// </summary>
[Display(Name = "数量")]
public decimal Qty { get; set; }
/// <summary>
/// 日顺序号
/// </summary>
[Display(Name = "日顺序号")]
public string SeqNumber { get; set; }
/// <summary>
/// 小总成号
/// </summary>
[Display(Name = "小总成号")]
public string AssemblyCode { get; set; }
/// <summary>
/// 注塑码
/// </summary>
[Display(Name = "注塑码")]
public string InjectionCode { get; set; }
/// <summary>
/// 订单时间
/// </summary>
[Display(Name = "订单时间")]
public DateTime BeginDate { get; set; }
}
/// <summary>
/// 导出
/// </summary>
public class BBAC_SE_DETAIL_EXPORT_DTO
{
/// <summary>
/// 期间
/// </summary>
[ExporterHeader(DisplayName = "日顺序号")]
public int Version { set; get; }
/// <summary>
/// 发货时间
/// </summary>
[ExporterHeader(DisplayName = "日顺序号")]
public DateTime ShippingDate { set; get; }
/// <summary>
/// 发运单号
/// </summary>
[ExporterHeader(DisplayName = "日顺序号")]
public string WmsBillNum { set; get; }
/// <summary>
/// 零件号
/// </summary>
[ExporterHeader(DisplayName = "日顺序号")]
public string LU { get; set; }
/// <summary>
/// 生产号
/// </summary>
[ExporterHeader(DisplayName = "日顺序号")]
public string PN { get; set; }
/// <summary>
/// 组合键值(LU+PN)
/// </summary>
[ExporterHeader(DisplayName = "日顺序号")]
public string KeyCode { get; set; }
/// <summary>
/// 数量
/// </summary>
[ExporterHeader(DisplayName = "日顺序号")]
public decimal Qty { get; set; }
/// <summary>
/// 日顺序号
/// </summary>
[Display(Name = "日顺序号")]
[ExporterHeader(DisplayName = "日顺序号")]
public string SeqNumber { get; set; }
/// <summary>
/// 小总成号
/// </summary>
[Display(Name = "小总成号")]
[ExporterHeader(DisplayName = "小总成号")]
public string AssemblyCode { get; set; }
/// <summary>
/// 注塑码
/// </summary>
[Display(Name = "注塑码")]
[ExporterHeader(DisplayName = "注塑码")]
public string InjectionCode { get; set; }
/// <summary>
/// 订单时间
/// </summary>
[Display(Name = "订单时间")]
[ExporterHeader(DisplayName = "订单时间")]
public DateTime BeginDate { get; set; }
}
}

136
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_SE_EDI_DTO.cs

@ -0,0 +1,136 @@
using Magicodes.ExporterAndImporter.Core;
using System;
using System.ComponentModel.DataAnnotations;
namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
{
/// <summary>
/// BBAC的EDI数据
/// </summary>
public class BBAC_SE_EDI_DTO
{
/// <summary>
/// LU+生产码
/// </summary>
[Display(Name = "LU+生产码")]
public string KeyCode { get; set; } = null!;
/// <summary>
/// 期间
/// </summary>
[Display(Name = "期间")]
public int Version { get; set; }
/// <summary>
/// 零件号
/// </summary>
[Display(Name = "零件号")]
public string LU { get; set; } = null!;
/// <summary>
/// 生产码
/// </summary>
[Display(Name = "生产码")]
public string PN { get; set; } = null!;
/// <summary>
/// 日顺序号
/// </summary>
[Display(Name = "日顺序号")]
public string SeqNumber { get; set; } = null!;
/// <summary>
/// 小总成号
/// </summary>
[Display(Name = "小总成号")]
public string AssemblyCode { get; set; } = null!;
/// <summary>
/// 注塑码
/// </summary>
[Display(Name = "注塑码")]
public string InjectionCode { get; set; } = null!;
/// <summary>
/// EDI数量
/// </summary>
[Display(Name = "EDI数量")]
public decimal Qty { get; set; }
/// <summary>
/// 订货时间
/// </summary>
[Display(Name = "订货时间")]
public DateTime BeginDate { get; set; }
}
/// <summary>
/// 导出
/// </summary>
public class BBAC_SE_EDI_EXPORT_DTO
{
/// <summary>
/// LU+生产码
/// </summary>
[Display(Name = "LU+生产码")]
[ExporterHeader(DisplayName = "LU+生产码")]
public string KeyCode { get; set; } = null!;
/// <summary>
/// 期间
/// </summary>
[Display(Name = "期间")]
[ExporterHeader(DisplayName = "期间")]
public int Version { get; set; }
/// <summary>
/// 零件号
/// </summary>
[Display(Name = "零件号")]
[ExporterHeader(DisplayName = "零件号")]
public string LU { get; set; } = null!;
/// <summary>
/// 生产码
/// </summary>
[Display(Name = "生产码")]
[ExporterHeader(DisplayName = "生产码")]
public string PN { get; set; } = null!;
/// <summary>
/// 日顺序号
/// </summary>
[Display(Name = "日顺序号")]
[ExporterHeader(DisplayName = "日顺序号")]
public string SeqNumber { get; set; } = null!;
/// <summary>
/// 小总成号
/// </summary>
[Display(Name = "小总成号")]
[ExporterHeader(DisplayName = "小总成号")]
public string AssemblyCode { get; set; } = null!;
/// <summary>
/// 注塑码
/// </summary>
[Display(Name = "注塑码")]
[ExporterHeader(DisplayName = "注塑码")]
public string InjectionCode { get; set; } = null!;
/// <summary>
/// EDI数量
/// </summary>
[Display(Name = "EDI数量")]
[ExporterHeader(DisplayName = "EDI数量")]
public decimal Qty { get; set; }
/// <summary>
/// 订货时间
/// </summary>
[Display(Name = "订货时间")]
[ExporterHeader(DisplayName = "订货时间")]
public DateTime BeginDate { get; set; }
}
}

166
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_SE_DETAIL_DTO.cs

@ -0,0 +1,166 @@
using Magicodes.ExporterAndImporter.Core;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
{
/// <summary>
/// HBPO发运单
/// </summary>
public class HBPO_SE_DETAIL_DTO
{
/// <summary>
/// 期间
/// </summary>
[Display(Name = "期间")]
public int Version { set; get; }
/// <summary>
/// 发货时间
/// </summary>
[Display(Name = "发货时间")]
public DateTime ShippingDate { set; get; }
/// <summary>
/// 发运单号
/// </summary>
[Display(Name = "发运单号")]
public string WmsBillNum { set; get; }
/// <summary>
/// 零件号
/// </summary>
[Display(Name = "零件号")]
public string LU { get; set; }
/// <summary>
/// 生产号
/// </summary>
[Display(Name = "生产号")]
public string PN { get; set; }
/// <summary>
/// 组合键值(LU+PN)
/// </summary>
[Display(Name = "组合键值(LU+PN)")]
public string KeyCode { get; set; }
/// <summary>
/// 数量
/// </summary>
[Display(Name = "数量")]
public decimal Qty { get; set; }
/// <summary>
/// 日顺序号
/// </summary>
[Display(Name = "日顺序号")]
public string SeqNumber { get; set; }
/// <summary>
/// 小总成号
/// </summary>
[Display(Name = "小总成号")]
public string AssemblyCode { get; set; }
/// <summary>
/// 注塑码
/// </summary>
[Display(Name = "注塑码")]
public string InjectionCode { get; set; }
/// <summary>
/// 订单时间
/// </summary>
[Display(Name = "订单时间")]
public DateTime BeginDate { get; set; }
}
/// <summary>
/// 导出
/// </summary>
public class HBPO_SE_DETAIL_EXPORT_DTO
{
/// <summary>
/// 期间
/// </summary>
[Display(Name = "期间")]
[ExporterHeader(DisplayName = "期间")]
public int Version { set; get; }
/// <summary>
/// 发货时间
/// </summary>
[Display(Name = "发货时间")]
[ExporterHeader(DisplayName = "发货时间")]
public DateTime ShippingDate { set; get; }
/// <summary>
/// 发运单号
/// </summary>
[Display(Name = "发运单号")]
[ExporterHeader(DisplayName = "发运单号")]
public string WmsBillNum { set; get; }
/// <summary>
/// 零件号
/// </summary>
[Display(Name = "零件号")]
[ExporterHeader(DisplayName = "零件号")]
public string LU { get; set; }
/// <summary>
/// 生产号
/// </summary>
[Display(Name = "生产号")]
[ExporterHeader(DisplayName = "生产号")]
public string PN { get; set; }
/// <summary>
/// 组合键值(LU+PN)
/// </summary>
[Display(Name = "组合键值(LU+PN)")]
[ExporterHeader(DisplayName = "组合键值(LU+PN)")]
public string KeyCode { get; set; }
/// <summary>
/// 数量
/// </summary>
[Display(Name = "数量")]
[ExporterHeader(DisplayName = "数量")]
public decimal Qty { get; set; }
/// <summary>
/// 日顺序号
/// </summary>
[Display(Name = "日顺序号")]
[ExporterHeader(DisplayName = "日顺序号")]
public string SeqNumber { get; set; }
/// <summary>
/// 小总成号
/// </summary>
[Display(Name = "小总成号")]
[ExporterHeader(DisplayName = "小总成号")]
public string AssemblyCode { get; set; }
/// <summary>
/// 注塑码
/// </summary>
[Display(Name = "注塑码")]
[ExporterHeader(DisplayName = "注塑码")]
public string InjectionCode { get; set; }
/// <summary>
/// 订单时间
/// </summary>
[Display(Name = "订单时间")]
[ExporterHeader(DisplayName = "订单时间")]
public DateTime BeginDate { get; set; }
}
}

65
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PURCHASE_PRICE_DTO.cs

@ -0,0 +1,65 @@
using Magicodes.ExporterAndImporter.Core;
using System.ComponentModel.DataAnnotations;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
{
/// <summary>
/// 采购价格单
/// </summary>
public class PURCHASE_PRICE_DTO
{
/// <summary>
/// 零件号
/// </summary>
[Display(Name = "零件号")]
public string LU { get; set; }
/// <summary>
/// 价格
/// </summary>
[Display(Name = "价格")]
public decimal Price { get; set; }
}
/// <summary>
/// 导入
/// </summary>
public class PURCHASE_PRICE_IMPORT_DTO
{
/// <summary>
/// 零件号
/// </summary>
[Display(Name = "零件号")]
[ImporterHeader(Name = "零件号")]
public string LU { get; set; }
/// <summary>
/// 价格
/// </summary>
[Display(Name = "价格")]
[ImporterHeader(Name = "价格")]
public decimal Price { get; set; }
}
/// <summary>
/// 导出
/// </summary>
public class PURCHASE_PRICE_EXPORT_DTO
{
/// <summary>
/// 零件号
/// </summary>
[Display(Name = "零件号")]
[ExporterHeader(DisplayName = "零件号")]
public string LU { get; set; }
/// <summary>
/// 价格
/// </summary>
[Display(Name = "价格")]
[ExporterHeader(DisplayName = "价格")]
public decimal Price { get; set; }
}
}

8
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/RequestDto.cs

@ -0,0 +1,8 @@
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
{
public class RequestDto : RequestDtoBase
{
}
}

104
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/TB_RePartsRelationship_DTO.cs

@ -0,0 +1,104 @@
using Magicodes.ExporterAndImporter.Core;
using System.ComponentModel.DataAnnotations;
namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
{
/// <summary>
/// 客户替换件关系
/// </summary>
public class TB_RePartsRelationship_DTO
{
/// <summary>
/// 零件号
/// </summary>
[Display(Name = "零件号")]
public string LU { set; get; }
/// <summary>
/// 替换零件号
/// </summary>
[Display(Name = "替换零件号")]
public string RepLU { set; get; }
/// <summary>
/// 客户编码
/// </summary>
[Display(Name = "客户编码")]
public string ClientCode { set; get; }
/// <summary>
/// 业务类型
/// </summary>
[Display(Name = "业务类型")]
public string BusinessType { set; get; }
}
/// <summary>
/// 导入
/// </summary>
public class TB_RePartsRelationship_IMPORT_DTO
{
/// <summary>
/// 零件号
/// </summary>
[Display(Name = "零件号")]
[ImporterHeader(Name = "零件号")]
public string LU { set; get; }
/// <summary>
/// 替换零件号
/// </summary>
[Display(Name = "替换零件号")]
[ImporterHeader(Name = "替换零件号")]
public string RepLU { set; get; }
/// <summary>
/// 客户编码
/// </summary>
[Display(Name = "客户编码")]
[ImporterHeader(Name = "客户编码")]
public string ClientCode { set; get; }
/// <summary>
/// 业务类型
/// </summary>
[Display(Name = "业务类型")]
[ImporterHeader(Name = "业务类型")]
public string BusinessType { set; get; }
}
/// <summary>
/// 导出
/// </summary>
public class TB_RePartsRelationship_EXPORT_DTO
{
/// <summary>
/// 零件号
/// </summary>
[Display(Name = "零件号")]
[ExporterHeader(DisplayName = "零件号")]
public string LU { set; get; }
/// <summary>
/// 替换零件号
/// </summary>
[Display(Name = "替换零件号")]
[ExporterHeader(DisplayName = "替换零件号")]
public string RepLU { set; get; }
/// <summary>
/// 客户编码
/// </summary>
[Display(Name = "客户编码")]
[ExporterHeader(DisplayName = "客户编码")]
public string ClientCode { set; get; }
/// <summary>
/// 业务类型
/// </summary>
[Display(Name = "业务类型")]
[ExporterHeader(DisplayName = "业务类型")]
public string BusinessType { set; get; }
}
}

30
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Controls/CentralizedControlDtoBase.cs

@ -1,4 +1,5 @@

using Magicodes.ExporterAndImporter.Core;
using System;
using System.Collections.Generic;
using System.Linq;
@ -96,6 +97,35 @@ namespace Win.Sfs.SettleAccount.Entities.Controls
}
/// <summary>
/// 导出Dto
/// </summary>
public class CentralizedControlExportDto
{
/// <summary>
/// 年度
/// </summary>
[ExporterHeader(DisplayName = "年度")]
public string Year { get; protected set; }
/// <summary>
/// 期间
/// </summary>
[ExporterHeader(DisplayName = "期间")]
public string Period { set; get; }
/// <summary>
/// 版本
/// </summary>
[ExporterHeader(DisplayName = "版本")]
public string Version { set; get; }
/// <summary>
/// 是否开放状态
/// </summary>
[ExporterHeader(DisplayName = "是否开放状态")]
public int State { set; get; }
}
}

20
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/MaterialRelationship/IMaterialRelationshipAppService.cs

@ -1,22 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Services;
using Win.Sfs.SettleAccount.MaterialRelationships;
using Win.Sfs.Shared.ApplicationBase;
namespace Win.Sfs.SettleAccount.Entities.MaterialRelationships
namespace Win.Sfs.SettleAccount.Entities.MaterialRelationships
{
public interface IMaterialRelationshipAppService : ICrudAppService<MaterialRelationshipDto,
MaterialRelationshipDto,
Guid,
MaterialRelationshipRequestDto,
MaterialRelationshipCreateDto,
MaterialRelationshipUpdateDto>,
IBranchBaseDataAppService<MaterialRelationshipDto, Guid>
public interface IMaterialRelationshipAppService
{
}
}

127
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/MaterialRelationship/MaterialRelationshipDtoBase.cs

@ -109,146 +109,67 @@ namespace Win.Sfs.SettleAccount.MaterialRelationships
}
/// <summary>
/// FIS
/// </summary>
public class MaterialRelationshipRequestDto : RequestDtoBase, IBranch<Guid>
{
/// <summary>
/// ERP物料号
/// </summary>
public virtual string ErpMaterialCode { get; set; }
/// <summary>
/// 物料描述
/// </summary>
public virtual string MaterialDesc { get; set; }
/// <summary>
/// 物料属性
/// </summary>
public virtual string MaterialProperty { get; set; }
/// <summary>
/// 结算物料号
/// </summary>
public virtual string SettleMaterialCode { get; set; }
/// <summary>
/// 发货看板物料号
/// </summary>
public virtual string ShipMaterailCode { get; set; }
public virtual Guid BranchId { get; set; }
/// <summary>
/// 估价类
/// </summary>
public virtual string AppraisalCategory { get; set; }
public virtual Guid ParentId { get; set; }
public virtual Guid UserId { get; set; }
}
/// <summary>
/// FIS
/// </summary>
public class MaterialRelationshipExportDto
{
/// <summary>
/// ERP物料号
/// </summary>
[ExporterHeaderAttribute(DisplayName = "ERP物料号")]
public virtual string ErpMaterialCode { get; set; }
/// <summary>
/// 物料描述
/// 厂内物料号
/// </summary>
[ExporterHeaderAttribute(DisplayName = "ERP物料描述")]
public virtual string MaterialDesc { get; set; }
[ExporterHeaderAttribute(DisplayName = "厂内物料号")]
public string ErpMaterialCode { get; set; }
[ExporterHeaderAttribute(DisplayName = "估价类")]
/// <summary>
/// 估价类
/// </summary>
public virtual string AppraisalCategory { get; set; }
/// <summary>
/// 物料属性
/// 厂内物料描述
/// </summary>
[ExporterHeaderAttribute(DisplayName = "物料属性")]
public virtual string MaterialProperty { get; set; }
[ExporterHeaderAttribute(DisplayName = "厂内物料描述")]
public string MaterialDesc { get; set; }
/// <summary>
/// 结算物料号
/// 客户物料号
/// </summary>
[ExporterHeaderAttribute(DisplayName = "客户物料号")]
public virtual string SettleMaterialCode { get; set; }
public string SettleMaterialCode { get; set; }
/// <summary>
/// 发货看板物料号
/// 客户物料描述
/// </summary>
[ExporterHeaderAttribute(DisplayName = "发货看板物料号")]
public virtual string ShipMaterailCode { get; set; }
[ExporterHeaderAttribute(DisplayName = "客户物料描述")]
public virtual string MaterialProperty { get; set; }
}
[ImportProject(Name = "零件匹配关系")]
public class MaterialRelationshipImportDto
{
/// <summary>
/// ERP物料号
/// 厂内物料号
/// </summary>
[ImporterHeader(Name = "ERP物料号")]
[ImporterHeader(Name = "厂内物料号")]
[Required(ErrorMessage = "{0}是必填项")]
[MaxLength(CommonConsts.MaxNameLength, ErrorMessage = "{0}最多输入{1}个字符")]
public virtual string ErpMaterialCode { get; set; }
/// <summary>
/// 物料描述
/// </summary>
[ImporterHeader(Name = "ERP物料描述")]
//[Required(ErrorMessage = "{0}是必填项")]
[MaxLength(CommonConsts.MaxNameLength, ErrorMessage = "{0}最多输入{1}个字符")]
public virtual string MaterialDesc { get; set; }
/// <summary>
/// 物料属性
/// </summary>
[ImporterHeader(Name = "物料属性")]
//[Required(ErrorMessage = "{0}是必填项")]
[MaxLength(CommonConsts.MaxNameLength, ErrorMessage = "{0}最多输入{1}个字符")]
public virtual string MaterialProperty { get; set; }
public string ErpMaterialCode { get; set; }
/// <summary>
/// 结算物料号
/// 厂内物料描述
/// </summary>
[ImporterHeader(Name = "结算物料号")]
//[Required(ErrorMessage = "{0}是必填项")]
[ImporterHeader(Name = "厂内物料描述")]
[MaxLength(CommonConsts.MaxNameLength, ErrorMessage = "{0}最多输入{1}个字符")]
public virtual string SettleMaterialCode { get; set; }
public string MaterialDesc { get; set; }
/// <summary>
/// 发货看板物料号
/// 客户物料号
/// </summary>
[ImporterHeader(Name = "发货看板物料号")]
//[Required(ErrorMessage = "{0}是必填项")]
[MaxLength(CommonConsts.MaxNameLength, ErrorMessage = "{0}最多输入{1}个字符")]
public virtual string ShipMaterailCode { get; set; }
[ImporterHeader(Name = "客户物料号")]
public string SettleMaterialCode { get; set; }
[ImporterHeader(Name = "估价类")]
/// <summary>
/// 估价类
/// 客户物料描述
/// </summary>
public virtual string AppraisalCategory { get; set; }
[ImporterHeader(Name = "客户物料描述")]
public virtual string MaterialProperty { get; set; }
}

80
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SE_DETAIL_Service.cs

@ -0,0 +1,80 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using SettleAccount.Domain.BQ;
using Shouldly;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos;
using Win.Sfs.SettleAccount.ExcelImporter;
using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ
{
/// <summary>
/// BBAC发运单
/// </summary>
[AllowAnonymous]
[Route("api/settleaccount/BBAC_SE_DETAIL_SERVICE")]
public class BBAC_SE_DETAIL_SERVICE : ApplicationService
{
/// <summary>
/// BBAC发运单仓储
/// </summary>
private readonly INormalEfCoreRepository<BBAC_SE_DETAIL, Guid> _repository;
/// <summary>
/// excel服务
/// </summary>
private readonly IExcelImportAppService _excelImportService;
/// <summary>
/// 构造
/// </summary>
public BBAC_SE_DETAIL_SERVICE(INormalEfCoreRepository<BBAC_SE_DETAIL, Guid> repository, IExcelImportAppService excelImportService)
{
_repository = repository;
_excelImportService = excelImportService;
}
#region 导出
/// <summary>
/// 导出
/// </summary>
[HttpPost]
[Route("Export")]
public async Task<string> ExportAsync(RequestDto input)
{
string fileName = $"BBAC发运单_{Guid.NewGuid()}.xlsx";
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, 0, true);
var dtos = ObjectMapper.Map<List<BBAC_SE_DETAIL>, List<BBAC_SE_DETAIL_EXPORT_DTO>>(entities);
ExportImporter _exportImporter = new ExportImporter();
var result = await _exportImporter.ExcelExporter(dtos);
result.ShouldNotBeNull();
await _excelImportService.SaveBlobAsync(new SaveExcelImportInputDto { Name = fileName, Content = result });
return fileName;
}
#endregion
#region 查询
/// <summary>
/// 获取列表
/// </summary>
[HttpPost]
[Route("list")]
public async Task<PagedResultDto<BBAC_SE_DETAIL_DTO>> GetListAsync(RequestDto input)
{
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true);
var totalCount = await _repository.GetCountByFilterAsync(input.Filters);
var dtos = ObjectMapper.Map<List<BBAC_SE_DETAIL>, List<BBAC_SE_DETAIL_DTO>>(entities);
return new PagedResultDto<BBAC_SE_DETAIL_DTO>(totalCount, dtos);
}
#endregion
}
}

69
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SE_EDI_Service.cs

@ -1,17 +1,80 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Mvc;
using SettleAccount.Domain.BQ;
using Shouldly;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos;
using Win.Sfs.SettleAccount.ExcelImporter;
using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ
{
/// <summary>
/// BBAC的EDI数据
/// </summary>
[AllowAnonymous]
[Route("api/settleaccount/bbac_se_edi_service")]
public class BBAC_SE_EDI_SERVICE : ApplicationService
{
/// <summary>
/// BBAC的EDI数据仓储
/// </summary>
private readonly INormalEfCoreRepository<BBAC_SE_EDI, Guid> _repository;
/// <summary>
/// excel服务
/// </summary>
private readonly IExcelImportAppService _excelImportService;
/// <summary>
/// 构造
/// </summary>
public BBAC_SE_EDI_SERVICE(INormalEfCoreRepository<BBAC_SE_EDI, Guid> repository, IExcelImportAppService excelImportService)
{
_repository = repository;
_excelImportService = excelImportService;
}
#region 导出
/// <summary>
/// 导出
/// </summary>
[HttpPost]
[Route("Export")]
public async Task<string> ExportAsync(RequestDto input)
{
string fileName = $"BBAC的EDI数据_{Guid.NewGuid()}.xlsx";
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, 0, true);
var dtos = ObjectMapper.Map<List<BBAC_SE_EDI>, List<BBAC_SE_EDI_EXPORT_DTO>>(entities);
ExportImporter _exportImporter = new ExportImporter();
var result = await _exportImporter.ExcelExporter(dtos);
result.ShouldNotBeNull();
await _excelImportService.SaveBlobAsync(new SaveExcelImportInputDto { Name = fileName, Content = result });
return fileName;
}
#endregion
#region 查询
/// <summary>
/// 获取列表
/// </summary>
[HttpPost]
[Route("list")]
public async Task<PagedResultDto<BBAC_SE_EDI_DTO>> GetListAsync(RequestDto input)
{
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true);
var totalCount = await _repository.GetCountByFilterAsync(input.Filters);
var dtos = ObjectMapper.Map<List<BBAC_SE_EDI>, List<BBAC_SE_EDI_DTO>>(entities);
return new PagedResultDto<BBAC_SE_EDI_DTO>(totalCount, dtos);
}
#endregion
}
}

77
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SE_DETAIL_SERVICE.cs

@ -0,0 +1,77 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using SettleAccount.Domain.BQ;
using Shouldly;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos;
using Win.Sfs.SettleAccount.ExcelImporter;
using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ
{
/// <summary>
/// HBPO发运单
/// </summary>
[AllowAnonymous]
[Route("api/settleaccount/HBPO_SE_DETAIL_SERVICE")]
public class HBPO_SE_DETAIL_SERVICE : ApplicationService
{
/// <summary>
/// HBPO发运单仓储
/// </summary>
private readonly INormalEfCoreRepository<HBPO_SE_DETAIL, Guid> _repository;
/// <summary>
/// excel服务
/// </summary>
private readonly IExcelImportAppService _excelImportService;
public HBPO_SE_DETAIL_SERVICE(INormalEfCoreRepository<HBPO_SE_DETAIL, Guid> repository, IExcelImportAppService excelImportService)
{
_repository = repository;
_excelImportService = excelImportService;
}
#region 导出
/// <summary>
/// 导出
/// </summary>
[HttpPost]
[Route("Export")]
public async Task<string> ExportAsync(RequestDto input)
{
string fileName = $"HBPO发运单_{Guid.NewGuid()}.xlsx";
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, 0, true);
var dtos = ObjectMapper.Map<List<HBPO_SE_DETAIL>, List<HBPO_SE_DETAIL_EXPORT_DTO>>(entities);
ExportImporter _exportImporter = new ExportImporter();
var result = await _exportImporter.ExcelExporter(dtos);
result.ShouldNotBeNull();
await _excelImportService.SaveBlobAsync(new SaveExcelImportInputDto { Name = fileName, Content = result });
return fileName;
}
#endregion
#region 查询
/// <summary>
/// 获取列表
/// </summary>
[HttpPost]
[Route("list")]
public async Task<PagedResultDto<HBPO_SE_DETAIL_DTO>> GetListAsync(RequestDto input)
{
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true);
var totalCount = await _repository.GetCountByFilterAsync(input.Filters);
var dtos = ObjectMapper.Map<List<HBPO_SE_DETAIL>, List<HBPO_SE_DETAIL_DTO>>(entities);
return new PagedResultDto<HBPO_SE_DETAIL_DTO>(totalCount, dtos);
}
#endregion
}
}

3
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SE_EDI_SERVICE.cs

@ -9,6 +9,9 @@ using Volo.Abp.Application.Services;
namespace Win.Sfs.SettleAccount.Entities.BQ
{
/// <summary>
/// HBPO的EDI数据
/// </summary>
[AllowAnonymous]
[Route("api/settleaccount/hbpo_se_edi_service")]
public class HBPO_SE_EDI_SERVICE : ApplicationService

129
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PURCHASE_PRICE_SERVICE.cs

@ -0,0 +1,129 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using SettleAccount.Domain.BQ;
using Shouldly;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Caching;
using Win.Abp.Snowflakes;
using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount.CommonManagers;
using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos;
using Win.Sfs.SettleAccount.ExcelImporter;
using Win.Sfs.SettleAccount.ExportReports;
using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ
{
/// <summary>
/// 采购价格单
/// </summary>
[AllowAnonymous]
[Route("api/settleaccount/PURCHASE_PRICE_LIST_Service")]
public class PURCHASE_PRICE_SERVICE : SettleAccountApplicationBase<PURCHASE_PRICE>
{
/// <summary>
/// 采购价格单仓储
/// </summary>
private readonly INormalEfCoreRepository<PURCHASE_PRICE, Guid> _repository;
public PURCHASE_PRICE_SERVICE(
INormalEfCoreRepository<PURCHASE_PRICE, Guid> repository,
IDistributedCache<PURCHASE_PRICE> cache,
IExcelImportAppService excelImportService,
ISnowflakeIdGenerator snowflakeIdGenerator,
ICommonManager commonManager
) : base(cache, excelImportService, snowflakeIdGenerator, commonManager)
{
_repository = repository;
}
#region 导入、导出
/// <summary>
/// 导入
/// </summary>
[HttpPost]
[Route("Import")]
public async Task<string> ImportAsync([FromForm] IFormFileCollection files)
{
ExportImporter _exportImporter = new ExportImporter();
var result = await _exportImporter.UploadExcelImport<PURCHASE_PRICE_IMPORT_DTO>(files, _excelImportService);
var _ls = ObjectMapper.Map<List<PURCHASE_PRICE_IMPORT_DTO>, List<PURCHASE_PRICE>>(result);
List<string> _errorList = new List<string>();
var checkList = new List<ErrorExportDto>();
if (_ls.Count > 0)
{
var query = from arc in _ls
group arc by new { arc.LU }
into g
where g.Count() > 1
select g;
foreach (var itm in query)
{
checkList.Add(new ErrorExportDto(string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Format("物料号{0}有重复", itm.Key.LU), string.Empty));
}
}
foreach (var itm in _ls)
{
var _first = _repository.FirstOrDefault(p => p.LU == itm.LU);
if (_first != null)
{
_first.Update(itm.Price);
await _repository.UpdateAsync(_first);
}
else
{
await _repository.InsertAsync(itm);
}
}
if (checkList.Count > 0)
{
return await ExportErrorReportAsync(checkList);
}
return ApplicationConsts.SuccessStr;
}
/// <summary>
/// 导出
/// </summary>
[HttpPost]
[Route("Export")]
public async Task<string> ExportAsync(RequestDto input)
{
string fileName = $"采购价格单_{Guid.NewGuid()}.xlsx";
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, 0, true);
var dtos = ObjectMapper.Map<List<PURCHASE_PRICE>, List<PURCHASE_PRICE_EXPORT_DTO>>(entities);
ExportImporter _exportImporter = new ExportImporter();
var result = await _exportImporter.ExcelExporter(dtos);
result.ShouldNotBeNull();
await _excelImportService.SaveBlobAsync(new SaveExcelImportInputDto { Name = fileName, Content = result });
return fileName;
}
#endregion
#region CURD
/// <summary>
/// 获取列表
/// </summary>
[HttpPost]
[Route("list")]
public async Task<PagedResultDto<PURCHASE_PRICE_DTO>> GetListAsync(RequestDto input)
{
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true);
var totalCount = await _repository.GetCountByFilterAsync(input.Filters);
var dtos = ObjectMapper.Map<List<PURCHASE_PRICE>, List<PURCHASE_PRICE_DTO>>(entities);
return new PagedResultDto<PURCHASE_PRICE_DTO>(totalCount, dtos);
}
#endregion
}
}

126
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/TB_RePartsRelationship_SERVICE.cs

@ -0,0 +1,126 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using SettleAccount.Domain.BQ;
using Shouldly;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Caching;
using Win.Abp.Snowflakes;
using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount.CommonManagers;
using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos;
using Win.Sfs.SettleAccount.ExcelImporter;
using Win.Sfs.SettleAccount.ExportReports;
using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ
{
/// <summary>
/// 客户替换件关系
/// </summary>
[AllowAnonymous]
[Route("api/settleaccount/[controller]/[action]")]
public class TB_RePartsRelationship_SERVICE : SettleAccountApplicationBase<TB_RePartsRelationship>
{
/// <summary>
/// 客户替换件关系仓储
/// </summary>
private readonly INormalEfCoreRepository<TB_RePartsRelationship, Guid> _repository;
public TB_RePartsRelationship_SERVICE(
INormalEfCoreRepository<TB_RePartsRelationship, Guid> repository,
IDistributedCache<TB_RePartsRelationship> cache,
IExcelImportAppService excelImportService,
ISnowflakeIdGenerator snowflakeIdGenerator,
ICommonManager commonManager
) : base(cache, excelImportService, snowflakeIdGenerator, commonManager)
{
_repository = repository;
}
#region 导入、导出
/// <summary>
/// 导入
/// </summary>
[HttpPost]
public async Task<string> ImportAsync([FromForm] IFormFileCollection files)
{
ExportImporter _exportImporter = new ExportImporter();
var result = await _exportImporter.UploadExcelImport<TB_RePartsRelationship_IMPORT_DTO>(files, _excelImportService);
var _ls = ObjectMapper.Map<List<TB_RePartsRelationship_IMPORT_DTO>, List<TB_RePartsRelationship>>(result);
List<string> _errorList = new List<string>();
var checkList = new List<ErrorExportDto>();
if (_ls.Count > 0)
{
var query = from arc in _ls
group arc by new { arc.LU }
into g
where g.Count() > 1
select g;
foreach (var itm in query)
{
checkList.Add(new ErrorExportDto(string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Format("物料号{0}有重复", itm.Key.LU), string.Empty));
}
}
foreach (var itm in _ls)
{
var _first = _repository.FirstOrDefault(p => p.LU == itm.LU);
if (_first != null)
{
_first.Update(itm.LU, itm.RepLU, itm.ClientCode, itm.BusinessType);
await _repository.UpdateAsync(_first);
}
else
{
await _repository.InsertAsync(itm);
}
}
if (checkList.Count > 0)
{
return await ExportErrorReportAsync(checkList);
}
return ApplicationConsts.SuccessStr;
}
/// <summary>
/// 导出
/// </summary>
[HttpPost]
public async Task<string> ExportAsync(RequestDto input)
{
string fileName = $"客户替换件关系_{Guid.NewGuid()}.xlsx";
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, 0, true);
var dtos = ObjectMapper.Map<List<TB_RePartsRelationship>, List<TB_RePartsRelationship_EXPORT_DTO>>(entities);
ExportImporter _exportImporter = new ExportImporter();
var result = await _exportImporter.ExcelExporter(dtos);
result.ShouldNotBeNull();
await _excelImportService.SaveBlobAsync(new SaveExcelImportInputDto { Name = fileName, Content = result });
return fileName;
}
#endregion
#region CURD
/// <summary>
/// 获取列表
/// </summary>
[HttpGet]
public async Task<PagedResultDto<TB_RePartsRelationship_DTO>> GetListAsync(RequestDto input)
{
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true);
var totalCount = await _repository.GetCountByFilterAsync(input.Filters);
var dtos = ObjectMapper.Map<List<TB_RePartsRelationship>, List<TB_RePartsRelationship_DTO>>(entities);
return new PagedResultDto<TB_RePartsRelationship_DTO>(totalCount, dtos);
}
#endregion
}
}

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

@ -1,102 +1,55 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using EFCore.BulkExtensions;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Csv;
using Magicodes.ExporterAndImporter.Excel;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Caching.Distributed;
using Shouldly;
using Volo.Abp;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Volo.Abp.Caching;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Guids;
using Volo.Abp.ObjectMapping;
using Volo.Abp.Uow;
using Win.Abp.Snowflakes;
using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount.CommonManagers;
using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.Entities.Boms;
using Win.Sfs.SettleAccount.Entities.Controls;
using Win.Sfs.SettleAccount.Entities.ImportMap;
using Win.Sfs.SettleAccount.Entities.Materials;
using Win.Sfs.SettleAccount.ExcelImporter;
using Win.Sfs.SettleAccount.ExportReports;
using Win.Sfs.Shared.CacheBase;
using Win.Sfs.Shared.Filter;
using Win.Sfs.Shared.RepositoryBase;
using Win.Utils;
namespace Win.Sfs.SettleAccount.Boms
{
/// <summary>
/// BOM
/// </summary>
//[Authorize(SettleAccountPermissions.Boms.Default)]
[AllowAnonymous]
[Route("api/settleaccount/bom")]
[Route("api/settleaccount/[controller]/[action]")]
public class BomAppService : SettleAccountApplicationBase<Bom>
{
/// <summary>
/// BOM�ִ�
/// BOM仓储
/// </summary>
private readonly INormalEfCoreRepository<Bom, Guid> _repository;
private readonly IGuidGenerator _guidGenerator;
private readonly IObjectMapper _objectMapper;
private readonly IExcelImportAppService _excelImportService;
private readonly ISettleAccountBranchEfCoreRepository<Material, Guid> _materialRepository;
private readonly ISettleAccountBranchEfCoreRepository<ImportColumnMap, Guid> _importColumnMapRepository;
private readonly ISettleAccountBranchEfCoreRepository<BomVersion, Guid> _versionRepository;
/// <summary>
/// ���췽��
/// 构造
/// </summary>
public BomAppService(
INormalEfCoreRepository<Bom, Guid> repository,
IGuidGenerator guidGenerator,
IObjectMapper objectMapper,
IExcelImportAppService excelImportService,
ISnowflakeIdGenerator snowflakeIdGenerator,
ICommonManager commonManager,
ISettleAccountBranchEfCoreRepository<BomVersion, Guid> versionRepository,
ISettleAccountBranchEfCoreRepository<Material, Guid> materialRepository,
ISettleAccountBranchEfCoreRepository<ImportColumnMap, Guid> importColumnMapRepository,
IDistributedCache<Bom> cache
) : base(cache,excelImportService,snowflakeIdGenerator,commonManager)
IDistributedCache<Bom> cache,
IExcelImportAppService excelImportService,
ISnowflakeIdGenerator snowflakeIdGenerator,
ICommonManager commonManager
) : base(cache,excelImportService,snowflakeIdGenerator,commonManager)
{
_repository = repository;
_guidGenerator = guidGenerator;
_objectMapper = objectMapper;
_excelImportService = excelImportService;
_versionRepository = versionRepository;
_materialRepository = materialRepository;
_importColumnMapRepository = importColumnMapRepository;
}
#region ���롢����
#region 导出
/// <summary>
/// ����
/// 导出
/// </summary>
[HttpPost]
[Route("Export")]
public virtual async Task<string> ExportAsync(BomRequestDto input)
{
string _fileName = string.Format("BOM_{0}.xlsx", DateTime.Now.ToString("yyyyMMdd"));
@ -104,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
{
@ -125,10 +78,9 @@ namespace Win.Sfs.SettleAccount.Boms
#region CURD
/// <summary>
/// ��ȡ�б�
/// 获取列表
/// </summary>
[HttpPost]
[Route("list")]
[HttpGet]
public async Task<PagedResultDto<BomDto>> GetListAsync(BomRequestDto input)
{
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true);
@ -138,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")]
@ -169,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();
@ -179,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);
@ -198,9 +150,9 @@ namespace Win.Sfs.SettleAccount.Boms
// /// <summary>
// /// ���빦��
// /// 导入功能
// /// </summary>
// /// <param name="files">�ϴ����ļ�(ǰ���Ѿ�����ֻ���ϴ�һ������)</param>
// /// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
// /// <returns></returns>
// [HttpPost]
// [Route("ExcelImport")]
@ -224,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();
@ -234,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);
@ -249,7 +201,7 @@ namespace Win.Sfs.SettleAccount.Boms
// return ApplicationConsts.SuccessStr;
// }
// /// <summary>
// /// �����ļ�
// /// 导出文件
// /// </summary>
// /// <param name="input"></param>
// /// <returns></returns>
@ -260,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() });
@ -273,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
// {
@ -302,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)]
@ -339,9 +291,9 @@ namespace Win.Sfs.SettleAccount.Boms
// }
// /// <summary>
// /// ��ȡʵ������
// /// 获取实体总数
// /// </summary>
// /// <returns>ʵ������</returns>
// /// <returns>实体总数</returns>
// [HttpGet]
// [Route("count")]
//[Authorize(SettleAccountPermissions.Boms.Default)]
@ -353,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)]
@ -368,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)]
@ -390,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)]
@ -420,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)]

25
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/CodeSettingTables/CodeSettingAppService.cs

@ -35,7 +35,7 @@ namespace Win.Sfs.SettleAccount.Entities.CodeSettingTables
/// </summary>
[Authorize(SettleAccountPermissions.CodeSettings.Default)]
[Route("api/settleaccount/CodeSetting")]
[Route("api/settleaccount/[controller]/[action]")]
public class CodeSettingAppService : SettleAccountApplicationBase<CodeSetting>, ICodeSettingAppService
{
private readonly ISettleAccountBranchEfCoreRepository<ImportColumnMap, Guid> _mapRepository;
@ -70,9 +70,7 @@ namespace Win.Sfs.SettleAccount.Entities.CodeSettingTables
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
[HttpPost]
[Route("ExcelImport-Map")]
[DisableRequestSizeLimit]
[Authorize(SettleAccountPermissions.CodeSettings.Create)]
public async Task<string> CodeSettingUploadExcelImportMap([FromForm] IFormFileCollection files)
{
@ -107,9 +105,7 @@ namespace Win.Sfs.SettleAccount.Entities.CodeSettingTables
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
[HttpPost]
[Route("ExcelImport")]
[DisableRequestSizeLimit]
[Authorize(SettleAccountPermissions.CodeSettings.Create)]
public async Task<string> CodeSettingUploadExcelImport([FromForm] IFormFileCollection files)
{
@ -148,7 +144,6 @@ namespace Win.Sfs.SettleAccount.Entities.CodeSettingTables
/// <param name="id">ID</param>
/// <returns>实体DTO</returns>
[HttpGet]
[Route("{id}")]
virtual public async Task<CodeSettingDto> GetAsync(Guid id)
{
var result = await _repository.GetAsync(id);
@ -184,8 +179,7 @@ namespace Win.Sfs.SettleAccount.Entities.CodeSettingTables
/// </remarks>
/// <param name="input">请求条件</param>
/// <returns>实体DTO列表</returns>
[HttpPost]
[Route("list")]
[HttpGet]
virtual public async Task<PagedResultDto<CodeSettingDto>> GetListAsync(CodeSettingRequestDto input)
{
var entities = await _repository.GetListByFilterAsync(input.BranchId, input.Filters, input.Sorting, input.MaxResultCount,
@ -203,7 +197,6 @@ namespace Win.Sfs.SettleAccount.Entities.CodeSettingTables
/// </summary>
/// <returns>实体总数</returns>
[HttpGet]
[Route("count")]
virtual public async Task<long> GetTotalCountAsync(Guid branchId)
{
return await _repository.GetCountAsync(branchId);
@ -214,7 +207,6 @@ namespace Win.Sfs.SettleAccount.Entities.CodeSettingTables
/// </summary>
/// <returns>实体DTO列表</returns>
[HttpGet]
[Route("all")]
virtual public async Task<ListResultDto<CodeSettingDto>> GetAllAsync(Guid branchId)
{
var entities = await _repository.GetAllAsync(branchId, true);
@ -270,8 +262,6 @@ namespace Win.Sfs.SettleAccount.Entities.CodeSettingTables
/// <returns>实体DTO</returns>
[HttpPost]
[Route("")]
[Authorize(SettleAccountPermissions.CodeSettings.Create)]
virtual public async Task<CodeSettingDto> CreateAsync(CodeSettingCreateDto input)
{
var _first = _repository.Where(p => p.Project == input.Project && p.Value==input.Value).FirstOrDefault();
@ -305,7 +295,6 @@ namespace Win.Sfs.SettleAccount.Entities.CodeSettingTables
[HttpPost]
[Route("Export")]
virtual public async Task<string> ExportAsync(CodeSettingRequestDto input)
{
string _fileName = string.Format("通用代码设置_{0}.xlsx",DateTime.Now.ToString("yyyyMMdd"));
@ -339,9 +328,7 @@ namespace Win.Sfs.SettleAccount.Entities.CodeSettingTables
/// <param name="id">ID</param>
/// <param name="input">修改实体DTO</param>
/// <returns>实体DTO</returns>
[HttpPut]
[Route("{id}")]
[Authorize(SettleAccountPermissions.CodeSettings.Update)]
[HttpPost]
virtual public async Task<CodeSettingDto> UpdateAsync(Guid id, CodeSettingUpdateDto input)
{
var _first = _repository.Where(p => p.Project == input.Project && p.Value == input.Value).FirstOrDefault();
@ -364,9 +351,7 @@ namespace Win.Sfs.SettleAccount.Entities.CodeSettingTables
/// </summary>
/// <param name="id">ID</param>
/// <returns>无</returns>
[HttpDelete]
[Route("{id}")]
[Authorize(SettleAccountPermissions.CodeSettings.Delete)]
[HttpPost]
virtual public async Task DeleteAsync(Guid id)
{
var entity = await GetFromCacheAsync(id);
@ -380,8 +365,6 @@ namespace Win.Sfs.SettleAccount.Entities.CodeSettingTables
/// <param name="ids">IDs</param>
/// <returns>是否执行成功</returns>
[HttpPost]
[Route("delete")]
[Authorize(SettleAccountPermissions.CodeSettings.Delete)]
virtual public async Task<bool> DeleteListAsync(List<Guid> ids)
{

67
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Controls/CentralizedControlAppService.cs

@ -1,43 +1,24 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using EFCore.BulkExtensions;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Caching.Distributed;
using Shouldly;
using Volo.Abp;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Volo.Abp.Caching;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Guids;
using Volo.Abp.ObjectMapping;
using Volo.Abp.Uow;
using Win.Abp.Snowflakes;
using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount.CommonManagers;
using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.Entities.CodeSettings;
using Win.Sfs.SettleAccount.Entities.ImportMap;
using Win.Sfs.SettleAccount.Entities.Materials;
using Win.Sfs.SettleAccount.ExcelImporter;
using Win.Sfs.Shared.CacheBase;
using Win.Sfs.Shared.RepositoryBase;
using Win.Utils;
namespace Win.Sfs.SettleAccount.Entities.Controls
{
/// <summary>
/// 期间设置
/// </summary>
//[Authorize(SettleAccountPermissions.CentralizedControls.Default)]
[AllowAnonymous]
[Route("api/settleaccount/CentralizedControl")]
[Route("api/settleaccount/[controller]/[action]")]
public class CentralizedControlAppService : SettleAccountApplicationBase<CentralizedControl>
{
/// <summary>
@ -45,16 +26,11 @@ namespace Win.Sfs.SettleAccount.Entities.Controls
/// </summary>
private readonly INormalEfCoreRepository<CentralizedControl, Guid> _repository;
private readonly ISettleAccountBranchEfCoreRepository<ImportColumnMap, Guid> _mapRepository;
private readonly IExcelImportAppService _excelImportService;
/// <summary>
/// 构建方法
/// 构造
/// </summary>
public CentralizedControlAppService(
INormalEfCoreRepository<CentralizedControl, Guid> repository,
IGuidGenerator guidGenerator,
IObjectMapper objectMapper,
IDistributedCache<CentralizedControl> cache,
IExcelImportAppService excelImportService,
ISnowflakeIdGenerator snowflakeIdGenerator,
@ -62,15 +38,33 @@ namespace Win.Sfs.SettleAccount.Entities.Controls
) : base(cache, excelImportService, snowflakeIdGenerator, commonManager)
{
_repository = repository;
_excelImportService = excelImportService;
}
#region 导出
/// <summary>
/// 导出
/// </summary>
[HttpPost]
public async Task<string> ExportAsync(CentralizedControlRequestDto input)
{
string fileName = $"期间设置_{Guid.NewGuid()}.xlsx";
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, 0, true);
var dtos = ObjectMapper.Map<List<CentralizedControl>, List<CentralizedControlExportDto>>(entities);
ExportImporter _exportImporter = new ExportImporter();
var result = await _exportImporter.ExcelExporter(dtos);
result.ShouldNotBeNull();
await _excelImportService.SaveBlobAsync(new SaveExcelImportInputDto { Name = fileName, Content = result });
return fileName;
}
#endregion
#region CURD
/// <summary>
/// 获取列表
/// </summary>
[HttpPost]
[Route("list")]
[HttpGet]
public async Task<PagedResultDto<CentralizedControlDto>> GetListAsync(CentralizedControlRequestDto input)
{
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true);
@ -81,8 +75,10 @@ namespace Win.Sfs.SettleAccount.Entities.Controls
#endregion
#region 开启、关闭
/// <summary>
/// 开启版本
/// </summary>
[HttpPost]
[Route("open")]
public async Task<bool> OpenVersion(List<Guid> ids)
{
var entitys = await _repository.GetListAsync(p => ids.Contains(p.Id));
@ -93,11 +89,10 @@ namespace Win.Sfs.SettleAccount.Entities.Controls
return true;
}
[HttpPost]
[Route("close")]
/// <summary>
/// 关闭版本
/// </summary>
[HttpPost]
public async Task<bool> ClosedVersion(List<Guid> ids)
{
var entitys = await _repository.GetListAsync(p => ids.Contains(p.Id));

1
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/ErpShipping/ErpShippingAppService.cs

@ -47,6 +47,7 @@ namespace Win.Sfs.SettleAccount.ERPShippingDetails
[Authorize(SettleAccountPermissions.Boms.Default)]
//[AllowAnonymous]
[Route("api/settleaccount/ErpShipping")]
[ApiExplorerSettings(IgnoreApi = true)]
public class ErpShippingAppService : SettleAccountApplicationBase<ERPShippingDetail>
{
private readonly IGuidGenerator _guidGenerator;

1
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/ErrorListBill/ErrorBillAppService.cs

@ -45,6 +45,7 @@ namespace Win.Sfs.SettleAccount.Entities.ErrorBills
// [Authorize(SettleAccountPermissions.ErrorBills.Default)]
//[AllowAnonymous]
[Route("api/settleaccount/ErrorBill")]
[ApiExplorerSettings(IgnoreApi = true)]
public class ErrorBillAppService : SettleAccountApplicationBase<ErrorBill>
{

1
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/FISes/FISAppService.cs

@ -44,6 +44,7 @@ namespace Win.Sfs.SettleAccount.FISes
/// </summary>
//[Authorize(SettleAccountPermissions.FISs.Default)]
//[AllowAnonymous]
[ApiExplorerSettings(IgnoreApi = true)]
[Route("api/settleaccount/fis")]
public class FISAppService : SettleAccountApplicationBase<FIS>, IFISAppService
{

3
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Factories/FactoryAppService.cs

@ -32,7 +32,8 @@ namespace Win.Sfs.SettleAccount.Entities.Factories
/// <summary>
/// 区域相关应用服务
/// </summary>
[Authorize(SettleAccountPermissions.Factorys.Default)]
[ApiExplorerSettings(IgnoreApi = true)]
[Authorize(SettleAccountPermissions.Factorys.Default)]
//[AllowAnonymous]
[Route("api/settleaccount/Factory")]
public class FactoryAppService : SettleAccountApplicationBase<Factory>, IFactoryAppService

1
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Inventories/InventoryDetailAppService.cs

@ -38,6 +38,7 @@ namespace Win.Sfs.SettleAccount.InventoryDetails
/// <summary>
/// 区域相关应用服务
/// </summary>
[ApiExplorerSettings(IgnoreApi = true)]
[Authorize(SettleAccountPermissions.InventoryDetails.Default)]
[Route("api/settleaccount/InventoryDetail")]

1
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Invoices/InvoiceAppService.cs

@ -41,6 +41,7 @@ namespace Win.Sfs.SettleAccount.Entities.Invoices
/// <summary>
/// 发票汇总导入
/// </summary>
[ApiExplorerSettings(IgnoreApi = true)]
[Route("api/settleaccount/Invoices")]
[Authorize(SettleAccountPermissions.Invoices.Default)]
public class InvoiceAppService : SettleAccountApplicationBase<Invoice>,IInvoiceAppService

1
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/ItemInvoicePrices/ItemInvoicePriceAppService.cs

@ -48,6 +48,7 @@ namespace Win.Sfs.SettleAccount.ItemInvoicePrices
/// </summary>
//[Authorize(SettleAccountPermissions.ItemInvoicePrices.Default)]
//[AllowAnonymous]
[ApiExplorerSettings(IgnoreApi = true)]
[Route("api/settleaccount/ItemInvoicePrice")]
public class ItemInvoicePriceAppService : SettleAccountApplicationBase<ItemInvoicePrice>, IItemInvoicePriceAppService
{

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

@ -1,97 +1,75 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using EFCore.BulkExtensions;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Caching.Distributed;
using Shouldly;
using Volo.Abp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Volo.Abp.Caching;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Guids;
using Volo.Abp.ObjectMapping;
using Volo.Abp.Uow;
using Win.Abp.Snowflakes;
using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount.CommonManagers;
using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.Entities.ImportMap;
using Win.Sfs.SettleAccount.Entities.MaterialRelationships;
using Win.Sfs.SettleAccount.ExcelImporter;
using Win.Sfs.SettleAccount.ExportReports;
using Win.Sfs.SettleAccount.MaterialRelationships;
using Win.Sfs.Shared.CacheBase;
using Win.Utils;
using Win.Sfs.Shared.DtoBase;
using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.MaterialRelationships
{
/// <summary>
/// 区域相关应用服务
/// 客户零件关系
/// </summary>
//[Authorize(SettleAccountPermissions.MaterialRelationships.Default)]
//[AllowAnonymous]
[Route("api/settleaccount/MaterialRelationship")]
public class MaterialRelationshipAppService : SettleAccountApplicationBase<MaterialRelationship>, IMaterialRelationshipAppService
[AllowAnonymous]
[Route("api/settleaccount/[controller]/[action]")]
public class MaterialRelationshipAppService : SettleAccountApplicationBase<MaterialRelationship>
{
/// <summary>
/// 客户零件关系仓储
/// </summary>
private readonly INormalEfCoreRepository<MaterialRelationship, Guid> _repository;
private readonly ISettleAccountBranchEfCoreRepository<ImportColumnMap, Guid> _mapRepository;
private readonly IExcelImportAppService _excelImportService;
private readonly ISettleAccountBranchEfCoreRepository<MaterialRelationship, Guid> _repository;
/// <summary>
/// 构建方法
/// 构造
/// </summary>
/// <param name="guidGenerator">构建UID</param>
/// <param name="objectMapper">自动map</param>
/// <param name="repository">仓储接口</param>
/// <param name="cache">缓存</param>
public MaterialRelationshipAppService(IGuidGenerator guidGenerator,
IObjectMapper objectMapper,
ISettleAccountBranchEfCoreRepository<MaterialRelationship, Guid> repository,
ISettleAccountBranchEfCoreRepository<ImportColumnMap, Guid> mapRepository,
public MaterialRelationshipAppService(
INormalEfCoreRepository<MaterialRelationship, Guid> repository,
IDistributedCache<MaterialRelationship> cache,
IExcelImportAppService excelImportService,
ISnowflakeIdGenerator snowflakeIdGenerator,
ICommonManager commonManager
) : base(cache,excelImportService,snowflakeIdGenerator,commonManager)
{
_mapRepository = mapRepository;
_repository = repository;
_excelImportService = excelImportService;
}
#region 导入、导出
/// <summary>
/// 导入功能
/// 导入
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
[HttpPost]
[Route("ExcelImport-Map")]
[DisableRequestSizeLimit]
public async Task<string> MaterialRelationshipUploadExcelImportMap([FromForm] IFormFileCollection files)
public async Task<string> ImportAsync([FromForm] IFormFileCollection files)
{
ExportImporter _exportImporter = new ExportImporter();
var mapList=_mapRepository.Where(p => p.ProjectName == SettleAccountModuleName.MaterialRelationship).ToList();
var result = await _exportImporter.ExtendExcelImport<MaterialRelationshipImportDto>(files, _excelImportService,mapList);
var result = await _exportImporter.UploadExcelImport<MaterialRelationshipImportDto>(files, _excelImportService);
var _ls = ObjectMapper.Map<List<MaterialRelationshipImportDto>, List<MaterialRelationship>>(result);
List<string> _errorList = new List<string>();
var checkList = new List<ErrorExportDto>();
if (_ls.Count > 0)
{
var query = from arc in _ls
group arc by new { arc.ErpMaterialCode }
into g
into g
where g.Count() > 1
select g;
foreach (var itm in query)
{
checkList.Add(new ErrorExportDto(string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Format("ERP物料号{0}有重复", itm.Key.ErpMaterialCode), string.Empty));
// _errorList.Add(string.Format("ERP物料号{0}有重复",itm.Key.ErpMaterialCode));
}
}
foreach (var itm in _ls)
@ -104,307 +82,392 @@ namespace Win.Sfs.SettleAccount.Entities.MaterialRelationships
}
else
{
checkList.Add(new ErrorExportDto(string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Format("关系表中不存在ERP物料号{0}!", itm.ErpMaterialCode), string.Empty));
//_errorList.Add(string.Format("关系表中不存在ERP物料号{0}!", itm.ErpMaterialCode));
//itm.SetId(GuidGenerator.Create(), GuidGenerator.Create());
//await _repository.InsertAsync(itm);
await _repository.InsertAsync(itm);
}
//itm.SetId(GuidGenerator.Create(), GuidGenerator.Create());
}
if (checkList.Count > 0)
{
return await ExportErrorReportAsync(checkList);
}
return ApplicationConsts.SuccessStr;
}
/// <summary>
/// 导入功能
/// 导出
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
[HttpPost]
[Route("ExcelImport")]
[DisableRequestSizeLimit]
public async Task<string> MaterialRelationshipUploadExcelImport([FromForm] IFormFileCollection files)
public async Task<string> ExportAsync(RequestDtoBase input)
{
string fileName = $"客户零件关系_{Guid.NewGuid()}.xlsx";
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, 0, true);
var dtos = ObjectMapper.Map<List<MaterialRelationship>, List<MaterialRelationshipExportDto>>(entities);
ExportImporter _exportImporter = new ExportImporter();
var result = await _exportImporter.UploadExcelImport<MaterialRelationshipImportDto>(files, _excelImportService);
var _ls = ObjectMapper.Map<List<MaterialRelationshipImportDto>, List<MaterialRelationship>>(result);
List<string> _errorList = new List<string>();
var checkList = new List<ErrorExportDto>();
if (_ls.Count > 0)
{
var query=from arc in _ls
group arc by new { arc.ErpMaterialCode}
into g
where g.Count() >1
select g;
foreach (var itm in query)
{
checkList.Add(new ErrorExportDto(string.Empty,string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Format("ERP物料号{0}有重复", itm.Key.ErpMaterialCode), string.Empty));
// _errorList.Add(string.Format("ERP物料号{0}有重复",itm.Key.ErpMaterialCode));
}
}
foreach (var itm in _ls)
{
var _first = _repository.FirstOrDefault(p => p.ErpMaterialCode == itm.ErpMaterialCode );
if (_first != null)
{
_first.Update(itm.MaterialDesc,itm.MaterialProperty,itm.SettleMaterialCode,itm.ShipMaterailCode);
await _repository.UpdateAsync(_first);
}
else
{
checkList.Add(new ErrorExportDto(string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Format("关系表中不存在ERP物料号{0}!", itm.ErpMaterialCode), string.Empty));
//_errorList.Add(string.Format("关系表中不存在ERP物料号{0}!", itm.ErpMaterialCode));
//itm.SetId(GuidGenerator.Create(), GuidGenerator.Create());
//await _repository.InsertAsync(itm);
}
//itm.SetId(GuidGenerator.Create(), GuidGenerator.Create());
}
if (checkList.Count > 0)
{
return await ExportErrorReportAsync(checkList);
}
var result = await _exportImporter.ExcelExporter(dtos);
result.ShouldNotBeNull();
return ApplicationConsts.SuccessStr;
await _excelImportService.SaveBlobAsync(new SaveExcelImportInputDto { Name = fileName, Content = result });
return fileName;
}
#endregion
#region CURD
/// <summary>
/// 按ID获取唯一实体
/// 获取列表
/// </summary>
/// <remarks>
/// 返回实体全部属性
/// </remarks>
/// <param name="id">ID</param>
/// <returns>实体DTO</returns>
[HttpGet]
[Route("{id}")]
virtual public async Task<MaterialRelationshipDto> GetAsync(Guid id)
public async Task<PagedResultDto<MaterialRelationshipDto>> GetListAsync(RequestDtoBase input)
{
var result = await GetFromCacheAsync(id);
var dto = ObjectMapper.Map<MaterialRelationship, MaterialRelationshipDto>(result);
return dto;
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true);
var totalCount = await _repository.GetCountByFilterAsync(input.Filters);
var dtos = ObjectMapper.Map<List<MaterialRelationship>, List<MaterialRelationshipDto>>(entities);
return new PagedResultDto<MaterialRelationshipDto>(totalCount, dtos);
}
#endregion
private async Task<MaterialRelationship> GetFromCacheAsync(Guid id)
{
var result = await _repository.GetAsync(id);
return result;
}
#region 原方法(废弃)
///// <summary>
///// 导入功能
///// </summary>
///// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
///// <returns></returns>
//[HttpPost]
//[Route("ExcelImport-Map")]
//[DisableRequestSizeLimit]
//public async Task<string> MaterialRelationshipUploadExcelImportMap([FromForm] IFormFileCollection files)
//{
// ExportImporter _exportImporter = new ExportImporter();
// var mapList = _mapRepository.Where(p => p.ProjectName == SettleAccountModuleName.MaterialRelationship).ToList();
// var result = await _exportImporter.ExtendExcelImport<MaterialRelationshipImportDto>(files, _excelImportService, mapList);
// var _ls = ObjectMapper.Map<List<MaterialRelationshipImportDto>, List<MaterialRelationship>>(result);
// List<string> _errorList = new List<string>();
// var checkList = new List<ErrorExportDto>();
// if (_ls.Count > 0)
// {
// var query = from arc in _ls
// group arc by new { arc.ErpMaterialCode }
// into g
// where g.Count() > 1
// select g;
// foreach (var itm in query)
// {
// checkList.Add(new ErrorExportDto(string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Format("ERP物料号{0}有重复", itm.Key.ErpMaterialCode), string.Empty));
// // _errorList.Add(string.Format("ERP物料号{0}有重复",itm.Key.ErpMaterialCode));
// }
// }
// foreach (var itm in _ls)
// {
// var _first = _repository.FirstOrDefault(p => p.ErpMaterialCode == itm.ErpMaterialCode);
// if (_first != null)
// {
// _first.Update(itm.MaterialDesc, itm.MaterialProperty, itm.SettleMaterialCode, itm.ShipMaterailCode);
// await _repository.UpdateAsync(_first);
// }
// else
// {
// checkList.Add(new ErrorExportDto(string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Format("关系表中不存在ERP物料号{0}!", itm.ErpMaterialCode), string.Empty));
// //_errorList.Add(string.Format("关系表中不存在ERP物料号{0}!", itm.ErpMaterialCode));
// //itm.SetId(GuidGenerator.Create(), GuidGenerator.Create());
// //await _repository.InsertAsync(itm);
// }
// //itm.SetId(GuidGenerator.Create(), GuidGenerator.Create());
// }
// if (checkList.Count > 0)
// {
// return await ExportErrorReportAsync(checkList);
// }
// return ApplicationConsts.SuccessStr;
//}
private async Task<long> GetCountAsync(MaterialRelationshipRequestDto input)
{
return await _repository.GetCountByFilterAsync(input.BranchId, input.Filters);
}
///// <summary>
///// 导入功能
///// </summary>
///// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
///// <returns></returns>
//[HttpPost]
//[Route("ExcelImport")]
//[DisableRequestSizeLimit]
//public async Task<string> MaterialRelationshipUploadExcelImport([FromForm] IFormFileCollection files)
//{
// ExportImporter _exportImporter = new ExportImporter();
// var result = await _exportImporter.UploadExcelImport<MaterialRelationshipImportDto>(files, _excelImportService);
// var _ls = ObjectMapper.Map<List<MaterialRelationshipImportDto>, List<MaterialRelationship>>(result);
// List<string> _errorList = new List<string>();
// var checkList = new List<ErrorExportDto>();
// if (_ls.Count > 0)
// {
// var query = from arc in _ls
// group arc by new { arc.ErpMaterialCode }
// into g
// where g.Count() > 1
// select g;
// foreach (var itm in query)
// {
// checkList.Add(new ErrorExportDto(string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Format("ERP物料号{0}有重复", itm.Key.ErpMaterialCode), string.Empty));
// // _errorList.Add(string.Format("ERP物料号{0}有重复",itm.Key.ErpMaterialCode));
// }
// }
// foreach (var itm in _ls)
// {
// var _first = _repository.FirstOrDefault(p => p.ErpMaterialCode == itm.ErpMaterialCode);
// if (_first != null)
// {
// _first.Update(itm.MaterialDesc, itm.MaterialProperty, itm.SettleMaterialCode, itm.ShipMaterailCode);
// await _repository.UpdateAsync(_first);
// }
// else
// {
// checkList.Add(new ErrorExportDto(string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Format("关系表中不存在ERP物料号{0}!", itm.ErpMaterialCode), string.Empty));
// //_errorList.Add(string.Format("关系表中不存在ERP物料号{0}!", itm.ErpMaterialCode));
// //itm.SetId(GuidGenerator.Create(), GuidGenerator.Create());
// //await _repository.InsertAsync(itm);
// }
// //itm.SetId(GuidGenerator.Create(), GuidGenerator.Create());
// }
// if (checkList.Count > 0)
// {
// return await ExportErrorReportAsync(checkList);
// }
// return ApplicationConsts.SuccessStr;
//}
///// <summary>
///// 按ID获取唯一实体
///// </summary>
///// <remarks>
///// 返回实体全部属性
///// </remarks>
///// <param name="id">ID</param>
///// <returns>实体DTO</returns>
//[HttpGet]
//[Route("{id}")]
//virtual public async Task<MaterialRelationshipDto> GetAsync(Guid id)
//{
// var result = await GetFromCacheAsync(id);
// var dto = ObjectMapper.Map<MaterialRelationship, MaterialRelationshipDto>(result);
// return dto;
//}
/// <summary>
/// 根据筛选条件获取实体列表
/// </summary>
/// <remarks>
/// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
/// </remarks>
/// <param name="input">请求条件</param>
/// <returns>实体DTO列表</returns>
[HttpPost]
[Route("list")]
virtual public async Task<PagedResultDto<MaterialRelationshipDto>> GetListAsync(MaterialRelationshipRequestDto input)
{
var entities = await _repository.GetListByFilterAsync(input.BranchId, input.Filters, input.Sorting, input.MaxResultCount,
input.SkipCount, true);
var totalCount = await GetCountAsync(input);
var dtos = ObjectMapper.Map<List<MaterialRelationship>, List<MaterialRelationshipDto>>(entities);
//private async Task<MaterialRelationship> GetFromCacheAsync(Guid id)
//{
// var result = await _repository.GetAsync(id);
return new PagedResultDto<MaterialRelationshipDto>(totalCount, dtos);
}
// return result;
//}
/// <summary>
/// 获取实体总数
/// </summary>
/// <returns>实体总数</returns>
[HttpGet]
[Route("count")]
virtual public async Task<long> GetTotalCountAsync(Guid branchId)
{
return await _repository.GetCountAsync(branchId);
}
/// <summary>
/// 获取全部实体列表
/// </summary>
/// <returns>实体DTO列表</returns>
[HttpGet]
[Route("all")]
virtual public async Task<ListResultDto<MaterialRelationshipDto>> GetAllAsync(Guid branchId)
{
var entities = await _repository.GetAllAsync(branchId, true);
//private async Task<long> GetCountAsync(MaterialRelationshipRequestDto input)
//{
// return await _repository.GetCountByFilterAsync(input.BranchId, input.Filters);
//}
var dtos = ObjectMapper.Map<List<MaterialRelationship>, List<MaterialRelationshipDto>>(entities);
return new ListResultDto<MaterialRelationshipDto>(dtos);
}
/////// <summary>
///// <summary>
///// 根据筛选条件获取实体列表
///// </summary>
///// <remarks>
///// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
///// </remarks>
///// <param name="input">请求条件</param>
///// <returns>实体DTO列表</returns>
//[HttpPost]
//[Route("list")]
//virtual public async Task<PagedResultDto<MaterialRelationshipDto>> GetListAsync(MaterialRelationshipRequestDto input)
//{
// var entities = await _repository.GetListByFilterAsync(input.BranchId, input.Filters, input.Sorting, input.MaxResultCount,
// input.SkipCount, true);
// var totalCount = await GetCountAsync(input);
// var dtos = ObjectMapper.Map<List<MaterialRelationship>, List<MaterialRelationshipDto>>(entities);
// return new PagedResultDto<MaterialRelationshipDto>(totalCount, dtos);
//}
/// <summary>
/// 新增实体
/// </summary>
/// <param name="input">新增实体DTO</param>
/// <returns>实体DTO</returns>
///// <summary>
///// 获取实体总数
///// </summary>
///// <returns>实体总数</returns>
//[HttpGet]
//[Route("count")]
//virtual public async Task<long> GetTotalCountAsync(Guid branchId)
//{
// return await _repository.GetCountAsync(branchId);
//}
[HttpPost]
[Route("")]
virtual public async Task<MaterialRelationshipDto> CreateAsync(MaterialRelationshipCreateDto input)
{
///// <summary>
///// 获取全部实体列表
///// </summary>
///// <returns>实体DTO列表</returns>
//[HttpGet]
//[Route("all")]
//virtual public async Task<ListResultDto<MaterialRelationshipDto>> GetAllAsync(Guid branchId)
//{
// var entities = await _repository.GetAllAsync(branchId, true);
var _first = _repository.Where(p => p.ErpMaterialCode == input.ErpMaterialCode ).FirstOrDefault();
// var dtos = ObjectMapper.Map<List<MaterialRelationship>, List<MaterialRelationshipDto>>(entities);
if (_first != null)
{
throw new BusinessException("001", "已经存数据请修改后创建");
}
// return new ListResultDto<MaterialRelationshipDto>(dtos);
//}
var entity = new MaterialRelationship(
GuidGenerator.Create(),
input.BranchId,
input.ErpMaterialCode,
input.MaterialDesc,
input.MaterialProperty,
input.SettleMaterialCode,
input.ShipMaterailCode,
input.AppraisalCategory
);
await _repository.InsertAsync(entity);
///// <summary>
///// 新增实体
///// </summary>
///// <param name="input">新增实体DTO</param>
///// <returns>实体DTO</returns>
////create cache
//await Cache.SetAsync(entity.Id.ToString(), entity,
// CacheStrategyConst.FIVE_MINUTES);
//[HttpPost]
//[Route("")]
//virtual public async Task<MaterialRelationshipDto> CreateAsync(MaterialRelationshipCreateDto input)
//{
var dto = ObjectMapper.Map<MaterialRelationship, MaterialRelationshipDto>(entity);
return dto;
}
// var _first = _repository.Where(p => p.ErpMaterialCode == input.ErpMaterialCode).FirstOrDefault();
/// <summary>
/// 修改实体
/// </summary>
/// <param name="id">ID</param>
/// <param name="input">修改实体DTO</param>
/// <returns>实体DTO</returns>
[HttpPut]
[Route("{id}")]
virtual public async Task<MaterialRelationshipDto> UpdateAsync(Guid id, MaterialRelationshipUpdateDto input)
{
var entity = await _repository.GetAsync(id);
if (entity != null)
{
entity.Update( input.MaterialDesc, input.MaterialProperty, input.SettleMaterialCode, input.ShipMaterailCode);
// if (_first != null)
// {
// throw new BusinessException("001", "已经存数据请修改后创建");
// }
await _repository.UpdateAsync(entity);
var dto = ObjectMapper.Map<MaterialRelationship, MaterialRelationshipDto>(entity);
return dto;
}
else
{
return null;
}
// var entity = new MaterialRelationship(
// GuidGenerator.Create(),
// input.BranchId,
// input.ErpMaterialCode,
}
// input.MaterialDesc,
// input.MaterialProperty,
// input.SettleMaterialCode,
// input.ShipMaterailCode,
// input.AppraisalCategory
/// <summary>
/// 删除实体
/// </summary>
/// <param name="id">ID</param>
/// <returns>无</returns>
[HttpDelete]
[Route("{id}")]
virtual public async Task DeleteAsync(Guid id)
{
var entity = await GetFromCacheAsync(id);
await Cache.DeleteAsync<MaterialRelationship>(id.ToString());
await _repository.DeleteAsync(id);
}
/// <summary>
/// 按IDs删除实体列表
/// </summary>
/// <param name="ids">IDs</param>
/// <returns>是否执行成功</returns>
[HttpPost]
[Route("delete")]
virtual public async Task<bool> DeleteListAsync(List<Guid> ids)
{
var _query = _repository.Where(p => ids.Contains(p.Id));
int i = await _query.BatchDeleteAsync();
// );
if (i == 0)
{
return false;
}
return true;
}
[HttpPost]
[Route("Export")]
virtual public async Task<string> ExportAsync(MaterialRelationshipRequestDto input)
{
//var _userId = CurrentUser.Id.Value.ToString();
string _fileName = string.Format("零件关系_{0}.xlsx",Guid.NewGuid().ToString());
var entities = await _repository.GetListByFilterAsync(input.BranchId, input.Filters, input.Sorting, int.MaxValue,
0, true);
// await _repository.InsertAsync(entity);
var dtoDetails = ObjectMapper.Map<List<MaterialRelationship>, List<MaterialRelationshipExportDto>>(entities);
// ////create cache
// //await Cache.SetAsync(entity.Id.ToString(), entity,
// // CacheStrategyConst.FIVE_MINUTES);
//声明导出容器
ExportImporter _exportImporter = new ExportImporter();
// var dto = ObjectMapper.Map<MaterialRelationship, MaterialRelationshipDto>(entity);
// return dto;
var result = await _exportImporter.ExcelExporter(dtoDetails);
//}
result.ShouldNotBeNull();
///// <summary>
///// 修改实体
///// </summary>
///// <param name="id">ID</param>
///// <param name="input">修改实体DTO</param>
///// <returns>实体DTO</returns>
//[HttpPut]
//[Route("{id}")]
//virtual public async Task<MaterialRelationshipDto> UpdateAsync(Guid id, MaterialRelationshipUpdateDto input)
//{
// var entity = await _repository.GetAsync(id);
// if (entity != null)
// {
// entity.Update(input.MaterialDesc, input.MaterialProperty, input.SettleMaterialCode, input.ShipMaterailCode);
// await _repository.UpdateAsync(entity);
// var dto = ObjectMapper.Map<MaterialRelationship, MaterialRelationshipDto>(entity);
// return dto;
// }
// else
// {
// return null;
// }
//}
//保存导出文件到服务器存成二进制
await _excelImportService.SaveBlobAsync(
new SaveExcelImportInputDto
{
Name = _fileName,
Content = result
}
);
return _fileName;
}
///// <summary>
///// 删除实体
///// </summary>
///// <param name="id">ID</param>
///// <returns>无</returns>
//[HttpDelete]
//[Route("{id}")]
//virtual public async Task DeleteAsync(Guid id)
//{
// var entity = await GetFromCacheAsync(id);
// await Cache.DeleteAsync<MaterialRelationship>(id.ToString());
// await _repository.DeleteAsync(id);
//}
///// <summary>
///// 按IDs删除实体列表
///// </summary>
///// <param name="ids">IDs</param>
///// <returns>是否执行成功</returns>
//[HttpPost]
//[Route("delete")]
//virtual public async Task<bool> DeleteListAsync(List<Guid> ids)
//{
// var _query = _repository.Where(p => ids.Contains(p.Id));
// int i = await _query.BatchDeleteAsync();
// if (i == 0)
// {
// return false;
// }
// return true;
//}
//[HttpPost]
//[Route("Export")]
//virtual public async Task<string> ExportAsync(MaterialRelationshipRequestDto input)
//{
// //var _userId = CurrentUser.Id.Value.ToString();
// string _fileName = string.Format("零件关系_{0}.xlsx", Guid.NewGuid().ToString());
// var entities = await _repository.GetListByFilterAsync(input.BranchId, input.Filters, input.Sorting, int.MaxValue,
// 0, true);
// var dtoDetails = ObjectMapper.Map<List<MaterialRelationship>, List<MaterialRelationshipExportDto>>(entities);
// //声明导出容器
// ExportImporter _exportImporter = new ExportImporter();
// var result = await _exportImporter.ExcelExporter(dtoDetails);
// result.ShouldNotBeNull();
// //保存导出文件到服务器存成二进制
// await _excelImportService.SaveBlobAsync(
// new SaveExcelImportInputDto
// {
// Name = _fileName,
// Content = result
// }
// );
// return _fileName;
//}
#endregion
}
}

1
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/MaterialRelationships/MaterialRelationshipTHAppService.cs

@ -30,6 +30,7 @@ namespace Win.Sfs.SettleAccount.Entities.MaterialRelationships
//[AllowAnonymous]
//[Authorize(SettleAccountPermissions.MaterialRelationships.Default)]
[ApiExplorerSettings(IgnoreApi = true)]
[Route("api/settleaccount/MaterialRelationshipDetail")]
public class MaterialRelationshipTHAppService : ApplicationService
/*, IMaterialRelationshipTHAppService*/

57
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Materials/MaterialAppService.cs

@ -1,7 +1,5 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Shouldly;
using System;
using System.Collections.Generic;
@ -10,16 +8,8 @@ using Volo.Abp.Application.Dtos;
using Volo.Abp.Caching;
using Win.Abp.Snowflakes;
using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount.Boms;
using Win.Sfs.SettleAccount.CommonManagers;
using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.Entities.Boms;
using Win.Sfs.SettleAccount.Entities.ImportMap;
using Win.Sfs.SettleAccount.Entities.Prices;
using Win.Sfs.SettleAccount.Entities.TaskJobs;
using Win.Sfs.SettleAccount.ExcelImporter;
using Win.Sfs.SettleAccount.ExportReports;
using Win.Sfs.SettleAccount.MaterialRelationships;
using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.Materials
@ -27,50 +17,27 @@ namespace Win.Sfs.SettleAccount.Entities.Materials
/// <summary>
/// 物料主数据
/// </summary>
//[Authorize(SettleAccountPermissions.Materials.Default)]
[AllowAnonymous]
[Route("api/settleaccount/Material")]
[Route("api/settleaccount/[controller]/[action]")]
public class MaterialAppService : SettleAccountApplicationBase<Material>
{
private readonly IExcelImportAppService _excelImportService;
/// <summary>
/// 物料主数据仓储
/// </summary>
private readonly INormalEfCoreRepository<Material, Guid> _repository;
private readonly ISettleAccountBranchEfCoreRepository<Bom, Guid> _bomRepository;
private readonly ISettleAccountBranchEfCoreRepository<BomVersion, Guid> _bomversionRepository;
private readonly ISettleAccountBranchEfCoreRepository<PriceList, Guid> _priceRepository;
private readonly ISettleAccountBranchEfCoreRepository<PriceListVersion, Guid> _priceversionRepository;
private readonly ISettleAccountBranchEfCoreRepository<ImportColumnMap, Guid> _mapRepository;
private readonly ISettleAccountBranchEfCoreRepository<MaterialRelationship, Guid> _relationshipRepository;
/// <summary>
/// 构建方法
/// 构造
/// </summary>
public MaterialAppService(
INormalEfCoreRepository<Material, Guid> repository,
ISettleAccountBranchEfCoreRepository<ImportColumnMap, Guid> mapRepository,
ISettleAccountBranchEfCoreRepository<Bom, Guid> bomRepository,
ISettleAccountBranchEfCoreRepository<BomVersion, Guid> bomversionRepository,
TaskJobService service,
ISettleAccountBranchEfCoreRepository<MaterialRelationship, Guid> relationshipRepository,
ISettleAccountBranchEfCoreRepository<PriceList, Guid> priceRepository,
ISettleAccountBranchEfCoreRepository<PriceListVersion, Guid> priceversionRepository,
IDistributedCache<Material> cache,
IDistributedCache<Material> cache,
IExcelImportAppService excelImportService,
ISnowflakeIdGenerator snowflakeIdGenerator,
ICommonManager commonManager
) : base(cache,excelImportService,snowflakeIdGenerator,commonManager)
) : base(cache,excelImportService,snowflakeIdGenerator,commonManager)
{
_priceRepository = priceRepository;
_priceversionRepository = priceversionRepository;
_bomRepository = bomRepository;
_excelImportService = excelImportService;
_repository = repository;
_relationshipRepository = relationshipRepository;
_mapRepository = mapRepository;
_bomversionRepository = bomversionRepository;
_repository = repository;
}
#region 导入、导出
@ -78,9 +45,7 @@ namespace Win.Sfs.SettleAccount.Entities.Materials
/// 导出
/// </summary>
[HttpPost]
[Route("Export")]
//[Authorize(SettleAccountPermissions.Materials.Default)]
public virtual async Task<string> ExportAsync(MaterialRequestDto input)
public async Task<string> ExportAsync(MaterialRequestDto input)
{
string _fileName = string.Format("物料主数据_{0}.xlsx", DateTime.Now.ToString("yyyyMMdd"));
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue,
@ -110,9 +75,7 @@ namespace Win.Sfs.SettleAccount.Entities.Materials
/// <summary>
/// 获取列表
/// </summary>
[HttpPost]
[Route("list")]
//[Authorize(SettleAccountPermissions.Materials.Default)]
[HttpGet]
virtual public async Task<PagedResultDto<MaterialDto>> GetListAsync(MaterialRequestDto input)
{
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount,

1
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prebatch/PrebatchAppService.cs

@ -37,6 +37,7 @@ namespace Win.Sfs.SettleAccount.Prebatches
/// 区域相关应用服务
/// </summary>
//[Authorize(SettleAccountPermissions.Prebatchs.Default)]
[ApiExplorerSettings(IgnoreApi = true)]
[AllowAnonymous]
[Route("api/settleaccount/Prebatch")]
public class PrebatchAppService : SettleAccountApplicationBase<Prebatch>, IPrebatchAppService

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

@ -4,39 +4,28 @@ using Magicodes.ExporterAndImporter.Excel;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.OpenApi.Extensions;
using NPOI.SS.UserModel;
using SettleAccount.Job.Services.Report;
using Shouldly;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using TaskJob.EventArgs;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Volo.Abp.Uow;
using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos;
using Win.Sfs.SettleAccount.Entities.ImportMap;
using Win.Sfs.SettleAccount.Entities.TaskJobs;
using Win.Sfs.SettleAccount.ExcelImporter;
using Win.Sfs.Shared.Filter;
namespace Win.Sfs.SettleAccount.Entities.Prices
{
/// <summary>
/// 标准价格单-相关应用服务
/// 销售价格单
/// </summary>
//[Authorize(SettleAccountPermissions.PriceLists.Default)]
[Route("api/SettleAccount/PriceList")]
[AllowAnonymous]
[Route("api/settleaccount/[controller]/[action]")]
public class PriceListAppService : ApplicationService
/*, IPriceListAppService*/
{
private readonly PriceListManager _priceListManager;
private readonly IExcelImportAppService _excelImportService;
@ -56,22 +45,20 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
}
#region 导入、导出
/// <summary>
/// 获取导入模板
/// </summary>
[HttpPost("import-template")]
public virtual async Task<IActionResult> ImportTemplateAsync()
{
await Task.CompletedTask;
return new Microsoft.AspNetCore.Mvc.OkResult();
}
///// <summary>
///// 获取导入模板
///// </summary>
//[HttpPost("import-template")]
//public virtual async Task<IActionResult> ImportTemplateAsync()
//{
// await Task.CompletedTask;
// return new Microsoft.AspNetCore.Mvc.OkResult();
//}
/// <summary>
/// 导入
/// </summary>
[HttpPost]
[Route("Import")]
//[Authorize(SettleAccountPermissions.PriceLists.Create)]
public virtual async Task<string> ImportAsync([FromForm] IFormFileCollection files, string version)
{
ExportImporter _exportImporter = new ExportImporter();
@ -101,9 +88,7 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
/// 导出
/// </summary>
[HttpPost]
[Route("Export")]
//[Authorize(SettleAccountPermissions.PriceLists.Default)]
public virtual async Task<string> ExportAsync(TB_PRICE_LIST_RequestDto input)
public virtual async Task<string> ExportAsync(RequestDto input)
{
IExporter _csv = new CsvExporter();
@ -118,18 +103,8 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
string _fileName = string.Empty;
//声明导出容器
byte[] result = null;
switch (input.FileType)
{
case 0:
_fileName = string.Format("销售价格单_{0}.xlsx", Guid.NewGuid().ToString());
result = await _csv.ExportAsByteArray(dtoDetails);
break;
case 1:
_fileName = string.Format("销售价格单_{0}.xlsx", Guid.NewGuid().ToString());
result = await _excel.ExportAsByteArray(dtoDetails);
break;
}
_fileName = string.Format("销售价格单_{0}.xlsx", Guid.NewGuid().ToString());
byte[] result = await _excel.ExportAsByteArray(dtoDetails);
result.ShouldNotBeNull();
//保存导出文件到服务器存成二进制
@ -148,17 +123,11 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
/// <summary>
/// 获取列表
/// </summary>
[HttpPost]
[Route("list")]
//[Authorize(SettleAccountPermissions.PriceLists.Default)]
public virtual async Task<PagedResultDto<TB_PRICE_LISTDto>> GetListAsync(TB_PRICE_LIST_RequestDto input)
[HttpGet]
public virtual async Task<PagedResultDto<TB_PRICE_LISTDto>> GetListAsync(RequestDto input)
{
if (!string.IsNullOrEmpty(input.Version))
{
input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Version", Logic = EnumFilterLogic.And, Value = input.Version });
}
var entitys = await _priceListManager.GetListAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount);
var totalCount = await GetCountAsync(input);
var totalCount = await _priceListManager.GetCountAsync(input.Filters, GuidGenerator.Create());
var dtos = ObjectMapper.Map<List<PriceList>, List<TB_PRICE_LISTDto>>(entitys);
return new PagedResultDto<TB_PRICE_LISTDto>(totalCount, dtos);
}
@ -166,9 +135,7 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
/// <summary>
/// 删除
/// </summary>
[HttpDelete]
[Route("{id}")]
//[Authorize(SettleAccountPermissions.PriceLists.Delete)]
[HttpPost]
virtual public async Task DeleteAsync(Guid id)
{
await _priceListManager.DeleteAsync(id);
@ -178,170 +145,160 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
/// 批量删除
/// </summary>
[HttpPost]
[Route("delete")]
//[Authorize(SettleAccountPermissions.PriceLists.Delete)]
virtual public async Task<bool> DeleteListAsync(List<Guid> ids)
{
return await _priceListManager.DeleteListAsync(ids);
}
#endregion
#region 私有方法
/// <summary>
/// 获取总数
/// </summary>
private async Task<long> GetCountAsync(TB_PRICE_LIST_RequestDto input)
{
return await _priceListManager.GetCountAsync(input.Filters, GuidGenerator.Create());
}
#endregion
/// <summary>
/// 获取总数
/// </summary>
private async Task<long> GetCountAsync(PriceListRequestDto input)
{
return await _priceListManager.GetCountAsync(input.Filters, GuidGenerator.Create());
}
/// <summary>
/// 结算总成和ERP总成价格对比
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
[HttpGet]
[Route("BomDiffPrice-Make")]
[DisableRequestSizeLimit]
[Authorize(SettleAccountPermissions.PriceLists.Default)]
public async Task<string> SettledPartAndErpPartPriceDiffMake(string version, string customerCode)
{
List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "ProjectName", Value = "Bom定价差异明细" });
customConditionList.Add(new CustomCondition() { Name = "Version", Value = string.IsNullOrEmpty(version) ? string.Empty : version });
customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value = string.IsNullOrEmpty(customerCode) ? string.Empty : customerCode });
var _taskid = await _service.ExportEnqueueAsync("Bom定价差异明细", ExportExtentsion.Excel, version, string.Empty, CurrentUser, typeof(SettledPartAndErpPartPriceDiffExportService), customConditionList, (rs) =>
{
});
return _taskid;
}
[HttpPost]
[Route("job/list")]
[Authorize(SettleAccountPermissions.PriceLists.Default)]
[UnitOfWork(false)]
virtual public async Task<List<JobDto>> GetListAsync(JobRequestDto input)
{
return await _service.GetListAsync(input);
}
/// <summary>
/// 按ID获取唯一实体
/// </summary>
/// <remarks>
/// 返回实体全部属性
/// </remarks>
/// <param name="id">ID</param>
/// <returns>实体DTO</returns>
[HttpGet]
[Route("{id}")]
/// [Authorize(SettleAccountPermissions.PriceLists.Default)]
virtual public async Task<PriceListDto> GetAsync(Guid id)
{
var result = await _priceListManager.GetAsync(id); ;
var dto = ObjectMapper.Map<PriceList, PriceListDto>(result);
return dto;
}
/// <summary>
/// 根据筛选条件获取实体列表
/// </summary>
/// <remarks>
/// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
/// </remarks>
/// <param name="input">请求条件</param>
/// <returns>实体DTO列表</returns>
[HttpPost]
[Route("versionlist")]
// [Authorize(SettleAccountPermissions.PriceLists.Default)]
virtual public async Task<PagedResultDto<PriceListVersionDto>> GetVersionListAsync(PriceListRequestDto input)
{
var entities = await _priceListManager.GetVersionListAsync(input.Filters, input.Sorting, input.MaxResultCount,input.SkipCount);
var totalCount = await GetCountAsync(input);
var dtos = ObjectMapper.Map<List<PriceListVersion>, List<PriceListVersionDto>>(entities);
return new PagedResultDto<PriceListVersionDto>(totalCount, dtos);
}
/// <summary>
/// 获取实体总数
/// </summary>
/// <returns>实体总数</returns>
[HttpGet]
[Route("count")]
//[Authorize(SettleAccountPermissions.PriceLists.Default)]
virtual public async Task<long> GetTotalCountAsync(Guid branchId)
{
return await _priceListManager.GetCountAsync(new List<FilterCondition>(), branchId);
}
/// <summary>
/// 获取全部实体列表
/// </summary>
/// <returns>实体DTO列表</returns>
[HttpGet]
[Route("all")]
//[Authorize(SettleAccountPermissions.PriceLists.Default)]
virtual public async Task<ListResultDto<PriceListDto>> GetAllAsync(Guid branchId)
{
var entities = await _priceListManager.GetAllAsync(branchId);
var dtos = ObjectMapper.Map<List<PriceList>, List<PriceListDto>>(entities);
return new ListResultDto<PriceListDto>(dtos);
}
/// <summary>
/// 修改实体
/// </summary>
/// <param name="id">ID</param>
/// <param name="input">修改实体DTO</param>
/// <returns>实体DTO</returns>
[HttpPut]
[Route("{id}")]
[Authorize(SettleAccountPermissions.PriceLists.Update)]
virtual public async Task<PriceListDto> UpdateAsync(Guid id, PriceListDto input)
{
var entity = new PriceList(
#region 原方法(废弃)
// /// <summary>
// /// 获取总数
// /// </summary>
// private async Task<long> GetCountAsync(PriceListRequestDto input)
// {
// return await _priceListManager.GetCountAsync(input.Filters, GuidGenerator.Create());
// }
);
var _ent = await _priceListManager.UpdateAsync(id, entity);
// /// <summary>
// /// 结算总成和ERP总成价格对比
// /// </summary>
// /// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
// /// <returns></returns>
// [HttpGet]
// [Route("BomDiffPrice-Make")]
// [DisableRequestSizeLimit]
// [Authorize(SettleAccountPermissions.PriceLists.Default)]
// public async Task<string> SettledPartAndErpPartPriceDiffMake(string version, string customerCode)
// {
// List<CustomCondition> customConditionList = new List<CustomCondition>();
var dto = ObjectMapper.Map<PriceList, PriceListDto>(_ent);
return dto;
}
// customConditionList.Add(new CustomCondition() { Name = "ProjectName", Value = "Bom定价差异明细" });
// customConditionList.Add(new CustomCondition() { Name = "Version", Value = string.IsNullOrEmpty(version) ? string.Empty : version });
// customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value = string.IsNullOrEmpty(customerCode) ? string.Empty : customerCode });
// var _taskid = await _service.ExportEnqueueAsync("Bom定价差异明细", ExportExtentsion.Excel, version, string.Empty, CurrentUser, typeof(SettledPartAndErpPartPriceDiffExportService), customConditionList, (rs) =>
// {
// });
// return _taskid;
// }
// [HttpPost]
// [Route("job/list")]
// [Authorize(SettleAccountPermissions.PriceLists.Default)]
// [UnitOfWork(false)]
// virtual public async Task<List<JobDto>> GetListAsync(JobRequestDto input)
// {
// return await _service.GetListAsync(input);
// }
// /// <summary>
// /// 按ID获取唯一实体
// /// </summary>
// /// <remarks>
// /// 返回实体全部属性
// /// </remarks>
// /// <param name="id">ID</param>
// /// <returns>实体DTO</returns>
// [HttpGet]
// [Route("{id}")]
// /// [Authorize(SettleAccountPermissions.PriceLists.Default)]
// virtual public async Task<PriceListDto> GetAsync(Guid id)
// {
// var result = await _priceListManager.GetAsync(id); ;
// var dto = ObjectMapper.Map<PriceList, PriceListDto>(result);
// return dto;
// }
// /// <summary>
// /// 根据筛选条件获取实体列表
// /// </summary>
// /// <remarks>
// /// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
// /// </remarks>
// /// <param name="input">请求条件</param>
// /// <returns>实体DTO列表</returns>
// [HttpPost]
// [Route("versionlist")]
//// [Authorize(SettleAccountPermissions.PriceLists.Default)]
// virtual public async Task<PagedResultDto<PriceListVersionDto>> GetVersionListAsync(PriceListRequestDto input)
// {
// var entities = await _priceListManager.GetVersionListAsync(input.Filters, input.Sorting, input.MaxResultCount,input.SkipCount);
// var totalCount = await GetCountAsync(input);
// var dtos = ObjectMapper.Map<List<PriceListVersion>, List<PriceListVersionDto>>(entities);
// return new PagedResultDto<PriceListVersionDto>(totalCount, dtos);
// }
// /// <summary>
// /// 获取实体总数
// /// </summary>
// /// <returns>实体总数</returns>
// [HttpGet]
// [Route("count")]
// //[Authorize(SettleAccountPermissions.PriceLists.Default)]
// virtual public async Task<long> GetTotalCountAsync(Guid branchId)
// {
// return await _priceListManager.GetCountAsync(new List<FilterCondition>(), branchId);
// }
// /// <summary>
// /// 获取全部实体列表
// /// </summary>
// /// <returns>实体DTO列表</returns>
// [HttpGet]
// [Route("all")]
// //[Authorize(SettleAccountPermissions.PriceLists.Default)]
// virtual public async Task<ListResultDto<PriceListDto>> GetAllAsync(Guid branchId)
// {
// var entities = await _priceListManager.GetAllAsync(branchId);
// var dtos = ObjectMapper.Map<List<PriceList>, List<PriceListDto>>(entities);
// return new ListResultDto<PriceListDto>(dtos);
// }
// /// <summary>
// /// 修改实体
// /// </summary>
// /// <param name="id">ID</param>
// /// <param name="input">修改实体DTO</param>
// /// <returns>实体DTO</returns>
// [HttpPut]
// [Route("{id}")]
// [Authorize(SettleAccountPermissions.PriceLists.Update)]
// virtual public async Task<PriceListDto> UpdateAsync(Guid id, PriceListDto input)
// {
// var entity = new PriceList(
// );
// var _ent = await _priceListManager.UpdateAsync(id, entity);
// var dto = ObjectMapper.Map<PriceList, PriceListDto>(_ent);
// return dto;
// }
#endregion
}
}

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

@ -1,14 +1,18 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Shouldly;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Caching;
using Win.Abp.Snowflakes;
using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount.Bases;
using Win.Sfs.SettleAccount.CommonManagers;
using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.Entities.ImportMap;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos;
using Win.Sfs.SettleAccount.ExcelImporter;
using Win.Sfs.Shared.RepositoryBase;
@ -17,29 +21,24 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
/// <summary>
/// 备件价格
/// </summary>
//[Authorize(SettleAccountPermissions.PriceLists.Default)]
[AllowAnonymous]
[Route("api/SettleAccount/PriceListBJ")]
public class PriceListAppServiceBJ : CurdBaseAppService<PriceListBJ, PriceListBJDto, PriceListBJRequestDto, PriceListBJ, PriceListBJImportDto, PriceListBJExportDto>
[Route("api/settleaccount/[controller]/[action]")]
public class PriceListAppServiceBJ : SettleAccountApplicationBase<PriceListBJ>
{
private readonly INormalEfCoreRepository<PriceListBJ, Guid> _repository;
private readonly PriceListManagerBJ _priceListManagerBJ;
private readonly IExcelImportAppService _excelImportService;
private readonly ISettleAccountBranchEfCoreRepository<ImportColumnMap, Guid> _mapRepository;
public PriceListAppServiceBJ(
INormalEfCoreRepository<PriceListBJ, Guid> repository,
PriceListManagerBJ priceListManagerBJ,
IDistributedCache<PriceListBJ> cache,
IExcelImportAppService excelImportService,
ISettleAccountBranchEfCoreRepository<ImportColumnMap, Guid> mapRepository
) :base(repository: repository, excelImportService: excelImportService)
ISnowflakeIdGenerator snowflakeIdGenerator,
ICommonManager commonManager
) : base(cache, excelImportService, snowflakeIdGenerator, commonManager)
{
_repository = repository;
_priceListManagerBJ = priceListManagerBJ;
_excelImportService = excelImportService;
_mapRepository = mapRepository;
}
#region 导入、导出
@ -47,8 +46,7 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
/// 导入
/// </summary>
[HttpPost]
[Route("Import")]
public override async Task<string> ImportAsync([FromForm] IFormFileCollection files, string version)
public async Task<string> ImportAsync([FromForm] IFormFileCollection files, string version)
{
ExportImporter _exportImporter = new ExportImporter();
var result = await _exportImporter.UploadExcelImport<PriceListBJImportDto>(files, _excelImportService);
@ -68,6 +66,38 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
await _priceListManagerBJ.ImportAsync(_ls.ToList(), version);
return ApplicationConsts.SuccessStr;
}
/// <summary>
/// 导出
/// </summary>
[HttpPost]
public async Task<string> ExportAsync(RequestDto input)
{
string fileName = $"备件价格_{Guid.NewGuid()}.xlsx";
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, 0, true);
var dtos = ObjectMapper.Map<List<PriceListBJ>, List<PriceListBJExportDto>>(entities);
ExportImporter _exportImporter = new ExportImporter();
var result = await _exportImporter.ExcelExporter(dtos);
result.ShouldNotBeNull();
await _excelImportService.SaveBlobAsync(new SaveExcelImportInputDto { Name = fileName, Content = result });
return fileName;
}
#endregion
#region CURD
/// <summary>
/// 获取列表
/// </summary>
[HttpGet]
public async Task<PagedResultDto<PriceListBJDto>> GetListAsync(RequestDto input)
{
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true);
var totalCount = await _repository.GetCountByFilterAsync(input.Filters);
var dtos = ObjectMapper.Map<List<PriceListBJ>, List<PriceListBJDto>>(entities);
return new PagedResultDto<PriceListBJDto>(totalCount, dtos);
}
#endregion
#region 原有的方法之后废弃删除

1
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/SecMatch/SecMatchAppService.cs

@ -36,6 +36,7 @@ namespace Win.Sfs.SettleAccount.Entities.SecMatch
/// <summary>
/// 总成与结算件关系
/// </summary>
[ApiExplorerSettings(IgnoreApi = true)]
[AllowAnonymous]

1
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/SettleAccounts/SettleAccountAppService.cs

@ -51,6 +51,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
/// <summary>
/// 大众准时化结算明细导入-R3已结
/// </summary>
[ApiExplorerSettings(IgnoreApi = true)]
[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
//[AllowAnonymous]
[Route("api/settleaccount/SettleAccount")]

1
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/SettlementParts/SettlementPartAppService.cs

@ -40,6 +40,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettlementParts
/// </summary>
//[Authorize(SettleAccountPermissions.SettlementParts.Default)]
//[AllowAnonymous]
[ApiExplorerSettings(IgnoreApi = true)]
[Route("api/settleaccount/SettlementPart")]
public class SettlementPartAppService : SettleAccountApplicationBase<SettlementPart>, ISettlementPartAppService
{

1
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/UnHQSettleAccounts/UnHQSettleAppService.cs

@ -29,6 +29,7 @@ namespace Win.Sfs.SettleAccount.Entities.UnHQSettleAccounts
/// <summary>
/// 红旗主机场明细导入
/// </summary>
[ApiExplorerSettings(IgnoreApi = true)]
[Authorize(SettleAccountPermissions.HQ_HPlatform.Default)]
//[AllowAnonymous]
[Route("api/settleaccount/UnHQSettle")]

2
code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.csproj

@ -6,7 +6,7 @@
<TargetFramework>net5.0</TargetFramework>
<RootNamespace>Win.Sfs.SettleAccount</RootNamespace>
<SignAssembly>false</SignAssembly>
<GenerateDocumentationFile>False</GenerateDocumentationFile>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
</PropertyGroup>

71
code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs

@ -54,6 +54,8 @@ using Win.Sfs.SettleAccount.Entities.UnHQSettleAccounts;
using Win.Sfs.SettleAccount.Entities.Wms.WmsSumOutput;
using Win.Sfs.SettleAccount.Errors;
using Win.Sfs.SettleAccount.Entities.Errors;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos;
using SettleAccount.Domain.BQ;
namespace Win.Sfs.SettleAccount
{
@ -132,6 +134,12 @@ namespace Win.Sfs.SettleAccount
#endregion
CreateMapPURCHASE_PRICE();
CreateMapTB_RePartsRelationship();
CreateMapBBAC_SE_DETAIL();
CreateMapBBAC_SE_EDI();
CreateMapHBPO_SE_DETAIL();
CreateMapHBPO_SE_EDI();
}
#region BQ
@ -630,9 +638,15 @@ namespace Win.Sfs.SettleAccount
CreateMap<PrebatchUpdateDto, Prebatch>();
}
/// <summary>
/// 期间设置
/// </summary>
private void CreateMapCentralizedControl()
{
CreateMap<CentralizedControl, CentralizedControlDto>().ReverseMap();
CreateMap<CentralizedControl, CentralizedControlExportDto>();
CreateMap<CentralizedControl, CentralizedControlCreateDto>();
CreateMap<CentralizedControl, CentralizedControlUpdateDto>();
@ -728,5 +742,62 @@ namespace Win.Sfs.SettleAccount
}
#endregion
/// <summary>
/// 采购价格单
/// </summary>
private void CreateMapPURCHASE_PRICE()
{
CreateMap<PURCHASE_PRICE, PURCHASE_PRICE_DTO>();
CreateMap<PURCHASE_PRICE, PURCHASE_PRICE_EXPORT_DTO>();
CreateMap<PURCHASE_PRICE_IMPORT_DTO, PURCHASE_PRICE>();
}
/// <summary>
/// 客户替换件关系
/// </summary>
private void CreateMapTB_RePartsRelationship()
{
CreateMap<TB_RePartsRelationship, TB_RePartsRelationship_DTO>();
CreateMap<TB_RePartsRelationship, TB_RePartsRelationship_EXPORT_DTO>();
CreateMap<TB_RePartsRelationship_IMPORT_DTO, TB_RePartsRelationship>();
}
/// <summary>
/// BBAC发运单
/// </summary>
private void CreateMapBBAC_SE_DETAIL()
{
CreateMap<BBAC_SE_DETAIL, BBAC_SE_DETAIL_DTO>();
CreateMap<BBAC_SE_DETAIL, BBAC_SE_DETAIL_EXPORT_DTO>();
}
/// <summary>
/// BBAC EDI
/// </summary>
private void CreateMapBBAC_SE_EDI()
{
CreateMap<BBAC_SE_EDI, BBAC_SE_EDI_DTO>();
CreateMap<BBAC_SE_EDI, BBAC_SE_EDI_EXPORT_DTO>();
}
/// <summary>
/// HBPO发运单
/// </summary>
private void CreateMapHBPO_SE_DETAIL()
{
CreateMap<HBPO_SE_DETAIL, HBPO_SE_DETAIL_DTO>();
CreateMap<HBPO_SE_DETAIL, HBPO_SE_DETAIL_EXPORT_DTO>();
}
/// <summary>
/// HBPO EDI
/// </summary>
private void CreateMapHBPO_SE_EDI()
{
//CreateMap<HBPO_SE_EDI, HBPO_SE_EDI_DTO>();
//CreateMap<HBPO_SE_EDI, HBPO_SE_EDI_EXPORT_DTO>();
}
}
}

32
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/PURCHASE_PRICE.cs

@ -1,11 +1,33 @@
using System.ComponentModel.DataAnnotations;
using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Domain.Entities.Auditing;
namespace SettleAccount.Domain.BQ;
/// <summary>
/// 采购价格单
/// </summary>
[Display(Name = "采购价格单")]
public class PURCHASE_PRICE
public class PURCHASE_PRICE : FullAuditedAggregateRoot<Guid>
{
/// <summary>
/// 物料号
/// </summary>
[Display(Name = "物料号")]
public string LU { get; set; }
/// <summary>
/// 价格
/// </summary>
[Display(Name = "价格")]
public decimal Price { get; set; }
/// <summary>
/// 更新
/// </summary>
public void Update(decimal price)
{
Price = price;
}
}

17
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/TB_RePartsRelationship.cs

@ -1,12 +1,12 @@
using System.ComponentModel.DataAnnotations;
using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Domain.Entities.Auditing;
namespace SettleAccount.Domain.BQ;
[Display(Name = "客户替换件关系")]
public class TB_RePartsRelationship
public class TB_RePartsRelationship : FullAuditedAggregateRoot<Guid>
{
/// <summary>
/// 取值字段【零件号】
@ -32,4 +32,13 @@ public class TB_RePartsRelationship
ClientCode = clientCode;
BusinessType = businessType;
}
public void Update(string lU, string repLU, string clientCode, string businessType)
{
LU = lU;
RepLU = repLU;
ClientCode = clientCode;
BusinessType = businessType;
}
}

7
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/Controls/CentralizedControl.cs

@ -1,12 +1,11 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared.DomainBase;
namespace Win.Sfs.SettleAccount.Entities.Controls
{
/// <summary>
/// 期间设置
/// </summary>
public class CentralizedControl: FullAuditedAggregateRootBase<Guid>
{
/// <summary>

35
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/MaterialRelationships/MaterialRelationship.cs

@ -1,24 +1,39 @@
using System;
using System.ComponentModel.DataAnnotations;
using Win.Sfs.Shared.DomainBase;
using Win.Sfs.Shared.Constant;
namespace Win.Sfs.SettleAccount.MaterialRelationships
{
/// <summary>
/// 物料关系
/// 客户零件关系
/// </summary>
public class MaterialRelationship : FullAuditedAggregateRootBase<Guid>
{
/// <summary>
/// ERP物料号
/// 厂内物料号
/// </summary>
public string ErpMaterialCode { get; set; }
/// <summary>
/// 物料描述
/// 厂内物料描述
/// </summary>
public string MaterialDesc { get; set; }
/// <summary>
/// 客户物料号
/// </summary>
public string SettleMaterialCode { get; set; }
/// <summary>
/// 物料属性
/// </summary>
@ -27,10 +42,10 @@ namespace Win.Sfs.SettleAccount.MaterialRelationships
/// <summary>
/// 结算物料号
/// </summary>
public string SettleMaterialCode { get; set; }
///// <summary>
///// 结算物料号
///// </summary>
//public string SettleMaterialCode { get; set; }
/// <summary>

36
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs

@ -80,7 +80,10 @@ namespace Win.Sfs.SettleAccount
builder.ConfigureBomVersion(options);
//期间
builder.ConfigureCentralizedControl(options);
//采购价格单
builder.ConfigurePURCHASE_PRICE(options);
//客户替换件关系
builder.ConfigureTB_RePartsRelationship(options);
#endregion
@ -322,21 +325,46 @@ namespace Win.Sfs.SettleAccount
});
}
/// <summary>
/// 采购价格单
/// </summary>
private static void ConfigurePURCHASE_PRICE(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<PURCHASE_PRICE>(b =>
{
b.ToTable($"{options.TablePrefix}_PURCHASE_PRICE", options.Schema);
b.ConfigureByConvention();
});
}
/// <summary>
/// 客户替换件关系
/// </summary>
private static void ConfigureTB_RePartsRelationship(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<TB_RePartsRelationship>(b =>
{
b.ToTable($"{options.TablePrefix}_TB_RePartsRelationship", options.Schema);
b.ConfigureByConvention();
});
}
#endregion
#region 北汽
/// <summary>
/// 一汽轿车平台验收结算明细-导入

3807
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230711073528_20230711-2.Designer.cs

File diff suppressed because it is too large

39
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230711073528_20230711-2.cs

@ -0,0 +1,39 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace Win.Sfs.SettleAccount.Migrations
{
public partial class _202307112 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Set_PURCHASE_PRICE",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
LU = table.Column<string>(type: "nvarchar(max)", nullable: true),
Price = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Set_PURCHASE_PRICE", x => x.Id);
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Set_PURCHASE_PRICE");
}
}
}

3870
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230712032712_20230712-1.Designer.cs

File diff suppressed because it is too large

41
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230712032712_20230712-1.cs

@ -0,0 +1,41 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace Win.Sfs.SettleAccount.Migrations
{
public partial class _202307121 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Set_TB_RePartsRelationship",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
LU = table.Column<string>(type: "nvarchar(max)", nullable: true),
RepLU = table.Column<string>(type: "nvarchar(max)", nullable: true),
ClientCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
BusinessType = table.Column<string>(type: "nvarchar(max)", nullable: true),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Set_TB_RePartsRelationship", x => x.Id);
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Set_TB_RePartsRelationship");
}
}
}

120
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/SettleAccountDbContextModelSnapshot.cs

@ -2938,6 +2938,126 @@ namespace Win.Sfs.SettleAccount.Migrations
b.ToTable("Set_PUB_SE_DETAIL");
});
modelBuilder.Entity("SettleAccount.Domain.BQ.PURCHASE_PRICE", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uniqueidentifier")
.HasColumnName("CreatorId");
b.Property<Guid?>("DeleterId")
.HasColumnType("uniqueidentifier")
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnType("datetime2")
.HasColumnName("DeletionTime");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<string>("LU")
.HasColumnType("nvarchar(max)");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("datetime2")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
b.Property<decimal>("Price")
.HasColumnType("decimal(18,2)");
b.HasKey("Id");
b.ToTable("Set_PURCHASE_PRICE");
});
modelBuilder.Entity("SettleAccount.Domain.BQ.TB_RePartsRelationship", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("BusinessType")
.HasColumnType("nvarchar(max)");
b.Property<string>("ClientCode")
.HasColumnType("nvarchar(max)");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uniqueidentifier")
.HasColumnName("CreatorId");
b.Property<Guid?>("DeleterId")
.HasColumnType("uniqueidentifier")
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnType("datetime2")
.HasColumnName("DeletionTime");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<string>("LU")
.HasColumnType("nvarchar(max)");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("datetime2")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
b.Property<string>("RepLU")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("Set_TB_RePartsRelationship");
});
modelBuilder.Entity("Win.Sfs.SettleAccount.Boms.Bom", b =>
{
b.Property<Guid>("Id")

4
code/src/Shared/Win.Abp.Snowflakes/obj/Debug/netcoreapp5/.NETCoreApp,Version=v5.0.AssemblyAttributes.cs

@ -1,4 +0,0 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v5.0", FrameworkDisplayName = ".NET 5.0")]

20
code/src/Shared/Win.Abp.Snowflakes/obj/Debug/netcoreapp5/Win.Abp.Snowflakes.AssemblyInfo.cs

@ -1,20 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyTitleAttribute("Win.Abp.Snowflakes")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
// 由 MSBuild WriteCodeFragment 类生成。

1
code/src/Shared/Win.Abp.Snowflakes/obj/Debug/netcoreapp5/Win.Abp.Snowflakes.AssemblyInfoInputs.cache

@ -1 +0,0 @@
dd45d7419542ed747e383f3acb2b9bf5ef266736

11
code/src/Shared/Win.Abp.Snowflakes/obj/Debug/netcoreapp5/Win.Abp.Snowflakes.GeneratedMSBuildEditorConfig.editorconfig

@ -1,11 +0,0 @@
is_global = true
build_property.TargetFramework = netcoreapp5
build_property.TargetPlatformMinVersion =
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace =
build_property.ProjectDir = C:\Users\Administrator\Source\Repos\BeiJinSettleAccount\code\src\Shared\Win.Abp.Snowflakes\

BIN
code/src/Shared/Win.Abp.Snowflakes/obj/Debug/netcoreapp5/Win.Abp.Snowflakes.assets.cache

Binary file not shown.

BIN
code/src/Shared/Win.Abp.Snowflakes/obj/Debug/netcoreapp5/Win.Abp.Snowflakes.csproj.AssemblyReference.cache

Binary file not shown.

74
code/src/Shared/Win.Abp.Snowflakes/obj/Win.Abp.Snowflakes.csproj.nuget.dgspec.json

@ -1,74 +0,0 @@
{
"format": 1,
"restore": {
"E:\\我的工作\\B_BJBQJS\\BJBQJS\\code\\src\\Shared\\Win.Abp.Snowflakes\\Win.Abp.Snowflakes.csproj": {}
},
"projects": {
"E:\\我的工作\\B_BJBQJS\\BJBQJS\\code\\src\\Shared\\Win.Abp.Snowflakes\\Win.Abp.Snowflakes.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "E:\\我的工作\\B_BJBQJS\\BJBQJS\\code\\src\\Shared\\Win.Abp.Snowflakes\\Win.Abp.Snowflakes.csproj",
"projectName": "Win.Abp.Snowflakes",
"projectPath": "E:\\我的工作\\B_BJBQJS\\BJBQJS\\code\\src\\Shared\\Win.Abp.Snowflakes\\Win.Abp.Snowflakes.csproj",
"packagesPath": "D:\\ProgramData\\NuGet\\packages",
"outputPath": "E:\\我的工作\\B_BJBQJS\\BJBQJS\\code\\src\\Shared\\Win.Abp.Snowflakes\\obj\\",
"projectStyle": "PackageReference",
"fallbackFolders": [
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
],
"configFilePaths": [
"C:\\Users\\Administrator\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
],
"originalTargetFrameworks": [
"netcoreapp5"
],
"sources": {
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"net5.0": {
"targetAlias": "netcoreapp5",
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
}
},
"frameworks": {
"net5.0": {
"targetAlias": "netcoreapp5",
"dependencies": {
"Volo.Abp.Core": {
"target": "Package",
"version": "[4.0.0, )"
}
},
"imports": [
"portable-net45+win8+wp8+wpa81",
"net461",
"net462",
"net47",
"net471",
"net472",
"net48",
"net481"
],
"assetTargetFallback": true,
"warn": true,
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.200\\RuntimeIdentifierGraph.json"
}
}
}
}
}

16
code/src/Shared/Win.Abp.Snowflakes/obj/Win.Abp.Snowflakes.csproj.nuget.g.props

@ -1,16 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">D:\ProgramData\NuGet\packages</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">D:\ProgramData\NuGet\packages;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.5.0</NuGetToolVersion>
</PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="D:\ProgramData\NuGet\packages\" />
<SourceRoot Include="C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages\" />
</ItemGroup>
</Project>

2
code/src/Shared/Win.Abp.Snowflakes/obj/Win.Abp.Snowflakes.csproj.nuget.g.targets

@ -1,2 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />

3105
code/src/Shared/Win.Abp.Snowflakes/obj/project.assets.json

File diff suppressed because it is too large

64
code/src/Shared/Win.Abp.Snowflakes/obj/project.nuget.cache

@ -1,64 +0,0 @@
{
"version": 2,
"dgSpecHash": "Ub4JQ58b10+xiFEHhFzG6d6yEoGhQ90WlHa0QLExy5UwBYfOAou1jOGc006kixczlWN+OUEoirHCniYH+f7bpQ==",
"success": true,
"projectFilePath": "E:\\我的工作\\B_BJBQJS\\BJBQJS\\code\\src\\Shared\\Win.Abp.Snowflakes\\Win.Abp.Snowflakes.csproj",
"expectedPackageFiles": [
"D:\\ProgramData\\NuGet\\packages\\jetbrains.annotations\\2020.1.0\\jetbrains.annotations.2020.1.0.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\microsoft.extensions.configuration\\5.0.0\\microsoft.extensions.configuration.5.0.0.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\microsoft.extensions.configuration.abstractions\\5.0.0\\microsoft.extensions.configuration.abstractions.5.0.0.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\microsoft.extensions.configuration.binder\\5.0.0\\microsoft.extensions.configuration.binder.5.0.0.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\microsoft.extensions.configuration.commandline\\5.0.0\\microsoft.extensions.configuration.commandline.5.0.0.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\microsoft.extensions.configuration.environmentvariables\\5.0.0\\microsoft.extensions.configuration.environmentvariables.5.0.0.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\microsoft.extensions.configuration.fileextensions\\5.0.0\\microsoft.extensions.configuration.fileextensions.5.0.0.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\microsoft.extensions.configuration.json\\5.0.0\\microsoft.extensions.configuration.json.5.0.0.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\microsoft.extensions.configuration.usersecrets\\5.0.0\\microsoft.extensions.configuration.usersecrets.5.0.0.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\microsoft.extensions.dependencyinjection\\5.0.0\\microsoft.extensions.dependencyinjection.5.0.0.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\microsoft.extensions.dependencyinjection.abstractions\\5.0.0\\microsoft.extensions.dependencyinjection.abstractions.5.0.0.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\microsoft.extensions.fileproviders.abstractions\\5.0.0\\microsoft.extensions.fileproviders.abstractions.5.0.0.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\microsoft.extensions.fileproviders.physical\\5.0.0\\microsoft.extensions.fileproviders.physical.5.0.0.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\microsoft.extensions.filesystemglobbing\\5.0.0\\microsoft.extensions.filesystemglobbing.5.0.0.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\microsoft.extensions.hosting.abstractions\\5.0.0\\microsoft.extensions.hosting.abstractions.5.0.0.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\microsoft.extensions.localization\\5.0.0\\microsoft.extensions.localization.5.0.0.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\microsoft.extensions.localization.abstractions\\5.0.0\\microsoft.extensions.localization.abstractions.5.0.0.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\microsoft.extensions.logging\\5.0.0\\microsoft.extensions.logging.5.0.0.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\microsoft.extensions.logging.abstractions\\5.0.0\\microsoft.extensions.logging.abstractions.5.0.0.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\microsoft.extensions.options\\5.0.0\\microsoft.extensions.options.5.0.0.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\microsoft.extensions.options.configurationextensions\\5.0.0\\microsoft.extensions.options.configurationextensions.5.0.0.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\microsoft.extensions.primitives\\5.0.0\\microsoft.extensions.primitives.5.0.0.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\microsoft.netcore.platforms\\1.1.0\\microsoft.netcore.platforms.1.1.0.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\microsoft.netcore.targets\\1.1.0\\microsoft.netcore.targets.1.1.0.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\nito.asyncex.context\\5.0.0\\nito.asyncex.context.5.0.0.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\nito.asyncex.coordination\\5.0.0\\nito.asyncex.coordination.5.0.0.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\nito.asyncex.tasks\\5.0.0\\nito.asyncex.tasks.5.0.0.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\nito.collections.deque\\1.0.4\\nito.collections.deque.1.0.4.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\nito.disposables\\2.0.0\\nito.disposables.2.0.0.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\system.collections\\4.3.0\\system.collections.4.3.0.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\system.collections.immutable\\1.7.1\\system.collections.immutable.1.7.1.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\system.componentmodel.annotations\\4.7.0\\system.componentmodel.annotations.4.7.0.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\system.diagnostics.debug\\4.3.0\\system.diagnostics.debug.4.3.0.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\system.globalization\\4.3.0\\system.globalization.4.3.0.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\system.io\\4.3.0\\system.io.4.3.0.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\system.linq\\4.3.0\\system.linq.4.3.0.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\system.linq.dynamic.core\\1.1.5\\system.linq.dynamic.core.1.1.5.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\system.linq.expressions\\4.3.0\\system.linq.expressions.4.3.0.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\system.linq.queryable\\4.3.0\\system.linq.queryable.4.3.0.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\system.objectmodel\\4.3.0\\system.objectmodel.4.3.0.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\system.reflection\\4.3.0\\system.reflection.4.3.0.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\system.reflection.emit\\4.3.0\\system.reflection.emit.4.3.0.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\system.reflection.emit.ilgeneration\\4.3.0\\system.reflection.emit.ilgeneration.4.3.0.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\system.reflection.emit.lightweight\\4.3.0\\system.reflection.emit.lightweight.4.3.0.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\system.reflection.extensions\\4.3.0\\system.reflection.extensions.4.3.0.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\system.reflection.primitives\\4.3.0\\system.reflection.primitives.4.3.0.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\system.reflection.typeextensions\\4.3.0\\system.reflection.typeextensions.4.3.0.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\system.resources.resourcemanager\\4.3.0\\system.resources.resourcemanager.4.3.0.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\system.runtime\\4.3.0\\system.runtime.4.3.0.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\system.runtime.extensions\\4.3.0\\system.runtime.extensions.4.3.0.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\system.runtime.loader\\4.3.0\\system.runtime.loader.4.3.0.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\system.text.encoding\\4.3.0\\system.text.encoding.4.3.0.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\system.threading\\4.3.0\\system.threading.4.3.0.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\system.threading.tasks\\4.3.0\\system.threading.tasks.4.3.0.nupkg.sha512",
"D:\\ProgramData\\NuGet\\packages\\volo.abp.core\\4.0.0\\volo.abp.core.4.0.0.nupkg.sha512"
],
"logs": []
}

4
code/src/Shared/Win.Abp/Win.Abp.SerialNumber.Test/obj/Debug/netcoreapp3.1/.NETCoreApp,Version=v3.1.AssemblyAttributes.cs

@ -1,4 +0,0 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v3.1", FrameworkDisplayName = "")]

23
code/src/Shared/Win.Abp/Win.Abp.SerialNumber.Test/obj/Debug/netcoreapp3.1/Win.Abp.SerialNumber.Test.AssemblyInfo.cs

@ -1,23 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Win.Abp.SerialNumber.Test")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("Win.Abp.SerialNumber.Test")]
[assembly: System.Reflection.AssemblyTitleAttribute("Win.Abp.SerialNumber.Test")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
// 由 MSBuild WriteCodeFragment 类生成。

1
code/src/Shared/Win.Abp/Win.Abp.SerialNumber.Test/obj/Debug/netcoreapp3.1/Win.Abp.SerialNumber.Test.AssemblyInfoInputs.cache

@ -1 +0,0 @@
1a654d04530100f52d8ecd654e3f9dfc5b5c638e

BIN
code/src/Shared/Win.Abp/Win.Abp.SerialNumber.Test/obj/Debug/netcoreapp3.1/Win.Abp.SerialNumber.Test.assets.cache

Binary file not shown.

0
code/src/Shared/Win.Abp/Win.Abp.SerialNumber.Test/obj/Debug/netcoreapp3.1/Win.Abp.SerialNumber.Test.csproj.CopyComplete

1
code/src/Shared/Win.Abp/Win.Abp.SerialNumber.Test/obj/Debug/netcoreapp3.1/Win.Abp.SerialNumber.Test.csproj.CoreCompileInputs.cache

@ -1 +0,0 @@
2095721497ba41d4da5fb7bd02b3551dbedca11a

73
code/src/Shared/Win.Abp/Win.Abp.SerialNumber.Test/obj/Debug/netcoreapp3.1/Win.Abp.SerialNumber.Test.csproj.FileListAbsolute.txt

@ -1,73 +0,0 @@
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\appsettings.json
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\Win.Abp.SerialNumber.Test.exe
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\Win.Abp.SerialNumber.Test.deps.json
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\Win.Abp.SerialNumber.Test.runtimeconfig.json
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\Win.Abp.SerialNumber.Test.runtimeconfig.dev.json
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\Win.Abp.SerialNumber.Test.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\Win.Abp.SerialNumber.Test.pdb
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\CSRedisCore.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\JetBrains.Annotations.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\Microsoft.Extensions.Configuration.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\Microsoft.Extensions.Configuration.Abstractions.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\Microsoft.Extensions.Configuration.Binder.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\Microsoft.Extensions.Configuration.CommandLine.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\Microsoft.Extensions.Configuration.EnvironmentVariables.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\Microsoft.Extensions.Configuration.FileExtensions.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\Microsoft.Extensions.Configuration.Json.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\Microsoft.Extensions.Configuration.UserSecrets.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\Microsoft.Extensions.DependencyInjection.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\Microsoft.Extensions.DependencyInjection.Abstractions.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\Microsoft.Extensions.FileProviders.Abstractions.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\Microsoft.Extensions.FileProviders.Physical.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\Microsoft.Extensions.FileSystemGlobbing.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\Microsoft.Extensions.Hosting.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\Microsoft.Extensions.Hosting.Abstractions.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\Microsoft.Extensions.Localization.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\Microsoft.Extensions.Localization.Abstractions.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\Microsoft.Extensions.Logging.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\Microsoft.Extensions.Logging.Abstractions.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\Microsoft.Extensions.Logging.Configuration.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\Microsoft.Extensions.Logging.Console.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\Microsoft.Extensions.Logging.Debug.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\Microsoft.Extensions.Logging.EventLog.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\Microsoft.Extensions.Logging.EventSource.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\Microsoft.Extensions.Options.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\Microsoft.Extensions.Options.ConfigurationExtensions.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\Microsoft.Extensions.Primitives.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\Newtonsoft.Json.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\Nito.AsyncEx.Context.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\Nito.AsyncEx.Coordination.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\Nito.AsyncEx.Tasks.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\Nito.Collections.Deque.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\Nito.Disposables.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\Pipelines.Sockets.Unofficial.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\SafeObjectPool.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\Serilog.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\Serilog.Extensions.Logging.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\Serilog.Sinks.Console.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\Serilog.Sinks.File.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\StackExchange.Redis.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\System.Collections.Immutable.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\System.Configuration.ConfigurationManager.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\System.Diagnostics.DiagnosticSource.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\System.Diagnostics.EventLog.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\System.Diagnostics.PerformanceCounter.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\System.IO.Pipelines.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\System.Linq.Dynamic.Core.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\System.Security.Cryptography.ProtectedData.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\System.Security.Permissions.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\System.Text.Json.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\Volo.Abp.Core.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\runtimes\win\lib\netcoreapp2.0\System.Diagnostics.EventLog.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\runtimes\win\lib\netcoreapp2.0\System.Diagnostics.PerformanceCounter.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\runtimes\win\lib\netstandard2.0\System.Security.Cryptography.ProtectedData.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\Win.Abp.SerialNumber.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\bin\Debug\netcoreapp3.1\Win.Abp.SerialNumber.pdb
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\obj\Debug\netcoreapp3.1\Win.Abp.SerialNumber.Test.csprojAssemblyReference.cache
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\obj\Debug\netcoreapp3.1\Win.Abp.SerialNumber.Test.AssemblyInfoInputs.cache
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\obj\Debug\netcoreapp3.1\Win.Abp.SerialNumber.Test.AssemblyInfo.cs
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\obj\Debug\netcoreapp3.1\Win.Abp.SerialNumber.Test.csproj.CoreCompileInputs.cache
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\obj\Debug\netcoreapp3.1\Win.Abp.SerialNumber.Test.csproj.CopyComplete
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\obj\Debug\netcoreapp3.1\Win.Abp.SerialNumber.Test.dll
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\obj\Debug\netcoreapp3.1\Win.Abp.SerialNumber.Test.pdb
H:\wms123\src\Shared\Win.Abp\Win.Abp.SerialNumber.Test\obj\Debug\netcoreapp3.1\Win.Abp.SerialNumber.Test.genruntimeconfig.cache

BIN
code/src/Shared/Win.Abp/Win.Abp.SerialNumber.Test/obj/Debug/netcoreapp3.1/Win.Abp.SerialNumber.Test.csprojAssemblyReference.cache

Binary file not shown.

BIN
code/src/Shared/Win.Abp/Win.Abp.SerialNumber.Test/obj/Debug/netcoreapp3.1/Win.Abp.SerialNumber.Test.dll

Binary file not shown.

1
code/src/Shared/Win.Abp/Win.Abp.SerialNumber.Test/obj/Debug/netcoreapp3.1/Win.Abp.SerialNumber.Test.genruntimeconfig.cache

@ -1 +0,0 @@
54e70cc76f209add602448f67165d969f59d488e

BIN
code/src/Shared/Win.Abp/Win.Abp.SerialNumber.Test/obj/Debug/netcoreapp3.1/Win.Abp.SerialNumber.Test.pdb

Binary file not shown.

BIN
code/src/Shared/Win.Abp/Win.Abp.SerialNumber.Test/obj/Debug/netcoreapp3.1/apphost.exe

Binary file not shown.

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save