给根据仓库和商品查询单据列表接口增加是否出入库管理的开关
This commit is contained in:
@@ -101,7 +101,8 @@ public class DepotItemController {
|
|||||||
endTime = endTime + BusinessConstants.DAY_LAST_TIME;
|
endTime = endTime + BusinessConstants.DAY_LAST_TIME;
|
||||||
}
|
}
|
||||||
Boolean forceFlag = systemConfigService.getForceApprovalFlag();
|
Boolean forceFlag = systemConfigService.getForceApprovalFlag();
|
||||||
List<DepotItemVo4DetailByTypeAndMId> list = depotItemService.findDetailByDepotIdsAndMaterialIdList(depotIds, forceFlag, sku,
|
Boolean inOutManageFlag = systemConfigService.getInOutManageFlag();
|
||||||
|
List<DepotItemVo4DetailByTypeAndMId> list = depotItemService.findDetailByDepotIdsAndMaterialIdList(depotIds, forceFlag, inOutManageFlag, sku,
|
||||||
batchNumber, StringUtil.toNull(number), beginTime, endTime, mId, (currentPage-1)*pageSize, pageSize);
|
batchNumber, StringUtil.toNull(number), beginTime, endTime, mId, (currentPage-1)*pageSize, pageSize);
|
||||||
JSONArray dataArray = new JSONArray();
|
JSONArray dataArray = new JSONArray();
|
||||||
if (list != null) {
|
if (list != null) {
|
||||||
@@ -129,7 +130,7 @@ public class DepotItemController {
|
|||||||
return returnJson(objectMap, "查找不到数据", ErpInfo.OK.code);
|
return returnJson(objectMap, "查找不到数据", ErpInfo.OK.code);
|
||||||
}
|
}
|
||||||
objectMap.put("rows", dataArray);
|
objectMap.put("rows", dataArray);
|
||||||
objectMap.put("total", depotItemService.findDetailByDepotIdsAndMaterialIdCount(depotIds, forceFlag, sku,
|
objectMap.put("total", depotItemService.findDetailByDepotIdsAndMaterialIdCount(depotIds, forceFlag, inOutManageFlag, sku,
|
||||||
batchNumber, StringUtil.toNull(number), beginTime, endTime, mId));
|
batchNumber, StringUtil.toNull(number), beginTime, endTime, mId));
|
||||||
return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code);
|
return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ public interface DepotItemMapperEx {
|
|||||||
List<DepotItemVo4DetailByTypeAndMId> findDetailByDepotIdsAndMaterialIdList(
|
List<DepotItemVo4DetailByTypeAndMId> findDetailByDepotIdsAndMaterialIdList(
|
||||||
@Param("depotIdArray") Long[] depotIdArray,
|
@Param("depotIdArray") Long[] depotIdArray,
|
||||||
@Param("forceFlag") Boolean forceFlag,
|
@Param("forceFlag") Boolean forceFlag,
|
||||||
|
@Param("inOutManageFlag") Boolean inOutManageFlag,
|
||||||
@Param("sku") String sku,
|
@Param("sku") String sku,
|
||||||
@Param("batchNumber") String batchNumber,
|
@Param("batchNumber") String batchNumber,
|
||||||
@Param("number") String number,
|
@Param("number") String number,
|
||||||
@@ -44,6 +45,7 @@ public interface DepotItemMapperEx {
|
|||||||
Long findDetailByDepotIdsAndMaterialIdCount(
|
Long findDetailByDepotIdsAndMaterialIdCount(
|
||||||
@Param("depotIdArray") Long[] depotIdArray,
|
@Param("depotIdArray") Long[] depotIdArray,
|
||||||
@Param("forceFlag") Boolean forceFlag,
|
@Param("forceFlag") Boolean forceFlag,
|
||||||
|
@Param("inOutManageFlag") Boolean inOutManageFlag,
|
||||||
@Param("sku") String sku,
|
@Param("sku") String sku,
|
||||||
@Param("batchNumber") String batchNumber,
|
@Param("batchNumber") String batchNumber,
|
||||||
@Param("number") String number,
|
@Param("number") String number,
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ public class DepotItemService {
|
|||||||
return list==null?0:list.size();
|
return list==null?0:list.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<DepotItemVo4DetailByTypeAndMId> findDetailByDepotIdsAndMaterialIdList(String depotIds, Boolean forceFlag, String sku, String batchNumber,
|
public List<DepotItemVo4DetailByTypeAndMId> findDetailByDepotIdsAndMaterialIdList(String depotIds, Boolean forceFlag, Boolean inOutManageFlag, String sku, String batchNumber,
|
||||||
String number, String beginTime, String endTime, Long mId, int offset, int rows)throws Exception {
|
String number, String beginTime, String endTime, Long mId, int offset, int rows)throws Exception {
|
||||||
Long depotId = null;
|
Long depotId = null;
|
||||||
if(StringUtil.isNotEmpty(depotIds)) {
|
if(StringUtil.isNotEmpty(depotIds)) {
|
||||||
@@ -186,14 +186,14 @@ public class DepotItemService {
|
|||||||
Long[] depotIdArray = StringUtil.listToLongArray(depotList);
|
Long[] depotIdArray = StringUtil.listToLongArray(depotList);
|
||||||
List<DepotItemVo4DetailByTypeAndMId> list =null;
|
List<DepotItemVo4DetailByTypeAndMId> list =null;
|
||||||
try{
|
try{
|
||||||
list = depotItemMapperEx.findDetailByDepotIdsAndMaterialIdList(depotIdArray, forceFlag, sku, batchNumber, number, beginTime, endTime, mId, offset, rows);
|
list = depotItemMapperEx.findDetailByDepotIdsAndMaterialIdList(depotIdArray, forceFlag, inOutManageFlag, sku, batchNumber, number, beginTime, endTime, mId, offset, rows);
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
JshException.readFail(logger, e);
|
JshException.readFail(logger, e);
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Long findDetailByDepotIdsAndMaterialIdCount(String depotIds, Boolean forceFlag, String sku, String batchNumber,
|
public Long findDetailByDepotIdsAndMaterialIdCount(String depotIds, Boolean forceFlag, Boolean inOutManageFlag, String sku, String batchNumber,
|
||||||
String number, String beginTime, String endTime, Long mId)throws Exception {
|
String number, String beginTime, String endTime, Long mId)throws Exception {
|
||||||
Long depotId = null;
|
Long depotId = null;
|
||||||
if(StringUtil.isNotEmpty(depotIds)) {
|
if(StringUtil.isNotEmpty(depotIds)) {
|
||||||
@@ -203,7 +203,7 @@ public class DepotItemService {
|
|||||||
Long[] depotIdArray = StringUtil.listToLongArray(depotList);
|
Long[] depotIdArray = StringUtil.listToLongArray(depotList);
|
||||||
Long result =null;
|
Long result =null;
|
||||||
try{
|
try{
|
||||||
result = depotItemMapperEx.findDetailByDepotIdsAndMaterialIdCount(depotIdArray, forceFlag, sku, batchNumber, number, beginTime, endTime, mId);
|
result = depotItemMapperEx.findDetailByDepotIdsAndMaterialIdCount(depotIdArray, forceFlag, inOutManageFlag, sku, batchNumber, number, beginTime, endTime, mId);
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
JshException.readFail(logger, e);
|
JshException.readFail(logger, e);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -165,6 +165,9 @@
|
|||||||
or (dh.type='其它' and dh.sub_type='组装单')
|
or (dh.type='其它' and dh.sub_type='组装单')
|
||||||
or (dh.type='其它' and dh.sub_type='拆卸单')
|
or (dh.type='其它' and dh.sub_type='拆卸单')
|
||||||
or (dh.type='其它' and dh.sub_type='盘点复盘'))
|
or (dh.type='其它' and dh.sub_type='盘点复盘'))
|
||||||
|
<if test="inOutManageFlag">
|
||||||
|
and (dh.sub_type!='采购' and dh.sub_type!='采购退货' and dh.sub_type!='销售' and dh.sub_type!='销售退货')
|
||||||
|
</if>
|
||||||
<if test="depotIdArray != null">
|
<if test="depotIdArray != null">
|
||||||
and di.depot_id in (
|
and di.depot_id in (
|
||||||
<foreach collection="depotIdArray" item="depotId" separator=",">#{depotId}</foreach>
|
<foreach collection="depotIdArray" item="depotId" separator=",">#{depotId}</foreach>
|
||||||
@@ -242,6 +245,9 @@
|
|||||||
or (dh.type='其它' and dh.sub_type='组装单')
|
or (dh.type='其它' and dh.sub_type='组装单')
|
||||||
or (dh.type='其它' and dh.sub_type='拆卸单')
|
or (dh.type='其它' and dh.sub_type='拆卸单')
|
||||||
or (dh.type='其它' and dh.sub_type='盘点复盘'))
|
or (dh.type='其它' and dh.sub_type='盘点复盘'))
|
||||||
|
<if test="inOutManageFlag">
|
||||||
|
and (dh.sub_type!='采购' and dh.sub_type!='采购退货' and dh.sub_type!='销售' and dh.sub_type!='销售退货')
|
||||||
|
</if>
|
||||||
<if test="depotIdArray != null">
|
<if test="depotIdArray != null">
|
||||||
and di.depot_id in (
|
and di.depot_id in (
|
||||||
<foreach collection="depotIdArray" item="depotId" separator=",">#{depotId}</foreach>
|
<foreach collection="depotIdArray" item="depotId" separator=",">#{depotId}</foreach>
|
||||||
|
|||||||
Reference in New Issue
Block a user