dev
ZR20090193-陈敬勇 5 months ago
parent e4e7ab5f73
commit 5300d8b092

@ -11,7 +11,7 @@
<BasicForm @register="registerFile" />
<template #actions>
<a-button
v-show="auditStatus === -1"
v-show="auditStatus === -1 || auditStatus === 2"
@click="customSaveFunc"
type="success"
:loading="loading"
@ -20,7 +20,7 @@
>保存</a-button
>
<a-button
v-show="auditStatus === -1"
v-show="auditStatus === -1 || auditStatus === 2"
@click="customSubmitFunc"
preIcon="ant-design:cloud-upload-outlined"
type="error"

@ -23,7 +23,7 @@
<!--右下角按钮-->
<template #footer>
<a-button
v-show="billStatus === -1 && isUpdate"
v-show="(billStatus === -1 || billStatus === 2) && isUpdate"
@click="handleSubmit"
preIcon="ant-design:cloud-upload-outlined"
type="error"

@ -53,7 +53,7 @@
<!--右下角按钮-->
<template #footer>
<a-button
v-show="billStatus === -1 && isUpdate"
v-show="(billStatus === -1 || billStatus === 2) && isUpdate"
@click="handleSubmit"
preIcon="ant-design:cloud-upload-outlined"
type="error"

@ -36,7 +36,7 @@
<!--右下角按钮-->
<template #footer>
<a-button
v-show="billStatus === -1 && isUpdate"
v-show="(billStatus === -1 || billStatus === 2) && isUpdate"
@click="handleSubmit"
preIcon="ant-design:cloud-upload-outlined"
type="error"

@ -54,7 +54,7 @@
<!--右下角按钮-->
<template #footer>
<a-button
v-show="billStatus === -1 && isUpdate"
v-show="(billStatus === -1 || billStatus === 2) && isUpdate"
@click="handleSubmit"
preIcon="ant-design:cloud-upload-outlined"
type="error"

@ -0,0 +1,110 @@
<template>
<BasicModal
v-bind="$attrs"
@register="registerModal"
:useWrapper="true"
title="导入Excel"
width="70%"
@ok="handleImport"
>
<ImpExcel @success="loadDataSuccess" dateFormat="YYYY-MM-DD">
<a-button class="m-3"> 选择Excel </a-button>
</ImpExcel>
<BasicTable
title="待导入数据"
v-for="(table, index) in tableListRef"
:key="index"
:columns="table.columns"
:dataSource="table.dataSource"
:pagination="{ pageSize: 100 }"
/>
<!--右下角按钮-->
<template #footer>
<a-button
@click="closeModal"
preIcon="ant-design:close-outlined"
type="warning"
:loading="loading"
ghost
style="margin-right: 0.8rem"
>取消</a-button
>
<a-button
@click="handleImport()"
preIcon="ant-design:check-circle-outlined"
type="primary"
:loading="loading"
>确认导入</a-button
>
</template>
</BasicModal>
</template>
<script lang="ts" setup>
import { ref, computed, unref, h } from 'vue'
import { BasicModal, useModalInner } from '/@/components/Modal'
import { BasicForm, useForm } from '/@/components/Form/index'
import { importInfo } from './api'
import { useMessage } from '/@/hooks/web/useMessage'
import { ImpExcel, ExcelData } from '/@/components/Excel'
import { BasicTable, BasicColumn } from '/@/components/Table'
// Emits
const emit = defineEmits(['success', 'register'])
const isUpdate = ref(true)
const loading = ref(false)
const { createMessage } = useMessage()
const tableListRef = ref<
{
title: string
columns?: any[]
dataSource?: any[]
}[]
>([])
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
setModalProps({ confirmLoading: false, loading: true })
isUpdate.value = !!data?.isUpdate
tableListRef.value = []
setModalProps({ loading: false })
})
function loadDataSuccess(excelDataList: ExcelData[]) {
tableListRef.value = []
console.log(excelDataList)
for (const excelData of excelDataList) {
const {
header,
results,
meta: { sheetName },
} = excelData
const columns: BasicColumn[] = []
for (const title of header) {
columns.push({ title, dataIndex: title })
}
tableListRef.value.push({ title: sheetName, dataSource: results, columns })
}
}
async function handleImport() {
try {
setModalProps({ confirmLoading: true })
console.log(tableListRef.value[0].dataSource)
// TODO custom api
// console.log(values);
// // loading.value = true;
const res: API.DataResult = await importInfo(tableListRef.value[0].dataSource)
console.log(res)
if (res.succeeded) {
createMessage.success(res.message)
emit('success')
// //
// if (!exit) {
// await refresh();
// }
closeModal()
} else {
createMessage.error(res.message)
}
} finally {
// loading.value = false;
setModalProps({ confirmLoading: false })
}
}
</script>

@ -0,0 +1,13 @@
// @ts-ignore
import { request } from '/@/utils/request'
import { DataResult } from '/@/api/model/baseModel'
enum Api {
importInfo = '/CodeGoods/ImportInfo',
}
export function importInfo(data: any) {
return request<DataResult>({
url: Api.importInfo,
method: 'post',
data,
})
}

@ -2,13 +2,14 @@
<div class="p-4">
<BasicTable @register="registerTable">
<template #toolbar>
<!-- <a-button-->
<!-- type="primary"-->
<!-- @click="handleCreate"-->
<!-- preIcon="ant-design:plus-outlined"-->
<!-- style="margin-right: 0.8rem"-->
<!-- >新增用户</a-button-->
<!-- >-->
<!-- <a-button-->
<!-- type="primary"-->
<!-- @click="handleCreate"-->
<!-- preIcon="ant-design:plus-outlined"-->
<!-- style="margin-right: 0.8rem"-->
<!-- >新增用户</a-button-->
<!-- >-->
<a-button type="primary" @click="handleImport"> </a-button>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'goodname'">
@ -28,16 +29,19 @@
</template>
</BasicTable>
<GoodsModal @register="registerModal" @success="handleSuccess" />
<ImportModal @register="registerImportModal" @success="handleSuccess" />
</div>
</template>
<script lang="ts" setup>
import { BasicTable, useTable, TableAction, SorterResult } from '/@/components/Table'
import { useModal } from '/@/components/Modal'
import ImportModal from './ImportModal.vue'
import { getGoodList } from '/@/api/baseinfo/goods'
import { columns, searchFormSchema } from './columns'
import GoodsModal from './GoodsModal.vue'
let sortInfo: SorterResult = {}
let filterInfo: Partial<Recordable<string[]>> = []
const [registerImportModal, { openModal: openImportModal }] = useModal()
const [registerModal, { openModal }] = useModal()
const [registerTable, { reload, getForm, getPaginationRef }] = useTable({
title: '商品列表',
@ -134,7 +138,9 @@
isUpdate: true,
})
}
function handleImport() {
openImportModal(true, {})
}
function handleSuccess() {
reload()

@ -0,0 +1,130 @@
<template>
<BasicModal
v-bind="$attrs"
@register="registerModal"
:useWrapper="true"
title="导入Excel"
width="70%"
@ok="handleImport"
>
<ImpExcel @success="loadDataSuccess" dateFormat="YYYY-MM-DD">
<a-button class="m-3"> 选择Excel </a-button>
</ImpExcel>
<BasicTable
title="待导入数据"
ref="tableRef"
v-for="(table, index) in tableListRef"
:key="index"
:columns="table.columns"
:dataSource="table.dataSource"
:pagination="{ pageSize: 100 }"
/>
<!--右下角按钮-->
<template #footer>
<a-button
@click="closeModal"
preIcon="ant-design:close-outlined"
type="warning"
:loading="loading"
ghost
style="margin-right: 0.8rem"
>取消</a-button
>
<a-button
@click="handleImport()"
preIcon="ant-design:check-circle-outlined"
type="primary"
:loading="loading"
>确认导入</a-button
>
</template>
</BasicModal>
</template>
<script lang="ts" setup>
import { ref, computed, unref, h } from 'vue'
import { BasicModal, useModalInner } from '/@/components/Modal'
import { BasicForm, useForm } from '/@/components/Form/index'
import { importInfo } from './api'
import { useMessage } from '/@/hooks/web/useMessage'
import { ImpExcel, ExcelData } from '/@/components/Excel'
import { BasicTable, BasicColumn,TableActionType } from '/@/components/Table'
// Emits
const emit = defineEmits(['success', 'register'])
const isUpdate = ref(true)
const loading = ref(false)
const rowId = ref('')
const { createMessage } = useMessage()
const tableListRef = ref<
{
title: string
columns?: any[]
dataSource?: any[]
}[]
>([])
const tableRef = ref<Nullable<TableActionType>>(null)
function getTableAction() {
const tableAction = unref(tableRef)
if (!tableAction) {
throw new Error('tableAction is null')
}
return tableAction
}
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
setModalProps({ confirmLoading: false, loading: true })
// console.log(data.rowId)
rowId.value = data.rowId
isUpdate.value = !!data?.isUpdate
tableListRef.value = []
setModalProps({ loading: false })
})
function loadDataSuccess(excelDataList: ExcelData[]) {
tableListRef.value = []
console.log(excelDataList)
for (const excelData of excelDataList) {
const {
header,
results,
meta: { sheetName },
} = excelData
const columns: BasicColumn[] = []
for (const title of header) {
columns.push({ title, dataIndex: title })
}
tableListRef.value.push({ title: sheetName, dataSource: results, columns })
}
}
async function handleImport() {
try {
setModalProps({ confirmLoading: true })
console.log(tableListRef.value[0].dataSource)
// TODO custom api
// console.log(values);
// // loading.value = true;
// console.log(getTableAction().getSelectRows())
var postData = Object.assign(
{},
{ wmsdoid: rowId.value },
{ list: tableListRef.value[0].dataSource },
)
console.log(postData)
const res: API.DataResult = await importInfo(postData)
console.log(res)
if (res.succeeded) {
createMessage.success(res.message)
emit('success')
// //
// if (!exit) {
// await refresh();
// }
closeModal()
} else {
createMessage.error(res.message)
}
} finally {
// loading.value = false;
setModalProps({ confirmLoading: false })
}
}
</script>

