去掉项目中使用的getMaxId逻辑

This commit is contained in:
qiankunpingtai
2019-05-22 16:43:00 +08:00
parent 3a78eb511a
commit 1353f7b09e
8 changed files with 0 additions and 74 deletions

View File

@@ -35,27 +35,6 @@ public class AccountHeadController {
@Resource
private AccountHeadService accountHeadService;
/**
* 获取最大的id
* @param request
* @return
*/
@GetMapping(value = "/getMaxId")
public BaseResponseInfo getMaxId(HttpServletRequest request)throws Exception {
BaseResponseInfo res = new BaseResponseInfo();
Map<String, Object> map = new HashMap<String, Object>();
try {
Long maxId = accountHeadService.getMaxId();
map.put("maxId", maxId);
res.code = 200;
res.data = map;
} catch(Exception e){
e.printStackTrace();
res.code = 500;
res.data = "获取数据失败";
}
return res;
}
/**
* 查询单位的累计应收和累计应付,收预付款不计入此处

View File

@@ -87,27 +87,6 @@ public class DepotHeadController {
return res;
}
/**
* 获取最大的id
* @param request
* @return
*/
@GetMapping(value = "/getMaxId")
public BaseResponseInfo getMaxId(HttpServletRequest request)throws Exception {
BaseResponseInfo res = new BaseResponseInfo();
Map<String, Object> map = new HashMap<String, Object>();
try {
Long maxId = depotHeadService.getMaxId();
map.put("maxId", maxId);
res.code = 200;
res.data = map;
} catch(Exception e){
e.printStackTrace();
res.code = 500;
res.data = "获取数据失败";
}
return res;
}
/**
* 查找单据_根据月份(报表)

View File

@@ -25,7 +25,6 @@ public interface AccountHeadMapperEx {
@Param("beginTime") String beginTime,
@Param("endTime") String endTime);
Long getMaxId();
BigDecimal findAllMoney(
@Param("supplierId") Integer supplierId,

View File

@@ -36,7 +36,6 @@ public interface DepotHeadMapperEx {
@Param("endTime") String endTime,
@Param("dhIds") String dhIds);
Long getMaxId();
String findMaterialsListByHeaderId(
@Param("id") Long id);

View File

@@ -188,18 +188,6 @@ public class AccountHeadService {
return list==null?0:list.size();
}
public Long getMaxId()throws Exception {
Long result = null;
try{
result = accountHeadMapperEx.getMaxId();
}catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]",
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
}
return result;
}
public BigDecimal findAllMoney(Integer supplierId, String type, String mode, String endTime) {
String modeName = "";

View File

@@ -287,18 +287,6 @@ public class DepotHeadService {
}
}
public Long getMaxId()throws Exception {
Long result = null;
try{
result = depotHeadMapperEx.getMaxId();
}catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]",
ExceptionConstants.DATA_READ_FAIL_CODE,ExceptionConstants.DATA_READ_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_READ_FAIL_CODE,
ExceptionConstants.DATA_READ_FAIL_MSG);
}
return result;
}
public String findMaterialsListByHeaderId(Long id)throws Exception {
String result = null;

View File

@@ -57,9 +57,6 @@
and ifnull(delete_Flag,'0') !='1'
</select>
<select id="getMaxId" resultType="java.lang.Long">
select max(Id) as Id from jsh_accounthead
</select>
<select id="findAllMoney" resultType="java.math.BigDecimal">
select sum(#{modeName}) as allMoney from jsh_accounthead

View File

@@ -108,9 +108,6 @@
and ifnull(delete_Flag,'0') !='1'
</select>
<select id="getMaxId" resultType="java.lang.Long">
select max(Id) as Id from jsh_depothead
</select>
<select id="findMaterialsListByHeaderId" resultType="java.lang.String">
select group_concat(concat(jsh_material.`Name`,' ',jsh_material.Model)) as mName