Commit 004884f2 by 赵剑炜

调整各个视图,将报废的物资剔除于总数量

parent 4c472374
......@@ -27,7 +27,7 @@ namespace JmpModel.Model
[StringLength(50)]
public string Date { get; set; }
[Column("photo")]
[StringLength(50)]
[StringLength(255)]
public string Photo { get; set; }
[Column("isDeal")]
[StringLength(50)]
......
......@@ -3540,6 +3540,8 @@ Warehouse:仓库");
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.EquipmentSizecode).IsUnicode(false);
......
......@@ -47,6 +47,9 @@ namespace JmpModel.Model
[Column("equipment_name")]
[StringLength(64)]
public string EquipmentName { get; set; }
[Column("equipmentCode")]
[StringLength(36)]
public string EquipmentCode1 { get; set; }
[Column("equipment_sizecode")]
[StringLength(36)]
public string EquipmentSizecode { get; set; }
......
......@@ -435,7 +435,7 @@
"ObjectType": 3
}
],
"UiHint": "pc.junmppolicesqldev.dbo",
"UiHint": "PC.junmppolicesqldev",
"UseBoolPropertiesWithoutDefaultSql": false,
"UseDatabaseNames": false,
"UseDbContextSplitting": false,
......
......@@ -642,16 +642,16 @@ namespace JunmpPoliceStation.Controllers
c.FirstOrDefault().OrgName,
c.FirstOrDefault().FindCode,
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(),
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(),
priceCount = c.Where(f => !f.CurrentState.Equals(6) && f.Price != null).Sum(k => k.Price),
children = c.OrderBy(z => z.TypeOneId).ThenBy(z=>z.TypeTwoId).ThenBy(z=>z.TypeThreeId).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,
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(),
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(),
......@@ -685,7 +685,7 @@ namespace JunmpPoliceStation.Controllers
OrgName = c.OrderBy(f => f.OrgCode).FirstOrDefault().AreaName,
c.OrderBy(f => f.OrgCode).FirstOrDefault().FindCode,
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(),
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(),
......@@ -694,7 +694,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 != 6 && f.CurrentState != null),
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(),
......@@ -820,7 +820,7 @@ namespace JunmpPoliceStation.Controllers
code = c.FirstOrDefault().EquipmentCodeNavigation?.Equipment?.Code,
equipmentCode = c.Key,
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()),
wxCount = c.Sum(c => c.CommonJpEquipmentStates.Where(f => f.ActionState.Equals(6) && f.OutTime >= Convert.ToDateTime(startTime) && f.OutTime <= Convert.ToDateTime(endTime)).Count())
......@@ -1165,7 +1165,7 @@ namespace JunmpPoliceStation.Controllers
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(),
yearDelCount = c.Where(f => f.CurrentState.Equals(6) && f.CreateTime?.Year == year).Count(),
children = c.OrderBy(z => z.TypeOneId).ThenBy(z=>z.TypeTwoId).ThenBy(z => z.TypeThreeId).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,
name = c.FirstOrDefault().EquipmentName,
......@@ -1211,7 +1211,7 @@ namespace JunmpPoliceStation.Controllers
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(),
yearDelCount = c.Where(f => f.CurrentState.Equals(6) && f.CreateTime?.Year == year).Count(),
children = c.OrderBy(z => z.TypeOneId).ThenBy(z => z.TypeTwoId).ThenBy(z => z.TypeThreeId).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,
name = c.FirstOrDefault().EquipmentName,
......@@ -1342,7 +1342,7 @@ namespace JunmpPoliceStation.Controllers
{
id = c.FirstOrDefault().TypeOneId,
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(),
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(),
......@@ -1350,7 +1350,7 @@ namespace JunmpPoliceStation.Controllers
{
id = c.FirstOrDefault().TypeTwoId,
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(),
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(),
......@@ -1358,7 +1358,7 @@ namespace JunmpPoliceStation.Controllers
{
id = c.FirstOrDefault().TypeThreeId,
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(),
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(),
......@@ -1366,7 +1366,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 != 6 && 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(),
......@@ -1374,7 +1374,7 @@ namespace JunmpPoliceStation.Controllers
{
id = c.FirstOrDefault().EquipmentSizecode,
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(),
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()
......@@ -1522,9 +1522,9 @@ namespace JunmpPoliceStation.Controllers
ParentName = c.FirstOrDefault().Name,
EquipmentName = c.FirstOrDefault().EquipmentName,
SizeName = c.FirstOrDefault().SizeName,
zsCount = c.Count(f => f.CurrentState != null),
zsCount = c.Count(f => f.CurrentState != 6 ),
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)
.ThenBy(x => x.TypeTwoId)
......@@ -1647,7 +1647,7 @@ namespace JunmpPoliceStation.Controllers
rowNumber = (idx + 1) + "",
id = c.FirstOrDefault().TypeOneId,
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(),
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(),
......@@ -1656,7 +1656,7 @@ namespace JunmpPoliceStation.Controllers
rowNumber = (idx + 1) + "." + (idx1 + 1),
id = c.FirstOrDefault().TypeTwoId,
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(),
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(),
......@@ -1665,7 +1665,7 @@ namespace JunmpPoliceStation.Controllers
rowNumber = (idx + 1) + "." + (idx1 + 1) + "." + (idx2 + 1),
id = c.FirstOrDefault().TypeThreeId,
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(),
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(),
......@@ -1674,7 +1674,7 @@ namespace JunmpPoliceStation.Controllers
rowNumber = (idx + 1) + "." + (idx1 + 1) + "." + (idx2 + 1) + "." + (idx3 + 1),
id = c.FirstOrDefault().EquipmentCode,
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(),
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(),
......@@ -1687,7 +1687,7 @@ namespace JunmpPoliceStation.Controllers
suplierName = c.Key.SupplierName,
price = 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(),
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()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论