@ -10,9 +10,16 @@
<!-- style="margin-left: 0.8rem"-->
<!-- >新增入库确认明细</a-button-->
<!-- >-->
<a-button
type="primary"
@click="handleImport"
preIcon="ant-design:plus-outlined"
style="margin-left: 0.8rem"
>导入入库确认明细</a-button
>
</template>
</vxe-toolbar>
<ImportModal @register="registerImportModal" @success="handleSuccess" />
<vxe-table
border
show-footer
@ -306,12 +313,15 @@
import { propTypes } from '/@/utils/propTypes'
import { useMessage } from '/@/hooks/web/useMessage'
import { getWmsFeeList } from '/@/views/wms/common/api'
import ImportModal from './ImportModal.vue'
import { useModal } from '/@/components/Modal'
const { notification, createConfirm, createMessage } = useMessage()
const goodsFilterData = ref([])
const areaList = ref([])
const storeunit = ref([])
const rowId = ref('')
const isUpdate = ref(true)
const [registerImportModal, { openModal: openImportModal }] = useModal()
//getTableData()
//
const props = defineProps({
@ -331,6 +341,7 @@
{ label: '立方米', value: '立方米' },
{ label: '平方米', value: '平方米' },
]
rowId.value = props.headId
}
// onMounted(() => {
// //
@ -618,6 +629,13 @@
doGoods.loading = false
}
// await initData()
function handleImport() {
openImportModal(true, { rowId })
}
function handleSuccess() {
loadList()
}
</script>
<style scoped>

@ -173,7 +173,7 @@
}
setModalProps({ loading: false })
//
setProps({ disabled: !attrs.showFooter })
// setProps({ disabled: !attrs.showFooter })
})
const [registerSelectModal, { openModal }] = useModal()
const [registerClientModal, { openModal: openClientModal }] = useModal()

@ -0,0 +1,13 @@
// @ts-ignore
import { request } from '/@/utils/request'
import { DataResult } from '/@/api/model/baseModel'
enum Api {
importInfo = '/WmsInDo/ImportInfo',
}
export function importInfo(data: any) {
return request<DataResult>({
url: Api.importInfo,
method: 'post',
data,
})
}

