Commit 3f2a592e authored by 季圣华's avatar 季圣华
Browse files

给报表里面增加规格展示

parent 56bc53c2
...@@ -271,8 +271,6 @@ ...@@ -271,8 +271,6 @@
/** /**
* create by: qiankunpingtai * create by: qiankunpingtai
* create time: 2019/3/21 14:56 * create time: 2019/3/21 14:56
* website:https://qiankunpingtai.cn
* description:
* 提交时需要对表格内容进行校验,校验通过后提交后台处理 * 提交时需要对表格内容进行校验,校验通过后提交后台处理
*/ */
var isValid = $("#organizationFM").form('validate'); var isValid = $("#organizationFM").form('validate');
......
...@@ -132,6 +132,7 @@ ...@@ -132,6 +132,7 @@
pageList: [10, 50, 100], pageList: [10, 50, 100],
columns: [[ columns: [[
{title: '名称', field: 'MaterialName', width: 160}, {title: '名称', field: 'MaterialName', width: 160},
{title: '规格', field: 'MaterialStandard', width: 80},
{title: '型号', field: 'MaterialModel', width: 80}, {title: '型号', field: 'MaterialModel', width: 80},
{title: '扩展信息', field: 'MaterialOther', width: 150}, {title: '扩展信息', field: 'MaterialOther', width: 150},
{title: '单位', field: 'MaterialUnit', width: 80, {title: '单位', field: 'MaterialUnit', width: 80,
......
...@@ -191,8 +191,9 @@ ...@@ -191,8 +191,9 @@
return '<a class="n-link" onclick="turnBillDetailPage(\'' + row.number + '\''+',\'' + row.newType + '\');">' + row.number + '</a>'; return '<a class="n-link" onclick="turnBillDetailPage(\'' + row.number + '\''+',\'' + row.newType + '\');">' + row.number + '</a>';
} }
}, },
{title: '商品名称', field: 'mname', width: 120}, {title: '名称', field: 'mname', width: 120},
{title: '商品型号', field: 'model', width: 100}, {title: '规格', field: 'standard', width: 100},
{title: '型号', field: 'model', width: 100},
{title: '单价', field: 'unitPrice', width: 60}, {title: '单价', field: 'unitPrice', width: 60},
{title: '入库数量', field: 'operNumber', width: 80}, {title: '入库数量', field: 'operNumber', width: 80},
{title: '金额', field: 'allPrice', width: 60}, {title: '金额', field: 'allPrice', width: 60},
......
...@@ -183,9 +183,10 @@ ...@@ -183,9 +183,10 @@
pageSize: 10, pageSize: 10,
pageList: [10, 50, 100], pageList: [10, 50, 100],
columns: [[ columns: [[
{title: '商品名称', field: 'mName', width: 150}, {title: '名称', field: 'mName', width: 150},
{title: '商品型号', field: 'model', width: 150}, {title: '规格', field: 'standard', width: 100},
{title: '商品类型', field: 'categoryName', width: 120}, {title: '型号', field: 'model', width: 100},
{title: '类型', field: 'categoryName', width: 120},
{title: '入库数量', field: 'numSum', width: 120}, {title: '入库数量', field: 'numSum', width: 120},
{title: '入库金额', field: 'priceSum', width: 120} {title: '入库金额', field: 'priceSum', width: 120}
]], ]],
......
...@@ -235,6 +235,7 @@ ...@@ -235,6 +235,7 @@
pageList: [10, 50, 100], pageList: [10, 50, 100],
columns: [[ columns: [[
{title: '名称', field: 'MaterialName', width: 160}, {title: '名称', field: 'MaterialName', width: 160},
{title: '规格', field: 'MaterialStandard', width: 80},
{title: '型号', field: 'MaterialModel', width: 80}, {title: '型号', field: 'MaterialModel', width: 80},
{title: '扩展信息', field: 'MaterialOther', width: 120}, {title: '扩展信息', field: 'MaterialOther', width: 120},
{title: '单位', field: 'unitName', width: 80}, {title: '单位', field: 'unitName', width: 80},
...@@ -370,7 +371,7 @@ ...@@ -370,7 +371,7 @@
if (count.lastIndexOf('.') > -1) { if (count.lastIndexOf('.') > -1) {
count = count.substring(0, count.lastIndexOf('.') + 3); count = count.substring(0, count.lastIndexOf('.') + 3);
} }
$("#tablePanel .total-count").text("本月合计金额:" + count + "");//本月合计金额 $("#tablePanel .total-count").text("本月合计金额" + count + "");//本月合计金额
} }
} }
}, },
......
...@@ -191,8 +191,9 @@ ...@@ -191,8 +191,9 @@
return '<a class="n-link" onclick="turnBillDetailPage(\'' + row.number + '\''+',\'' + row.newType + '\');">' + row.number + '</a>'; return '<a class="n-link" onclick="turnBillDetailPage(\'' + row.number + '\''+',\'' + row.newType + '\');">' + row.number + '</a>';
} }
}, },
{title: '商品名称', field: 'mname', width: 120}, {title: '名称', field: 'mname', width: 120},
{title: '商品型号', field: 'model', width: 100}, {title: '规格', field: 'standard', width: 100},
{title: '型号', field: 'model', width: 100},
{title: '单价', field: 'unitPrice', width: 60}, {title: '单价', field: 'unitPrice', width: 60},
{title: '出库数量', field: 'operNumber', width: 80}, {title: '出库数量', field: 'operNumber', width: 80},
{title: '金额', field: 'allPrice', width: 60}, {title: '金额', field: 'allPrice', width: 60},
......
...@@ -183,9 +183,10 @@ ...@@ -183,9 +183,10 @@
pageSize: 10, pageSize: 10,
pageList: [10, 50, 100], pageList: [10, 50, 100],
columns: [[ columns: [[
{title: '商品名称', field: 'mName', width: 150}, {title: '名称', field: 'mName', width: 150},
{title: '商品型号', field: 'model', width: 150}, {title: '规格', field: 'standard', width: 100},
{title: '商品类型', field: 'categoryName', width: 120}, {title: '型号', field: 'model', width: 100},
{title: '类型', field: 'categoryName', width: 120},
{title: '出库数量', field: 'numSum', width: 120}, {title: '出库数量', field: 'numSum', width: 120},
{title: '出库金额', field: 'priceSum', width: 120} {title: '出库金额', field: 'priceSum', width: 120}
]], ]],
......
...@@ -136,6 +136,7 @@ ...@@ -136,6 +136,7 @@
pageList: [10, 50, 100], pageList: [10, 50, 100],
columns: [[ columns: [[
{title: '名称', field: 'MaterialName', width: 160}, {title: '名称', field: 'MaterialName', width: 160},
{title: '规格', field: 'MaterialStandard', width: 80},
{title: '型号', field: 'MaterialModel', width: 80}, {title: '型号', field: 'MaterialModel', width: 80},
{title: '扩展信息', field: 'MaterialOther', width: 150}, {title: '扩展信息', field: 'MaterialOther', width: 150},
{title: '单位', field: 'MaterialUnit', width: 80, {title: '单位', field: 'MaterialUnit', width: 80,
......
...@@ -203,6 +203,7 @@ ...@@ -203,6 +203,7 @@
pageList: [10, 50, 100], pageList: [10, 50, 100],
columns: [[ columns: [[
{title: '名称', field: 'materialName', width: 160}, {title: '名称', field: 'materialName', width: 160},
{title: '规格', field: 'materialStandard', width: 80},
{title: '型号', field: 'materialModel', width: 80}, {title: '型号', field: 'materialModel', width: 80},
{title: '扩展信息', field: 'materialOther', width: 150}, {title: '扩展信息', field: 'materialOther', width: 150},
{title: '单位', field: 'materialUnit', width: 80}, {title: '单位', field: 'materialUnit', width: 80},
......
...@@ -265,6 +265,7 @@ public class DepotItemController { ...@@ -265,6 +265,7 @@ public class DepotItemController {
Long mId = diEx.getMId(); Long mId = diEx.getMId();
item.put("MaterialName", diEx.getMName()); item.put("MaterialName", diEx.getMName());
item.put("MaterialModel", diEx.getMModel()); item.put("MaterialModel", diEx.getMModel());
item.put("MaterialStandard", diEx.getMStandard());
//扩展信息 //扩展信息
String materialOther = getOtherInfo(mpArr, diEx); String materialOther = getOtherInfo(mpArr, diEx);
item.put("MaterialOther", materialOther); item.put("MaterialOther", materialOther);
...@@ -326,23 +327,24 @@ public class DepotItemController { ...@@ -326,23 +327,24 @@ public class DepotItemController {
List<DepotItemVo4WithInfoEx> dataList = depotItemService.findByAll(StringUtil.toNull(name), StringUtil.toNull(model), List<DepotItemVo4WithInfoEx> dataList = depotItemService.findByAll(StringUtil.toNull(name), StringUtil.toNull(model),
timeB, (currentPage-1)*pageSize, pageSize); timeB, (currentPage-1)*pageSize, pageSize);
//存放数据json数组 //存放数据json数组
String[] names = {"名称", "型号", "单位", "单价", "上月结存数量", "入库数量", "出库数量", "本月结存数量", "结存金额"}; String[] names = {"名称", "规格", "型号", "单位", "单价", "上月结存数量", "入库数量", "出库数量", "本月结存数量", "结存金额"};
String title = "库存报表"; String title = "库存报表";
List<String[]> objects = new ArrayList<String[]>(); List<String[]> objects = new ArrayList<String[]>();
if (null != dataList) { if (null != dataList) {
for (DepotItemVo4WithInfoEx diEx : dataList) { for (DepotItemVo4WithInfoEx diEx : dataList) {
Long mId = diEx.getMId(); Long mId = diEx.getMId();
String[] objs = new String[9]; String[] objs = new String[10];
objs[0] = diEx.getMName().toString(); objs[0] = diEx.getMName();
objs[1] = diEx.getMModel().toString(); objs[1] = diEx.getMStandard();
objs[2] = diEx.getMaterialUnit().toString(); objs[2] = diEx.getMModel();
objs[3] = diEx.getPurchaseDecimal().toString(); objs[3] = diEx.getMaterialUnit();
objs[4] = depotItemService.getStockByParam(depotId,mId,null,timeA,tenantId).toString(); objs[4] = diEx.getPurchaseDecimal().toString();
objs[5] = depotItemService.getInNumByParam(depotId,mId,timeA,timeB,tenantId).toString(); objs[5] = depotItemService.getStockByParam(depotId,mId,null,timeA,tenantId).toString();
objs[6] = depotItemService.getOutNumByParam(depotId,mId,timeA,timeB,tenantId).toString(); objs[6] = depotItemService.getInNumByParam(depotId,mId,timeA,timeB,tenantId).toString();
objs[7] = depotItemService.getOutNumByParam(depotId,mId,timeA,timeB,tenantId).toString();
BigDecimal thisSum = depotItemService.getStockByParam(depotId,mId,null,timeB,tenantId); BigDecimal thisSum = depotItemService.getStockByParam(depotId,mId,null,timeB,tenantId);
objs[7] = thisSum.toString(); objs[8] = thisSum.toString();
objs[8] = thisSum.multiply(diEx.getPurchaseDecimal()).toString(); objs[9] = thisSum.multiply(diEx.getPurchaseDecimal()).toString();
objects.add(objs); objects.add(objs);
} }
} }
...@@ -434,6 +436,7 @@ public class DepotItemController { ...@@ -434,6 +436,7 @@ public class DepotItemController {
BigDecimal OutSumPrice = depotItemService.buyOrSale("出库", "采购退货", diEx.getMId(), monthTime, "price"); BigDecimal OutSumPrice = depotItemService.buyOrSale("出库", "采购退货", diEx.getMId(), monthTime, "price");
item.put("MaterialName", diEx.getMName()); item.put("MaterialName", diEx.getMName());
item.put("MaterialModel", diEx.getMModel()); item.put("MaterialModel", diEx.getMModel());
item.put("MaterialStandard", diEx.getMStandard());
//扩展信息 //扩展信息
String materialOther = getOtherInfo(mpArr, diEx); String materialOther = getOtherInfo(mpArr, diEx);
item.put("MaterialOther", materialOther); item.put("MaterialOther", materialOther);
...@@ -502,6 +505,7 @@ public class DepotItemController { ...@@ -502,6 +505,7 @@ public class DepotItemController {
BigDecimal OutInSumPrice = (OutSumRetailPrice.add(OutSumPrice)).subtract(InSumRetailPrice.add(InSumPrice)); BigDecimal OutInSumPrice = (OutSumRetailPrice.add(OutSumPrice)).subtract(InSumRetailPrice.add(InSumPrice));
item.put("MaterialName", diEx.getMName()); item.put("MaterialName", diEx.getMName());
item.put("MaterialModel", diEx.getMModel()); item.put("MaterialModel", diEx.getMModel());
item.put("MaterialStandard", diEx.getMStandard());
//扩展信息 //扩展信息
String materialOther = getOtherInfo(mpArr, diEx); String materialOther = getOtherInfo(mpArr, diEx);
item.put("MaterialOther", materialOther); item.put("MaterialOther", materialOther);
...@@ -543,34 +547,8 @@ public class DepotItemController { ...@@ -543,34 +547,8 @@ public class DepotItemController {
return unitName; return unitName;
} }
/**
* 获取单价
* @param presetPriceOne
* @param priceStrategy
* @return
*/
public BigDecimal getUnitPrice(BigDecimal presetPriceOne, String priceStrategy) {
BigDecimal unitPrice = BigDecimal.ZERO;
if(presetPriceOne != null) {
DecimalFormat df = new DecimalFormat("#.00");
unitPrice = new BigDecimal(df.format(presetPriceOne));
} else {
JSONArray priceArr = JSONArray.parseArray(priceStrategy);
if(priceArr!=null && priceArr.get(0)!=null) {
JSONObject priceObj = JSONObject.parseObject(priceArr.get(0).toString());
BigDecimal basicPresetPriceOne = priceObj.getJSONObject("basic").getBigDecimal("PresetPriceOne");
if(basicPresetPriceOne!=null) {
unitPrice = basicPresetPriceOne;
}
}
}
return unitPrice;
}
/** /**
* create by: qiankunpingtai * create by: qiankunpingtai
* website:https://qiankunpingtai.cn
* description:
* 批量删除单据明细信息 * 批量删除单据明细信息
* create time: 2019/3/29 11:15 * create time: 2019/3/29 11:15
* @Param: ids * @Param: ids
...@@ -600,7 +578,6 @@ public class DepotItemController { ...@@ -600,7 +578,6 @@ public class DepotItemController {
BaseResponseInfo res = new BaseResponseInfo(); BaseResponseInfo res = new BaseResponseInfo();
Map<String, Object> map = new HashMap<String, Object>(); Map<String, Object> map = new HashMap<String, Object>();
try { try {
List<DepotItemStockWarningCount> resList = new ArrayList<DepotItemStockWarningCount>();
List<DepotItemStockWarningCount> list = depotItemService.findStockWarningCount((currentPage-1)*pageSize, pageSize,pid); List<DepotItemStockWarningCount> list = depotItemService.findStockWarningCount((currentPage-1)*pageSize, pageSize,pid);
int total = depotItemService.findStockWarningCountTotal(pid); int total = depotItemService.findStockWarningCountTotal(pid);
map.put("total", total); map.put("total", total);
...@@ -635,21 +612,22 @@ public class DepotItemController { ...@@ -635,21 +612,22 @@ public class DepotItemController {
List<DepotItemStockWarningCount> dataList = depotItemService.findStockWarningCount((currentPage - 1) * pageSize, pageSize, projectId); List<DepotItemStockWarningCount> dataList = depotItemService.findStockWarningCount((currentPage - 1) * pageSize, pageSize, projectId);
//存放数据json数组 //存放数据json数组
Integer pid = projectId; Integer pid = projectId;
String[] names = {"名称", "型号", "扩展信息", "单位", "入库数量", "出库数量", "库存数量", "安全库存量", "临界库存量"}; String[] names = {"名称", "规格", "型号", "扩展信息", "单位", "入库数量", "出库数量", "库存数量", "安全库存量", "临界库存量"};
String title = "库存预警报表"; String title = "库存预警报表";
List<String[]> objects = new ArrayList<String[]>(); List<String[]> objects = new ArrayList<String[]>();
if (null != dataList) { if (null != dataList) {
for (DepotItemStockWarningCount diEx : dataList) { for (DepotItemStockWarningCount diEx : dataList) {
String[] objs = new String[9]; String[] objs = new String[10];
objs[0] = diEx.getMaterialName().toString(); objs[0] = diEx.getMaterialName();
objs[1] = diEx.getMaterialModel().toString(); objs[1] = diEx.getMaterialStandard();
objs[2] = diEx.getMaterialOther().toString(); objs[2] = diEx.getMaterialModel();
objs[3] = diEx.getMaterialUnit().toString(); objs[3] = diEx.getMaterialOther();
objs[4] = diEx.getBasicInNumber().toString(); objs[4] = diEx.getMaterialUnit();
objs[5] = diEx.getBasicOutNumber() == null ? "0" : diEx.getBasicOutNumber().toString(); objs[5] = diEx.getBasicInNumber().toString();
objs[6] = diEx.getBasicNumber() == null ? "0" : diEx.getBasicNumber().toString(); objs[6] = diEx.getBasicOutNumber() == null ? "0" : diEx.getBasicOutNumber().toString();
objs[7] = diEx.getSafetystock() == null ? "0" : diEx.getSafetystock().toString(); objs[7] = diEx.getBasicNumber() == null ? "0" : diEx.getBasicNumber().toString();
objs[8] = diEx.getBasicLinjieNumber() == null ? "0" : diEx.getBasicLinjieNumber().toString(); objs[8] = diEx.getSafetystock() == null ? "0" : diEx.getSafetystock().toString();
objs[9] = diEx.getBasicLinjieNumber() == null ? "0" : diEx.getBasicLinjieNumber().toString();
objects.add(objs); objects.add(objs);
} }
} }
......
...@@ -12,6 +12,8 @@ public class DepotHeadVo4InDetail { ...@@ -12,6 +12,8 @@ public class DepotHeadVo4InDetail {
private String Model; private String Model;
private String standard;
private BigDecimal UnitPrice; private BigDecimal UnitPrice;
private BigDecimal OperNumber; private BigDecimal OperNumber;
...@@ -52,6 +54,14 @@ public class DepotHeadVo4InDetail { ...@@ -52,6 +54,14 @@ public class DepotHeadVo4InDetail {
Model = model; Model = model;
} }
public String getStandard() {
return standard;
}
public void setStandard(String standard) {
this.standard = standard;
}
public BigDecimal getUnitPrice() { public BigDecimal getUnitPrice() {
return UnitPrice; return UnitPrice;
} }
......
...@@ -11,6 +11,8 @@ public class DepotHeadVo4InOutMCount { ...@@ -11,6 +11,8 @@ public class DepotHeadVo4InOutMCount {
private String Model; private String Model;
private String standard;
private String categoryName; private String categoryName;
private BigDecimal numSum; private BigDecimal numSum;
...@@ -43,6 +45,14 @@ public class DepotHeadVo4InOutMCount { ...@@ -43,6 +45,14 @@ public class DepotHeadVo4InOutMCount {
Model = model; Model = model;
} }
public String getStandard() {
return standard;
}
public void setStandard(String standard) {
this.standard = standard;
}
public String getCategoryName() { public String getCategoryName() {
return categoryName; return categoryName;
} }
......
...@@ -5,11 +5,12 @@ import java.math.BigDecimal; ...@@ -5,11 +5,12 @@ import java.math.BigDecimal;
public class DepotItemStockWarningCount { public class DepotItemStockWarningCount {
private String MaterialName; private String MaterialName;
private String MaterialModel; private String MaterialModel;
private String MaterialStandard;
private String categoryName; private String categoryName;
private String MaterialOther; private String MaterialOther;
...@@ -43,6 +44,14 @@ public class DepotItemStockWarningCount { ...@@ -43,6 +44,14 @@ public class DepotItemStockWarningCount {
MaterialModel = materialModel; MaterialModel = materialModel;
} }
public String getMaterialStandard() {
return MaterialStandard;
}
public void setMaterialStandard(String materialStandard) {
MaterialStandard = materialStandard;
}
public String getCategoryName() { public String getCategoryName() {
return categoryName; return categoryName;
} }
......
...@@ -38,8 +38,6 @@ public class GlobalExceptionHandler { ...@@ -38,8 +38,6 @@ public class GlobalExceptionHandler {
/** /**
* create by: qiankunpingtai * create by: qiankunpingtai
* create time: 2019/4/18 17:41 * create time: 2019/4/18 17:41
* website:https://qiankunpingtai.cn
* description:
* 这里输出完整的堆栈信息,否则有些异常完全不知道哪里出错了。 * 这里输出完整的堆栈信息,否则有些异常完全不知道哪里出错了。
*/ */
log.error("Global Exception Occured => url : {}", request.getRequestURL(), e); log.error("Global Exception Occured => url : {}", request.getRequestURL(), e);
......
...@@ -475,8 +475,6 @@ public class AccountService { ...@@ -475,8 +475,6 @@ public class AccountService {
} }
/** /**
* create by: qiankunpingtai * create by: qiankunpingtai
* website:https://qiankunpingtai.cn
* description:
* 正常删除,要考虑数据完整性,进行完整性校验 * 正常删除,要考虑数据完整性,进行完整性校验
* create time: 2019/4/10 10:31 * create time: 2019/4/10 10:31
* @Param: ids * @Param: ids
......
...@@ -331,8 +331,6 @@ public class AccountHeadService { ...@@ -331,8 +331,6 @@ public class AccountHeadService {
} }
/** /**
* create by: qiankunpingtai * create by: qiankunpingtai
* website:https://qiankunpingtai.cn
* description:
* 正常删除,要考虑数据完整性,进行完整性校验 * 正常删除,要考虑数据完整性,进行完整性校验
* create time: 2019/4/10 15:49 * create time: 2019/4/10 15:49
* @Param: ids * @Param: ids
......
...@@ -229,8 +229,6 @@ public class DepotService { ...@@ -229,8 +229,6 @@ public class DepotService {
} }
/** /**
* create by: qiankunpingtai * create by: qiankunpingtai
* website:https://qiankunpingtai.cn
* description:
* 正常删除,要考虑数据完整性,进行完整性校验 * 正常删除,要考虑数据完整性,进行完整性校验
* create time: 2019/4/10 16:52 * create time: 2019/4/10 16:52
* @Param: ids * @Param: ids
......
...@@ -441,7 +441,6 @@ public class DepotItemService { ...@@ -441,7 +441,6 @@ public class DepotItemService {
@Transactional(value = "transactionManager", rollbackFor = Exception.class) @Transactional(value = "transactionManager", rollbackFor = Exception.class)
public List<DepotItemStockWarningCount> findStockWarningCount(int offset, Integer rows, Integer pid) { public List<DepotItemStockWarningCount> findStockWarningCount(int offset, Integer rows, Integer pid) {
List<DepotItemStockWarningCount> list = null; List<DepotItemStockWarningCount> list = null;
try{ try{
list =depotItemMapperEx.findStockWarningCount( offset, rows, pid); list =depotItemMapperEx.findStockWarningCount( offset, rows, pid);
......
...@@ -205,8 +205,6 @@ public class InOutItemService { ...@@ -205,8 +205,6 @@ public class InOutItemService {
} }
/** /**
* create by: qiankunpingtai * create by: qiankunpingtai
* website:https://qiankunpingtai.cn
* description:
* 正常删除,要考虑数据完整性,进行完整性校验 * 正常删除,要考虑数据完整性,进行完整性校验
* create time: 2019/4/10 16:23 * create time: 2019/4/10 16:23
* @Param: ids * @Param: ids
......
...@@ -680,8 +680,6 @@ public class MaterialService { ...@@ -680,8 +680,6 @@ public class MaterialService {
} }
/** /**
* create by: qiankunpingtai * create by: qiankunpingtai
* website:https://qiankunpingtai.cn
* description:
* 正常删除,要考虑数据完整性,进行完整性校验 * 正常删除,要考虑数据完整性,进行完整性校验
* create time: 2019/4/10 18:00 * create time: 2019/4/10 18:00
* @Param: ids * @Param: ids
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment