Commit 1353f7b0 authored by qiankunpingtai's avatar qiankunpingtai
Browse files

去掉项目中使用的getMaxId逻辑

parent 3a78eb51
...@@ -35,27 +35,6 @@ public class AccountHeadController { ...@@ -35,27 +35,6 @@ public class AccountHeadController {
@Resource @Resource
private AccountHeadService accountHeadService; 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;
}
/** /**
* 查询单位的累计应收和累计应付,收预付款不计入此处 * 查询单位的累计应收和累计应付,收预付款不计入此处
......
...@@ -87,27 +87,6 @@ public class DepotHeadController { ...@@ -87,27 +87,6 @@ public class DepotHeadController {
return res; 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;
}
/** /**
* 查找单据_根据月份(报表) * 查找单据_根据月份(报表)
......
...@@ -25,7 +25,6 @@ public interface AccountHeadMapperEx { ...@@ -25,7 +25,6 @@ public interface AccountHeadMapperEx {
@Param("beginTime") String beginTime, @Param("beginTime") String beginTime,
@Param("endTime") String endTime); @Param("endTime") String endTime);
Long getMaxId();
BigDecimal findAllMoney( BigDecimal findAllMoney(
@Param("supplierId") Integer supplierId, @Param("supplierId") Integer supplierId,
......
...@@ -36,7 +36,6 @@ public interface DepotHeadMapperEx { ...@@ -36,7 +36,6 @@ public interface DepotHeadMapperEx {
@Param("endTime") String endTime, @Param("endTime") String endTime,
@Param("dhIds") String dhIds); @Param("dhIds") String dhIds);
Long getMaxId();
String findMaterialsListByHeaderId( String findMaterialsListByHeaderId(
@Param("id") Long id); @Param("id") Long id);
......
...@@ -188,18 +188,6 @@ public class AccountHeadService { ...@@ -188,18 +188,6 @@ public class AccountHeadService {
return list==null?0:list.size(); 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) { public BigDecimal findAllMoney(Integer supplierId, String type, String mode, String endTime) {
String modeName = ""; String modeName = "";
......
...@@ -287,18 +287,6 @@ public class DepotHeadService { ...@@ -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 { public String findMaterialsListByHeaderId(Long id)throws Exception {
String result = null; String result = null;
......
...@@ -57,9 +57,6 @@ ...@@ -57,9 +57,6 @@
and ifnull(delete_Flag,'0') !='1' and ifnull(delete_Flag,'0') !='1'
</select> </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 id="findAllMoney" resultType="java.math.BigDecimal">
select sum(#{modeName}) as allMoney from jsh_accounthead select sum(#{modeName}) as allMoney from jsh_accounthead
......
...@@ -108,9 +108,6 @@ ...@@ -108,9 +108,6 @@
and ifnull(delete_Flag,'0') !='1' and ifnull(delete_Flag,'0') !='1'
</select> </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 id="findMaterialsListByHeaderId" resultType="java.lang.String">
select group_concat(concat(jsh_material.`Name`,' ',jsh_material.Model)) as mName select group_concat(concat(jsh_material.`Name`,' ',jsh_material.Model)) as mName
......
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