@ -203,11 +203,11 @@ export const formSchema: FormSchema[] = [
colProps: {
span: 8,
},
componentProps: {
disabledDate: (current: dayjs.Dayjs) => {
return current && current < dayjs().add(-1, 'day').endOf('day')
},
},
// componentProps: {
// disabledDate: (current: dayjs.Dayjs) => {
// return current && current < dayjs().add(-1, 'day').endOf('day')
// },
// },
},
{
field: 'feestartdate',
@ -218,11 +218,11 @@ export const formSchema: FormSchema[] = [
colProps: {
span: 8,
},
componentProps: {
disabledDate: (current: dayjs.Dayjs) => {
return current && current < dayjs().add(-1, 'day').endOf('day')
},
},
// componentProps: {
// disabledDate: (current: dayjs.Dayjs) => {
// return current && current < dayjs().add(-1, 'day').endOf('day')
// },
// },
},
{
field: 'customername',
@ -231,7 +231,7 @@ export const formSchema: FormSchema[] = [
colProps: {
span: 8,
},
// slot: 'clientSelectSlot',
slot: 'clientSelectSlot',
componentProps: {
disabled: true,
},
@ -309,10 +309,10 @@ export const formSchema: FormSchema[] = [
colProps: {
span: 8,
},
// slot: 'storehouseSelectSlot',
componentProps: {
disabled: true,
},
slot: 'storehouseSelectSlot',
// componentProps: {
// disabled: true,
// },
},
// {
// field: 'goodsname',

@ -2,13 +2,13 @@
<PageWrapper contentBackground contentClass="flex" dense contentFullHeight fixedHeight>
<BasicTable @register="registerTable">
<template #toolbar>
<!-- <a-button-->
<!-- type="primary"-->
<!-- @click="handleCreate"-->
<!-- preIcon="ant-design:plus-outlined"-->
<!-- style="margin-right: 0.8rem"-->
<!-- >新增入库确认</a-button-->
<!-- >-->
<a-button
type="primary"
@click="handleCreate"
preIcon="ant-design:plus-outlined"
style="margin-right: 0.8rem"
>新增入库确认</a-button
>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'bsno'">

File diff suppressed because it is too large Load Diff

@ -0,0 +1,21 @@
using Microsoft.Extensions.DependencyInjection;
namespace DS.Module.CaiNiaoApi;
/// <summary>
/// 注入菜鸟服务
/// </summary>
public static class CaiNiaoModuleInstall
{
/// <summary>
///
/// </summary>
/// <param name="services"></param>
/// <exception cref="ArgumentNullException"></exception>
public static void AddCaiNiaoModuleInstall(this IServiceCollection services)
{
if (services == null) throw new ArgumentNullException(nameof(services));
services.AddScoped<ISendCaiNiaoMsgService, SendCaiNiaoMsgService>();
}
}

@ -0,0 +1,29 @@
namespace DS.Module.CaiNiaoApi.CaiNiaoReq;
public class CarInRecordReq
{
/// <summary>
/// 停车车场编码
/// </summary>
public string ParkingLotCode { get; set; }
/// <summary>
/// 入园时间
/// </summary>
public string CarInTime { get; set; }
/// <summary>
/// 入园图⽚,公⽹可访问照⽚
/// </summary>
public string CarInPic { get; set; }
/// <summary>
/// 车道编码
/// </summary>
public string LaneCode { get; set; }
/// <summary>
/// 记录唯⼀id
/// </summary>
public string ParkingRecordId { get; set; }
/// <summary>
/// 车牌号
/// </summary>
public string CarNum { get; set; }
}

@ -0,0 +1,31 @@
namespace DS.Module.CaiNiaoApi.CaiNiaoReq;
/// <summary>
/// ⻋辆出园记录上报
/// </summary>
public class CarOutRecordReq
{
/// <summary>
/// 停车车场编码
/// </summary>
public string ParkingLotCode { get; set; }
/// <summary>
/// 出园时间
/// </summary>
public string CarOutTime { get; set; }
/// <summary>
/// 出园图⽚,公⽹可访问照⽚
/// </summary>
public string CarOutPic { get; set; }
/// <summary>
/// 车道编码
/// </summary>
public string LaneCode { get; set; }
/// <summary>
/// 记录唯⼀id
/// </summary>
public string ParkingRecordId { get; set; }
/// <summary>
/// 车牌号
/// </summary>
public string CarNum { get; set; }
}

@ -0,0 +1,24 @@
namespace DS.Module.CaiNiaoApi.CaiNiaoReq;
/// <summary>
/// ⽕警报警
/// </summary>
public class FireAlarmReq
{
/// <summary>
/// 默认传fireAlarm
/// </summary>
public string MsgType { get; set; }
/// <summary>
/// 设备编码
/// </summary>
public string DevId { get; set; }
/// <summary>
/// 触发时间
/// </summary>
public int TriggerTime { get; set; }
/// <summary>
/// 公⽹可访问照⽚
/// </summary>
public string Photo { get; set; }
}

@ -0,0 +1,33 @@
namespace DS.Module.CaiNiaoApi.CaiNiaoReq;
/// <summary>
/// 推送内部车辆数据
/// </summary>
public class InternalCarReq
{
/// <summary>
/// 车牌号
/// </summary>
public string VehicleNo { get; set; }
/// <summary>
/// 车主
/// </summary>
public string OwnerName { get; set; }
/// <summary>
/// 联系电话
/// </summary>
public string OwnerPhone { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public int GmtCreate { get; set; }
/// <summary>
/// 1推送0未推送
/// </summary>
public int ToHik { get; set; }
}

@ -0,0 +1,48 @@
namespace DS.Module.CaiNiaoApi.CaiNiaoReq;
/// <summary>
/// 推送临时车数据
/// </summary>
public class TemporaryCarReq
{
/// <summary>
/// 放⾏时间
/// </summary>
public int AppointmentDate { get; set; }
/// <summary>
/// 放⾏结束时间
/// </summary>
public int AppointmentDateEnd { get; set; }
/// <summary>
/// 车牌号
/// </summary>
public string VehicleNo { get; set; }
/// <summary>
/// 联系电话
/// </summary>
public string DriverPhone { get; set; }
/// <summary>
/// 车主姓名
/// </summary>
public string DriverName { get; set; }
/// <summary>
/// 司机⾝份证号
/// </summary>
public string DriverIdCardNo { get; set; }
/// <summary>
/// 允许进出次数
/// </summary>
public int AllowCount { get; set; }
/// <summary>
/// 1推送0未推送
/// </summary>
public int ToHik { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public int GmtCreate { get; set; }
}

@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\DS.Module.Core\DS.Module.Core.csproj" />
<ProjectReference Include="..\DS.Module.UserModule\DS.Module.UserModule.csproj" />
</ItemGroup>
</Project>

@ -0,0 +1,6 @@
namespace DS.Module.CaiNiaoApi;
public interface ICaiNiaoHttpRequestService
{
}

@ -0,0 +1,42 @@
using DS.Module.CaiNiaoApi.CaiNiaoReq;
using DS.Module.Core;
namespace DS.Module.CaiNiaoApi;
public interface ISendCaiNiaoMsgService
{
/// <summary>
/// 推送临时车辆
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
Task<DataResult> SendTemporaryCar(TemporaryCarReq model);
/// <summary>
/// 推送内部车辆
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
Task<DataResult> SendInternalCar(InternalCarReq model);
/// <summary>
/// 车辆进入记录上报
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
Task<DataResult> SendCarInRecord(CarInRecordReq model);
/// <summary>
/// 车辆出园记录上报
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
Task<DataResult> SendCarOutRecord(CarOutRecordReq model);
/// <summary>
/// ⽕警报警上报
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
Task<DataResult> SendFireAlarmRecord(FireAlarmReq model);
}

@ -0,0 +1,130 @@
using DS.Module.CaiNiaoApi.CaiNiaoReq;
using DS.Module.Core;
using DS.Module.Core.Helpers;
using DS.Module.UserModule;
using Microsoft.Extensions.DependencyInjection;
using Newtonsoft.Json;
using NLog;
using SqlSugar;
namespace DS.Module.CaiNiaoApi;
public class SendCaiNiaoMsgService:ISendCaiNiaoMsgService
{
private readonly IServiceProvider _serviceProvider;
private readonly ISqlSugarClient db;
private readonly IUser user;
private readonly string accessKeyId;
private readonly string accessSecret;
private readonly string apiUrl;
static readonly Logger Logger = LogManager.GetCurrentClassLogger();
/// <summary>
/// 构造函数
/// </summary>
/// <param name="serviceProvider"></param>
public SendCaiNiaoMsgService(IServiceProvider serviceProvider)
{
_serviceProvider = serviceProvider;
db = _serviceProvider.GetRequiredService<ISqlSugarClient>();
user = _serviceProvider.GetRequiredService<IUser>();
accessKeyId = AppSetting.app(new string[] { "CaiNaioApi", "AccessKeyId" });
accessSecret = AppSetting.app(new string[] { "CaiNaioApi", "AccessKeySecret" });
apiUrl = AppSetting.app(new string[] { "CaiNaioApi", "ApiUrl" });
}
public async Task<DataResult> SendTemporaryCar(TemporaryCarReq model)
{
var url = apiUrl + "/api/vehicle/appointment/linkong";
var data = RequestHelper.Post(JsonConvert.SerializeObject(model), url);
var res = JsonConvert.DeserializeObject<SendCaiNiaoResponse>(data);
if (res.Success)
{
return await Task.FromResult(DataResult.Successed(res.ErrorMsg));
}
else
{
Logger.Log(LogLevel.Error,
"对接菜鸟系统:推送临时车辆失败 "+DateTime.Now.ToString() + "\r\n" +
data);
return await Task.FromResult(DataResult.Successed("发送失败!-"+ res.ErrorMsg));
}
}
public async Task<DataResult> SendInternalCar(InternalCarReq model)
{
var url = apiUrl + "/api/vehicle/blackWhiteList/linkong";
var data = RequestHelper.Post(JsonConvert.SerializeObject(model), url);
var res = JsonConvert.DeserializeObject<SendCaiNiaoResponse>(data);
if (res.Success)
{
return await Task.FromResult(DataResult.Successed(res.ErrorMsg));
}
else
{
Logger.Log(LogLevel.Error,
"对接菜鸟系统:推送内部车辆失败 "+DateTime.Now.ToString() + "\r\n" +
data);
return await Task.FromResult(DataResult.Successed("发送失败!-"+ res.ErrorMsg));
}
}
public async Task<DataResult> SendCarInRecord(CarInRecordReq model)
{
var url = apiUrl + "/third/device/carIn";
var data = RequestHelper.Post(JsonConvert.SerializeObject(model), url);
var res = JsonConvert.DeserializeObject<SendCaiNiaoResponse>(data);
if (res.Success)
{
return await Task.FromResult(DataResult.Successed(res.ErrorMsg));
}
else
{
Logger.Log(LogLevel.Error,
"对接菜鸟系统:推送车辆进入记录失败 "+DateTime.Now.ToString() + "\r\n" +
data);
return await Task.FromResult(DataResult.Successed("发送失败!-"+ res.ErrorMsg));
}
}
public async Task<DataResult> SendCarOutRecord(CarOutRecordReq model)
{
var url = apiUrl + "/third/device/carOut";
var data = RequestHelper.Post(JsonConvert.SerializeObject(model), url);
var res = JsonConvert.DeserializeObject<SendCaiNiaoResponse>(data);
if (res.Success)
{
return await Task.FromResult(DataResult.Successed(res.ErrorMsg));
}
else
{
Logger.Log(LogLevel.Error,
"对接菜鸟系统:推送车辆出园记录失败 "+DateTime.Now.ToString() + "\r\n" +
data);
return await Task.FromResult(DataResult.Successed("发送失败!-"+ res.ErrorMsg));
}
}
public async Task<DataResult> SendFireAlarmRecord(FireAlarmReq model)
{
var url = apiUrl + "/third/device/fireAlarm";
var data = RequestHelper.Post(JsonConvert.SerializeObject(model), url);
var res = JsonConvert.DeserializeObject<SendCaiNiaoResponse>(data);
if (res.Success)
{
return await Task.FromResult(DataResult.Successed(res.ErrorMsg));
}
else
{
Logger.Log(LogLevel.Error,
"对接菜鸟系统:推送火警报警失败 "+DateTime.Now.ToString() + "\r\n" +
data);
return await Task.FromResult(DataResult.Successed("发送失败!-"+ res.ErrorMsg));
}
}
}

@ -0,0 +1,36 @@
using Newtonsoft.Json;
namespace DS.Module.CaiNiaoApi;
/// <summary>
///
/// </summary>
public class SendCaiNiaoResponse
{
[JsonProperty("Data")]
public string Data { get; set; }
/// <summary>
///
/// </summary>
[JsonProperty("Success")]
public bool Success { get; set; }
/// <summary>
///
/// </summary>
[JsonProperty("ErrorCode")]
public string ErrorCode { get; set; }
/// <summary>
/// 系统异常
/// </summary>
[JsonProperty("ErrorMsg")]
public string ErrorMsg { get; set; }
/// <summary>
///
/// </summary>
[JsonProperty("Msg")]
public string Msg { get; set; }
/// <summary>
///
/// </summary>
[JsonProperty("TraceId")]
public string TraceId { get; set; }
}

@ -1,4 +1,5 @@
using Microsoft.AspNetCore.Http;
using System.Text;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;
using Microsoft.AspNetCore.Hosting;
@ -38,7 +39,15 @@ public class GlobalExceptionsFilter : IExceptionFilter
// context.Result = new InternalServerErrorObjectResult(json);
//MiniProfiler.Current.CustomTiming("Errors", json.Message);
Logger.Log(NLog.LogLevel.Info, "异常信息:" + JsonConvert.SerializeObject(context.Exception));
//记录异常到日志
StringBuilder exMsg = new();
exMsg.AppendLine($"【异常方法:】{context.HttpContext.Request.Path}");
exMsg.AppendLine($"【请求类型:】{context.HttpContext.Request.Method}");
exMsg.AppendLine($"【异常错误:】{context.Exception.Message}");
exMsg.AppendLine($"【堆栈跟踪:】{context.Exception.StackTrace}");
// logger.LogError(exMsg.ToString());
Logger.Log(NLog.LogLevel.Error, exMsg.ToString());
// Logger.Log(NLog.LogLevel.Info, "异常信息:" + JsonConvert.SerializeObject(context.Exception));
//采用log4net 进行错误日志记录
//_loggerHelper.Error(json.Message, WriteLog(json.Message, context.Exception));

@ -0,0 +1,194 @@
namespace DS.WMS.Common.Data;
public class CarEventNotify
{
/// <summary>
/// 方法名,用于标识报文用途 事件固定OnEventNotify
/// </summary>
public string Method { get; set; }
/// <summary>
/// 事件参数信息
/// </summary>
public CarParams Params { get; set; }
}
public class CarParams
{
/// <summary>
/// 事件从接收者(如设备接入框架)发出的时间,格式 YYYY-mm-dd hh:MM:ss
/// </summary>
public DateTime SendTime { get; set; }
/// <summary>
/// 事件类别,如视频事件、门禁事件
/// </summary>
public string Ability { get; set; }
/// <summary>
/// 事件信息 最大支持50条事件数据
/// </summary>
public List<CarEventsItem> Events { get; set; }
}
public class CarEventDetailsItem
{
/// <summary>
/// 事件唯一标识
/// </summary>
public string EventIndex { get; set; }
/// <summary>
/// 车牌号
/// </summary>
public string PlateNo { get; set; }
/// <summary>
/// 车牌类型key
/// </summary>
public string PlateType { get; set; }
/// <summary>
/// 车牌类型名称
/// </summary>
public string PlateTypeName { get; set; }
/// <summary>
/// 车辆类型key
/// </summary>
public string VehicleType { get; set; }
/// <summary>
/// 车辆类型名称
/// </summary>
public string VehicleTypeName { get; set; }
/// <summary>
/// 过车时间
/// </summary>
public string CrossTime { get; set; }
/// <summary>
/// 整型,速度值
/// </summary>
public int Speed { get; set; }
/// <summary>
/// 布防类型 1-被盗车
/// 2-被抢车
/// 3-嫌疑车
/// 4-交通违法车
/// 5-紧急查控车
/// 6-违章车
/// </summary>
public string AlarmType { get; set; }
/// <summary>
/// 布防类型名称
/// </summary>
public string AlarmTypeName { get; set; }
/// <summary>
/// 卡口点主键
/// </summary>
public string MonitorId { get; set; }
/// <summary>
/// 卡口点名称
/// </summary>
public string MonitorName { get; set; }
/// <summary>
/// 整型违法类型0正常过车 1超速 2逆行 3黑名单5-违停
/// </summary>
public int IllegalType { get; set; }
/// <summary>
/// 点位或是区间名称
/// </summary>
public string MixedName { get; set; }
/// <summary>
/// 点位测速或是区间测速类型
/// </summary>
public int MixedType { get; set; }
/// <summary>
/// 点位或是区间id
/// </summary>
public string MixedId { get; set; }
/// <summary>
/// 卡口点编号
/// </summary>
public string MonitorIndexCode { get; set; }
/// <summary>
/// 包含车牌和车辆url
/// </summary>
public PicUrl PicUrl { get; set; }
/// <summary>
/// 图片服务器编号
/// </summary>
public string ImageIndexCode { get; set; }
/// <summary>
/// 超速阈值
/// </summary>
public string SpeedLimit { get; set; }
/// <summary>
/// 车主信息
/// </summary>
public Person Person { get; set; }
}
public class PicUrl
{
/// <summary>
/// 车牌url
/// </summary>
public string PlatePicUrl { get; set; }
/// <summary>
/// 车辆url
/// </summary>
public string VehiclePicUrl { get; set; }
}
public class Person
{
/// <summary>
/// 车主姓名
/// </summary>
public string PersonName { get; set; }
/// <summary>
/// 车主电话
/// </summary>
public string PhoneNo { get; set; }
}
public class CarEventsItem
{
/// <summary>
///
/// </summary>
public CarEventDetailsItem Data { get; set; }
/// <summary>
/// 事件唯一标识
/// </summary>
public string EventId { get; set; }
/// <summary>
/// 事件源编号,物理设备是资源编号
/// </summary>
public string SrcIndex { get; set; }
/// <summary>
/// 事件源类型
/// </summary>
public string SrcType { get; set; }
/// <summary>
/// 事件类型 monitorPoint园区-卡口点
/// </summary>
public int EventType { get; set; }
/// <summary>
/// 事件状态 0-瞬时
/// 1-开始
/// 2-停止
/// 3-事件脉冲
/// 4-联动结果更新
/// 5-事件图片异步上传
/// </summary>
public int Status { get; set; }
/// <summary>
/// 脉冲超时时间
/// </summary>
public int Timeout { get; set; }
/// <summary>
/// 事件发生时间(设备时间)
/// </summary>
public string HappenTime { get; set; }
/// <summary>
/// 事件发生的事件源父设备
/// </summary>
public string SrcParentIndex { get; set; }
}

@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DS.WMS.Core.BaseInfo.Dtos
{
public class GoodsImportModel
{
public string { get; set; }
public string { get; set; }
public string { get; set; }
public string { get; set; }
public string { get; set; }
public string { get; set; }
public string { get; set; }
}
}

@ -22,6 +22,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\DS.Module.CaiNiaoApi\DS.Module.CaiNiaoApi.csproj" />
<ProjectReference Include="..\DS.Module.Core\DS.Module.Core.csproj" />
<ProjectReference Include="..\DS.Module.FastReport\DS.Module.FastReport.csproj" />
<ProjectReference Include="..\DS.Module.HkOpenApi\DS.Module.HkOpenApi.csproj" />

@ -26,4 +26,11 @@ public interface IOpenService
// /// <param name="plateNumber"></param>
// /// <returns></returns>
// Task<DataResult<InternalCarInfoViewModel>> GetInternalCarInfoAsync(string plateNumber);
/// <summary>
/// 处理海康过车监控
/// </summary>
/// <param name="data"></param>
/// <returns></returns>
Task<DataResult> HKDealCarMonitor(CarEventNotify data);
}

@ -1,3 +1,5 @@
using DS.Module.CaiNiaoApi;
using DS.Module.CaiNiaoApi.CaiNiaoReq;
using DS.Module.Core;
using DS.Module.Core.Extensions;
using DS.WMS.Common.Data;
@ -20,7 +22,7 @@ public class OpenService : IOpenService
private readonly IServiceProvider _serviceProvider;
private readonly ISqlSugarClient db;
static readonly Logger Logger = LogManager.GetCurrentClassLogger();
private readonly ISendCaiNiaoMsgService _iSendCaiNiaoMsgService;
/// <summary>
///
/// </summary>
@ -29,6 +31,7 @@ public class OpenService : IOpenService
{
_serviceProvider = serviceProvider;
db = _serviceProvider.GetRequiredService<ISqlSugarClient>();
_iSendCaiNiaoMsgService= _serviceProvider.GetRequiredService<ISendCaiNiaoMsgService>();
}
/// <summary>
@ -158,6 +161,58 @@ public class OpenService : IOpenService
return DataResult.Failed("越界侦测报警回调失败!" + ",请联系管理员!");
}
}
/// <summary>
/// 车辆监控回调
/// </summary>
/// <param name="data"></param>
/// <returns></returns>
public async Task<DataResult> HKDealCarMonitor(CarEventNotify data)
{
var events = data.Params.Events;
try
{
//开启事务
await db.Ado.BeginTranAsync();
foreach (var item in events)
{
// var hkEvent = item.Adapt<tb_HKEvent>();
//取值联动结果
if (item.Status == 4)
{
var detail = item.Data;
#region 车辆过车信息
//正常过车
if (detail.IllegalType == 0)
{
var rec = new CarInRecordReq
{
ParkingLotCode = detail.MonitorIndexCode,
CarInTime = detail.CrossTime,
CarInPic = detail.PicUrl.VehiclePicUrl,
LaneCode = detail.MonitorIndexCode,
ParkingRecordId = detail.EventIndex,
CarNum = detail.PlateNo,
};
await _iSendCaiNiaoMsgService.SendCarInRecord(rec);
}
#endregion
}
}
await db.Ado.CommitTranAsync();
return DataResult.Successed("车辆监控回调成功!");
}
catch (Exception ex)
{
await db.Ado.RollbackTranAsync();
Logger.Log(LogLevel.Error,
DateTime.Now.ToString() + ex.ToString());
Logger.Log(LogLevel.Info,
DateTime.Now.ToString() + JsonConvert.SerializeObject(data));
return DataResult.Failed("车辆监控回调失败!" + ",请联系管理员!");
}
}
// public async Task<DataResult<InternalCarInfoViewModel>> GetInternalCarInfoAsync(string plateNumber)

@ -1,3 +1,5 @@
using DS.Module.CaiNiaoApi;
using DS.Module.CaiNiaoApi.CaiNiaoReq;
using DS.Module.Core;
using DS.Module.Core.Extensions;
using DS.Module.HkOpenApi;
@ -18,6 +20,7 @@ public class PortOpenService : IPortOpenService
private readonly ISqlSugarClient db;
static readonly Logger Logger = LogManager.GetCurrentClassLogger();
private readonly IHttpRequestService _ihkHttpService;
private readonly ISendCaiNiaoMsgService _iSendCaiNiaoMsgService;
/// <summary>
///
/// </summary>
@ -27,6 +30,7 @@ public class PortOpenService : IPortOpenService
_serviceProvider = serviceProvider;
db = _serviceProvider.GetRequiredService<ISqlSugarClient>();
_ihkHttpService = _serviceProvider.GetRequiredService<IHttpRequestService>();
_iSendCaiNiaoMsgService= _serviceProvider.GetRequiredService<ISendCaiNiaoMsgService>();
}
@ -119,6 +123,18 @@ public class PortOpenService : IPortOpenService
DateTime.Now.ToString() + JsonConvert.SerializeObject(res));
}
info.BoxNo = boxNo;
#region 推送车辆进出记录给菜鸟系统 TODO
if (model.RecordType==0)
{
// var req = new CarInRecordReq
// {
//
// };
}
#endregion
await db.Insertable(info).ExecuteCommandAsync();
return DataResult.Successed("车辆信息纪录成功!");

