仓库添加负责人字段
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.jsh.erp.service;
|
||||
|
||||
import com.jsh.erp.constants.BusinessConstants;
|
||||
import com.jsh.erp.datasource.entities.Log;
|
||||
import com.jsh.erp.datasource.entities.User;
|
||||
import com.jsh.erp.datasource.mappers.LogMapper;
|
||||
@@ -60,11 +61,11 @@ public class CommonQueryManager {
|
||||
* @param parameterMap
|
||||
* @return
|
||||
*/
|
||||
public int counts(String apiName, Map<String, String> parameterMap) {
|
||||
public Long counts(String apiName, Map<String, String> parameterMap) {
|
||||
if (StringUtil.isNotEmpty(apiName)) {
|
||||
return container.getCommonQuery(apiName).counts(parameterMap);
|
||||
}
|
||||
return 0;
|
||||
return BusinessConstants.DEFAULT_LIST_NULL_NUMBER;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -34,7 +34,7 @@ public interface ICommonQuery {
|
||||
* @param parameterMap 查询参数
|
||||
* @return 查询结果
|
||||
*/
|
||||
int counts(Map<String, String> parameterMap);
|
||||
Long counts(Map<String, String> parameterMap);
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
|
||||
@@ -34,8 +34,9 @@ public class InterfaceContainer {
|
||||
}
|
||||
|
||||
public int getResourceType(String apiName) {
|
||||
if (!nameTypeMap.containsKey(apiName))
|
||||
if (!nameTypeMap.containsKey(apiName)) {
|
||||
throw new RuntimeException("资源:" + apiName + "的组件不存在");
|
||||
}
|
||||
return nameTypeMap.get(apiName);
|
||||
}
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ public class AccountComponent implements ICommonQuery {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int counts(Map<String, String> map) {
|
||||
public Long counts(Map<String, String> map) {
|
||||
String search = map.get(Constants.SEARCH);
|
||||
String name = StringUtil.getInfo(search, "name");
|
||||
String serialNo = StringUtil.getInfo(search, "serialNo");
|
||||
|
||||
@@ -70,7 +70,7 @@ public class AccountService {
|
||||
return resList;
|
||||
}
|
||||
|
||||
public int countAccount(String name, String serialNo, String remark) {
|
||||
public Long countAccount(String name, String serialNo, String remark) {
|
||||
return accountMapperEx.countsByAccount(name, serialNo, remark);
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ public class AccountHeadComponent implements ICommonQuery {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int counts(Map<String, String> map) {
|
||||
public Long counts(Map<String, String> map) {
|
||||
String search = map.get(Constants.SEARCH);
|
||||
String type = StringUtil.getInfo(search, "type");
|
||||
String billNo = StringUtil.getInfo(search, "billNo");
|
||||
|
||||
@@ -55,7 +55,7 @@ public class AccountHeadService {
|
||||
return resList;
|
||||
}
|
||||
|
||||
public int countAccountHead(String type, String billNo, String beginTime, String endTime) {
|
||||
public Long countAccountHead(String type, String billNo, String beginTime, String endTime) {
|
||||
return accountHeadMapperEx.countsByAccountHead(type, billNo, beginTime, endTime);
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ public class AccountItemComponent implements ICommonQuery {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int counts(Map<String, String> map) {
|
||||
public Long counts(Map<String, String> map) {
|
||||
String search = map.get(Constants.SEARCH);
|
||||
String name = StringUtil.getInfo(search, "name");
|
||||
Integer type = StringUtil.parseInteger(StringUtil.getInfo(search, "type"));
|
||||
|
||||
@@ -45,7 +45,7 @@ public class AccountItemService {
|
||||
return accountItemMapperEx.selectByConditionAccountItem(name, type, remark, offset, rows);
|
||||
}
|
||||
|
||||
public int countAccountItem(String name, Integer type, String remark) {
|
||||
public Long countAccountItem(String name, Integer type, String remark) {
|
||||
return accountItemMapperEx.countsByAccountItem(name, type, remark);
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ public class AppComponent implements ICommonQuery {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int counts(Map<String, String> map) {
|
||||
public Long counts(Map<String, String> map) {
|
||||
String search = map.get(Constants.SEARCH);
|
||||
String name = StringUtil.getInfo(search, "name");
|
||||
String type = StringUtil.getInfo(search, "type");
|
||||
|
||||
@@ -60,7 +60,7 @@ public class AppService {
|
||||
return appMapperEx.selectByConditionApp(name, type, offset, rows);
|
||||
}
|
||||
|
||||
public int countApp(String name, String type) {
|
||||
public Long countApp(String name, String type) {
|
||||
return appMapperEx.countsByApp(name, type);
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ public class DepotComponent implements ICommonQuery {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int counts(Map<String, String> map) {
|
||||
public Long counts(Map<String, String> map) {
|
||||
String search = map.get(Constants.SEARCH);
|
||||
String name = StringUtil.getInfo(search, "name");
|
||||
Integer type = StringUtil.parseInteger(StringUtil.getInfo(search, "type"));
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.jsh.erp.service.depot;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.jsh.erp.datasource.entities.Depot;
|
||||
import com.jsh.erp.datasource.entities.DepotEx;
|
||||
import com.jsh.erp.datasource.entities.DepotExample;
|
||||
import com.jsh.erp.datasource.mappers.DepotMapper;
|
||||
import com.jsh.erp.datasource.mappers.DepotMapperEx;
|
||||
@@ -14,6 +15,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
public class DepotService {
|
||||
@@ -44,7 +46,7 @@ public class DepotService {
|
||||
return depotMapperEx.selectByConditionDepot(name, type, remark, offset, rows);
|
||||
}
|
||||
|
||||
public int countDepot(String name, Integer type, String remark) {
|
||||
public Long countDepot(String name, Integer type, String remark) {
|
||||
return depotMapperEx.countsByDepot(name, type, remark);
|
||||
}
|
||||
|
||||
@@ -97,4 +99,8 @@ public class DepotService {
|
||||
return list;
|
||||
}
|
||||
|
||||
public List<DepotEx> getDepotList(Map<String, Object> parameterMap) {
|
||||
return depotMapperEx.getDepotList(parameterMap);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ public class DepotHeadComponent implements ICommonQuery {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int counts(Map<String, String> map) {
|
||||
public Long counts(Map<String, String> map) {
|
||||
String search = map.get(Constants.SEARCH);
|
||||
String type = StringUtil.getInfo(search, "type");
|
||||
String subType = StringUtil.getInfo(search, "subType");
|
||||
|
||||
@@ -95,7 +95,7 @@ public class DepotHeadService {
|
||||
|
||||
|
||||
|
||||
public int countDepotHead(String type, String subType, String number, String beginTime, String endTime, String dhIds) {
|
||||
public Long countDepotHead(String type, String subType, String number, String beginTime, String endTime, String dhIds) {
|
||||
return depotHeadMapperEx.countsByDepotHead(type, subType, number, beginTime, endTime, dhIds);
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ public class DepotItemComponent implements ICommonQuery {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int counts(Map<String, String> map) {
|
||||
public Long counts(Map<String, String> map) {
|
||||
String search = map.get(Constants.SEARCH);
|
||||
String name = StringUtil.getInfo(search, "name");
|
||||
Integer type = StringUtil.parseInteger(StringUtil.getInfo(search, "type"));
|
||||
|
||||
@@ -68,7 +68,7 @@ public class DepotItemService {
|
||||
return depotItemMapperEx.selectByConditionDepotItem(name, type, remark, offset, rows);
|
||||
}
|
||||
|
||||
public int countDepotItem(String name, Integer type, String remark) {
|
||||
public Long countDepotItem(String name, Integer type, String remark) {
|
||||
return depotItemMapperEx.countsByDepotItem(name, type, remark);
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ public class DepotItemService {
|
||||
return depotItemMapperEx.findDetailByTypeAndMaterialIdList(mId, QueryUtils.offset(map), QueryUtils.rows(map));
|
||||
}
|
||||
|
||||
public int findDetailByTypeAndMaterialIdCounts(Map<String, String> map) {
|
||||
public Long findDetailByTypeAndMaterialIdCounts(Map<String, String> map) {
|
||||
String mIdStr = map.get("mId");
|
||||
Long mId = null;
|
||||
if(!StringUtil.isEmpty(mIdStr)) {
|
||||
@@ -137,7 +137,7 @@ public class DepotItemService {
|
||||
return depotItemMapperEx.findStockNumByMaterialIdList(mId, monthTime, QueryUtils.offset(map), QueryUtils.rows(map));
|
||||
}
|
||||
|
||||
public int findStockNumByMaterialIdCounts(Map<String, String> map) {
|
||||
public Long findStockNumByMaterialIdCounts(Map<String, String> map) {
|
||||
String mIdStr = map.get("mId");
|
||||
Long mId = null;
|
||||
if(!StringUtil.isEmpty(mIdStr)) {
|
||||
|
||||
@@ -39,7 +39,7 @@ public class FunctionsComponent implements ICommonQuery {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int counts(Map<String, String> map) {
|
||||
public Long counts(Map<String, String> map) {
|
||||
String search = map.get(Constants.SEARCH);
|
||||
String name = StringUtil.getInfo(search, "name");
|
||||
String type = StringUtil.getInfo(search, "type");
|
||||
|
||||
@@ -38,7 +38,7 @@ public class FunctionsService {
|
||||
return functionsMapperEx.selectByConditionFunctions(name, type, offset, rows);
|
||||
}
|
||||
|
||||
public int countFunctions(String name, String type) {
|
||||
public Long countFunctions(String name, String type) {
|
||||
return functionsMapperEx.countsByFunctions(name, type);
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ public class InOutItemComponent implements ICommonQuery {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int counts(Map<String, String> map) {
|
||||
public Long counts(Map<String, String> map) {
|
||||
String search = map.get(Constants.SEARCH);
|
||||
String name = StringUtil.getInfo(search, "name");
|
||||
String type = StringUtil.getInfo(search, "type");
|
||||
|
||||
@@ -38,7 +38,7 @@ public class InOutItemService {
|
||||
return inOutItemMapperEx.selectByConditionInOutItem(name, type, remark, offset, rows);
|
||||
}
|
||||
|
||||
public int countInOutItem(String name, String type, String remark) {
|
||||
public Long countInOutItem(String name, String type, String remark) {
|
||||
return inOutItemMapperEx.countsByInOutItem(name, type, remark);
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ public class LogComponent implements ICommonQuery {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int counts(Map<String, String> map) {
|
||||
public Long counts(Map<String, String> map) {
|
||||
String search = map.get(Constants.SEARCH);
|
||||
String operation = StringUtil.getInfo(search, "operation");
|
||||
Integer usernameID = StringUtil.parseInteger(StringUtil.getInfo(search, "usernameID"));
|
||||
|
||||
@@ -44,7 +44,7 @@ public class LogService {
|
||||
contentdetails, offset, rows);
|
||||
}
|
||||
|
||||
public int countLog(String operation, Integer usernameID, String clientIp, Integer status, String beginTime, String endTime,
|
||||
public Long countLog(String operation, Integer usernameID, String clientIp, Integer status, String beginTime, String endTime,
|
||||
String contentdetails) {
|
||||
return logMapperEx.countsByLog(operation, usernameID, clientIp, status, beginTime, endTime, contentdetails);
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ public class MaterialComponent implements ICommonQuery {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int counts(Map<String, String> map) {
|
||||
public Long counts(Map<String, String> map) {
|
||||
String search = map.get(Constants.SEARCH);
|
||||
String name = StringUtil.getInfo(search, "name");
|
||||
String model = StringUtil.getInfo(search, "model");
|
||||
|
||||
@@ -73,7 +73,7 @@ public class MaterialService {
|
||||
return resList;
|
||||
}
|
||||
|
||||
public int countMaterial(String name, String model,Long categoryId, String categoryIds,String mpList) {
|
||||
public Long countMaterial(String name, String model,Long categoryId, String categoryIds,String mpList) {
|
||||
return materialMapperEx.countsByMaterial(name, model,categoryId,categoryIds,mpList);
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ public class MaterialCategoryComponent implements ICommonQuery {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int counts(Map<String, String> map) {
|
||||
public Long counts(Map<String, String> map) {
|
||||
String search = map.get(Constants.SEARCH);
|
||||
String name = StringUtil.getInfo(search, "name");
|
||||
Integer parentId = StringUtil.parseInteger(StringUtil.getInfo(search, "parentId"));
|
||||
|
||||
@@ -53,7 +53,7 @@ public class MaterialCategoryService {
|
||||
return materialCategoryMapperEx.selectByConditionMaterialCategory(name, parentId, offset, rows);
|
||||
}
|
||||
|
||||
public int countMaterialCategory(String name, Integer parentId) {
|
||||
public Long countMaterialCategory(String name, Integer parentId) {
|
||||
return materialCategoryMapperEx.countsByMaterialCategory(name, parentId);
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ public class MaterialPropertyComponent implements ICommonQuery {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int counts(Map<String, String> map) {
|
||||
public Long counts(Map<String, String> map) {
|
||||
String search = map.get(Constants.SEARCH);
|
||||
String name = StringUtil.getInfo(search, "name");
|
||||
return materialPropertyService.countMaterialProperty(name);
|
||||
|
||||
@@ -37,7 +37,7 @@ public class MaterialPropertyService {
|
||||
return materialPropertyMapperEx.selectByConditionMaterialProperty(name, offset, rows);
|
||||
}
|
||||
|
||||
public int countMaterialProperty(String name) {
|
||||
public Long countMaterialProperty(String name) {
|
||||
return materialPropertyMapperEx.countsByMaterialProperty(name);
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ public class PersonComponent implements ICommonQuery {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int counts(Map<String, String> map) {
|
||||
public Long counts(Map<String, String> map) {
|
||||
String search = map.get(Constants.SEARCH);
|
||||
String name = StringUtil.getInfo(search, "name");
|
||||
String type = StringUtil.getInfo(search, "type");
|
||||
|
||||
@@ -38,7 +38,7 @@ public class PersonService {
|
||||
return personMapperEx.selectByConditionPerson(name, type, offset, rows);
|
||||
}
|
||||
|
||||
public int countPerson(String name, String type) {
|
||||
public Long countPerson(String name, String type) {
|
||||
return personMapperEx.countsByPerson(name, type);
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ public class RoleComponent implements ICommonQuery {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int counts(Map<String, String> map) {
|
||||
public Long counts(Map<String, String> map) {
|
||||
String search = map.get(Constants.SEARCH);
|
||||
String name = StringUtil.getInfo(search, "name");
|
||||
return roleService.countRole(name);
|
||||
|
||||
@@ -40,7 +40,7 @@ public class RoleService {
|
||||
return roleMapperEx.selectByConditionRole(name, offset, rows);
|
||||
}
|
||||
|
||||
public int countRole(String name) {
|
||||
public Long countRole(String name) {
|
||||
return roleMapperEx.countsByRole(name);
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ public class SerialNumberComponent implements ICommonQuery {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int counts(Map<String, String> map) {
|
||||
public Long counts(Map<String, String> map) {
|
||||
String search = map.get(Constants.SEARCH);
|
||||
String serialNumber = StringUtil.getInfo(search, "serialNumber");
|
||||
String materialName = StringUtil.getInfo(search, "materialName");
|
||||
|
||||
@@ -61,7 +61,7 @@ public class SerialNumberService {
|
||||
|
||||
}
|
||||
|
||||
public int countSerialNumber(String serialNumber,String materialName) {
|
||||
public Long countSerialNumber(String serialNumber,String materialName) {
|
||||
return serialNumberMapperEx.countSerialNumber(serialNumber, materialName);
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ public class SupplierComponent implements ICommonQuery {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int counts(Map<String, String> map) {
|
||||
public Long counts(Map<String, String> map) {
|
||||
String search = map.get(Constants.SEARCH);
|
||||
String supplier = StringUtil.getInfo(search, "supplier");
|
||||
String type = StringUtil.getInfo(search, "type");
|
||||
|
||||
@@ -42,7 +42,7 @@ public class SupplierService {
|
||||
return supplierMapperEx.selectByConditionSupplier(supplier, type, phonenum, telephone, description, offset, rows);
|
||||
}
|
||||
|
||||
public int countSupplier(String supplier, String type, String phonenum, String telephone, String description) {
|
||||
public Long countSupplier(String supplier, String type, String phonenum, String telephone, String description) {
|
||||
return supplierMapperEx.countsBySupplier(supplier, type, phonenum, telephone, description);
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ public class SystemConfigComponent implements ICommonQuery {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int counts(Map<String, String> map) {
|
||||
public Long counts(Map<String, String> map) {
|
||||
return systemConfigService.countSystemConfig();
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ public class SystemConfigService {
|
||||
return systemConfigMapperEx.selectByConditionSystemConfig(offset, rows);
|
||||
}
|
||||
|
||||
public int countSystemConfig() {
|
||||
public Long countSystemConfig() {
|
||||
return systemConfigMapperEx.countsBySystemConfig();
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ public class UnitComponent implements ICommonQuery {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int counts(Map<String, String> map) {
|
||||
public Long counts(Map<String, String> map) {
|
||||
String search = map.get(Constants.SEARCH);
|
||||
String name = StringUtil.getInfo(search, "name");
|
||||
return unitService.countUnit(name);
|
||||
|
||||
@@ -38,7 +38,7 @@ public class UnitService {
|
||||
return unitMapperEx.selectByConditionUnit(name, offset, rows);
|
||||
}
|
||||
|
||||
public int countUnit(String name) {
|
||||
public Long countUnit(String name) {
|
||||
return unitMapperEx.countsByUnit(name);
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ public class UserComponent implements ICommonQuery {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int counts(Map<String, String> map) {
|
||||
public Long counts(Map<String, String> map) {
|
||||
String search = map.get(Constants.SEARCH);
|
||||
String userName = StringUtil.getInfo(search, "userName");
|
||||
String loginName = StringUtil.getInfo(search, "loginName");
|
||||
|
||||
@@ -43,7 +43,7 @@ public class UserService {
|
||||
return userMapperEx.selectByConditionUser(userName, loginName, offset, rows);
|
||||
}
|
||||
|
||||
public int countUser(String userName, String loginName) {
|
||||
public Long countUser(String userName, String loginName) {
|
||||
return userMapperEx.countsByUser(userName, loginName);
|
||||
}
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.jsh.erp.service.userBusiness;
|
||||
|
||||
import com.jsh.erp.constants.BusinessConstants;
|
||||
import com.jsh.erp.service.ICommonQuery;
|
||||
import com.jsh.erp.service.depot.DepotResource;
|
||||
import com.jsh.erp.service.depot.DepotService;
|
||||
@@ -35,8 +36,8 @@ public class UserBusinessComponent implements ICommonQuery {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int counts(Map<String, String> map) {
|
||||
return 0;
|
||||
public Long counts(Map<String, String> map) {
|
||||
return BusinessConstants.DEFAULT_LIST_NULL_NUMBER;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user