给出入库明细和出入库汇总报表增加出入库开关的判断

This commit is contained in:
季圣华
2023-12-12 21:43:20 +08:00
parent e7911b1304
commit c6f2bd4ddd
4 changed files with 38 additions and 17 deletions

View File

@@ -132,9 +132,10 @@ public class DepotHeadController {
beginTime = Tools.parseDayToTime(beginTime, BusinessConstants.DAY_FIRST_TIME);
endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME);
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);
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);
map.put("total", total);
//存放数据json数组
@@ -195,10 +196,11 @@ public class DepotHeadController {
beginTime = Tools.parseDayToTime(beginTime,BusinessConstants.DAY_FIRST_TIME);
endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME);
Boolean forceFlag = systemConfigService.getForceApprovalFlag();
List<DepotHeadVo4InOutMCount> list = depotHeadService.findInOutMaterialCount(beginTime, endTime, type, forceFlag, StringUtil.toNull(materialParam),
depotList, oId, (currentPage-1)*pageSize, pageSize);
int total = depotHeadService.findInOutMaterialCountTotal(beginTime, endTime, type, forceFlag, StringUtil.toNull(materialParam),
depotList, oId);
Boolean inOutManageFlag = systemConfigService.getInOutManageFlag();
List<DepotHeadVo4InOutMCount> list = depotHeadService.findInOutMaterialCount(beginTime, endTime, type, forceFlag, inOutManageFlag,
StringUtil.toNull(materialParam), depotList, oId, (currentPage-1)*pageSize, pageSize);
int total = depotHeadService.findInOutMaterialCountTotal(beginTime, endTime, type, forceFlag, inOutManageFlag,
StringUtil.toNull(materialParam), depotList, oId);
map.put("total", total);
map.put("rows", list);
res.code = 200;

View File

@@ -70,6 +70,7 @@ public interface DepotHeadMapperEx {
@Param("creatorArray") String[] creatorArray,
@Param("organArray") String[] organArray,
@Param("forceFlag") Boolean forceFlag,
@Param("inOutManageFlag") Boolean inOutManageFlag,
@Param("materialParam") String materialParam,
@Param("depotList") List<Long> depotList,
@Param("oId") Integer oId,
@@ -86,6 +87,7 @@ public interface DepotHeadMapperEx {
@Param("creatorArray") String[] creatorArray,
@Param("organArray") String[] organArray,
@Param("forceFlag") Boolean forceFlag,
@Param("inOutManageFlag") Boolean inOutManageFlag,
@Param("materialParam") String materialParam,
@Param("depotList") List<Long> depotList,
@Param("oId") Integer oId,
@@ -98,6 +100,7 @@ public interface DepotHeadMapperEx {
@Param("endTime") String endTime,
@Param("type") String type,
@Param("forceFlag") Boolean forceFlag,
@Param("inOutManageFlag") Boolean inOutManageFlag,
@Param("materialParam") String materialParam,
@Param("depotList") List<Long> depotList,
@Param("oId") Integer oId,
@@ -111,6 +114,7 @@ public interface DepotHeadMapperEx {
@Param("endTime") String endTime,
@Param("type") String type,
@Param("forceFlag") Boolean forceFlag,
@Param("inOutManageFlag") Boolean inOutManageFlag,
@Param("materialParam") String materialParam,
@Param("depotList") List<Long> depotList,
@Param("oId") Integer oId,

View File

@@ -657,11 +657,12 @@ public class DepotHeadService {
}
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,
Long creator, String remark, Integer offset, Integer rows) throws Exception{
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{
List<DepotHeadVo4InDetail> list = null;
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);
}catch(Exception e){
JshException.readFail(logger, e);
@@ -670,11 +671,11 @@ public class DepotHeadService {
}
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{
int result = 0;
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);
}catch(Exception e){
JshException.readFail(logger, e);
@@ -682,14 +683,15 @@ public class DepotHeadService {
return result;
}
public List<DepotHeadVo4InOutMCount> findInOutMaterialCount(String beginTime, String endTime, String type, Boolean forceFlag, String materialParam,
List<Long> depotList, Integer oId, Integer offset, Integer rows)throws Exception {
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<DepotHeadVo4InOutMCount> list = null;
try{
String [] creatorArray = getCreatorArray();
String subType = "出库".equals(type)? "销售" : "";
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);
}catch(Exception e){
JshException.readFail(logger, e);
@@ -697,14 +699,15 @@ public class DepotHeadService {
return list;
}
public int findInOutMaterialCountTotal(String beginTime, String endTime, String type, Boolean forceFlag, String materialParam,
List<Long> depotList, Integer oId)throws Exception {
public int findInOutMaterialCountTotal(String beginTime, String endTime, String type,
Boolean forceFlag, Boolean inOutManageFlag, String materialParam,
List<Long> depotList, Integer oId)throws Exception {
int result = 0;
try{
String [] creatorArray = getCreatorArray();
String subType = "出库".equals(type)? "销售" : "";
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);
}catch(Exception e){
JshException.readFail(logger, e);

View File

@@ -306,6 +306,9 @@
<if test="type != null">
and dh.type=#{type}
</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">
and dh.creator in (
<foreach collection="creatorArray" item="creator" separator=",">
@@ -367,6 +370,9 @@
<if test="type != null">
and dh.type=#{type}
</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">
and dh.creator in (
<foreach collection="creatorArray" item="creator" separator=",">
@@ -461,6 +467,9 @@
<if test="forceFlag">
and dh.status = '1'
</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'
group by di.material_id
<if test="offset != null and rows != null">
@@ -521,6 +530,9 @@
<if test="forceFlag">
and dh.status = '1'
</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'
group by di.material_id) a
</select>