@ -1,4 +1,5 @@
using DS.Module.Core;
using DS.WMS.Core.BaseInfo.Dtos;
using DS.WMS.Core.System.Dtos;
using DS.WMS.Core.System.Entity;
@ -21,4 +22,12 @@ public interface ICodeGoodsService
/// <param name="id"></param>
/// <returns></returns>
DataResult<CodeGoodsViewModel> GetGoodInfo(string id);
/// <summary>
/// 导入
/// </summary>
/// <param name="datas"></param>
/// <returns></returns>
public DataResult ImportInfo(List<GoodsImportModel> datas);
}

@ -1,6 +1,9 @@
using DS.Module.Core;
using DS.Module.Core.Extensions;
using DS.WMS.Core.BaseInfo.Dtos;
using DS.WMS.Core.BaseInfo.Entity;
using DS.WMS.Core.SecurityModule.Dtos;
using DS.WMS.Core.SecurityModule.Entity;
using DS.WMS.Core.System.Dtos;
using DS.WMS.Core.System.Entity;
using DS.WMS.Core.System.Interface;
@ -11,7 +14,7 @@ namespace DS.WMS.Core.System.Method;
/// <summary>
///
/// </summary>
public class CodeGoodsService:ICodeGoodsService
public class CodeGoodsService : ICodeGoodsService
{
private readonly IServiceProvider _serviceProvider;
private readonly ISqlSugarClient db;
@ -54,4 +57,53 @@ public class CodeGoodsService:ICodeGoodsService
.First();
return DataResult<CodeGoodsViewModel>.Success(data);
}
/// <summary>
/// 导入
/// </summary>
/// <param name="datas"></param>
/// <returns></returns>
public DataResult ImportInfo(List<GoodsImportModel> datas)
{
var goodsTypeList = db.Queryable<code_goodsType>().ToList();
var feeTypeList = db.Queryable<OP_WMS_GOODSFEETYPE>().ToList();
var err = string.Empty;
try
{
//开启事务
db.Ado.BeginTran();
foreach (var item in datas)
{
var isExist = db.Queryable<code_goods>().Where(x => x.GOODNAME == item.).First();
if (isExist.IsNull())
{
//db.Deleteable(isExist).ExecuteCommand();
var info = new code_goods
{
GID = Guid.NewGuid().ToString(),
GOODCODE = "",
GOODNAME = item.,
GOODSMODEL = item.,
PinYinCode = PinYinUtil.GetFristLetter(item.),
ISSTOP = false,
GoodsTypeGID = goodsTypeList.First(x => x.GoodsTypeName == item.).GID,
CORPID = "Comcab2d43f60454327af30a131fc1d3abd",
GOODSFEETYPE = item.,
GoodsFeeTypeGID = feeTypeList.First(x => x.GOODSFEETYPE == item.).GID,
RULEUNIT = item.,
};
db.Insertable(info).ExecuteCommand();
}
}
db.Ado.CommitTran();
return DataResult.Successed("导入成功!");
}
catch (Exception ex)
{
db.Ado.RollbackTran();
return DataResult.Failed("导入失败!" + ex);
}
}
}

