Commit 73e44909 by zxw

解决冲突

parents f4fbd11d 05ce1804
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto
###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp
###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary
###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary
###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain
......@@ -8,6 +8,7 @@
<Compile Remove="Model\DataContext\DbContextExtensions.cs" />
<Compile Remove="Model\DataContext\IJunmppolicesqlContextProcedures.cs" />
<Compile Remove="Model\DataContext\JunmppolicesqlContextProcedures.cs" />
<Compile Remove="Model\UseCountResult.cs" />
</ItemGroup>
<ItemGroup>
......
using JmpModel.Model;
using JmpModel.Model.DataContext;
using JmpModel.TempModel;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata.Internal;
......
// <auto-generated> This file has been auto generated by EF Core Power Tools. </auto-generated>
using System;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;
namespace JmpModel.Model
namespace JmpModel.TempModel
{
[Table("useCount")]
public partial class useCountResult
{
[Column("result")]
......
......@@ -435,7 +435,7 @@
"ObjectType": 3
}
],
"UiHint": "pc.junmppolicesqldev.dbo",
"UiHint": "PC.junmppolicesqldev",
"UseBoolPropertiesWithoutDefaultSql": false,
"UseDatabaseNames": false,
"UseDbContextSplitting": false,
......
......@@ -19,6 +19,7 @@ using System.Net.Http;
using System.Net.WebSockets;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore.Internal;
using JmpModel.TempModel;
namespace JunmpPoliceStation.Controllers
{
......@@ -636,12 +637,14 @@ namespace JunmpPoliceStation.Controllers
if (findcode.Length == 6)
{
var data = equipmentList.GroupBy(t => t.OrgName).Select(c => new
var data = equipmentList.GroupBy(t => t.OrgCode).Select(c => new
{
c.FirstOrDefault().OrgName,
OrgName = c.OrderBy(f => f.OrgCode).FirstOrDefault().OrgName,
NameJc = c.OrderBy(f => f.OrgCode).FirstOrDefault().NameJc,
c.FirstOrDefault().FindCode,
c.FirstOrDefault().OrgCode,
zsCount = c.Count(f => f.CurrentState != null),
c.FirstOrDefault().SortCode,
zsCount = c.Count(f => f.CurrentState != null && f.InventoryState != "loss"),
zkCount = c.Where(f => f.CurrentState.Equals(0) || f.CurrentState.Equals(3)).Count(),
ckCount = c.Where(f => !(f.CurrentState == null || f.CurrentState.Equals(0) || f.CurrentState.Equals(3) || f.CurrentState.Equals(6))).Count(),
bfCount = c.Where(f => f.CurrentState.Equals(6)).Count(),
......@@ -650,7 +653,7 @@ namespace JunmpPoliceStation.Controllers
{
id = c.FirstOrDefault().EquipmentCode,
name = c.FirstOrDefault().EquipmentName,
zsCount = c.Count(f => f.CurrentState != null),
zsCount = c.Count(f => f.CurrentState != null && f.InventoryState != "loss"),
zkCount = c.Where(f => f.CurrentState.Equals(0) || f.CurrentState.Equals(3)).Count(),
ckCount = c.Where(f => !(f.CurrentState == null || f.CurrentState.Equals(0) || f.CurrentState.Equals(3) || f.CurrentState.Equals(6))).Count(),
bfCount = c.Where(f => f.CurrentState.Equals(6)).Count(),
......@@ -659,7 +662,7 @@ namespace JunmpPoliceStation.Controllers
}).ToList();
data = data.Where(c => c.zsCount != 0)
.OrderBy(c => c.FindCode.Length)
.OrderBy(c => c.SortCode.Length)
.ThenBy(c => c.FindCode)
.ThenBy(c => c.OrgCode)
.ToList();
......@@ -679,12 +682,15 @@ namespace JunmpPoliceStation.Controllers
else
{
var codeLen = findcode.Length + 2;
var data = equipmentList.GroupBy(t => t.FindCode.PadLeft(codeLen, '0').Substring(0, codeLen)).Select(c => new
//var data = equipmentList.GroupBy(t => t.FindCode.PadLeft(codeLen, '0').Substring(0, codeLen)).Select(c => new
var data = equipmentList.GroupBy(t => t.OrgCode).Select(c => new
{
OrgName = c.OrderBy(f => f.OrgCode).FirstOrDefault().AreaName,
OrgName = c.OrderBy(f => f.OrgCode).FirstOrDefault().OrgName,
NameJc = c.OrderBy(f => f.OrgCode).FirstOrDefault().NameJc,
c.OrderBy(f => f.OrgCode).FirstOrDefault().FindCode,
c.OrderBy(f => f.OrgCode).FirstOrDefault().OrgCode,
zsCount = c.Count(f => f.CurrentState != null),
c.FirstOrDefault().SortCode,
zsCount = c.Count(f => f.CurrentState != null && f.InventoryState != "loss"),
zkCount = c.Where(f => f.CurrentState.Equals(0) || f.CurrentState.Equals(3)).Count(),
ckCount = c.Where(f => !(f.CurrentState == null || f.CurrentState.Equals(0) || f.CurrentState.Equals(3) || f.CurrentState.Equals(6))).Count(),
bfCount = c.Where(f => f.CurrentState.Equals(6)).Count(),
......@@ -693,7 +699,7 @@ namespace JunmpPoliceStation.Controllers
{
id = c.FirstOrDefault().EquipmentCode,
name = c.FirstOrDefault().EquipmentName,
zsCount = c.Count(f => f.CurrentState != null),
zsCount = c.Count(f => f.CurrentState != null && f.InventoryState != "loss"),
zkCount = c.Where(f => f.CurrentState.Equals(0) || f.CurrentState.Equals(3)).Count(),
ckCount = c.Where(f => !(f.CurrentState == null || f.CurrentState.Equals(0) || f.CurrentState.Equals(3) || f.CurrentState.Equals(6))).Count(),
bfCount = c.Where(f => f.CurrentState.Equals(6)).Count(),
......@@ -702,7 +708,7 @@ namespace JunmpPoliceStation.Controllers
}).ToList();
data = data.Where(c => c.zsCount != 0)
.OrderBy(c => c.FindCode.Length)
.OrderBy(c => c.SortCode.Length)
.ThenBy(c => c.FindCode)
.ThenBy(c => c.OrgCode)
.ToList();
......
......@@ -119,7 +119,7 @@
<ProjectReference Include="..\JmpMsgService\JmpMsgService.csproj" />
</ItemGroup>
<ProjectExtensions><VisualStudio><UserProperties appsettings_1json__JsonSchema="" properties_4launchsettings_1json__JsonSchema="" /></VisualStudio></ProjectExtensions>
<ProjectExtensions><VisualStudio><UserProperties properties_4launchsettings_1json__JsonSchema="" /></VisualStudio></ProjectExtensions>
</Project>
{
"iisSettings": {
"windowsAuthentication": false,
"windowsAuthentication": true,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:53692/",
"sslPort": 44399
"applicationUrl": "http://localhost:5000",
"sslPort": 5000
}
},
"$schema": "http://json.schemastore.org/launchsettings.json",
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "swagger/index.html",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"applicationUrl": "http://192.168.3.1:5000;http://192.168.10.88:5000;http://localhost:5001;http://localhost:5000;"
},
"JunmpPoliceStation": {
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "swagger/index.html",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "http://192.168.3.74:5000;http://localhost:5000"
"applicationUrl": "http://192.168.3.1:5000;http://192.168.10.88:5000;http://localhost:5001;http://localhost:5000;http://0.0.0.0:5001;"
},
"Docker": {
"commandName": "Docker",
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}",
"publishAllPorts": true,
"useSSL": true
}
}
}
\ No newline at end of file
{
"Logging": {
"LogLevel": {
"Default": "Debug",
"System": "Information",
"Microsoft": "Information"
}
}
}
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论