给出入库明细和出入库汇总报表增加出入库开关的判断
This commit is contained in:
@@ -132,9 +132,10 @@ public class DepotHeadController {
|
|||||||
beginTime = Tools.parseDayToTime(beginTime, BusinessConstants.DAY_FIRST_TIME);
|
beginTime = Tools.parseDayToTime(beginTime, BusinessConstants.DAY_FIRST_TIME);
|
||||||
endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME);
|
endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME);
|
||||||
Boolean forceFlag = systemConfigService.getForceApprovalFlag();
|
Boolean forceFlag = systemConfigService.getForceApprovalFlag();
|
||||||
List<DepotHeadVo4InDetail> list = depotHeadService.findInOutDetail(beginTime, endTime, type, creatorArray, organArray, forceFlag,
|
Boolean inOutManageFlag = systemConfigService.getInOutManageFlag();
|
||||||
|
List<DepotHeadVo4InDetail> list = depotHeadService.findInOutDetail(beginTime, endTime, type, creatorArray, organArray, forceFlag, inOutManageFlag,
|
||||||
StringUtil.toNull(materialParam), depotList, oId, StringUtil.toNull(number), creator, remark, (currentPage-1)*pageSize, pageSize);
|
StringUtil.toNull(materialParam), depotList, oId, StringUtil.toNull(number), creator, remark, (currentPage-1)*pageSize, pageSize);
|
||||||
int total = depotHeadService.findInOutDetailCount(beginTime, endTime, type, creatorArray, organArray, forceFlag,
|
int total = depotHeadService.findInOutDetailCount(beginTime, endTime, type, creatorArray, organArray, forceFlag, inOutManageFlag,
|
||||||
StringUtil.toNull(materialParam), depotList, oId, StringUtil.toNull(number), creator, remark);
|
StringUtil.toNull(materialParam), depotList, oId, StringUtil.toNull(number), creator, remark);
|
||||||
map.put("total", total);
|
map.put("total", total);
|
||||||
//存放数据json数组
|
//存放数据json数组
|
||||||
@@ -195,10 +196,11 @@ public class DepotHeadController {
|
|||||||
beginTime = Tools.parseDayToTime(beginTime,BusinessConstants.DAY_FIRST_TIME);
|
beginTime = Tools.parseDayToTime(beginTime,BusinessConstants.DAY_FIRST_TIME);
|
||||||
endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME);
|
endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME);
|
||||||
Boolean forceFlag = systemConfigService.getForceApprovalFlag();
|
Boolean forceFlag = systemConfigService.getForceApprovalFlag();
|
||||||
List<DepotHeadVo4InOutMCount> list = depotHeadService.findInOutMaterialCount(beginTime, endTime, type, forceFlag, StringUtil.toNull(materialParam),
|
Boolean inOutManageFlag = systemConfigService.getInOutManageFlag();
|
||||||
depotList, oId, (currentPage-1)*pageSize, pageSize);
|
List<DepotHeadVo4InOutMCount> list = depotHeadService.findInOutMaterialCount(beginTime, endTime, type, forceFlag, inOutManageFlag,
|
||||||
int total = depotHeadService.findInOutMaterialCountTotal(beginTime, endTime, type, forceFlag, StringUtil.toNull(materialParam),
|
StringUtil.toNull(materialParam), depotList, oId, (currentPage-1)*pageSize, pageSize);
|
||||||
depotList, oId);
|
int total = depotHeadService.findInOutMaterialCountTotal(beginTime, endTime, type, forceFlag, inOutManageFlag,
|
||||||
|
StringUtil.toNull(materialParam), depotList, oId);
|
||||||
map.put("total", total);
|
map.put("total", total);
|
||||||
map.put("rows", list);
|
map.put("rows", list);
|
||||||
res.code = 200;
|
res.code = 200;
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ public interface DepotHeadMapperEx {
|
|||||||
@Param("creatorArray") String[] creatorArray,
|
@Param("creatorArray") String[] creatorArray,
|
||||||
@Param("organArray") String[] organArray,
|
@Param("organArray") String[] organArray,
|
||||||
@Param("forceFlag") Boolean forceFlag,
|
@Param("forceFlag") Boolean forceFlag,
|
||||||
|
@Param("inOutManageFlag") Boolean inOutManageFlag,
|
||||||
@Param("materialParam") String materialParam,
|
@Param("materialParam") String materialParam,
|
||||||
@Param("depotList") List<Long> depotList,
|
@Param("depotList") List<Long> depotList,
|
||||||
@Param("oId") Integer oId,
|
@Param("oId") Integer oId,
|
||||||
@@ -86,6 +87,7 @@ public interface DepotHeadMapperEx {
|
|||||||
@Param("creatorArray") String[] creatorArray,
|
@Param("creatorArray") String[] creatorArray,
|
||||||
@Param("organArray") String[] organArray,
|
@Param("organArray") String[] organArray,
|
||||||
@Param("forceFlag") Boolean forceFlag,
|
@Param("forceFlag") Boolean forceFlag,
|
||||||
|
@Param("inOutManageFlag") Boolean inOutManageFlag,
|
||||||
@Param("materialParam") String materialParam,
|
@Param("materialParam") String materialParam,
|
||||||
@Param("depotList") List<Long> depotList,
|
@Param("depotList") List<Long> depotList,
|
||||||
@Param("oId") Integer oId,
|
@Param("oId") Integer oId,
|
||||||
@@ -98,6 +100,7 @@ public interface DepotHeadMapperEx {
|
|||||||
@Param("endTime") String endTime,
|
@Param("endTime") String endTime,
|
||||||
@Param("type") String type,
|
@Param("type") String type,
|
||||||
@Param("forceFlag") Boolean forceFlag,
|
@Param("forceFlag") Boolean forceFlag,
|
||||||
|
@Param("inOutManageFlag") Boolean inOutManageFlag,
|
||||||
@Param("materialParam") String materialParam,
|
@Param("materialParam") String materialParam,
|
||||||
@Param("depotList") List<Long> depotList,
|
@Param("depotList") List<Long> depotList,
|
||||||
@Param("oId") Integer oId,
|
@Param("oId") Integer oId,
|
||||||
@@ -111,6 +114,7 @@ public interface DepotHeadMapperEx {
|
|||||||
@Param("endTime") String endTime,
|
@Param("endTime") String endTime,
|
||||||
@Param("type") String type,
|
@Param("type") String type,
|
||||||
@Param("forceFlag") Boolean forceFlag,
|
@Param("forceFlag") Boolean forceFlag,
|
||||||
|
@Param("inOutManageFlag") Boolean inOutManageFlag,
|
||||||
@Param("materialParam") String materialParam,
|
@Param("materialParam") String materialParam,
|
||||||
@Param("depotList") List<Long> depotList,
|
@Param("depotList") List<Long> depotList,
|
||||||
@Param("oId") Integer oId,
|
@Param("oId") Integer oId,
|
||||||
|
|||||||
@@ -657,11 +657,12 @@ public class DepotHeadService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public List<DepotHeadVo4InDetail> findInOutDetail(String beginTime, String endTime, String type, String [] creatorArray,
|
public List<DepotHeadVo4InDetail> findInOutDetail(String beginTime, String endTime, String type, String [] creatorArray,
|
||||||
String [] organArray, Boolean forceFlag, String materialParam, List<Long> depotList, Integer oId, String number,
|
String [] organArray, Boolean forceFlag, Boolean inOutManageFlag,
|
||||||
|
String materialParam, List<Long> depotList, Integer oId, String number,
|
||||||
Long creator, String remark, Integer offset, Integer rows) throws Exception{
|
Long creator, String remark, Integer offset, Integer rows) throws Exception{
|
||||||
List<DepotHeadVo4InDetail> list = null;
|
List<DepotHeadVo4InDetail> list = null;
|
||||||
try{
|
try{
|
||||||
list =depotHeadMapperEx.findInOutDetail(beginTime, endTime, type, creatorArray, organArray, forceFlag,
|
list =depotHeadMapperEx.findInOutDetail(beginTime, endTime, type, creatorArray, organArray, forceFlag, inOutManageFlag,
|
||||||
materialParam, depotList, oId, number, creator, remark, offset, rows);
|
materialParam, depotList, oId, number, creator, remark, offset, rows);
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
JshException.readFail(logger, e);
|
JshException.readFail(logger, e);
|
||||||
@@ -670,11 +671,11 @@ public class DepotHeadService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int findInOutDetailCount(String beginTime, String endTime, String type, String [] creatorArray,
|
public int findInOutDetailCount(String beginTime, String endTime, String type, String [] creatorArray,
|
||||||
String [] organArray, Boolean forceFlag, String materialParam, List<Long> depotList, Integer oId, String number,
|
String [] organArray, Boolean forceFlag, Boolean inOutManageFlag, String materialParam, List<Long> depotList, Integer oId, String number,
|
||||||
Long creator, String remark) throws Exception{
|
Long creator, String remark) throws Exception{
|
||||||
int result = 0;
|
int result = 0;
|
||||||
try{
|
try{
|
||||||
result =depotHeadMapperEx.findInOutDetailCount(beginTime, endTime, type, creatorArray, organArray, forceFlag,
|
result =depotHeadMapperEx.findInOutDetailCount(beginTime, endTime, type, creatorArray, organArray, forceFlag, inOutManageFlag,
|
||||||
materialParam, depotList, oId, number, creator, remark);
|
materialParam, depotList, oId, number, creator, remark);
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
JshException.readFail(logger, e);
|
JshException.readFail(logger, e);
|
||||||
@@ -682,14 +683,15 @@ public class DepotHeadService {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<DepotHeadVo4InOutMCount> findInOutMaterialCount(String beginTime, String endTime, String type, Boolean forceFlag, String materialParam,
|
public List<DepotHeadVo4InOutMCount> findInOutMaterialCount(String beginTime, String endTime, String type,
|
||||||
|
Boolean forceFlag, Boolean inOutManageFlag, String materialParam,
|
||||||
List<Long> depotList, Integer oId, Integer offset, Integer rows)throws Exception {
|
List<Long> depotList, Integer oId, Integer offset, Integer rows)throws Exception {
|
||||||
List<DepotHeadVo4InOutMCount> list = null;
|
List<DepotHeadVo4InOutMCount> list = null;
|
||||||
try{
|
try{
|
||||||
String [] creatorArray = getCreatorArray();
|
String [] creatorArray = getCreatorArray();
|
||||||
String subType = "出库".equals(type)? "销售" : "";
|
String subType = "出库".equals(type)? "销售" : "";
|
||||||
String [] organArray = getOrganArray(subType, "");
|
String [] organArray = getOrganArray(subType, "");
|
||||||
list =depotHeadMapperEx.findInOutMaterialCount(beginTime, endTime, type, forceFlag, materialParam, depotList, oId,
|
list =depotHeadMapperEx.findInOutMaterialCount(beginTime, endTime, type, forceFlag, inOutManageFlag, materialParam, depotList, oId,
|
||||||
creatorArray, organArray, offset, rows);
|
creatorArray, organArray, offset, rows);
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
JshException.readFail(logger, e);
|
JshException.readFail(logger, e);
|
||||||
@@ -697,14 +699,15 @@ public class DepotHeadService {
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int findInOutMaterialCountTotal(String beginTime, String endTime, String type, Boolean forceFlag, String materialParam,
|
public int findInOutMaterialCountTotal(String beginTime, String endTime, String type,
|
||||||
|
Boolean forceFlag, Boolean inOutManageFlag, String materialParam,
|
||||||
List<Long> depotList, Integer oId)throws Exception {
|
List<Long> depotList, Integer oId)throws Exception {
|
||||||
int result = 0;
|
int result = 0;
|
||||||
try{
|
try{
|
||||||
String [] creatorArray = getCreatorArray();
|
String [] creatorArray = getCreatorArray();
|
||||||
String subType = "出库".equals(type)? "销售" : "";
|
String subType = "出库".equals(type)? "销售" : "";
|
||||||
String [] organArray = getOrganArray(subType, "");
|
String [] organArray = getOrganArray(subType, "");
|
||||||
result =depotHeadMapperEx.findInOutMaterialCountTotal(beginTime, endTime, type, forceFlag, materialParam, depotList, oId,
|
result =depotHeadMapperEx.findInOutMaterialCountTotal(beginTime, endTime, type, forceFlag, inOutManageFlag, materialParam, depotList, oId,
|
||||||
creatorArray, organArray);
|
creatorArray, organArray);
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
JshException.readFail(logger, e);
|
JshException.readFail(logger, e);
|
||||||
|
|||||||
@@ -306,6 +306,9 @@
|
|||||||
<if test="type != null">
|
<if test="type != null">
|
||||||
and dh.type=#{type}
|
and dh.type=#{type}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="inOutManageFlag">
|
||||||
|
and (dh.sub_type!='采购' and dh.sub_type!='采购退货' and dh.sub_type!='销售' and dh.sub_type!='销售退货')
|
||||||
|
</if>
|
||||||
<if test="creatorArray != null">
|
<if test="creatorArray != null">
|
||||||
and dh.creator in (
|
and dh.creator in (
|
||||||
<foreach collection="creatorArray" item="creator" separator=",">
|
<foreach collection="creatorArray" item="creator" separator=",">
|
||||||
@@ -367,6 +370,9 @@
|
|||||||
<if test="type != null">
|
<if test="type != null">
|
||||||
and dh.type=#{type}
|
and dh.type=#{type}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="inOutManageFlag">
|
||||||
|
and (dh.sub_type!='采购' and dh.sub_type!='采购退货' and dh.sub_type!='销售' and dh.sub_type!='销售退货')
|
||||||
|
</if>
|
||||||
<if test="creatorArray != null">
|
<if test="creatorArray != null">
|
||||||
and dh.creator in (
|
and dh.creator in (
|
||||||
<foreach collection="creatorArray" item="creator" separator=",">
|
<foreach collection="creatorArray" item="creator" separator=",">
|
||||||
@@ -461,6 +467,9 @@
|
|||||||
<if test="forceFlag">
|
<if test="forceFlag">
|
||||||
and dh.status = '1'
|
and dh.status = '1'
|
||||||
</if>
|
</if>
|
||||||
|
<if test="inOutManageFlag">
|
||||||
|
and (dh.sub_type!='采购' and dh.sub_type!='采购退货' and dh.sub_type!='销售' and dh.sub_type!='销售退货')
|
||||||
|
</if>
|
||||||
and ifnull(dh.delete_flag,'0') !='1'
|
and ifnull(dh.delete_flag,'0') !='1'
|
||||||
group by di.material_id
|
group by di.material_id
|
||||||
<if test="offset != null and rows != null">
|
<if test="offset != null and rows != null">
|
||||||
@@ -521,6 +530,9 @@
|
|||||||
<if test="forceFlag">
|
<if test="forceFlag">
|
||||||
and dh.status = '1'
|
and dh.status = '1'
|
||||||
</if>
|
</if>
|
||||||
|
<if test="inOutManageFlag">
|
||||||
|
and (dh.sub_type!='采购' and dh.sub_type!='采购退货' and dh.sub_type!='销售' and dh.sub_type!='销售退货')
|
||||||
|
</if>
|
||||||
and ifnull(dh.delete_flag,'0') !='1'
|
and ifnull(dh.delete_flag,'0') !='1'
|
||||||
group by di.material_id) a
|
group by di.material_id) a
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
Reference in New Issue
Block a user