将查询单据信息的两个接口合并为一个
This commit is contained in:
@@ -35,9 +35,9 @@ public class DepotHeadComponent implements ICommonQuery {
|
||||
String number = StringUtil.getInfo(search, "number");
|
||||
String beginTime = StringUtil.getInfo(search, "beginTime");
|
||||
String endTime = StringUtil.getInfo(search, "endTime");
|
||||
String dhIds = StringUtil.getInfo(search, "dhIds");
|
||||
String order = QueryUtils.order(map);
|
||||
return depotHeadService.select(type, subType, number, beginTime, endTime, dhIds, QueryUtils.offset(map), QueryUtils.rows(map));
|
||||
String materialParam = StringUtil.getInfo(search, "materialParam");
|
||||
String depotIds = StringUtil.getInfo(search, "depotIds");
|
||||
return depotHeadService.select(type, subType, number, beginTime, endTime, materialParam, depotIds, QueryUtils.offset(map), QueryUtils.rows(map));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -48,8 +48,9 @@ public class DepotHeadComponent implements ICommonQuery {
|
||||
String number = StringUtil.getInfo(search, "number");
|
||||
String beginTime = StringUtil.getInfo(search, "beginTime");
|
||||
String endTime = StringUtil.getInfo(search, "endTime");
|
||||
String dhIds = StringUtil.getInfo(search, "dhIds");
|
||||
return depotHeadService.countDepotHead(type, subType, number, beginTime, endTime, dhIds);
|
||||
String materialParam = StringUtil.getInfo(search, "materialParam");
|
||||
String depotIds = StringUtil.getInfo(search, "depotIds");
|
||||
return depotHeadService.countDepotHead(type, subType, number, beginTime, endTime, materialParam, depotIds);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -88,11 +88,12 @@ public class DepotHeadService {
|
||||
return list;
|
||||
}
|
||||
|
||||
public List<DepotHeadVo4List> select(String type, String subType, String number, String beginTime, String endTime, String dhIds, int offset, int rows)throws Exception {
|
||||
public List<DepotHeadVo4List> select(String type, String subType, String number, String beginTime, String endTime,
|
||||
String materialParam, String depotIds, int offset, int rows)throws Exception {
|
||||
List<DepotHeadVo4List> resList = new ArrayList<DepotHeadVo4List>();
|
||||
List<DepotHeadVo4List> list=null;
|
||||
try{
|
||||
list=depotHeadMapperEx.selectByConditionDepotHead(type, subType, number, beginTime, endTime, dhIds, offset, rows);
|
||||
list=depotHeadMapperEx.selectByConditionDepotHead(type, subType, number, beginTime, endTime, materialParam, depotIds, offset, rows);
|
||||
}catch(Exception e){
|
||||
logger.error("异常码[{}],异常提示[{}],异常[{}]",
|
||||
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
|
||||
@@ -127,10 +128,11 @@ public class DepotHeadService {
|
||||
|
||||
|
||||
|
||||
public Long countDepotHead(String type, String subType, String number, String beginTime, String endTime, String dhIds) throws Exception{
|
||||
public Long countDepotHead(String type, String subType, String number, String beginTime, String endTime,
|
||||
String materialParam, String depotIds) throws Exception{
|
||||
Long result=null;
|
||||
try{
|
||||
result=depotHeadMapperEx.countsByDepotHead(type, subType, number, beginTime, endTime, dhIds);
|
||||
result=depotHeadMapperEx.countsByDepotHead(type, subType, number, beginTime, endTime, materialParam, depotIds);
|
||||
}catch(Exception e){
|
||||
logger.error("异常码[{}],异常提示[{}],异常[{}]",
|
||||
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
|
||||
|
||||
@@ -188,19 +188,6 @@ public class DepotItemService {
|
||||
return list==null?0:list.size();
|
||||
}
|
||||
|
||||
public List<DepotItemVo4HeaderId> getHeaderIdByMaterial(String materialParam, String depotIds)throws Exception {
|
||||
List<DepotItemVo4HeaderId> list =null;
|
||||
try{
|
||||
list = depotItemMapperEx.getHeaderIdByMaterial(materialParam, depotIds);
|
||||
}catch(Exception e){
|
||||
logger.error("异常码[{}],异常提示[{}],异常[{}]",
|
||||
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
|
||||
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
|
||||
ExceptionConstants.DATA_READ_FAIL_MSG);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public List<DepotItemVo4DetailByTypeAndMId> findDetailByTypeAndMaterialIdList(Map<String, String> map)throws Exception {
|
||||
String mIdStr = map.get("mId");
|
||||
Long mId = null;
|
||||
|
||||
Reference in New Issue
Block a user