@ -0,0 +1,30 @@
namespace DS.WMS.Core.WmsModule.Dtos;
public class WmsInGoodsImportModel
{
public Guid? WMSDOID { get; set; }
/// <summary>
/// 计划明细
/// </summary>
public List<WmsInDoGoodsTempInput> List{ get; set; }
}
public class WmsInDoGoodsTempInput
{
public string { get; set; }
public decimal { get; set; }
public decimal { get; set; }
public decimal kg { get; set; }
public string { get; set; }
public string { get; set; }
public decimal { get; set; }
public decimal { get; set; }
// public string 合同号 { get; set; } = "";
}

@ -45,7 +45,10 @@
/// 批次号
/// </summary>
public string GOODSMODEL2 { get; set; }
/// <summary>
/// 合同号
/// </summary>
public string GOODSMODEL10 { get; set; }
/// <summary>
///
/// </summary>

@ -71,4 +71,11 @@ public interface IWmsInDoService
public DataResult DelWmsInDoGoods(string id);
public DataResult GetWmsInDoGoodsPageList(PageRequest request);
/// <summary>
/// 导入
/// </summary>
/// <param name="datas"></param>
/// <returns></returns>
public DataResult ImportInfo(WmsInGoodsImportModel datas);
}

@ -92,6 +92,7 @@ public class WmsCommonService : IWmsCommonService
wmsbase.REMARK_GOODS = doGoods.REMARK;
wmsbase.REMARK_BOX = doGoods.REMARK2;
wmsbase.TRUCKNO = doGoods.TRUCKNO;
wmsbase.GOODSMODEL10= doGoods.GOODSMODEL10;
return DataResult<OP_WMS_BASE>.Success(wmsbase);
}

@ -13,6 +13,7 @@ using DS.WMS.Core.WmsModule.Interface;
using Mapster;
using Microsoft.Extensions.DependencyInjection;
using SqlSugar;
using OP_WMS_FEERATE = DS.WMS.Core.FeeModule.Entity.OP_WMS_FEERATE;
using OP_WMS_STOREHOUSE = DS.WMS.Core.App.Entity.OP_WMS_STOREHOUSE;
using OP_WMS_STOREHOUSE_AREA = DS.WMS.Core.App.Entity.OP_WMS_STOREHOUSE_AREA;
@ -265,6 +266,118 @@ public class WmsInDoService:IWmsInDoService
.Where(whereList).ToList();
return DataResult.Successed("查询成功!", data);
}
public DataResult ImportInfo(WmsInGoodsImportModel data)
{
var goodsTypeList = db.Queryable<code_goodsType>().ToList();
var feeTypeList = db.Queryable<OP_WMS_GOODSFEETYPE>().ToList();
var err = string.Empty;
var info = db.Queryable<OP_WMS_IN_DO>().First(x => x.WMSDOID == data.WMSDOID);
if (info.IsNull())
{
return DataResult.Failed("执行信息不存在!");
}
if (info.BILLSTATUS == "1002" )
{
return DataResult.Failed("已审核通过!");
}
if (info.BILLSTATUS == "1003" )
{
return DataResult.Failed("已执行入库!");
}
try
{
//开启事务
db.Ado.BeginTran();
var doGoodsList = new List<OP_WMS_IN_DO_GOODS>();
foreach (var item in data.List)
{
var isExist = db.Queryable<code_goods>().Where(x => x.GOODNAME == item.).First();
if (isExist.IsNotNull())
{
//db.Deleteable(isExist).ExecuteCommand();
var good = db.Queryable<code_goods>().First(x => x.GOODNAME == item.);
var area = db.Queryable<OP_WMS_STOREHOUSE_AREA>().First(x => x.AREANAME == item.);
var inDoGoods = new OP_WMS_IN_DO_GOODS
{
WMSDODETAILID = Guid.NewGuid(),
WMSDOID = info.WMSDOID,
MBLNO = item.,
GOODSMODEL = good.GOODSMODEL,
PKGS = item.,
MINPKGS = item.,
KGS = item.kg,
CBM = 0,
NETWEIGHT = item.kg,
STORAGEUNITCOUNT = item.,
ACCEPT_PKGS = item.,
ACCEPT_MINPKGS = item.,
ACCEPT_KGS = item.kg,
ACCEPT_CBM = 0,
ACCEPT_NETWEIGHT = item.kg,
ACCEPT_STORAGEUNITCOUNT = item.,
STOREHOUSE = info.STOREHOUSE,
AREACODE = area.AREACODE,
ACCEPT_STOREHOUSE= info.STOREHOUSE,
GoodsId = good.GID,
GOODSNAME = good.GOODNAME,
STORAGEUNIT = good.RULEUNIT,
GOODSMODEL2 = item.,
// GOODSMODEL10 = item.合同号
};
//添加到List
doGoodsList.Add(inDoGoods);
}
}
db.Insertable(doGoodsList).ExecuteCommand();
info.GOODSNAME = doGoodsList.Select(x => x.GOODSNAME).First();
info.REMARK = "库存期初导入";
db.Updateable(info).ExecuteCommand();
#region 处理客户协议费率
var feeRateList = new List<OP_WMS_FEERATE_DETAIL>();
var goodsFeeTypeList = db.Queryable<code_goods>().Where(x => doGoodsList.Select(a => a.GoodsId).Contains(x.GID))
.Select(x => x.GoodsFeeTypeGID).Distinct().ToList();
foreach (var item in goodsFeeTypeList)
{
// var good = db.Queryable<code_goods>().First(x => x.GID == item.GoodsId);
var feerate = db.Queryable<OP_WMS_FEERATE>()
.Where(x => x.ClientId == info.ClientId && x.GoodsFeeTypeGID == item).First();
if (feerate.IsNull())
{
var feetype = db.Queryable<OP_WMS_GOODSFEETYPE>().First(x => x.GID == item);
return DataResult.Failed("请维护该客户[" + feetype.GOODSFEETYPE + "]的客户协议费率!!!");
}
else
{
var feedetail = db.Queryable<OP_WMS_FEERATE_DETAIL>().Where(x => x.FEERATEID == feerate.FEERATEID)
.ToList();
feeRateList.AddRange(feedetail);
}
}
foreach (var item in feeRateList)
{
var dofee = item.Adapt<OP_WMS_FEERATE_DO_DETAIL>();
dofee.PID = info.WMSDOID;
db.Insertable(dofee).ExecuteCommand();
}
#endregion
db.Ado.CommitTran();
return DataResult.Successed("导入成功!");
}
catch (Exception ex)
{
db.Ado.RollbackTran();
return DataResult.Failed("导入失败!" + ex);
}
}
public DataResult DelWmsInDo(string id)
{
var gid = Guid.Parse(id);

@ -67,7 +67,27 @@ public class HKApiController : ControllerBase
await _invokeService.HKDealLineDetection(data);
return await Task.FromResult<string>("success");
}
/// <summary>
/// 车辆过车回调
/// </summary>
/// <param name="data"></param>
/// <returns></returns>
[HttpPost]
[Route("CarMonitorCallBack")]
public async Task<string> CarMonitorCallBack()
{
string body = string.Empty;
Request.EnableBuffering();
StreamReader sr = new StreamReader(Request.Body);
body = await sr.ReadToEndAsync();
Request.Body.Seek(0, SeekOrigin.Begin);
var data = JsonConvert.DeserializeObject<CarEventNotify>(body);
Logger.Log(LogLevel.Info,
"车辆过车:"+DateTime.Now.ToString() + JsonConvert.SerializeObject(data));
// await _invokeService.HKDealLineDetection(data);
return await Task.FromResult<string>("success");
}
// /// <summary>
// /// 获取内部车辆信息
// /// </summary>

@ -18,6 +18,7 @@
<ItemGroup>
<ProjectReference Include="..\DS.Module.AutofacModule\DS.Module.AutofacModule.csproj" />
<ProjectReference Include="..\DS.Module.CaiNiaoApi\DS.Module.CaiNiaoApi.csproj" />
<ProjectReference Include="..\DS.Module.Core\DS.Module.Core.csproj" />
<ProjectReference Include="..\DS.Module.SqlSugar\DS.Module.SqlSugar.csproj" />
<ProjectReference Include="..\DS.WMS.Core\DS.WMS.Core.csproj" />

