仓库添加负责人字段
This commit is contained in:
@@ -16,11 +16,15 @@ public class BusinessConstants {
|
||||
/**
|
||||
* 默认的分页起始页页码
|
||||
*/
|
||||
public static final String DEFAULT_PAGINATION_PAGE_NUMBER = "1";
|
||||
public static final Integer DEFAULT_PAGINATION_PAGE_NUMBER = 1;
|
||||
/**
|
||||
* 默认的分页页数
|
||||
* 无数据时列表返回的默认数据条数
|
||||
*/
|
||||
public static final String DEFAULT_PAGINATION_PAGE_SIZE = "10";
|
||||
public static final Long DEFAULT_LIST_NULL_NUMBER = 0L;
|
||||
/**
|
||||
* 默认的分页条数
|
||||
*/
|
||||
public static final Integer DEFAULT_PAGINATION_PAGE_SIZE = 10;
|
||||
/**
|
||||
* 单据主表出入库类型 type 入库 出库
|
||||
* depothead
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
package com.jsh.erp.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.jsh.erp.constants.BusinessConstants;
|
||||
import com.jsh.erp.datasource.entities.Depot;
|
||||
import com.jsh.erp.datasource.entities.DepotEx;
|
||||
import com.jsh.erp.service.depot.DepotService;
|
||||
import com.jsh.erp.service.userBusiness.UserBusinessService;
|
||||
import com.jsh.erp.utils.BaseResponseInfo;
|
||||
import com.jsh.erp.utils.*;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.dao.DataAccessException;
|
||||
@@ -14,7 +20,9 @@ import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
|
||||
import static com.jsh.erp.utils.ResponseJsonUtil.returnJson;
|
||||
|
||||
/**
|
||||
* @author ji sheng hua 752*718*920
|
||||
@@ -121,4 +129,49 @@ public class DepotController {
|
||||
}
|
||||
return arr;
|
||||
}
|
||||
/**
|
||||
* create by: cjl
|
||||
* description:
|
||||
* 查询仓库列表信息
|
||||
* create time: 2019/2/25 14:32
|
||||
* @Param: pageSize
|
||||
* @Param: currentPage
|
||||
* @Param: search
|
||||
* @return java.lang.String
|
||||
*/
|
||||
@RequestMapping(value = "/getDepotList")
|
||||
public String getDepotList(
|
||||
@RequestParam(value = Constants.PAGE_SIZE, required = false) Integer pageSize,
|
||||
@RequestParam(value = Constants.CURRENT_PAGE, required = false) Integer currentPage,
|
||||
@RequestParam(value = Constants.SEARCH, required = false) String search) {
|
||||
Map<String, Object> parameterMap = new HashMap<String, Object>();
|
||||
//查询参数
|
||||
JSONObject obj=JSON.parseObject(search);
|
||||
Set<String> key= obj.keySet();
|
||||
for(String keyEach: key){
|
||||
parameterMap.put(keyEach,obj.getString(keyEach));
|
||||
}
|
||||
PageQueryInfo queryInfo = new PageQueryInfo();
|
||||
Map<String, Object> objectMap = new HashMap<String, Object>();
|
||||
if (pageSize == null || pageSize <= 0) {
|
||||
pageSize = BusinessConstants.DEFAULT_PAGINATION_PAGE_SIZE;
|
||||
}
|
||||
if (currentPage == null || currentPage <= 0) {
|
||||
currentPage = BusinessConstants.DEFAULT_PAGINATION_PAGE_NUMBER;
|
||||
}
|
||||
PageHelper.startPage(currentPage,pageSize,false);
|
||||
List<DepotEx> list = depotService.getDepotList(parameterMap);
|
||||
//获取分页查询后的数据
|
||||
PageInfo<DepotEx> pageInfo = new PageInfo<>(list);
|
||||
objectMap.put("page", queryInfo);
|
||||
if (list == null) {
|
||||
queryInfo.setRows(new ArrayList<Object>());
|
||||
queryInfo.setTotal(BusinessConstants.DEFAULT_LIST_NULL_NUMBER);
|
||||
return returnJson(objectMap, "查找不到数据", ErpInfo.OK.code);
|
||||
}
|
||||
queryInfo.setRows(list);
|
||||
queryInfo.setTotal(pageInfo.getTotal());
|
||||
return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.jsh.erp.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.jsh.erp.constants.BusinessConstants;
|
||||
import com.jsh.erp.datasource.entities.*;
|
||||
import com.jsh.erp.service.depotItem.DepotItemService;
|
||||
import com.jsh.erp.service.material.MaterialService;
|
||||
@@ -113,7 +114,7 @@ public class DepotItemController {
|
||||
objectMap.put("page", queryInfo);
|
||||
if (list == null) {
|
||||
queryInfo.setRows(new ArrayList<Object>());
|
||||
queryInfo.setTotal(0);
|
||||
queryInfo.setTotal(BusinessConstants.DEFAULT_LIST_NULL_NUMBER);
|
||||
return returnJson(objectMap, "查找不到数据", ErpInfo.OK.code);
|
||||
}
|
||||
queryInfo.setRows(dataArray);
|
||||
@@ -169,7 +170,7 @@ public class DepotItemController {
|
||||
objectMap.put("page", dataArray);
|
||||
if (list == null) {
|
||||
queryInfo.setRows(new ArrayList<Object>());
|
||||
queryInfo.setTotal(0);
|
||||
queryInfo.setTotal(BusinessConstants.DEFAULT_LIST_NULL_NUMBER);
|
||||
return returnJson(objectMap, "查找不到数据", ErpInfo.OK.code);
|
||||
}
|
||||
queryInfo.setRows(list);
|
||||
@@ -223,7 +224,7 @@ public class DepotItemController {
|
||||
objectMap.put("page", dataArray);
|
||||
if (list == null) {
|
||||
queryInfo.setRows(new ArrayList<Object>());
|
||||
queryInfo.setTotal(0);
|
||||
queryInfo.setTotal(BusinessConstants.DEFAULT_LIST_NULL_NUMBER);
|
||||
return returnJson(objectMap, "查找不到数据", ErpInfo.OK.code);
|
||||
}
|
||||
queryInfo.setRows(list);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.jsh.erp.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.jsh.erp.constants.BusinessConstants;
|
||||
import com.jsh.erp.service.CommonQueryManager;
|
||||
import com.jsh.erp.utils.*;
|
||||
|
||||
@@ -49,7 +50,7 @@ public class ResourceController {
|
||||
objectMap.put("page", queryInfo);
|
||||
if (list == null) {
|
||||
queryInfo.setRows(new ArrayList<Object>());
|
||||
queryInfo.setTotal(0);
|
||||
queryInfo.setTotal(BusinessConstants.DEFAULT_LIST_NULL_NUMBER);
|
||||
return returnJson(objectMap, "查找不到数据", ErpInfo.OK.code);
|
||||
}
|
||||
queryInfo.setRows(list);
|
||||
|
||||
@@ -67,6 +67,14 @@ public class Depot {
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column jsh_depot.principal
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
private Long principal;
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column jsh_depot.id
|
||||
@@ -258,4 +266,28 @@ public class Depot {
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark == null ? null : remark.trim();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column jsh_depot.principal
|
||||
*
|
||||
* @return the value of jsh_depot.principal
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
public Long getPrincipal() {
|
||||
return principal;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column jsh_depot.principal
|
||||
*
|
||||
* @param principal the value for jsh_depot.principal
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
public void setPrincipal(Long principal) {
|
||||
this.principal = principal;
|
||||
}
|
||||
}
|
||||
20
src/main/java/com/jsh/erp/datasource/entities/DepotEx.java
Normal file
20
src/main/java/com/jsh/erp/datasource/entities/DepotEx.java
Normal file
@@ -0,0 +1,20 @@
|
||||
package com.jsh.erp.datasource.entities;
|
||||
|
||||
/**
|
||||
* Description
|
||||
*
|
||||
* @Author: cjl
|
||||
* @Date: 2019/2/25 11:40
|
||||
*/
|
||||
public class DepotEx extends Depot{
|
||||
//负责人名字
|
||||
private String principalName;
|
||||
|
||||
public String getPrincipalName() {
|
||||
return principalName;
|
||||
}
|
||||
|
||||
public void setPrincipalName(String principalName) {
|
||||
this.principalName = principalName;
|
||||
}
|
||||
}
|
||||
@@ -714,6 +714,66 @@ public class DepotExample {
|
||||
addCriterion("remark not between", value1, value2, "remark");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPrincipalIsNull() {
|
||||
addCriterion("principal is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPrincipalIsNotNull() {
|
||||
addCriterion("principal is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPrincipalEqualTo(Long value) {
|
||||
addCriterion("principal =", value, "principal");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPrincipalNotEqualTo(Long value) {
|
||||
addCriterion("principal <>", value, "principal");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPrincipalGreaterThan(Long value) {
|
||||
addCriterion("principal >", value, "principal");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPrincipalGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("principal >=", value, "principal");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPrincipalLessThan(Long value) {
|
||||
addCriterion("principal <", value, "principal");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPrincipalLessThanOrEqualTo(Long value) {
|
||||
addCriterion("principal <=", value, "principal");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPrincipalIn(List<Long> values) {
|
||||
addCriterion("principal in", values, "principal");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPrincipalNotIn(List<Long> values) {
|
||||
addCriterion("principal not in", values, "principal");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPrincipalBetween(Long value1, Long value2) {
|
||||
addCriterion("principal between", value1, value2, "principal");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPrincipalNotBetween(Long value1, Long value2) {
|
||||
addCriterion("principal not between", value1, value2, "principal");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -18,7 +18,7 @@ public interface AccountHeadMapperEx {
|
||||
@Param("offset") Integer offset,
|
||||
@Param("rows") Integer rows);
|
||||
|
||||
int countsByAccountHead(
|
||||
Long countsByAccountHead(
|
||||
@Param("type") String type,
|
||||
@Param("billNo") String billNo,
|
||||
@Param("beginTime") String beginTime,
|
||||
|
||||
@@ -16,7 +16,7 @@ public interface AccountItemMapperEx {
|
||||
@Param("offset") Integer offset,
|
||||
@Param("rows") Integer rows);
|
||||
|
||||
int countsByAccountItem(
|
||||
Long countsByAccountItem(
|
||||
@Param("name") String name,
|
||||
@Param("type") Integer type,
|
||||
@Param("remark") String remark);
|
||||
|
||||
@@ -17,7 +17,7 @@ public interface AccountMapperEx {
|
||||
@Param("offset") Integer offset,
|
||||
@Param("rows") Integer rows);
|
||||
|
||||
int countsByAccount(
|
||||
Long countsByAccount(
|
||||
@Param("name") String name,
|
||||
@Param("serialNo") String serialNo,
|
||||
@Param("remark") String remark);
|
||||
|
||||
@@ -14,7 +14,7 @@ public interface AppMapperEx {
|
||||
@Param("offset") Integer offset,
|
||||
@Param("rows") Integer rows);
|
||||
|
||||
int countsByApp(
|
||||
Long countsByApp(
|
||||
@Param("name") String name,
|
||||
@Param("type") String type);
|
||||
}
|
||||
@@ -27,7 +27,7 @@ public interface DepotHeadMapperEx {
|
||||
@Param("offset") Integer offset,
|
||||
@Param("rows") Integer rows);
|
||||
|
||||
int countsByDepotHead(
|
||||
Long countsByDepotHead(
|
||||
@Param("type") String type,
|
||||
@Param("subType") String subType,
|
||||
@Param("number") String number,
|
||||
|
||||
@@ -20,7 +20,7 @@ public interface DepotItemMapperEx {
|
||||
@Param("offset") Integer offset,
|
||||
@Param("rows") Integer rows);
|
||||
|
||||
int countsByDepotItem(
|
||||
Long countsByDepotItem(
|
||||
@Param("name") String name,
|
||||
@Param("type") Integer type,
|
||||
@Param("remark") String remark);
|
||||
@@ -34,7 +34,7 @@ public interface DepotItemMapperEx {
|
||||
@Param("offset") Integer offset,
|
||||
@Param("rows") Integer rows);
|
||||
|
||||
int findDetailByTypeAndMaterialIdCounts(
|
||||
Long findDetailByTypeAndMaterialIdCounts(
|
||||
@Param("mId") Long mId);
|
||||
|
||||
List<DepotItemVo4Material> findStockNumByMaterialIdList(
|
||||
@@ -43,7 +43,7 @@ public interface DepotItemMapperEx {
|
||||
@Param("offset") Integer offset,
|
||||
@Param("rows") Integer rows);
|
||||
|
||||
int findStockNumByMaterialIdCounts(
|
||||
Long findStockNumByMaterialIdCounts(
|
||||
@Param("mId") Long mId,
|
||||
@Param("monthTime") String monthTime);
|
||||
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
package com.jsh.erp.datasource.mappers;
|
||||
|
||||
import com.jsh.erp.datasource.entities.Depot;
|
||||
import com.jsh.erp.datasource.entities.DepotEx;
|
||||
import com.jsh.erp.datasource.entities.DepotExample;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface DepotMapperEx {
|
||||
|
||||
@@ -15,8 +17,11 @@ public interface DepotMapperEx {
|
||||
@Param("offset") Integer offset,
|
||||
@Param("rows") Integer rows);
|
||||
|
||||
int countsByDepot(
|
||||
Long countsByDepot(
|
||||
@Param("name") String name,
|
||||
@Param("type") Integer type,
|
||||
@Param("remark") String remark);
|
||||
|
||||
List<DepotEx> getDepotList(Map<String, Object> params);
|
||||
Long getDepotListCount(Map<String, Object> params);
|
||||
}
|
||||
@@ -14,7 +14,7 @@ public interface FunctionsMapperEx {
|
||||
@Param("offset") Integer offset,
|
||||
@Param("rows") Integer rows);
|
||||
|
||||
int countsByFunctions(
|
||||
Long countsByFunctions(
|
||||
@Param("name") String name,
|
||||
@Param("type") String type);
|
||||
}
|
||||
@@ -15,7 +15,7 @@ public interface InOutItemMapperEx {
|
||||
@Param("offset") Integer offset,
|
||||
@Param("rows") Integer rows);
|
||||
|
||||
int countsByInOutItem(
|
||||
Long countsByInOutItem(
|
||||
@Param("name") String name,
|
||||
@Param("type") String type,
|
||||
@Param("remark") String remark);
|
||||
|
||||
@@ -20,7 +20,7 @@ public interface LogMapperEx {
|
||||
@Param("offset") Integer offset,
|
||||
@Param("rows") Integer rows);
|
||||
|
||||
int countsByLog(
|
||||
Long countsByLog(
|
||||
@Param("operation") String operation,
|
||||
@Param("usernameID") Integer usernameID,
|
||||
@Param("clientIp") String clientIp,
|
||||
|
||||
@@ -20,7 +20,7 @@ public interface MaterialCategoryMapperEx {
|
||||
@Param("offset") Integer offset,
|
||||
@Param("rows") Integer rows);
|
||||
|
||||
int countsByMaterialCategory(
|
||||
Long countsByMaterialCategory(
|
||||
@Param("name") String name,
|
||||
@Param("parentId") Integer parentId);
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ public interface MaterialMapperEx {
|
||||
@Param("offset") Integer offset,
|
||||
@Param("rows") Integer rows);
|
||||
|
||||
int countsByMaterial(
|
||||
Long countsByMaterial(
|
||||
@Param("name") String name,
|
||||
@Param("model") String model,
|
||||
@Param("categoryId") Long categoryId,
|
||||
|
||||
@@ -13,5 +13,5 @@ public interface MaterialPropertyMapperEx {
|
||||
@Param("offset") Integer offset,
|
||||
@Param("rows") Integer rows);
|
||||
|
||||
int countsByMaterialProperty(@Param("name") String name);
|
||||
Long countsByMaterialProperty(@Param("name") String name);
|
||||
}
|
||||
@@ -14,7 +14,7 @@ public interface PersonMapperEx {
|
||||
@Param("offset") Integer offset,
|
||||
@Param("rows") Integer rows);
|
||||
|
||||
int countsByPerson(
|
||||
Long countsByPerson(
|
||||
@Param("name") String name,
|
||||
@Param("type") String type);
|
||||
}
|
||||
@@ -13,6 +13,6 @@ public interface RoleMapperEx {
|
||||
@Param("offset") Integer offset,
|
||||
@Param("rows") Integer rows);
|
||||
|
||||
int countsByRole(
|
||||
Long countsByRole(
|
||||
@Param("name") String name);
|
||||
}
|
||||
@@ -20,7 +20,7 @@ public interface SerialNumberMapperEx {
|
||||
/**
|
||||
* 根据条件查询序列号数量
|
||||
* */
|
||||
int countSerialNumber(@Param("serialNumber")String serialNumber,@Param("materialName")String materialName);
|
||||
Long countSerialNumber(@Param("serialNumber")String serialNumber,@Param("materialName")String materialName);
|
||||
/**
|
||||
* 通过id查询序列号复合信息
|
||||
* */
|
||||
|
||||
@@ -17,7 +17,7 @@ public interface SupplierMapperEx {
|
||||
@Param("offset") Integer offset,
|
||||
@Param("rows") Integer rows);
|
||||
|
||||
int countsBySupplier(
|
||||
Long countsBySupplier(
|
||||
@Param("supplier") String supplier,
|
||||
@Param("type") String type,
|
||||
@Param("phonenum") String phonenum,
|
||||
|
||||
@@ -12,5 +12,5 @@ public interface SystemConfigMapperEx {
|
||||
@Param("offset") Integer offset,
|
||||
@Param("rows") Integer rows);
|
||||
|
||||
int countsBySystemConfig();
|
||||
Long countsBySystemConfig();
|
||||
}
|
||||
@@ -13,6 +13,6 @@ public interface UnitMapperEx {
|
||||
@Param("offset") Integer offset,
|
||||
@Param("rows") Integer rows);
|
||||
|
||||
int countsByUnit(
|
||||
Long countsByUnit(
|
||||
@Param("name") String name);
|
||||
}
|
||||
@@ -14,7 +14,7 @@ public interface UserMapperEx {
|
||||
@Param("offset") Integer offset,
|
||||
@Param("rows") Integer rows);
|
||||
|
||||
int countsByUser(
|
||||
Long countsByUser(
|
||||
@Param("userName") String userName,
|
||||
@Param("loginName") String loginName);
|
||||
}
|
||||
@@ -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
|
||||
|
||||
@@ -16,6 +16,7 @@ public class Constants {
|
||||
public final static String SEARCH = "search";
|
||||
public final static String DEVICE_ID = "deviceId";
|
||||
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_VALUE = "1";
|
||||
public final static String IS_QUERYBYNODEID = "isquerybyid";
|
||||
|
||||
@@ -9,14 +9,14 @@ import java.util.List;
|
||||
*/
|
||||
public class PageQueryInfo {
|
||||
|
||||
private Integer total;
|
||||
private Long total;
|
||||
private List<?> rows;
|
||||
|
||||
public Integer getTotal() {
|
||||
public Long getTotal() {
|
||||
return total;
|
||||
}
|
||||
|
||||
public void setTotal(Integer total) {
|
||||
public void setTotal(Long total) {
|
||||
this.total = total;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,10 +12,32 @@ public class ParamUtils {
|
||||
public static String getPageOffset(Integer currentPage, Integer pageSize) {
|
||||
if (currentPage != null && pageSize != null) {
|
||||
int offset = (currentPage - 1) * pageSize;
|
||||
if (offset < 0) {
|
||||
return 0 + "";
|
||||
if (offset <= 0) {
|
||||
return "0";
|
||||
} 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;
|
||||
|
||||
@@ -15,6 +15,14 @@ logging.level.com.jsh.erp.datasource.mappers=DEBUG
|
||||
#日志
|
||||
logging.config=classpath:logback-spring.xml
|
||||
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 @@
|
||||
</select>
|
||||
|
||||
|
||||
<select id="countsByAccountHead" resultType="java.lang.Integer">
|
||||
<select id="countsByAccountHead" resultType="java.lang.Long">
|
||||
SELECT
|
||||
COUNT(id)
|
||||
FROM jsh_accounthead
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
limit #{offset},#{rows}
|
||||
</if>
|
||||
</select>
|
||||
<select id="countsByAccountItem" resultType="java.lang.Integer">
|
||||
<select id="countsByAccountItem" resultType="java.lang.Long">
|
||||
SELECT
|
||||
COUNT(id)
|
||||
FROM jsh_accountitem
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="countsByAccount" resultType="java.lang.Integer">
|
||||
<select id="countsByAccount" resultType="java.lang.Long">
|
||||
SELECT
|
||||
COUNT(id)
|
||||
FROM jsh_account
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
limit #{offset},#{rows}
|
||||
</if>
|
||||
</select>
|
||||
<select id="countsByApp" resultType="java.lang.Integer">
|
||||
<select id="countsByApp" resultType="java.lang.Long">
|
||||
SELECT
|
||||
COUNT(id)
|
||||
FROM jsh_app
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
limit #{offset},#{rows}
|
||||
</if>
|
||||
</select>
|
||||
<select id="countsByDepotHead" resultType="java.lang.Integer">
|
||||
<select id="countsByDepotHead" resultType="java.lang.Long">
|
||||
SELECT
|
||||
COUNT(id)
|
||||
FROM jsh_depothead
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
limit #{offset},#{rows}
|
||||
</if>
|
||||
</select>
|
||||
<select id="countsByDepotItem" resultType="java.lang.Integer">
|
||||
<select id="countsByDepotItem" resultType="java.lang.Long">
|
||||
SELECT
|
||||
COUNT(id)
|
||||
FROM jsh_depotitem
|
||||
@@ -93,7 +93,7 @@
|
||||
limit #{offset},#{rows}
|
||||
</if>
|
||||
</select>
|
||||
<select id="findDetailByTypeAndMaterialIdCounts" resultType="java.lang.Integer">
|
||||
<select id="findDetailByTypeAndMaterialIdCounts" resultType="java.lang.Long">
|
||||
select count(1)
|
||||
from jsh_depothead dh INNER JOIN jsh_depotitem di on dh.id=di.HeaderId where type!='其它'
|
||||
and SubType!='调拨'
|
||||
@@ -110,7 +110,7 @@
|
||||
limit #{offset},#{rows}
|
||||
</if>
|
||||
</select>
|
||||
<select id="findStockNumByMaterialIdCounts" resultType="java.lang.Integer">
|
||||
<select id="findStockNumByMaterialIdCounts" resultType="java.lang.Long">
|
||||
select count(*) from jsh_depotitem where 1=1
|
||||
<if test="mId != null">
|
||||
and MaterialId=${mId}
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
<result column="type" jdbcType="INTEGER" property="type" />
|
||||
<result column="sort" jdbcType="VARCHAR" property="sort" />
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||
<result column="principal" jdbcType="BIGINT" property="principal" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<!--
|
||||
@@ -86,7 +87,7 @@
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
id, name, address, warehousing, truckage, type, sort, remark
|
||||
id, name, address, warehousing, truckage, type, sort, remark, principal
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.DepotExample" resultMap="BaseResultMap">
|
||||
<!--
|
||||
@@ -141,10 +142,12 @@
|
||||
-->
|
||||
insert into jsh_depot (id, name, address,
|
||||
warehousing, truckage, type,
|
||||
sort, remark)
|
||||
sort, remark, principal
|
||||
)
|
||||
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR},
|
||||
#{warehousing,jdbcType=DECIMAL}, #{truckage,jdbcType=DECIMAL}, #{type,jdbcType=INTEGER},
|
||||
#{sort,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR})
|
||||
#{sort,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{principal,jdbcType=BIGINT}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Depot">
|
||||
<!--
|
||||
@@ -177,6 +180,9 @@
|
||||
<if test="remark != null">
|
||||
remark,
|
||||
</if>
|
||||
<if test="principal != null">
|
||||
principal,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
@@ -203,6 +209,9 @@
|
||||
<if test="remark != null">
|
||||
#{remark,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="principal != null">
|
||||
#{principal,jdbcType=BIGINT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.DepotExample" resultType="java.lang.Integer">
|
||||
@@ -246,6 +255,9 @@
|
||||
<if test="record.remark != null">
|
||||
remark = #{record.remark,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.principal != null">
|
||||
principal = #{record.principal,jdbcType=BIGINT},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
@@ -264,7 +276,8 @@
|
||||
truckage = #{record.truckage,jdbcType=DECIMAL},
|
||||
type = #{record.type,jdbcType=INTEGER},
|
||||
sort = #{record.sort,jdbcType=VARCHAR},
|
||||
remark = #{record.remark,jdbcType=VARCHAR}
|
||||
remark = #{record.remark,jdbcType=VARCHAR},
|
||||
principal = #{record.principal,jdbcType=BIGINT}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
@@ -297,6 +310,9 @@
|
||||
<if test="remark != null">
|
||||
remark = #{remark,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="principal != null">
|
||||
principal = #{principal,jdbcType=BIGINT},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
@@ -312,7 +328,8 @@
|
||||
truckage = #{truckage,jdbcType=DECIMAL},
|
||||
type = #{type,jdbcType=INTEGER},
|
||||
sort = #{sort,jdbcType=VARCHAR},
|
||||
remark = #{remark,jdbcType=VARCHAR}
|
||||
remark = #{remark,jdbcType=VARCHAR},
|
||||
principal = #{principal,jdbcType=BIGINT}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -1,6 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.jsh.erp.datasource.mappers.DepotMapperEx">
|
||||
<resultMap extends="com.jsh.erp.datasource.mappers.DepotMapper.BaseResultMap" id="ResultMapEx" type="com.jsh.erp.datasource.entities.DepotEx">
|
||||
<result column="principalName" jdbcType="VARCHAR" property="principalName" />
|
||||
</resultMap>
|
||||
|
||||
<select id="selectByConditionDepot" parameterType="com.jsh.erp.datasource.entities.DepotExample" resultMap="com.jsh.erp.datasource.mappers.DepotMapper.BaseResultMap">
|
||||
select *
|
||||
FROM jsh_depot
|
||||
@@ -19,7 +23,7 @@
|
||||
limit #{offset},#{rows}
|
||||
</if>
|
||||
</select>
|
||||
<select id="countsByDepot" resultType="java.lang.Integer">
|
||||
<select id="countsByDepot" resultType="java.lang.Long">
|
||||
SELECT
|
||||
COUNT(id)
|
||||
FROM jsh_depot
|
||||
@@ -34,4 +38,25 @@
|
||||
and remark like '%${remark}%'
|
||||
</if>
|
||||
</select>
|
||||
<select id="getDepotList" parameterType="java.util.Map" resultMap="ResultMapEx">
|
||||
select dep.*,usr.username as principalName
|
||||
FROM jsh_depot dep
|
||||
left join jsh_user usr on usr.id=dep.principal
|
||||
where 1=1
|
||||
<if test="name != null and name != ''">
|
||||
<bind name="name" value="'%' + _parameter.name + '%'" />
|
||||
and dep.name like #{name}
|
||||
</if>
|
||||
<if test="type != null and type != ''">
|
||||
and dep.type=#{type}
|
||||
</if>
|
||||
<if test="remark != null and remark != ''">
|
||||
<bind name="remark" value="'%' + _parameter.remark + '%'" />
|
||||
and dep.remark like #{remark}
|
||||
</if>
|
||||
order by dep.sort asc
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -16,7 +16,7 @@
|
||||
limit #{offset},#{rows}
|
||||
</if>
|
||||
</select>
|
||||
<select id="countsByFunctions" resultType="java.lang.Integer">
|
||||
<select id="countsByFunctions" resultType="java.lang.Long">
|
||||
SELECT
|
||||
COUNT(id)
|
||||
FROM jsh_functions
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
limit #{offset},#{rows}
|
||||
</if>
|
||||
</select>
|
||||
<select id="countsByInOutItem" resultType="java.lang.Integer">
|
||||
<select id="countsByInOutItem" resultType="java.lang.Long">
|
||||
SELECT
|
||||
COUNT(id)
|
||||
FROM jsh_inoutitem
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
limit #{offset},#{rows}
|
||||
</if>
|
||||
</select>
|
||||
<select id="countsByLog" resultType="java.lang.Integer">
|
||||
<select id="countsByLog" resultType="java.lang.Long">
|
||||
SELECT
|
||||
COUNT(id)
|
||||
FROM jsh_log
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
limit #{offset},#{rows}
|
||||
</if>
|
||||
</select>
|
||||
<select id="countsByMaterialCategory" resultType="java.lang.Integer">
|
||||
<select id="countsByMaterialCategory" resultType="java.lang.Long">
|
||||
SELECT
|
||||
COUNT(id)
|
||||
FROM jsh_materialcategory
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="countsByMaterial" resultType="java.lang.Integer">
|
||||
<select id="countsByMaterial" resultType="java.lang.Long">
|
||||
SELECT
|
||||
COUNT(m.id)
|
||||
FROM jsh_material m
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
limit #{offset},#{rows}
|
||||
</if>
|
||||
</select>
|
||||
<select id="countsByMaterialProperty" resultType="java.lang.Integer">
|
||||
<select id="countsByMaterialProperty" resultType="java.lang.Long">
|
||||
SELECT
|
||||
COUNT(id)
|
||||
FROM jsh_materialproperty
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
limit #{offset},#{rows}
|
||||
</if>
|
||||
</select>
|
||||
<select id="countsByPerson" resultType="java.lang.Integer">
|
||||
<select id="countsByPerson" resultType="java.lang.Long">
|
||||
SELECT
|
||||
COUNT(id)
|
||||
FROM jsh_person
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
limit #{offset},#{rows}
|
||||
</if>;
|
||||
</select>
|
||||
<select id="countsByRole" resultType="java.lang.Integer">
|
||||
<select id="countsByRole" resultType="java.lang.Long">
|
||||
SELECT
|
||||
COUNT(id)
|
||||
FROM jsh_role
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
limit #{offset},#{rows}
|
||||
</if>
|
||||
</select>
|
||||
<select id="countSerialNumber" resultType="java.lang.Integer">
|
||||
<select id="countSerialNumber" resultType="java.lang.Long">
|
||||
SELECT
|
||||
COUNT(ser.id)
|
||||
FROM jsh_serial_number ser
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
limit #{offset},#{rows}
|
||||
</if>
|
||||
</select>
|
||||
<select id="countsBySupplier" resultType="java.lang.Integer">
|
||||
<select id="countsBySupplier" resultType="java.lang.Long">
|
||||
SELECT
|
||||
COUNT(id)
|
||||
FROM jsh_supplier
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
limit #{offset},#{rows}
|
||||
</if>
|
||||
</select>
|
||||
<select id="countsBySystemConfig" resultType="java.lang.Integer">
|
||||
<select id="countsBySystemConfig" resultType="java.lang.Long">
|
||||
SELECT
|
||||
COUNT(id)
|
||||
FROM jsh_systemconfig
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
limit #{offset},#{rows}
|
||||
</if>
|
||||
</select>
|
||||
<select id="countsByUnit" resultType="java.lang.Integer">
|
||||
<select id="countsByUnit" resultType="java.lang.Long">
|
||||
SELECT
|
||||
COUNT(id)
|
||||
FROM jsh_unit
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
limit #{offset},#{rows}
|
||||
</if>
|
||||
</select>
|
||||
<select id="countsByUser" resultType="java.lang.Integer">
|
||||
<select id="countsByUser" resultType="java.lang.Long">
|
||||
SELECT
|
||||
COUNT(id)
|
||||
FROM jsh_user
|
||||
|
||||
@@ -47,9 +47,9 @@
|
||||
<table tableName="jsh_app" domainObjectName="App"></table>
|
||||
<table tableName="jsh_asset" domainObjectName="Asset"></table>
|
||||
<table tableName="jsh_assetcategory" domainObjectName="AssetCategory"></table>
|
||||
<table tableName="jsh_assetname" domainObjectName="AssetName"></table>
|
||||
<table tableName="jsh_assetname" domainObjectName="AssetName"></table>-->
|
||||
<table tableName="jsh_depot" domainObjectName="Depot"></table>
|
||||
<table tableName="jsh_depothead" domainObjectName="DepotHead"></table>
|
||||
<!--<table tableName="jsh_depothead" domainObjectName="DepotHead"></table>
|
||||
<table tableName="jsh_depotitem" domainObjectName="DepotItem"></table>
|
||||
<table tableName="jsh_functions" domainObjectName="Functions"></table>
|
||||
<table tableName="jsh_inoutitem" domainObjectName="InOutItem"></table>
|
||||
@@ -64,6 +64,6 @@
|
||||
<table tableName="jsh_unit" domainObjectName="Unit"></table>
|
||||
<table tableName="jsh_user" domainObjectName="User"></table>
|
||||
<table tableName="jsh_userbusiness" domainObjectName="UserBusiness"></table>-->
|
||||
<table tableName="jsh_serial_number" domainObjectName="SerialNumber"></table>
|
||||
<!--<table tableName="jsh_serial_number" domainObjectName="SerialNumber"></table>-->
|
||||
</context>
|
||||
</generatorConfiguration>
|
||||
|
||||
Reference in New Issue
Block a user