Commit a8f42e6a by zxw

Merge branch 'hotFix' of http://gitlab.sothing.top/zxw/JunmpPoliceStation into hotFix

parents 88d3a752 004884f2
...@@ -3540,6 +3540,8 @@ Warehouse:仓库"); ...@@ -3540,6 +3540,8 @@ Warehouse:仓库");
entity.Property(e => e.EquipmentCode).IsUnicode(false); entity.Property(e => e.EquipmentCode).IsUnicode(false);
entity.Property(e => e.EquipmentCode1).IsUnicode(false);
entity.Property(e => e.EquipmentName).IsUnicode(false); entity.Property(e => e.EquipmentName).IsUnicode(false);
entity.Property(e => e.EquipmentSizecode).IsUnicode(false); entity.Property(e => e.EquipmentSizecode).IsUnicode(false);
......
...@@ -47,6 +47,9 @@ namespace JmpModel.Model ...@@ -47,6 +47,9 @@ namespace JmpModel.Model
[Column("equipment_name")] [Column("equipment_name")]
[StringLength(64)] [StringLength(64)]
public string EquipmentName { get; set; } public string EquipmentName { get; set; }
[Column("equipmentCode")]
[StringLength(36)]
public string EquipmentCode1 { get; set; }
[Column("equipment_sizecode")] [Column("equipment_sizecode")]
[StringLength(36)] [StringLength(36)]
public string EquipmentSizecode { get; set; } public string EquipmentSizecode { get; set; }
......
...@@ -435,7 +435,7 @@ ...@@ -435,7 +435,7 @@
"ObjectType": 3 "ObjectType": 3
} }
], ],
"UiHint": "pc.junmppolicesqldev.dbo", "UiHint": "PC.junmppolicesqldev",
"UseBoolPropertiesWithoutDefaultSql": false, "UseBoolPropertiesWithoutDefaultSql": false,
"UseDatabaseNames": false, "UseDatabaseNames": false,
"UseDbContextSplitting": false, "UseDbContextSplitting": false,
......
...@@ -9191,7 +9191,6 @@ namespace JunmpPoliceStation.Controllers ...@@ -9191,7 +9191,6 @@ namespace JunmpPoliceStation.Controllers
"EquipmentSizecodeNavigation.Detail" , "EquipmentSizecodeNavigation.Detail" ,
"EquipmentCodeNavigation" , "EquipmentCodeNavigation" ,
"WarehouseCodeNavigation" , "WarehouseCodeNavigation" ,
"WarehouseCodeNavigation.Orgization",
"CommonJpEquipmentStates", "CommonJpEquipmentStates",
"SupplierCodeNavigation", "SupplierCodeNavigation",
"Cabinet", "Cabinet",
...@@ -9345,10 +9344,7 @@ namespace JunmpPoliceStation.Controllers ...@@ -9345,10 +9344,7 @@ namespace JunmpPoliceStation.Controllers
} }
var EquipmentList = _unitOfWork.EquipmentInventoryRepository.GetList(expression, c => c.CreateTime, false, param) var EquipmentList = _unitOfWork.EquipmentInventoryRepository.GetList(expression, c => c.CreateTime, false, param)
.OrderBy(x => x.EquipmentCode) .OrderBy(x=>x.EquipmentCodeNavigation.Code)
.ThenBy(x => x.EquipmentSizecode)
.ThenBy(x => x.WarehouseCodeNavigation.Orgization.Code)
.ThenBy(x => x.WarehouseCode)
.ToList(); .ToList();
var datas = EquipmentList.Select(equipment => new var datas = EquipmentList.Select(equipment => new
......
...@@ -642,16 +642,16 @@ namespace JunmpPoliceStation.Controllers ...@@ -642,16 +642,16 @@ namespace JunmpPoliceStation.Controllers
c.FirstOrDefault().OrgName, c.FirstOrDefault().OrgName,
c.FirstOrDefault().FindCode, c.FirstOrDefault().FindCode,
c.FirstOrDefault().OrgCode, c.FirstOrDefault().OrgCode,
zsCount = c.Count(f => f.CurrentState != null), zsCount = c.Count(f => f.CurrentState != 6&&f.CurrentState!=null),
zkCount = c.Where(f => f.CurrentState.Equals(0) || f.CurrentState.Equals(3)).Count(), 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(), 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(), bfCount = c.Where(f => f.CurrentState.Equals(6)).Count(),
priceCount = c.Where(f => !f.CurrentState.Equals(6) && f.Price != null).Sum(k => k.Price), priceCount = c.Where(f => !f.CurrentState.Equals(6) && f.Price != null).Sum(k => k.Price),
children = c.OrderBy(z => z.TypeOneId).GroupBy(a => a.EquipmentCode).Select(c => new children = c.OrderBy(z => z.TypeOneId).ThenBy(z => z.TypeTwoId).ThenBy(z => z.TypeThreeId).GroupBy(a => a.EquipmentCode).Select(c => new
{ {
id = c.FirstOrDefault().EquipmentCode, id = c.FirstOrDefault().EquipmentCode,
name = c.FirstOrDefault().EquipmentName, name = c.FirstOrDefault().EquipmentName,
zsCount = c.Count(f => f.CurrentState != null), zsCount = c.Count(f => f.CurrentState != 6 && f.CurrentState != null),
zkCount = c.Where(f => f.CurrentState.Equals(0) || f.CurrentState.Equals(3)).Count(), 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(), 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(), bfCount = c.Where(f => f.CurrentState.Equals(6)).Count(),
...@@ -685,16 +685,16 @@ namespace JunmpPoliceStation.Controllers ...@@ -685,16 +685,16 @@ namespace JunmpPoliceStation.Controllers
OrgName = c.OrderBy(f => f.OrgCode).FirstOrDefault().AreaName, OrgName = c.OrderBy(f => f.OrgCode).FirstOrDefault().AreaName,
c.OrderBy(f => f.OrgCode).FirstOrDefault().FindCode, c.OrderBy(f => f.OrgCode).FirstOrDefault().FindCode,
c.OrderBy(f => f.OrgCode).FirstOrDefault().OrgCode, c.OrderBy(f => f.OrgCode).FirstOrDefault().OrgCode,
zsCount = c.Count(f => f.CurrentState != null), zsCount = c.Count(f => f.CurrentState != 6 && f.CurrentState != null),
zkCount = c.Where(f => f.CurrentState.Equals(0) || f.CurrentState.Equals(3)).Count(), 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(), 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(), bfCount = c.Where(f => f.CurrentState.Equals(6)).Count(),
priceCount = c.Where(f => !f.CurrentState.Equals(6) && f.Price != null).Sum(k => k.Price), priceCount = c.Where(f => !f.CurrentState.Equals(6) && f.Price != null).Sum(k => k.Price),
children = c.OrderBy(z => z.TypeOneId).GroupBy(a => a.EquipmentCode).Select(c => new children = c.OrderBy(z => z.TypeOneId).ThenBy(z => z.TypeTwoId).ThenBy(z => z.TypeThreeId).GroupBy(a => a.EquipmentCode).Select(c => new
{ {
id = c.FirstOrDefault().EquipmentCode, id = c.FirstOrDefault().EquipmentCode,
name = c.FirstOrDefault().EquipmentName, name = c.FirstOrDefault().EquipmentName,
zsCount = c.Count(f => f.CurrentState != null), zsCount = c.Count(f => f.CurrentState != 6 && f.CurrentState != null),
zkCount = c.Where(f => f.CurrentState.Equals(0) || f.CurrentState.Equals(3)).Count(), 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(), 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(), bfCount = c.Where(f => f.CurrentState.Equals(6)).Count(),
...@@ -784,12 +784,13 @@ namespace JunmpPoliceStation.Controllers ...@@ -784,12 +784,13 @@ namespace JunmpPoliceStation.Controllers
OrgId = entity.orgId; OrgId = entity.orgId;
} }
var param = new string[] { var param = new string[] {
"EquipmentCodeNavigation" , "EquipmentCodeNavigation",
"Org" , "Org" ,
"Org.BaseJpCabinetOutinlogs" , "Org.BaseJpCabinetOutinlogs" ,
"CommonJpEquipmentStates" "CommonJpEquipmentStates",
};
};
var Infoparam = new string[] { };
Expression<Func<CommonJpEquipmentInventory, bool>> expression = t => OrgId == t.OrgId && (!t.InventoryState.Equals("loss")); Expression<Func<CommonJpEquipmentInventory, bool>> expression = t => OrgId == t.OrgId && (!t.InventoryState.Equals("loss"));
...@@ -799,17 +800,31 @@ namespace JunmpPoliceStation.Controllers ...@@ -799,17 +800,31 @@ namespace JunmpPoliceStation.Controllers
string equipmentCode = entity.equipmentCode; string equipmentCode = entity.equipmentCode;
expression = LambdaExtensions.AndAlso(expression, t => t.EquipmentCode.Equals(equipmentCode)); expression = LambdaExtensions.AndAlso(expression, t => t.EquipmentCode.Equals(equipmentCode));
} }
//var infoList=_unitOfWork.EquipmentInfoRepository.GetList(t=>t.Id!=null).ToList();
//var query = from t1 in infoList
// join t2 in infoList
// on t1.ParentId equals t2.Id
// join t3 in infoList
// on t2.ParentId equals t3.Id
// select new ViewEquipment
// {
// TypeOneId = t1.Id,
// TypeTwoId = t2.Id,
// TypeThreeId = t3.Id,
// };
var EquipmentList = _unitOfWork.EquipmentInventoryRepository.GetList(expression, null, false, param).ToList(); var EquipmentList = _unitOfWork.EquipmentInventoryRepository.GetList(expression, null, false, param).ToList();
var datas = EquipmentList.GroupBy(p => p.EquipmentCode).Select(c => new var datas = EquipmentList.GroupBy(p => p.EquipmentCode).Select(c => new
{ {
code = c.FirstOrDefault().EquipmentCodeNavigation?.Equipment?.Code,
equipmentCode = c.Key, equipmentCode = c.Key,
equipmentName = c.FirstOrDefault().EquipmentCodeNavigation.Name, equipmentName = c.FirstOrDefault().EquipmentCodeNavigation.Name,
sumCount = c.Count(), sumCount = c.Where(p=>p.CurrentState!=6).Count(),
syCount = c.Sum(c => c.Org.BaseJpCabinetOutinlogs.Where(p => p.State == "out" && p.OperationTime >= Convert.ToDateTime(startTime) && p.OperationTime <= Convert.ToDateTime(endTime)).Count()) + c.Sum(c => c.CommonJpEquipmentStates.Where(f => (f.ActionState.Equals(2) || f.ActionState.Equals(3) || f.ActionState.Equals(5) || f.ActionState.Equals(14) || f.ActionState.Equals(15)) && f.OutTime >= Convert.ToDateTime(startTime) && f.OutTime <= Convert.ToDateTime(endTime)).Count()), syCount = c.Sum(c => c.Org.BaseJpCabinetOutinlogs.Where(p => p.State == "out" && p.OperationTime >= Convert.ToDateTime(startTime) && p.OperationTime <= Convert.ToDateTime(endTime)).Count()) + c.Sum(c => c.CommonJpEquipmentStates.Where(f => (f.ActionState.Equals(2) || f.ActionState.Equals(3) || f.ActionState.Equals(5) || f.ActionState.Equals(14) || f.ActionState.Equals(15)) && f.OutTime >= Convert.ToDateTime(startTime) && f.OutTime <= Convert.ToDateTime(endTime)).Count()),
wxCount = c.Sum(c => c.CommonJpEquipmentStates.Where(f => f.ActionState.Equals(6) && f.OutTime >= Convert.ToDateTime(startTime) && f.OutTime <= Convert.ToDateTime(endTime)).Count()) wxCount = c.Sum(c => c.CommonJpEquipmentStates.Where(f => f.ActionState.Equals(6) && f.OutTime >= Convert.ToDateTime(startTime) && f.OutTime <= Convert.ToDateTime(endTime)).Count())
}).OrderByDescending(f => f.syCount).ToList(); }).OrderBy(f => f.code).ToList();
//var content = new //var content = new
//{ //{
...@@ -1157,7 +1172,7 @@ namespace JunmpPoliceStation.Controllers ...@@ -1157,7 +1172,7 @@ namespace JunmpPoliceStation.Controllers
yearEndPrice = c.Where(f => !f.CurrentState.Equals(6) && f.Price != null && f.CreateTime?.Year <= year).Sum(k => k.Price), yearEndPrice = c.Where(f => !f.CurrentState.Equals(6) && f.Price != null && f.CreateTime?.Year <= year).Sum(k => k.Price),
yearAddCount = c.Where(f => !f.CurrentState.Equals(6) && f.CreateTime?.Year == year).Count(), yearAddCount = c.Where(f => !f.CurrentState.Equals(6) && f.CreateTime?.Year == year).Count(),
yearDelCount = c.Where(f => f.CurrentState.Equals(6) && f.CreateTime?.Year == year).Count(), yearDelCount = c.Where(f => f.CurrentState.Equals(6) && f.CreateTime?.Year == year).Count(),
children = c.OrderBy(z => z.TypeOneId).GroupBy(a => a.EquipmentCode).Select(c => new children = c.OrderBy(z => z.TypeOneId).ThenBy(z=>z.TypeTwoId).ThenBy(z => z.TypeThreeId).ThenBy(z => z.EquipmentCode1).GroupBy(a => a.EquipmentCode).Select(c => new
{ {
id = c.FirstOrDefault().EquipmentCode, id = c.FirstOrDefault().EquipmentCode,
name = c.FirstOrDefault().EquipmentName, name = c.FirstOrDefault().EquipmentName,
...@@ -1203,7 +1218,7 @@ namespace JunmpPoliceStation.Controllers ...@@ -1203,7 +1218,7 @@ namespace JunmpPoliceStation.Controllers
yearEndPrice = c.Where(f => !f.CurrentState.Equals(6) && f.Price != null && f.CreateTime?.Year <= year).Sum(k => k.Price), yearEndPrice = c.Where(f => !f.CurrentState.Equals(6) && f.Price != null && f.CreateTime?.Year <= year).Sum(k => k.Price),
yearAddCount = c.Where(f => !f.CurrentState.Equals(6) && f.CreateTime?.Year == year).Count(), yearAddCount = c.Where(f => !f.CurrentState.Equals(6) && f.CreateTime?.Year == year).Count(),
yearDelCount = c.Where(f => f.CurrentState.Equals(6) && f.CreateTime?.Year == year).Count(), yearDelCount = c.Where(f => f.CurrentState.Equals(6) && f.CreateTime?.Year == year).Count(),
children = c.OrderBy(z => z.TypeOneId).GroupBy(a => a.EquipmentCode).Select(c => new children = c.OrderBy(z => z.TypeOneId).ThenBy(z => z.TypeTwoId).ThenBy(z => z.TypeThreeId).ThenBy(z => z.EquipmentCode1).GroupBy(a => a.EquipmentCode).Select(c => new
{ {
id = c.FirstOrDefault().EquipmentCode, id = c.FirstOrDefault().EquipmentCode,
name = c.FirstOrDefault().EquipmentName, name = c.FirstOrDefault().EquipmentName,
...@@ -1334,7 +1349,7 @@ namespace JunmpPoliceStation.Controllers ...@@ -1334,7 +1349,7 @@ namespace JunmpPoliceStation.Controllers
{ {
id = c.FirstOrDefault().TypeOneId, id = c.FirstOrDefault().TypeOneId,
name = c.FirstOrDefault().ParentName, name = c.FirstOrDefault().ParentName,
zsCount = c.Count(f => f.CurrentState != null), zsCount = c.Count(f => f.CurrentState != 6 && f.InventoryState != "loss"),
zkCount = c.Where(f => f.CurrentState.Equals(0) || f.CurrentState.Equals(3)).Count(), 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(), 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(), bfCount = c.Where(f => f.CurrentState.Equals(6)).Count(),
...@@ -1342,7 +1357,7 @@ namespace JunmpPoliceStation.Controllers ...@@ -1342,7 +1357,7 @@ namespace JunmpPoliceStation.Controllers
{ {
id = c.FirstOrDefault().TypeTwoId, id = c.FirstOrDefault().TypeTwoId,
name = c.FirstOrDefault().TypeName, name = c.FirstOrDefault().TypeName,
zsCount = c.Count(f => f.CurrentState != null), zsCount = c.Count(f => f.CurrentState != 6 && f.InventoryState != "loss"),
zkCount = c.Where(f => f.CurrentState.Equals(0) || f.CurrentState.Equals(3)).Count(), 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(), 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(), bfCount = c.Where(f => f.CurrentState.Equals(6)).Count(),
...@@ -1350,7 +1365,7 @@ namespace JunmpPoliceStation.Controllers ...@@ -1350,7 +1365,7 @@ namespace JunmpPoliceStation.Controllers
{ {
id = c.FirstOrDefault().TypeThreeId, id = c.FirstOrDefault().TypeThreeId,
name = c.FirstOrDefault().Name, name = c.FirstOrDefault().Name,
zsCount = c.Count(f => f.CurrentState != null), zsCount = c.Count(f => f.CurrentState != 6 && f.InventoryState != "loss"),
zkCount = c.Where(f => f.CurrentState.Equals(0) || f.CurrentState.Equals(3)).Count(), 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(), 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(), bfCount = c.Where(f => f.CurrentState.Equals(6)).Count(),
...@@ -1358,7 +1373,7 @@ namespace JunmpPoliceStation.Controllers ...@@ -1358,7 +1373,7 @@ namespace JunmpPoliceStation.Controllers
{ {
id = c.FirstOrDefault().EquipmentCode, id = c.FirstOrDefault().EquipmentCode,
name = c.FirstOrDefault().EquipmentName, name = c.FirstOrDefault().EquipmentName,
zsCount = c.Count(f => f.CurrentState != null), zsCount = c.Count(f => f.CurrentState != 6 && f.InventoryState != "loss"),
zkCount = c.Where(f => f.CurrentState.Equals(0) || f.CurrentState.Equals(3)).Count(), 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(), 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(), bfCount = c.Where(f => f.CurrentState.Equals(6)).Count(),
...@@ -1366,7 +1381,7 @@ namespace JunmpPoliceStation.Controllers ...@@ -1366,7 +1381,7 @@ namespace JunmpPoliceStation.Controllers
{ {
id = c.FirstOrDefault().EquipmentSizecode, id = c.FirstOrDefault().EquipmentSizecode,
name = c.FirstOrDefault().SizeName, name = c.FirstOrDefault().SizeName,
zsCount = c.Count(f => f.CurrentState != null), zsCount = c.Count(f => f.CurrentState != 6 && f.InventoryState != "loss"),
zkCount = c.Where(f => f.CurrentState.Equals(0) || f.CurrentState.Equals(3)).Count(), 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(), 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() bfCount = c.Where(f => f.CurrentState.Equals(6)).Count()
...@@ -1514,9 +1529,9 @@ namespace JunmpPoliceStation.Controllers ...@@ -1514,9 +1529,9 @@ namespace JunmpPoliceStation.Controllers
ParentName = c.FirstOrDefault().Name, ParentName = c.FirstOrDefault().Name,
EquipmentName = c.FirstOrDefault().EquipmentName, EquipmentName = c.FirstOrDefault().EquipmentName,
SizeName = c.FirstOrDefault().SizeName, SizeName = c.FirstOrDefault().SizeName,
zsCount = c.Count(f => f.CurrentState != null), zsCount = c.Count(f => f.CurrentState != 6 ),
Price = c.FirstOrDefault().Price, Price = c.FirstOrDefault().Price,
sumPrice = c.Count(f => f.CurrentState != null) * c.Key.Price, sumPrice = c.Count(f => f.CurrentState != 6) * c.Key.Price,
} }
).OrderBy(x => x.id) ).OrderBy(x => x.id)
.ThenBy(x => x.TypeTwoId) .ThenBy(x => x.TypeTwoId)
...@@ -1639,7 +1654,7 @@ namespace JunmpPoliceStation.Controllers ...@@ -1639,7 +1654,7 @@ namespace JunmpPoliceStation.Controllers
rowNumber = (idx + 1) + "", rowNumber = (idx + 1) + "",
id = c.FirstOrDefault().TypeOneId, id = c.FirstOrDefault().TypeOneId,
name = c.FirstOrDefault().ParentName, name = c.FirstOrDefault().ParentName,
zsCount = c.Count(f => f.CurrentState != null), zsCount = c.Count(f => f.CurrentState != 6 ),
zkCount = c.Where(f => f.CurrentState.Equals(0) || f.CurrentState.Equals(3)).Count(), 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(), 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(), bfCount = c.Where(f => f.CurrentState.Equals(6)).Count(),
...@@ -1648,7 +1663,7 @@ namespace JunmpPoliceStation.Controllers ...@@ -1648,7 +1663,7 @@ namespace JunmpPoliceStation.Controllers
rowNumber = (idx + 1) + "." + (idx1 + 1), rowNumber = (idx + 1) + "." + (idx1 + 1),
id = c.FirstOrDefault().TypeTwoId, id = c.FirstOrDefault().TypeTwoId,
name = c.FirstOrDefault().TypeName, name = c.FirstOrDefault().TypeName,
zsCount = c.Count(f => f.CurrentState != null), zsCount = c.Count(f => f.CurrentState != 6),
zkCount = c.Where(f => f.CurrentState.Equals(0) || f.CurrentState.Equals(3)).Count(), 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(), 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(), bfCount = c.Where(f => f.CurrentState.Equals(6)).Count(),
...@@ -1657,7 +1672,7 @@ namespace JunmpPoliceStation.Controllers ...@@ -1657,7 +1672,7 @@ namespace JunmpPoliceStation.Controllers
rowNumber = (idx + 1) + "." + (idx1 + 1) + "." + (idx2 + 1), rowNumber = (idx + 1) + "." + (idx1 + 1) + "." + (idx2 + 1),
id = c.FirstOrDefault().TypeThreeId, id = c.FirstOrDefault().TypeThreeId,
name = c.FirstOrDefault().Name, name = c.FirstOrDefault().Name,
zsCount = c.Count(f => f.CurrentState != null), zsCount = c.Count(f => f.CurrentState != 6),
zkCount = c.Where(f => f.CurrentState.Equals(0) || f.CurrentState.Equals(3)).Count(), 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(), 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(), bfCount = c.Where(f => f.CurrentState.Equals(6)).Count(),
...@@ -1666,7 +1681,7 @@ namespace JunmpPoliceStation.Controllers ...@@ -1666,7 +1681,7 @@ namespace JunmpPoliceStation.Controllers
rowNumber = (idx + 1) + "." + (idx1 + 1) + "." + (idx2 + 1) + "." + (idx3 + 1), rowNumber = (idx + 1) + "." + (idx1 + 1) + "." + (idx2 + 1) + "." + (idx3 + 1),
id = c.FirstOrDefault().EquipmentCode, id = c.FirstOrDefault().EquipmentCode,
name = c.FirstOrDefault().EquipmentName, name = c.FirstOrDefault().EquipmentName,
zsCount = c.Count(f => f.CurrentState != null), zsCount = c.Count(f => f.CurrentState != 6),
zkCount = c.Where(f => f.CurrentState.Equals(0) || f.CurrentState.Equals(3)).Count(), 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(), 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(), bfCount = c.Where(f => f.CurrentState.Equals(6)).Count(),
...@@ -1679,7 +1694,7 @@ namespace JunmpPoliceStation.Controllers ...@@ -1679,7 +1694,7 @@ namespace JunmpPoliceStation.Controllers
suplierName = c.Key.SupplierName, suplierName = c.Key.SupplierName,
price = c.Key.Price, price = c.Key.Price,
sumPrice = c.Count(f => f.CurrentState != null) * c.Key.Price, sumPrice = c.Count(f => f.CurrentState != null) * c.Key.Price,
zsCount = c.Count(f => f.CurrentState != null), zsCount = c.Count(f => f.CurrentState != 6),
zkCount = c.Where(f => f.CurrentState.Equals(0) || f.CurrentState.Equals(3)).Count(), 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(), 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() bfCount = c.Where(f => f.CurrentState.Equals(6)).Count()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论