@ -3,6 +3,7 @@ using System.Security.Claims;
using Autofac;
using Autofac.Extensions.DependencyInjection;
using DS.Module.AutofacModule;
using DS.Module.CaiNiaoApi;
using DS.Module.HkOpenApi;
using DS.Module.SqlSugar;
using DS.WMS.OpenApi;
@ -22,6 +23,7 @@ builder.Services.AddAppWebInstal();
builder.Services.AddSwaggerGen();
builder.Services.AddSqlsugarInstall();
builder.Services.AddHKModuleInstall();//海康服务
builder.Services.AddCaiNiaoModuleInstall();//菜鸟服务
// 以下是加入了JWT身份认证
builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme).AddJwtBearer(options =>
{

@ -105,6 +105,13 @@
<param name="id"></param>
<returns></returns>
</member>
<member name="M:DS.WMS.WebApi.Controllers.CodeGoodsController.ImportInfo(System.Collections.Generic.List{DS.WMS.Core.BaseInfo.Dtos.GoodsImportModel})">
<summary>
导入商品
</summary>
<param name="model"></param>
<returns></returns>
</member>
<member name="T:DS.WMS.WebApi.Controllers.CommonController">
<summary>
公共模块
@ -1371,6 +1378,13 @@
<param name="id"></param>
<returns></returns>
</member>
<member name="M:DS.WMS.WebApi.Controllers.WmsInDoController.ImportInfo(DS.WMS.Core.WmsModule.Dtos.WmsInGoodsImportModel)">
<summary>
导入入库确认明细
</summary>
<param name="model"></param>
<returns></returns>
</member>
<member name="T:DS.WMS.WebApi.Controllers.WmsInPlanController">
<summary>
预约入库

@ -1,4 +1,5 @@
using DS.Module.Core;
using DS.WMS.Core.BaseInfo.Dtos;
using DS.WMS.Core.System.Dtos;
using DS.WMS.Core.System.Entity;
using DS.WMS.Core.System.Interface;
@ -46,4 +47,16 @@ public class CodeGoodsController : ApiController
var res = _invokeService.GetGoodInfo(id);
return res;
}
/// <summary>
/// 导入商品
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
[HttpPost]
[Route("ImportInfo")]
public DataResult ImportInfo([FromBody] List<GoodsImportModel> model)
{
var res = _invokeService.ImportInfo(model);
return res;
}
}

@ -155,4 +155,17 @@ public class WmsInDoController : ApiController
var res = _invokeService.DelWmsInDoGoods(id);
return res;
}
/// <summary>
/// 导入入库确认明细
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
[HttpPost]
[Route("ImportInfo")]
public DataResult ImportInfo([FromBody] WmsInGoodsImportModel model)
{
var res = _invokeService.ImportInfo(model);
return res;
}
}

@ -26,6 +26,7 @@
<ItemGroup>
<ProjectReference Include="..\DS.Module.AutofacModule\DS.Module.AutofacModule.csproj" />
<ProjectReference Include="..\DS.Module.AutoMapper\DS.Module.AutoMapper.csproj" />
<ProjectReference Include="..\DS.Module.CaiNiaoApi\DS.Module.CaiNiaoApi.csproj" />
<ProjectReference Include="..\DS.Module.Core\DS.Module.Core.csproj" />
<ProjectReference Include="..\DS.Module.Hangfire\DS.Module.Hangfire.csproj" />
<ProjectReference Include="..\DS.Module.Jwt\DS.Module.Jwt.csproj" />

