"document/vscode:/vscode.git/clone" did not exist on "0653278125f4428f1d8c9e038b1d2936b60cd60b"
Commit 86b9ae90 authored by qiankunpingtai's avatar qiankunpingtai
Browse files

仓库添加负责人字段

parent c6056838
...@@ -39,7 +39,7 @@ public class PersonComponent implements ICommonQuery { ...@@ -39,7 +39,7 @@ public class PersonComponent implements ICommonQuery {
} }
@Override @Override
public int counts(Map<String, String> map) { public Long counts(Map<String, String> map) {
String search = map.get(Constants.SEARCH); String search = map.get(Constants.SEARCH);
String name = StringUtil.getInfo(search, "name"); String name = StringUtil.getInfo(search, "name");
String type = StringUtil.getInfo(search, "type"); String type = StringUtil.getInfo(search, "type");
......
...@@ -38,7 +38,7 @@ public class PersonService { ...@@ -38,7 +38,7 @@ public class PersonService {
return personMapperEx.selectByConditionPerson(name, type, offset, rows); 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); return personMapperEx.countsByPerson(name, type);
} }
......
...@@ -37,7 +37,7 @@ public class RoleComponent implements ICommonQuery { ...@@ -37,7 +37,7 @@ public class RoleComponent implements ICommonQuery {
} }
@Override @Override
public int counts(Map<String, String> map) { public Long counts(Map<String, String> map) {
String search = map.get(Constants.SEARCH); String search = map.get(Constants.SEARCH);
String name = StringUtil.getInfo(search, "name"); String name = StringUtil.getInfo(search, "name");
return roleService.countRole(name); return roleService.countRole(name);
......
...@@ -40,7 +40,7 @@ public class RoleService { ...@@ -40,7 +40,7 @@ public class RoleService {
return roleMapperEx.selectByConditionRole(name, offset, rows); return roleMapperEx.selectByConditionRole(name, offset, rows);
} }
public int countRole(String name) { public Long countRole(String name) {
return roleMapperEx.countsByRole(name); return roleMapperEx.countsByRole(name);
} }
......
...@@ -43,7 +43,7 @@ public class SerialNumberComponent implements ICommonQuery { ...@@ -43,7 +43,7 @@ public class SerialNumberComponent implements ICommonQuery {
} }
@Override @Override
public int counts(Map<String, String> map) { public Long counts(Map<String, String> map) {
String search = map.get(Constants.SEARCH); String search = map.get(Constants.SEARCH);
String serialNumber = StringUtil.getInfo(search, "serialNumber"); String serialNumber = StringUtil.getInfo(search, "serialNumber");
String materialName = StringUtil.getInfo(search, "materialName"); String materialName = StringUtil.getInfo(search, "materialName");
......
...@@ -61,7 +61,7 @@ public class SerialNumberService { ...@@ -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); return serialNumberMapperEx.countSerialNumber(serialNumber, materialName);
} }
......
...@@ -42,7 +42,7 @@ public class SupplierComponent implements ICommonQuery { ...@@ -42,7 +42,7 @@ public class SupplierComponent implements ICommonQuery {
} }
@Override @Override
public int counts(Map<String, String> map) { public Long counts(Map<String, String> map) {
String search = map.get(Constants.SEARCH); String search = map.get(Constants.SEARCH);
String supplier = StringUtil.getInfo(search, "supplier"); String supplier = StringUtil.getInfo(search, "supplier");
String type = StringUtil.getInfo(search, "type"); String type = StringUtil.getInfo(search, "type");
......
...@@ -42,7 +42,7 @@ public class SupplierService { ...@@ -42,7 +42,7 @@ public class SupplierService {
return supplierMapperEx.selectByConditionSupplier(supplier, type, phonenum, telephone, description, offset, rows); 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); return supplierMapperEx.countsBySupplier(supplier, type, phonenum, telephone, description);
} }
......
...@@ -36,7 +36,7 @@ public class SystemConfigComponent implements ICommonQuery { ...@@ -36,7 +36,7 @@ public class SystemConfigComponent implements ICommonQuery {
} }
@Override @Override
public int counts(Map<String, String> map) { public Long counts(Map<String, String> map) {
return systemConfigService.countSystemConfig(); return systemConfigService.countSystemConfig();
} }
......
...@@ -37,7 +37,7 @@ public class SystemConfigService { ...@@ -37,7 +37,7 @@ public class SystemConfigService {
return systemConfigMapperEx.selectByConditionSystemConfig(offset, rows); return systemConfigMapperEx.selectByConditionSystemConfig(offset, rows);
} }
public int countSystemConfig() { public Long countSystemConfig() {
return systemConfigMapperEx.countsBySystemConfig(); return systemConfigMapperEx.countsBySystemConfig();
} }
......
...@@ -37,7 +37,7 @@ public class UnitComponent implements ICommonQuery { ...@@ -37,7 +37,7 @@ public class UnitComponent implements ICommonQuery {
} }
@Override @Override
public int counts(Map<String, String> map) { public Long counts(Map<String, String> map) {
String search = map.get(Constants.SEARCH); String search = map.get(Constants.SEARCH);
String name = StringUtil.getInfo(search, "name"); String name = StringUtil.getInfo(search, "name");
return unitService.countUnit(name); return unitService.countUnit(name);
......
...@@ -38,7 +38,7 @@ public class UnitService { ...@@ -38,7 +38,7 @@ public class UnitService {
return unitMapperEx.selectByConditionUnit(name, offset, rows); return unitMapperEx.selectByConditionUnit(name, offset, rows);
} }
public int countUnit(String name) { public Long countUnit(String name) {
return unitMapperEx.countsByUnit(name); return unitMapperEx.countsByUnit(name);
} }
......
...@@ -37,7 +37,7 @@ public class UserComponent implements ICommonQuery { ...@@ -37,7 +37,7 @@ public class UserComponent implements ICommonQuery {
} }
@Override @Override
public int counts(Map<String, String> map) { public Long counts(Map<String, String> map) {
String search = map.get(Constants.SEARCH); String search = map.get(Constants.SEARCH);
String userName = StringUtil.getInfo(search, "userName"); String userName = StringUtil.getInfo(search, "userName");
String loginName = StringUtil.getInfo(search, "loginName"); String loginName = StringUtil.getInfo(search, "loginName");
......
...@@ -43,7 +43,7 @@ public class UserService { ...@@ -43,7 +43,7 @@ public class UserService {
return userMapperEx.selectByConditionUser(userName, loginName, offset, rows); 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); return userMapperEx.countsByUser(userName, loginName);
} }
/** /**
......
package com.jsh.erp.service.userBusiness; package com.jsh.erp.service.userBusiness;
import com.jsh.erp.constants.BusinessConstants;
import com.jsh.erp.service.ICommonQuery; import com.jsh.erp.service.ICommonQuery;
import com.jsh.erp.service.depot.DepotResource; import com.jsh.erp.service.depot.DepotResource;
import com.jsh.erp.service.depot.DepotService; import com.jsh.erp.service.depot.DepotService;
...@@ -35,8 +36,8 @@ public class UserBusinessComponent implements ICommonQuery { ...@@ -35,8 +36,8 @@ public class UserBusinessComponent implements ICommonQuery {
} }
@Override @Override
public int counts(Map<String, String> map) { public Long counts(Map<String, String> map) {
return 0; return BusinessConstants.DEFAULT_LIST_NULL_NUMBER;
} }
@Override @Override
......
...@@ -16,6 +16,7 @@ public class Constants { ...@@ -16,6 +16,7 @@ public class Constants {
public final static String SEARCH = "search"; public final static String SEARCH = "search";
public final static String DEVICE_ID = "deviceId"; public final static String DEVICE_ID = "deviceId";
public final static String OFFSET = "offset"; public final static String OFFSET = "offset";
public final static String ROWS = "rows";
public final static String IS_RECURSION = "isRecursion"; public final static String IS_RECURSION = "isRecursion";
public final static String IS_RECURSION_VALUE = "1"; public final static String IS_RECURSION_VALUE = "1";
public final static String IS_QUERYBYNODEID = "isquerybyid"; public final static String IS_QUERYBYNODEID = "isquerybyid";
......
...@@ -9,14 +9,14 @@ import java.util.List; ...@@ -9,14 +9,14 @@ import java.util.List;
*/ */
public class PageQueryInfo { public class PageQueryInfo {
private Integer total; private Long total;
private List<?> rows; private List<?> rows;
public Integer getTotal() { public Long getTotal() {
return total; return total;
} }
public void setTotal(Integer total) { public void setTotal(Long total) {
this.total = total; this.total = total;
} }
......
...@@ -12,10 +12,32 @@ public class ParamUtils { ...@@ -12,10 +12,32 @@ public class ParamUtils {
public static String getPageOffset(Integer currentPage, Integer pageSize) { public static String getPageOffset(Integer currentPage, Integer pageSize) {
if (currentPage != null && pageSize != null) { if (currentPage != null && pageSize != null) {
int offset = (currentPage - 1) * pageSize; int offset = (currentPage - 1) * pageSize;
if (offset < 0) { if (offset <= 0) {
return 0 + ""; return "0";
} else { } else {
return offset + ""; return new StringBuffer().append(offset).toString();
}
}
return null;
}
public static Integer getNumberPageOffset(Integer currentPage, Integer pageSize) {
if (currentPage != null && pageSize != null) {
int offset = (currentPage - 1) * pageSize;
if (offset <= 0) {
return 0;
} else {
return offset;
}
}
return null;
}
public static Integer getNumberPageRows(Integer currentPage, Integer pageSize) {
if (currentPage != null && pageSize != null) {
int rows = (currentPage) * pageSize;
if (rows <= 0) {
return 0;
} else {
return rows;
} }
} }
return null; return null;
......
...@@ -15,6 +15,14 @@ logging.level.com.jsh.erp.datasource.mappers=DEBUG ...@@ -15,6 +15,14 @@ logging.level.com.jsh.erp.datasource.mappers=DEBUG
#日志 #日志
logging.config=classpath:logback-spring.xml logging.config=classpath:logback-spring.xml
logging.level.com.didispace=DEBUG logging.level.com.didispace=DEBUG
#pagehelper配置
pagehelper.helperDialect=mysql
pagehelper.offsetAsPageNum=true
pagehelper.rowBoundsWithCount=true
pagehelper.pageSizeZero=true
pagehelper.reasonable=false
pagehelper.params=pageNum=pageHelperStart;pageSize=pageHelperRows;
pagehelper.supportMethodsArguments=false
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
</select> </select>
<select id="countsByAccountHead" resultType="java.lang.Integer"> <select id="countsByAccountHead" resultType="java.lang.Long">
SELECT SELECT
COUNT(id) COUNT(id)
FROM jsh_accounthead FROM jsh_accounthead
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment