完善报表接口返回字段,增加品牌和制造商
This commit is contained in:
@@ -512,10 +512,12 @@ public class DepotItemController {
|
||||
item.put("materialName", diEx.getMName());
|
||||
item.put("materialModel", diEx.getMModel());
|
||||
item.put("materialStandard", diEx.getMStandard());
|
||||
item.put("materialColor", diEx.getMColor());
|
||||
item.put("materialMfrs", diEx.getMMfrs());
|
||||
item.put("materialBrand", diEx.getBrand());
|
||||
//扩展信息
|
||||
String materialOther = depotItemService.getOtherInfo(mpArr, diEx);
|
||||
item.put("materialOther", materialOther);
|
||||
item.put("materialColor", diEx.getMColor());
|
||||
item.put("unitId", diEx.getUnitId());
|
||||
item.put("unitName", null!=diEx.getUnitId() ? diEx.getMaterialUnit()+"[多单位]" : diEx.getMaterialUnit());
|
||||
BigDecimal prevSum = depotItemService.getStockByParamWithDepotList(depotList,mId,null,beginTime);
|
||||
@@ -672,10 +674,10 @@ public class DepotItemController {
|
||||
String [] organArray = null;
|
||||
List<Long> depotList = depotService.parseDepotList(depotId);
|
||||
Boolean forceFlag = systemConfigService.getForceApprovalFlag();
|
||||
List<DepotItemVo4WithInfoEx> dataList = depotItemService.getListWithBugOrSale(StringUtil.toNull(materialParam),
|
||||
List<DepotItemVo4WithInfoEx> dataList = depotItemService.getListWithBuyOrSale(StringUtil.toNull(materialParam),
|
||||
"buy", beginTime, endTime, creatorArray, organId, organArray, depotList, forceFlag, (currentPage-1)*pageSize, pageSize);
|
||||
String[] mpArr = mpList.split(",");
|
||||
int total = depotItemService.getListWithBugOrSaleCount(StringUtil.toNull(materialParam),
|
||||
int total = depotItemService.getListWithBuyOrSaleCount(StringUtil.toNull(materialParam),
|
||||
"buy", beginTime, endTime, creatorArray, organId, organArray, depotList, forceFlag);
|
||||
map.put("total", total);
|
||||
//存放数据json数组
|
||||
@@ -696,6 +698,8 @@ public class DepotItemController {
|
||||
String materialOther = depotItemService.getOtherInfo(mpArr, diEx);
|
||||
item.put("materialOther", materialOther);
|
||||
item.put("materialColor", diEx.getMColor());
|
||||
item.put("materialBrand", diEx.getBrand());
|
||||
item.put("materialMfrs", diEx.getMMfrs());
|
||||
item.put("materialUnit", diEx.getMaterialUnit());
|
||||
item.put("unitName", diEx.getUnitName());
|
||||
item.put("inSum", InSum);
|
||||
@@ -756,10 +760,10 @@ public class DepotItemController {
|
||||
String [] organArray = null;
|
||||
List<Long> depotList = depotService.parseDepotList(depotId);
|
||||
Boolean forceFlag = systemConfigService.getForceApprovalFlag();
|
||||
List<DepotItemVo4WithInfoEx> dataList = depotItemService.getListWithBugOrSale(StringUtil.toNull(materialParam),
|
||||
List<DepotItemVo4WithInfoEx> dataList = depotItemService.getListWithBuyOrSale(StringUtil.toNull(materialParam),
|
||||
"retail", beginTime, endTime, creatorArray, organId, organArray, depotList, forceFlag, (currentPage-1)*pageSize, pageSize);
|
||||
String[] mpArr = mpList.split(",");
|
||||
int total = depotItemService.getListWithBugOrSaleCount(StringUtil.toNull(materialParam),
|
||||
int total = depotItemService.getListWithBuyOrSaleCount(StringUtil.toNull(materialParam),
|
||||
"retail", beginTime, endTime, creatorArray, organId, organArray, depotList, forceFlag);
|
||||
map.put("total", total);
|
||||
//存放数据json数组
|
||||
@@ -780,6 +784,8 @@ public class DepotItemController {
|
||||
String materialOther = depotItemService.getOtherInfo(mpArr, diEx);
|
||||
item.put("materialOther", materialOther);
|
||||
item.put("materialColor", diEx.getMColor());
|
||||
item.put("materialBrand", diEx.getBrand());
|
||||
item.put("materialMfrs", diEx.getMMfrs());
|
||||
item.put("materialUnit", diEx.getMaterialUnit());
|
||||
item.put("unitName", diEx.getUnitName());
|
||||
item.put("outSum", OutSumRetail);
|
||||
@@ -841,10 +847,10 @@ public class DepotItemController {
|
||||
String [] organArray = depotHeadService.getOrganArray("销售", "");
|
||||
List<Long> depotList = depotService.parseDepotList(depotId);
|
||||
Boolean forceFlag = systemConfigService.getForceApprovalFlag();
|
||||
List<DepotItemVo4WithInfoEx> dataList = depotItemService.getListWithBugOrSale(StringUtil.toNull(materialParam),
|
||||
List<DepotItemVo4WithInfoEx> dataList = depotItemService.getListWithBuyOrSale(StringUtil.toNull(materialParam),
|
||||
"sale", beginTime, endTime, creatorArray, organId, organArray, depotList, forceFlag, (currentPage-1)*pageSize, pageSize);
|
||||
String[] mpArr = mpList.split(",");
|
||||
int total = depotItemService.getListWithBugOrSaleCount(StringUtil.toNull(materialParam),
|
||||
int total = depotItemService.getListWithBuyOrSaleCount(StringUtil.toNull(materialParam),
|
||||
"sale", beginTime, endTime, creatorArray, organId, organArray, depotList, forceFlag);
|
||||
map.put("total", total);
|
||||
//存放数据json数组
|
||||
@@ -865,6 +871,8 @@ public class DepotItemController {
|
||||
String materialOther = depotItemService.getOtherInfo(mpArr, diEx);
|
||||
item.put("materialOther", materialOther);
|
||||
item.put("materialColor", diEx.getMColor());
|
||||
item.put("materialBrand", diEx.getBrand());
|
||||
item.put("materialMfrs", diEx.getMMfrs());
|
||||
item.put("materialUnit", diEx.getMaterialUnit());
|
||||
item.put("unitName", diEx.getUnitName());
|
||||
item.put("outSum", OutSum);
|
||||
@@ -939,7 +947,6 @@ public class DepotItemController {
|
||||
if (null != list) {
|
||||
for (DepotItemStockWarningCount disw : list) {
|
||||
DepotItemVo4WithInfoEx diEx = new DepotItemVo4WithInfoEx();
|
||||
diEx.setMMfrs(disw.getMMfrs());
|
||||
diEx.setMOtherField1(disw.getMOtherField1());
|
||||
diEx.setMOtherField2(disw.getMOtherField2());
|
||||
diEx.setMOtherField3(disw.getMOtherField3());
|
||||
|
||||
@@ -228,10 +228,11 @@ public class MaterialController {
|
||||
if(StringUtil.isNotEmpty(mpList)){
|
||||
mpArr= mpList.split(",");
|
||||
}
|
||||
List<MaterialVo4Unit> dataList = materialService.findBySelectWithBarCode(categoryId, q, standardOrModel,
|
||||
color, brand, mfrs, enableSerialNumber, enableBatchNumber, (currentPage-1)*pageSize, pageSize);
|
||||
int total = materialService.findBySelectWithBarCodeCount(categoryId, q, standardOrModel,
|
||||
color, brand, mfrs, enableSerialNumber, enableBatchNumber);
|
||||
List<MaterialVo4Unit> dataList = materialService.findBySelectWithBarCode(categoryId, q, StringUtil.toNull(standardOrModel),
|
||||
StringUtil.toNull(color), StringUtil.toNull(brand), StringUtil.toNull(mfrs), enableSerialNumber, enableBatchNumber,
|
||||
(currentPage-1)*pageSize, pageSize);
|
||||
int total = materialService.findBySelectWithBarCodeCount(categoryId, q, StringUtil.toNull(standardOrModel),
|
||||
StringUtil.toNull(color), StringUtil.toNull(brand), StringUtil.toNull(mfrs), enableSerialNumber, enableBatchNumber);
|
||||
object.put("total", total);
|
||||
JSONArray dataArray = new JSONArray();
|
||||
//存放数据json数组
|
||||
|
||||
@@ -72,7 +72,7 @@ public interface DepotItemMapperEx {
|
||||
@Param("categoryIdList") List<Long> categoryIdList,
|
||||
@Param("endTime") String endTime);
|
||||
|
||||
List<DepotItemVo4WithInfoEx> getListWithBugOrSale(
|
||||
List<DepotItemVo4WithInfoEx> getListWithBuyOrSale(
|
||||
@Param("materialParam") String materialParam,
|
||||
@Param("billType") String billType,
|
||||
@Param("beginTime") String beginTime,
|
||||
@@ -85,7 +85,7 @@ public interface DepotItemMapperEx {
|
||||
@Param("offset") Integer offset,
|
||||
@Param("rows") Integer rows);
|
||||
|
||||
int getListWithBugOrSaleCount(
|
||||
int getListWithBuyOrSaleCount(
|
||||
@Param("materialParam") String materialParam,
|
||||
@Param("billType") String billType,
|
||||
@Param("beginTime") String beginTime,
|
||||
|
||||
@@ -16,6 +16,12 @@ public class DepotHeadVo4InDetail {
|
||||
|
||||
private String standard;
|
||||
|
||||
private String color;
|
||||
|
||||
private String brand;
|
||||
|
||||
private String mfrs;
|
||||
|
||||
private BigDecimal unitPrice;
|
||||
|
||||
private String sku;
|
||||
@@ -84,6 +90,30 @@ public class DepotHeadVo4InDetail {
|
||||
this.standard = standard;
|
||||
}
|
||||
|
||||
public String getColor() {
|
||||
return color;
|
||||
}
|
||||
|
||||
public void setColor(String color) {
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
public String getBrand() {
|
||||
return brand;
|
||||
}
|
||||
|
||||
public void setBrand(String brand) {
|
||||
this.brand = brand;
|
||||
}
|
||||
|
||||
public String getMfrs() {
|
||||
return mfrs;
|
||||
}
|
||||
|
||||
public void setMfrs(String mfrs) {
|
||||
this.mfrs = mfrs;
|
||||
}
|
||||
|
||||
public BigDecimal getUnitPrice() {
|
||||
return unitPrice;
|
||||
}
|
||||
|
||||
@@ -14,6 +14,12 @@ public class DepotHeadVo4InOutMCount {
|
||||
|
||||
private String standard;
|
||||
|
||||
private String color;
|
||||
|
||||
private String brand;
|
||||
|
||||
private String mfrs;
|
||||
|
||||
private String categoryName;
|
||||
|
||||
private String materialUnit;
|
||||
@@ -64,6 +70,30 @@ public class DepotHeadVo4InOutMCount {
|
||||
this.standard = standard;
|
||||
}
|
||||
|
||||
public String getColor() {
|
||||
return color;
|
||||
}
|
||||
|
||||
public void setColor(String color) {
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
public String getBrand() {
|
||||
return brand;
|
||||
}
|
||||
|
||||
public void setBrand(String brand) {
|
||||
this.brand = brand;
|
||||
}
|
||||
|
||||
public String getMfrs() {
|
||||
return mfrs;
|
||||
}
|
||||
|
||||
public void setMfrs(String mfrs) {
|
||||
this.mfrs = mfrs;
|
||||
}
|
||||
|
||||
public String getCategoryName() {
|
||||
return categoryName;
|
||||
}
|
||||
|
||||
@@ -21,6 +21,8 @@ public class DepotItemStockWarningCount {
|
||||
|
||||
private String MMfrs;
|
||||
|
||||
private String brand;
|
||||
|
||||
private String unitName;
|
||||
|
||||
private String MaterialOther;
|
||||
@@ -107,6 +109,14 @@ public class DepotItemStockWarningCount {
|
||||
this.MMfrs = MMfrs;
|
||||
}
|
||||
|
||||
public String getBrand() {
|
||||
return brand;
|
||||
}
|
||||
|
||||
public void setBrand(String brand) {
|
||||
this.brand = brand;
|
||||
}
|
||||
|
||||
public String getUnitName() {
|
||||
return unitName;
|
||||
}
|
||||
|
||||
@@ -321,22 +321,22 @@ public class DepotItemService {
|
||||
return result;
|
||||
}
|
||||
|
||||
public List<DepotItemVo4WithInfoEx> getListWithBugOrSale(String materialParam, String billType,
|
||||
public List<DepotItemVo4WithInfoEx> getListWithBuyOrSale(String materialParam, String billType,
|
||||
String beginTime, String endTime, String[] creatorArray, Long organId, String [] organArray, List<Long> depotList, Boolean forceFlag, Integer offset, Integer rows)throws Exception {
|
||||
List<DepotItemVo4WithInfoEx> list =null;
|
||||
try{
|
||||
list = depotItemMapperEx.getListWithBugOrSale(materialParam, billType, beginTime, endTime, creatorArray, organId, organArray, depotList, forceFlag, offset, rows);
|
||||
list = depotItemMapperEx.getListWithBuyOrSale(materialParam, billType, beginTime, endTime, creatorArray, organId, organArray, depotList, forceFlag, offset, rows);
|
||||
}catch(Exception e){
|
||||
JshException.readFail(logger, e);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public int getListWithBugOrSaleCount(String materialParam, String billType,
|
||||
public int getListWithBuyOrSaleCount(String materialParam, String billType,
|
||||
String beginTime, String endTime, String[] creatorArray, Long organId, String [] organArray, List<Long> depotList, Boolean forceFlag)throws Exception {
|
||||
int result=0;
|
||||
try{
|
||||
result = depotItemMapperEx.getListWithBugOrSaleCount(materialParam, billType, beginTime, endTime, creatorArray, organId, organArray, depotList, forceFlag);
|
||||
result = depotItemMapperEx.getListWithBuyOrSaleCount(materialParam, billType, beginTime, endTime, creatorArray, organId, organArray, depotList, forceFlag);
|
||||
}catch(Exception e){
|
||||
JshException.readFail(logger, e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user