@ -9023,3 +9023,256 @@
2023-08-23 11:50:28.9483 Info Adding target ColoredConsoleTarget(Name=console)
2023-08-23 11:50:29.0974 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\sdgslk-wms-solution\gslk-wmsapi-service-server\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2023-08-23 11:50:29.1235 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2023-08-23 16:33:54.1844 Info Message Template Auto Format enabled
2023-08-23 16:33:54.2040 Info Loading assembly: NLog.Web.AspNetCore
2023-08-23 16:33:54.3831 Info Adding target FileTarget(Name=allfile)
2023-08-23 16:33:54.3831 Info Adding target FileTarget(Name=ownFile-web)
2023-08-23 16:33:54.4160 Info Adding target ColoredConsoleTarget(Name=console)
2023-08-23 16:33:54.5149 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\sdgslk-wms-solution\gslk-wmsapi-service-server\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2023-08-23 16:33:54.5349 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2023-08-23 16:35:24.9267 Info Message Template Auto Format enabled
2023-08-23 16:35:24.9522 Info Loading assembly: NLog.Web.AspNetCore
2023-08-23 16:35:25.1025 Info Adding target FileTarget(Name=allfile)
2023-08-23 16:35:25.1137 Info Adding target FileTarget(Name=ownFile-web)
2023-08-23 16:35:25.1363 Info Adding target ColoredConsoleTarget(Name=console)
2023-08-23 16:35:25.1998 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\sdgslk-wms-solution\gslk-wmsapi-service-server\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2023-08-23 16:35:25.2210 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2023-08-23 16:39:11.2549 Info Message Template Auto Format enabled
2023-08-23 16:39:11.2788 Info Loading assembly: NLog.Web.AspNetCore
2023-08-23 16:39:11.4436 Info Adding target FileTarget(Name=allfile)
2023-08-23 16:39:11.4436 Info Adding target FileTarget(Name=ownFile-web)
2023-08-23 16:39:11.4742 Info Adding target ColoredConsoleTarget(Name=console)
2023-08-23 16:39:11.5545 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\sdgslk-wms-solution\gslk-wmsapi-service-server\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2023-08-23 16:39:11.5753 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2023-08-23 16:42:36.8902 Info Message Template Auto Format enabled
2023-08-23 16:42:36.9174 Info Loading assembly: NLog.Web.AspNetCore
2023-08-23 16:42:37.1770 Info Adding target FileTarget(Name=allfile)
2023-08-23 16:42:37.1770 Info Adding target FileTarget(Name=ownFile-web)
2023-08-23 16:42:37.2490 Info Adding target ColoredConsoleTarget(Name=console)
2023-08-23 16:42:37.3949 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\sdgslk-wms-solution\gslk-wmsapi-service-server\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2023-08-23 16:42:37.4209 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2023-08-23 16:45:26.5637 Info Message Template Auto Format enabled
2023-08-23 16:45:26.5934 Info Loading assembly: NLog.Web.AspNetCore
2023-08-23 16:45:26.8332 Info Adding target FileTarget(Name=allfile)
2023-08-23 16:45:26.8332 Info Adding target FileTarget(Name=ownFile-web)
2023-08-23 16:45:26.8858 Info Adding target ColoredConsoleTarget(Name=console)
2023-08-23 16:45:27.0242 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\sdgslk-wms-solution\gslk-wmsapi-service-server\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2023-08-23 16:45:27.0519 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2023-08-23 16:46:19.5402 Info Message Template Auto Format enabled
2023-08-23 16:46:19.5567 Info Loading assembly: NLog.Web.AspNetCore
2023-08-23 16:46:19.7575 Info Adding target FileTarget(Name=allfile)
2023-08-23 16:46:19.7575 Info Adding target FileTarget(Name=ownFile-web)
2023-08-23 16:46:19.8229 Info Adding target ColoredConsoleTarget(Name=console)
2023-08-23 16:46:19.9649 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\sdgslk-wms-solution\gslk-wmsapi-service-server\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2023-08-23 16:46:20.0097 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2023-08-23 17:44:38.1254 Info Message Template Auto Format enabled
2023-08-23 17:44:38.1570 Info Loading assembly: NLog.Web.AspNetCore
2023-08-23 17:44:38.3356 Info Adding target FileTarget(Name=allfile)
2023-08-23 17:44:38.3506 Info Adding target FileTarget(Name=ownFile-web)
2023-08-23 17:44:38.3842 Info Adding target ColoredConsoleTarget(Name=console)
2023-08-23 17:44:38.5031 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\sdgslk-wms-solution\gslk-wmsapi-service-server\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2023-08-23 17:44:38.5323 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2023-09-01 10:53:38.2617 Info Message Template Auto Format enabled
2023-09-01 10:53:38.2970 Info Loading assembly: NLog.Web.AspNetCore
2023-09-01 10:53:38.4780 Info Adding target FileTarget(Name=allfile)
2023-09-01 10:53:38.4893 Info Adding target FileTarget(Name=ownFile-web)
2023-09-01 10:53:38.5198 Info Adding target ColoredConsoleTarget(Name=console)
2023-09-01 10:53:38.5994 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\sdgslk-wms-solution\gslk-wmsapi-service-server\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2023-09-01 10:53:38.6270 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2023-09-01 10:57:34.0204 Info Shutdown() called. Logger closing...
2023-09-01 10:57:34.0204 Info Closing old configuration.
2023-09-01 10:57:34.0579 Info Logger has been closed down.
2023-09-01 10:58:04.5780 Info Message Template Auto Format enabled
2023-09-01 10:58:04.6026 Info Loading assembly: NLog.Web.AspNetCore
2023-09-01 10:58:04.7199 Info Adding target FileTarget(Name=allfile)
2023-09-01 10:58:04.7199 Info Adding target FileTarget(Name=ownFile-web)
2023-09-01 10:58:04.7432 Info Adding target ColoredConsoleTarget(Name=console)
2023-09-01 10:58:04.7991 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\sdgslk-wms-solution\gslk-wmsapi-service-server\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2023-09-01 10:58:04.8191 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2023-09-01 13:45:40.4548 Info Shutdown() called. Logger closing...
2023-09-01 13:45:40.4548 Info Closing old configuration.
2023-09-01 13:45:40.4828 Info Logger has been closed down.
2023-09-01 13:46:49.2813 Info Message Template Auto Format enabled
2023-09-01 13:46:49.2947 Info Loading assembly: NLog.Web.AspNetCore
2023-09-01 13:46:49.3848 Info Adding target FileTarget(Name=allfile)
2023-09-01 13:46:49.3848 Info Adding target FileTarget(Name=ownFile-web)
2023-09-01 13:46:49.4060 Info Adding target ColoredConsoleTarget(Name=console)
2023-09-01 13:46:49.4701 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\sdgslk-wms-solution\gslk-wmsapi-service-server\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2023-09-01 13:46:49.4892 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2023-09-01 13:47:44.1667 Info Shutdown() called. Logger closing...
2023-09-01 13:47:44.1667 Info Closing old configuration.
2023-09-01 13:47:44.1867 Info Logger has been closed down.
2023-09-01 13:48:10.1347 Info Message Template Auto Format enabled
2023-09-01 13:48:10.1512 Info Loading assembly: NLog.Web.AspNetCore
2023-09-01 13:48:10.2606 Info Adding target FileTarget(Name=allfile)
2023-09-01 13:48:10.2606 Info Adding target FileTarget(Name=ownFile-web)
2023-09-01 13:48:10.2798 Info Adding target ColoredConsoleTarget(Name=console)
2023-09-01 13:48:10.3377 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\sdgslk-wms-solution\gslk-wmsapi-service-server\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2023-09-01 13:48:10.3543 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2023-09-01 14:38:16.3953 Info Shutdown() called. Logger closing...
2023-09-01 14:38:16.3953 Info Closing old configuration.
2023-09-01 14:38:16.4304 Info Logger has been closed down.
2023-09-01 14:39:12.7385 Info Message Template Auto Format enabled
2023-09-01 14:39:12.7506 Info Loading assembly: NLog.Web.AspNetCore
2023-09-01 14:39:12.8398 Info Adding target FileTarget(Name=allfile)
2023-09-01 14:39:12.8398 Info Adding target FileTarget(Name=ownFile-web)
2023-09-01 14:39:12.8636 Info Adding target ColoredConsoleTarget(Name=console)
2023-09-01 14:39:12.9277 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\sdgslk-wms-solution\gslk-wmsapi-service-server\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2023-09-01 14:39:12.9461 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2023-09-01 15:01:48.4283 Info Shutdown() called. Logger closing...
2023-09-01 15:01:48.4283 Info Closing old configuration.
2023-09-01 15:01:48.4615 Info Logger has been closed down.
2023-09-01 15:02:24.7099 Info Message Template Auto Format enabled
2023-09-01 15:02:24.7228 Info Loading assembly: NLog.Web.AspNetCore
2023-09-01 15:02:24.8021 Info Adding target FileTarget(Name=allfile)
2023-09-01 15:02:24.8089 Info Adding target FileTarget(Name=ownFile-web)
2023-09-01 15:02:24.8235 Info Adding target ColoredConsoleTarget(Name=console)
2023-09-01 15:02:24.8630 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\sdgslk-wms-solution\gslk-wmsapi-service-server\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2023-09-01 15:02:24.8729 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2023-09-01 16:38:06.4725 Info Shutdown() called. Logger closing...
2023-09-01 16:38:06.4725 Info Closing old configuration.
2023-09-01 16:38:06.5039 Info Logger has been closed down.
2023-09-01 16:38:43.4608 Info Message Template Auto Format enabled
2023-09-01 16:38:43.4726 Info Loading assembly: NLog.Web.AspNetCore
2023-09-01 16:38:43.5483 Info Adding target FileTarget(Name=allfile)
2023-09-01 16:38:43.5483 Info Adding target FileTarget(Name=ownFile-web)
2023-09-01 16:38:43.5682 Info Adding target ColoredConsoleTarget(Name=console)
2023-09-01 16:38:43.6050 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\sdgslk-wms-solution\gslk-wmsapi-service-server\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2023-09-01 16:38:43.6050 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2023-09-01 16:43:08.5843 Info Shutdown() called. Logger closing...
2023-09-01 16:43:08.5843 Info Closing old configuration.
2023-09-01 16:43:08.6100 Info Logger has been closed down.
2023-09-01 16:43:17.6465 Info Message Template Auto Format enabled
2023-09-01 16:43:17.6671 Info Loading assembly: NLog.Web.AspNetCore
2023-09-01 16:43:17.7672 Info Adding target FileTarget(Name=allfile)
2023-09-01 16:43:17.7761 Info Adding target FileTarget(Name=ownFile-web)
2023-09-01 16:43:17.7932 Info Adding target ColoredConsoleTarget(Name=console)
2023-09-01 16:43:17.8405 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\sdgslk-wms-solution\gslk-wmsapi-service-server\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2023-09-01 16:43:17.8405 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2023-09-01 16:51:28.1486 Info Shutdown() called. Logger closing...
2023-09-01 16:51:28.1486 Info Closing old configuration.
2023-09-01 16:51:28.1805 Info Logger has been closed down.
2023-09-01 16:51:46.2444 Info Message Template Auto Format enabled
2023-09-01 16:51:46.2751 Info Loading assembly: NLog.Web.AspNetCore
2023-09-01 16:51:46.4051 Info Adding target FileTarget(Name=allfile)
2023-09-01 16:51:46.4169 Info Adding target FileTarget(Name=ownFile-web)
2023-09-01 16:51:46.4405 Info Adding target ColoredConsoleTarget(Name=console)
2023-09-01 16:51:46.4932 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\sdgslk-wms-solution\gslk-wmsapi-service-server\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2023-09-01 16:51:46.5100 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2023-09-01 16:54:43.6809 Info Message Template Auto Format enabled
2023-09-01 16:54:43.6981 Info Loading assembly: NLog.Web.AspNetCore
2023-09-01 16:54:43.8083 Info Adding target FileTarget(Name=allfile)
2023-09-01 16:54:43.8083 Info Adding target FileTarget(Name=ownFile-web)
2023-09-01 16:54:43.8374 Info Adding target ColoredConsoleTarget(Name=console)
2023-09-01 16:54:43.9276 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\sdgslk-wms-solution\gslk-wmsapi-service-server\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2023-09-01 16:54:43.9460 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2023-09-01 16:56:48.6579 Info Shutdown() called. Logger closing...
2023-09-01 16:56:48.6579 Info Closing old configuration.
2023-09-01 16:56:48.6922 Info Logger has been closed down.
2023-09-01 16:57:17.7238 Info Message Template Auto Format enabled
2023-09-01 16:57:17.7395 Info Loading assembly: NLog.Web.AspNetCore
2023-09-01 16:57:17.8409 Info Adding target FileTarget(Name=allfile)
2023-09-01 16:57:17.8409 Info Adding target FileTarget(Name=ownFile-web)
2023-09-01 16:57:17.8593 Info Adding target ColoredConsoleTarget(Name=console)
2023-09-01 16:57:17.8974 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\sdgslk-wms-solution\gslk-wmsapi-service-server\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2023-09-01 16:57:17.9063 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2023-09-01 18:02:20.3968 Info Shutdown() called. Logger closing...
2023-09-01 18:02:20.3968 Info Closing old configuration.
2023-09-01 18:02:20.4290 Info Logger has been closed down.
2023-09-04 09:39:41.1354 Info Message Template Auto Format enabled
2023-09-04 09:39:41.1695 Info Loading assembly: NLog.Web.AspNetCore
2023-09-04 09:39:41.4102 Info Adding target FileTarget(Name=allfile)
2023-09-04 09:39:41.4269 Info Adding target FileTarget(Name=ownFile-web)
2023-09-04 09:39:41.4594 Info Adding target ColoredConsoleTarget(Name=console)
2023-09-04 09:39:41.5289 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\sdgslk-wms-solution\gslk-wmsapi-service-server\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2023-09-04 09:39:41.5442 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2023-09-04 18:04:21.2861 Info Shutdown() called. Logger closing...
2023-09-04 18:04:21.2861 Info Closing old configuration.
2023-09-04 18:04:21.3417 Info Logger has been closed down.
2023-09-05 09:22:34.7441 Info Message Template Auto Format enabled
2023-09-05 09:22:34.7898 Info Loading assembly: NLog.Web.AspNetCore
2023-09-05 09:22:35.0816 Info Adding target FileTarget(Name=allfile)
2023-09-05 09:22:35.0816 Info Adding target FileTarget(Name=ownFile-web)
2023-09-05 09:22:35.1329 Info Adding target ColoredConsoleTarget(Name=console)
2023-09-05 09:22:35.2997 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\sdgslk-wms-solution\gslk-wmsapi-service-server\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2023-09-05 09:22:35.3320 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2023-09-05 14:12:36.3693 Info Shutdown() called. Logger closing...
2023-09-05 14:12:36.3693 Info Closing old configuration.
2023-09-05 14:12:36.4676 Info Logger has been closed down.
2023-09-05 14:13:29.0019 Info Message Template Auto Format enabled
2023-09-05 14:13:29.0706 Info Loading assembly: NLog.Web.AspNetCore
2023-09-05 14:13:29.3697 Info Adding target FileTarget(Name=allfile)
2023-09-05 14:13:29.3794 Info Adding target FileTarget(Name=ownFile-web)
2023-09-05 14:13:29.4306 Info Adding target ColoredConsoleTarget(Name=console)
2023-09-05 14:13:29.5389 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\sdgslk-wms-solution\gslk-wmsapi-service-server\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2023-09-05 14:13:29.5866 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2023-09-06 08:54:18.9762 Info Message Template Auto Format enabled
2023-09-06 08:54:19.0071 Info Loading assembly: NLog.Web.AspNetCore
2023-09-06 08:54:19.2240 Info Adding target FileTarget(Name=allfile)
2023-09-06 08:54:19.2240 Info Adding target FileTarget(Name=ownFile-web)
2023-09-06 08:54:19.2656 Info Adding target ColoredConsoleTarget(Name=console)
2023-09-06 08:54:19.3628 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\sdgslk-wms-solution\gslk-wmsapi-service-server\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2023-09-06 08:54:19.3858 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2023-09-06 09:43:13.2052 Info Shutdown() called. Logger closing...
2023-09-06 09:43:13.2052 Info Closing old configuration.
2023-09-06 09:43:13.2502 Info Logger has been closed down.
2023-09-06 09:43:56.5498 Info Message Template Auto Format enabled
2023-09-06 09:43:56.5498 Info Loading assembly: NLog.Web.AspNetCore
2023-09-06 09:43:56.6310 Info Adding target FileTarget(Name=allfile)
2023-09-06 09:43:56.6310 Info Adding target FileTarget(Name=ownFile-web)
2023-09-06 09:43:56.6500 Info Adding target ColoredConsoleTarget(Name=console)
2023-09-06 09:43:56.6842 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\sdgslk-wms-solution\gslk-wmsapi-service-server\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2023-09-06 09:43:56.6922 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2023-09-06 10:04:05.7185 Info Shutdown() called. Logger closing...
2023-09-06 10:04:05.7194 Info Closing old configuration.
2023-09-06 10:04:05.7449 Info Logger has been closed down.
2023-09-06 10:04:31.2363 Info Message Template Auto Format enabled
2023-09-06 10:04:31.2525 Info Loading assembly: NLog.Web.AspNetCore
2023-09-06 10:04:31.3453 Info Adding target FileTarget(Name=allfile)
2023-09-06 10:04:31.3453 Info Adding target FileTarget(Name=ownFile-web)
2023-09-06 10:04:31.3699 Info Adding target ColoredConsoleTarget(Name=console)
2023-09-06 10:04:31.4121 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\sdgslk-wms-solution\gslk-wmsapi-service-server\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2023-09-06 10:04:31.4121 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2023-09-06 10:06:15.7532 Info Shutdown() called. Logger closing...
2023-09-06 10:06:15.7532 Info Closing old configuration.
2023-09-06 10:06:15.8051 Info Logger has been closed down.
2023-09-06 10:06:46.8390 Info Message Template Auto Format enabled
2023-09-06 10:06:46.8577 Info Loading assembly: NLog.Web.AspNetCore
2023-09-06 10:06:46.9694 Info Adding target FileTarget(Name=allfile)
2023-09-06 10:06:46.9694 Info Adding target FileTarget(Name=ownFile-web)
2023-09-06 10:06:46.9947 Info Adding target ColoredConsoleTarget(Name=console)
2023-09-06 10:06:47.0521 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\sdgslk-wms-solution\gslk-wmsapi-service-server\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2023-09-06 10:06:47.0634 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2023-09-06 15:28:21.7277 Info Shutdown() called. Logger closing...
2023-09-06 15:28:21.7277 Info Closing old configuration.
2023-09-06 15:28:21.7849 Info Logger has been closed down.
2023-09-06 15:29:06.3094 Info Message Template Auto Format enabled
2023-09-06 15:29:06.3288 Info Loading assembly: NLog.Web.AspNetCore
2023-09-06 15:29:06.4730 Info Adding target FileTarget(Name=allfile)
2023-09-06 15:29:06.4730 Info Adding target FileTarget(Name=ownFile-web)
2023-09-06 15:29:06.5062 Info Adding target ColoredConsoleTarget(Name=console)
2023-09-06 15:29:06.5673 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\sdgslk-wms-solution\gslk-wmsapi-service-server\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2023-09-06 15:29:06.5829 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2023-09-06 15:49:04.5221 Info Shutdown() called. Logger closing...
2023-09-06 15:49:04.5221 Info Closing old configuration.
2023-09-06 15:49:04.5944 Info Logger has been closed down.
2023-09-06 15:49:52.5202 Info Message Template Auto Format enabled
2023-09-06 15:49:52.5326 Info Loading assembly: NLog.Web.AspNetCore
2023-09-06 15:49:52.6428 Info Adding target FileTarget(Name=allfile)
2023-09-06 15:49:52.6428 Info Adding target FileTarget(Name=ownFile-web)
2023-09-06 15:49:52.6747 Info Adding target ColoredConsoleTarget(Name=console)
2023-09-06 15:49:52.7277 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\sdgslk-wms-solution\gslk-wmsapi-service-server\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2023-09-06 15:49:52.7385 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2023-09-06 16:39:38.7051 Info Shutdown() called. Logger closing...
2023-09-06 16:39:38.7051 Info Closing old configuration.
2023-09-06 16:39:38.7419 Info Logger has been closed down.
2023-09-06 16:40:27.5404 Info Message Template Auto Format enabled
2023-09-06 16:40:27.5616 Info Loading assembly: NLog.Web.AspNetCore
2023-09-06 16:40:27.6625 Info Adding target FileTarget(Name=allfile)
2023-09-06 16:40:27.6625 Info Adding target FileTarget(Name=ownFile-web)
2023-09-06 16:40:27.6813 Info Adding target ColoredConsoleTarget(Name=console)
2023-09-06 16:40:27.7210 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\sdgslk-wms-solution\gslk-wmsapi-service-server\DS.WMS.WebApi\bin\Debug\net6.0\nlog.config
2023-09-06 16:40:27.7210 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2023-09-06 18:01:41.1724 Info Shutdown() called. Logger closing...
2023-09-06 18:01:41.1799 Info Closing old configuration.
2023-09-06 18:01:41.3117 Info Logger has been closed down.

