优化报表,增加条码查询
This commit is contained in:
@@ -282,6 +282,7 @@ public class DepotItemController {
|
||||
for (DepotItemVo4WithInfoEx diEx : dataList) {
|
||||
JSONObject item = new JSONObject();
|
||||
Long mId = diEx.getMId();
|
||||
item.put("barCode", diEx.getBarCode());
|
||||
item.put("materialName", diEx.getMName());
|
||||
item.put("materialModel", diEx.getMModel());
|
||||
item.put("materialStandard", diEx.getMStandard());
|
||||
@@ -339,24 +340,25 @@ public class DepotItemController {
|
||||
List<DepotItemVo4WithInfoEx> dataList = depotItemService.findByAll(StringUtil.toNull(materialParam),
|
||||
timeB, null, null);
|
||||
//存放数据json数组
|
||||
String[] names = {"名称", "规格", "型号", "单位", "单价", "上月结存数量", "入库数量", "出库数量", "本月结存数量", "结存金额"};
|
||||
String[] names = {"条码", "名称", "规格", "型号", "单位", "单价", "上月结存数量", "入库数量", "出库数量", "本月结存数量", "结存金额"};
|
||||
String title = "库存报表";
|
||||
List<String[]> objects = new ArrayList<String[]>();
|
||||
if (null != dataList) {
|
||||
for (DepotItemVo4WithInfoEx diEx : dataList) {
|
||||
Long mId = diEx.getMId();
|
||||
String[] objs = new String[10];
|
||||
objs[0] = diEx.getMName();
|
||||
objs[1] = diEx.getMStandard();
|
||||
objs[2] = diEx.getMModel();
|
||||
objs[3] = diEx.getMaterialUnit();
|
||||
objs[4] = diEx.getPurchaseDecimal().toString();
|
||||
objs[5] = depotItemService.getStockByParam(depotId,mId,null,timeA,tenantId).toString();
|
||||
objs[6] = depotItemService.getInNumByParam(depotId,mId,timeA,timeB,tenantId).toString();
|
||||
objs[7] = depotItemService.getOutNumByParam(depotId,mId,timeA,timeB,tenantId).toString();
|
||||
String[] objs = new String[11];
|
||||
objs[0] = diEx.getBarCode();
|
||||
objs[1] = diEx.getMName();
|
||||
objs[2] = diEx.getMStandard();
|
||||
objs[3] = diEx.getMModel();
|
||||
objs[4] = diEx.getMaterialUnit();
|
||||
objs[5] = diEx.getPurchaseDecimal().toString();
|
||||
objs[6] = depotItemService.getStockByParam(depotId,mId,null,timeA,tenantId).toString();
|
||||
objs[7] = depotItemService.getInNumByParam(depotId,mId,timeA,timeB,tenantId).toString();
|
||||
objs[8] = depotItemService.getOutNumByParam(depotId,mId,timeA,timeB,tenantId).toString();
|
||||
BigDecimal thisSum = depotItemService.getStockByParam(depotId,mId,null,timeB,tenantId);
|
||||
objs[8] = thisSum.toString();
|
||||
objs[9] = thisSum.multiply(diEx.getPurchaseDecimal()).toString();
|
||||
objs[9] = thisSum.toString();
|
||||
objs[10] = thisSum.multiply(diEx.getPurchaseDecimal()).toString();
|
||||
objects.add(objs);
|
||||
}
|
||||
}
|
||||
@@ -445,6 +447,7 @@ public class DepotItemController {
|
||||
BigDecimal OutSum = depotItemService.buyOrSale("出库", "采购退货", diEx.getMId(), monthTime, "number");
|
||||
BigDecimal InSumPrice = depotItemService.buyOrSale("入库", "采购", diEx.getMId(), monthTime, "price");
|
||||
BigDecimal OutSumPrice = depotItemService.buyOrSale("出库", "采购退货", diEx.getMId(), monthTime, "price");
|
||||
item.put("barCode", diEx.getBarCode());
|
||||
item.put("materialName", diEx.getMName());
|
||||
item.put("materialModel", diEx.getMModel());
|
||||
item.put("materialStandard", diEx.getMStandard());
|
||||
@@ -512,6 +515,7 @@ public class DepotItemController {
|
||||
BigDecimal InSumRetailPrice = depotItemService.buyOrSale("入库", "零售退货", diEx.getMId(), monthTime,"price");
|
||||
BigDecimal InSumPrice = depotItemService.buyOrSale("入库", "销售退货", diEx.getMId(), monthTime,"price");
|
||||
BigDecimal OutInSumPrice = (OutSumRetailPrice.add(OutSumPrice)).subtract(InSumRetailPrice.add(InSumPrice));
|
||||
item.put("barCode", diEx.getBarCode());
|
||||
item.put("materialName", diEx.getMName());
|
||||
item.put("materialModel", diEx.getMModel());
|
||||
item.put("materialStandard", diEx.getMStandard());
|
||||
@@ -618,7 +622,7 @@ public class DepotItemController {
|
||||
List<DepotItemStockWarningCount> dataList = depotItemService.findStockWarningCount(null, null, materialParam, depotId);
|
||||
//存放数据json数组
|
||||
Long pid = depotId;
|
||||
String[] names = {"名称", "规格", "型号", "扩展信息", "单位", "安全存量", "当前库存", "建议入库量"};
|
||||
String[] names = {"条码", "名称", "规格", "型号", "扩展信息", "单位", "安全存量", "当前库存", "建议入库量"};
|
||||
String title = "库存预警报表";
|
||||
List<String[]> objects = new ArrayList<String[]>();
|
||||
if (null != dataList) {
|
||||
@@ -630,15 +634,16 @@ public class DepotItemController {
|
||||
diVI.setMOtherField3(diEx.getMOtherField3());
|
||||
String materialOther = getOtherInfo(mpArr, diVI);
|
||||
String unitName = getUName(diEx.getMaterialUnit(), diEx.getUnitName());
|
||||
String[] objs = new String[8];
|
||||
objs[0] = diEx.getMName();
|
||||
objs[1] = diEx.getMStandard();
|
||||
objs[2] = diEx.getMModel();
|
||||
objs[3] = materialOther;
|
||||
objs[4] = unitName;
|
||||
objs[5] = diEx.getSafetystock() == null ? "0" : diEx.getSafetystock().toString();
|
||||
objs[6] = diEx.getCurrentNumber() == null ? "0" : diEx.getCurrentNumber().toString();
|
||||
objs[7] = diEx.getLinjieNumber() == null ? "0" : diEx.getLinjieNumber().toString();
|
||||
String[] objs = new String[9];
|
||||
objs[0] = diEx.getBarCode();
|
||||
objs[1] = diEx.getMName();
|
||||
objs[2] = diEx.getMStandard();
|
||||
objs[3] = diEx.getMModel();
|
||||
objs[4] = materialOther;
|
||||
objs[5] = unitName;
|
||||
objs[6] = diEx.getSafetystock() == null ? "0" : diEx.getSafetystock().toString();
|
||||
objs[7] = diEx.getCurrentNumber() == null ? "0" : diEx.getCurrentNumber().toString();
|
||||
objs[8] = diEx.getLinjieNumber() == null ? "0" : diEx.getLinjieNumber().toString();
|
||||
objects.add(objs);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user