给销售采购统计增加机构id参数

This commit is contained in:
jishenghua 2024-01-04 00:22:48 +08:00
parent 198ca74efa
commit 3fd8767c92
3 changed files with 27 additions and 4 deletions

View File

@ -97,6 +97,7 @@ public class DepotHeadController {
@RequestParam("endTime") String endTime,
@RequestParam("type") String type,
@RequestParam(value = "creator", required = false) Long creator,
@RequestParam(value = "organizationId", required = false) Long organizationId,
@RequestParam("remark") String remark,
@RequestParam(value = "column", required = false, defaultValue = "createTime") String column,
@RequestParam(value = "order", required = false, defaultValue = "desc") String order,
@ -117,6 +118,9 @@ public class DepotHeadController {
}
List<DepotHeadVo4InDetail> resList = new ArrayList<DepotHeadVo4InDetail>();
String [] creatorArray = depotHeadService.getCreatorArray();
if(creatorArray == null && organizationId != null) {
creatorArray = depotHeadService.getCreatorArrayByOrg(organizationId);
}
String subType = "出库".equals(type)? "销售" : "";
String [] organArray = depotHeadService.getOrganArray(subType, "");
beginTime = Tools.parseDayToTime(beginTime, BusinessConstants.DAY_FIRST_TIME);
@ -166,6 +170,7 @@ public class DepotHeadController {
@RequestParam(value = "organId", required = false) Integer oId,
@RequestParam("materialParam") String materialParam,
@RequestParam(value = "depotId", required = false) Long depotId,
@RequestParam(value = "organizationId", required = false) Long organizationId,
@RequestParam("beginTime") String beginTime,
@RequestParam("endTime") String endTime,
@RequestParam("type") String type,
@ -191,10 +196,10 @@ public class DepotHeadController {
Boolean forceFlag = systemConfigService.getForceApprovalFlag();
Boolean inOutManageFlag = systemConfigService.getInOutManageFlag();
List<DepotHeadVo4InOutMCount> list = depotHeadService.findInOutMaterialCount(beginTime, endTime, type, forceFlag, inOutManageFlag,
StringUtil.toNull(materialParam), depotList, oId, StringUtil.safeSqlParse(column), StringUtil.safeSqlParse(order),
StringUtil.toNull(materialParam), depotList, organizationId, oId, StringUtil.safeSqlParse(column), StringUtil.safeSqlParse(order),
(currentPage-1)*pageSize, pageSize);
int total = depotHeadService.findInOutMaterialCountTotal(beginTime, endTime, type, forceFlag, inOutManageFlag,
StringUtil.toNull(materialParam), depotList, oId);
StringUtil.toNull(materialParam), depotList, organizationId, oId);
map.put("total", total);
map.put("rows", list);
res.code = 200;
@ -229,6 +234,7 @@ public class DepotHeadController {
@RequestParam("materialParam") String materialParam,
@RequestParam(value = "depotId", required = false) Long depotId,
@RequestParam(value = "depotIdF", required = false) Long depotIdF,
@RequestParam(value = "organizationId", required = false) Long organizationId,
@RequestParam("beginTime") String beginTime,
@RequestParam("endTime") String endTime,
@RequestParam("subType") String subType,
@ -262,6 +268,9 @@ public class DepotHeadController {
}
}
String [] creatorArray = depotHeadService.getCreatorArray();
if(creatorArray == null && organizationId != null) {
creatorArray = depotHeadService.getCreatorArrayByOrg(organizationId);
}
beginTime = Tools.parseDayToTime(beginTime, BusinessConstants.DAY_FIRST_TIME);
endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME);
Boolean forceFlag = systemConfigService.getForceApprovalFlag();

View File

@ -480,6 +480,7 @@ public class DepotItemController {
@RequestParam("endTime") String endTime,
@RequestParam(value = "organId", required = false) Long organId,
@RequestParam(value = "depotId", required = false) Long depotId,
@RequestParam(value = "organizationId", required = false) Long organizationId,
@RequestParam("materialParam") String materialParam,
@RequestParam("mpList") String mpList,
HttpServletRequest request)throws Exception {
@ -489,6 +490,9 @@ public class DepotItemController {
endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME);
try {
String [] creatorArray = depotHeadService.getCreatorArray();
if(creatorArray == null && organizationId != null) {
creatorArray = depotHeadService.getCreatorArrayByOrg(organizationId);
}
String [] organArray = null;
List<Long> depotList = depotService.parseDepotList(depotId);
Boolean forceFlag = systemConfigService.getForceApprovalFlag();
@ -645,6 +649,7 @@ public class DepotItemController {
@RequestParam("endTime") String endTime,
@RequestParam(value = "organId", required = false) Long organId,
@RequestParam(value = "depotId", required = false) Long depotId,
@RequestParam(value = "organizationId", required = false) Long organizationId,
@RequestParam("materialParam") String materialParam,
@RequestParam("mpList") String mpList,
HttpServletRequest request)throws Exception {
@ -654,6 +659,9 @@ public class DepotItemController {
endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME);
try {
String [] creatorArray = depotHeadService.getCreatorArray();
if(creatorArray == null && organizationId != null) {
creatorArray = depotHeadService.getCreatorArrayByOrg(organizationId);
}
String [] organArray = depotHeadService.getOrganArray("销售", "");
List<Long> depotList = depotService.parseDepotList(depotId);
Boolean forceFlag = systemConfigService.getForceApprovalFlag();

View File

@ -703,11 +703,14 @@ public class DepotHeadService {
public List<DepotHeadVo4InOutMCount> findInOutMaterialCount(String beginTime, String endTime, String type,
Boolean forceFlag, Boolean inOutManageFlag, String materialParam,
List<Long> depotList, Integer oId, String column, String order,
List<Long> depotList, Long organizationId, Integer oId, String column, String order,
Integer offset, Integer rows)throws Exception {
List<DepotHeadVo4InOutMCount> list = null;
try{
String [] creatorArray = getCreatorArray();
if(creatorArray == null && organizationId != null) {
creatorArray = getCreatorArrayByOrg(organizationId);
}
String subType = "出库".equals(type)? "销售" : "";
String [] organArray = getOrganArray(subType, "");
list =depotHeadMapperEx.findInOutMaterialCount(beginTime, endTime, type, forceFlag, inOutManageFlag, materialParam, depotList, oId,
@ -720,10 +723,13 @@ public class DepotHeadService {
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, Long organizationId, Integer oId)throws Exception {
int result = 0;
try{
String [] creatorArray = getCreatorArray();
if(creatorArray == null && organizationId != null) {
creatorArray = getCreatorArrayByOrg(organizationId);
}
String subType = "出库".equals(type)? "销售" : "";
String [] organArray = getOrganArray(subType, "");
result =depotHeadMapperEx.findInOutMaterialCountTotal(beginTime, endTime, type, forceFlag, inOutManageFlag, materialParam, depotList, oId,