@ -2,6 +2,7 @@ using System.Net;
using Autofac;
using Autofac.Extensions.DependencyInjection;
using DS.Module.AutofacModule;
using DS.Module.CaiNiaoApi;
using DS.Module.Core;
using DS.Module.Core.Extensions;
using DS.Module.Core.ServiceExtensions;
@ -41,8 +42,9 @@ builder.Services.AddSmsModuleInstall();//短信服务
builder.Services.AddHKModuleInstall();//海康服务
builder.Services.AddJwtInstall();
builder.Services.AddHangfireInstall();//Hangfire
// builder.Services.AddHangfireInstall();//Hangfire
builder.Services.AddModbusInstall();//Modbus服务
builder.Services.AddCaiNiaoModuleInstall();//菜鸟服务
// 3、配置中间件
var app = builder.Build();
// if (app.Environment.IsDevelopment())
@ -72,24 +74,24 @@ if (!policyName.IsNullOrEmpty())
{
app.UseCors(policyName); //添加跨域中间件
}
app.UseHangfireServer();
app.UseHangfireDashboard("/hangfire", new DashboardOptions
{
Authorization = new[] {new BasicAuthAuthorizationFilter(new BasicAuthAuthorizationFilterOptions
{
RequireSsl = false,
SslRedirect = false,
LoginCaseSensitive = true,
Users = new []
{
new BasicAuthAuthorizationUser
{
Login = "admin",
PasswordClear = "admin"
}
}
})}
});
// app.UseHangfireServer();
// app.UseHangfireDashboard("/hangfire", new DashboardOptions
// {
// Authorization = new[] {new BasicAuthAuthorizationFilter(new BasicAuthAuthorizationFilterOptions
// {
// RequireSsl = false,
// SslRedirect = false,
// LoginCaseSensitive = true,
// Users = new []
// {
// new BasicAuthAuthorizationUser
// {
// Login = "admin",
// PasswordClear = "admin"
// }
// }
// })}
// });
app.UseRouting();
app.UseStaticFiles();
@ -113,6 +115,6 @@ app.UseAuthorization();
app.UseEndpoints(endpoints => { endpoints.MapControllers(); });
// SendModbusMessage */5 * * * * ?
// RecurringJob.AddOrUpdate<ISendModbusMessageService>((a) => a.SendModbusMessage(), "0 0/1 * * * ? ", TimeZoneInfo.Local);
RecurringJob.AddOrUpdate<ISendModbusMessageService>((a) => a.SendModbusMessage(), "*/10 * * * * ?", TimeZoneInfo.Local);
// RecurringJob.AddOrUpdate<ISendModbusMessageService>((a) => a.SendModbusMessage(), "*/10 * * * * ?", TimeZoneInfo.Local);
// BackgroundJob.Enqueue<ISendModbusMessageService>(c => c.SendModbusMessage());
app.Run();

@ -43,6 +43,13 @@
"LineDetectionSMSCode": "SMS_461085312",
"FireAlarmSMSCode": "SMS_460930389"
},
"CaiNaioApi": {
"AccessKeyId": "LTAI5tLZNXraReaC4eYrnxAp",
"AccessKeySecret": "swzxbbAXnUML6MYKe8GF44XmwIWszB",
"ThermometrySMSCode": "SMS_274925386",
"LineDetectionSMSCode": "SMS_461085312",
"ApiUrl": "http://shandonggaosu.dwork-park.top"
},
"HKOpenApi": {
"IP": "60.208.35.37",
"Port": "1443",

@ -49,6 +49,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DS.Module.Hangfire", "DS.Mo
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DS.Module.Modbus", "DS.Module.Modbus\DS.Module.Modbus.csproj", "{6266A237-F386-47DF-B97F-D10BB5AB715B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DS.Module.CaiNiaoApi", "DS.Module.CaiNiaoApi\DS.Module.CaiNiaoApi.csproj", "{94126856-4B6B-4F6E-977B-AAF4CA9987A7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -135,6 +137,10 @@ Global
{6266A237-F386-47DF-B97F-D10BB5AB715B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6266A237-F386-47DF-B97F-D10BB5AB715B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6266A237-F386-47DF-B97F-D10BB5AB715B}.Release|Any CPU.Build.0 = Release|Any CPU
{94126856-4B6B-4F6E-977B-AAF4CA9987A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{94126856-4B6B-4F6E-977B-AAF4CA9987A7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{94126856-4B6B-4F6E-977B-AAF4CA9987A7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{94126856-4B6B-4F6E-977B-AAF4CA9987A7}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -160,6 +166,7 @@ Global
{572AC9CA-AD47-4241-AAA5-D8EC25E178F9} = {BCA4E87C-1273-4FE0-8AA1-9D9BB1010E2E}
{48FC3489-CD79-47F1-8757-591664FD10B8} = {BCA4E87C-1273-4FE0-8AA1-9D9BB1010E2E}
{6266A237-F386-47DF-B97F-D10BB5AB715B} = {BCA4E87C-1273-4FE0-8AA1-9D9BB1010E2E}
{94126856-4B6B-4F6E-977B-AAF4CA9987A7} = {BCA4E87C-1273-4FE0-8AA1-9D9BB1010E2E}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {4EFC7D20-4951-458F-8871-EB25CF8FD75D}

Loading…
Cancel
Save