去掉项目中使用的getMaxId逻辑
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询单位的累计应收和累计应付,收预付款不计入此处
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查找单据_根据月份(报表)
|
||||
|
||||
@@ -25,7 +25,6 @@ public interface AccountHeadMapperEx {
|
||||
@Param("beginTime") String beginTime,
|
||||
@Param("endTime") String endTime);
|
||||
|
||||
Long getMaxId();
|
||||
|
||||
BigDecimal findAllMoney(
|
||||
@Param("supplierId") Integer supplierId,
|
||||
|
||||
@@ -36,7 +36,6 @@ public interface DepotHeadMapperEx {
|
||||
@Param("endTime") String endTime,
|
||||
@Param("dhIds") String dhIds);
|
||||
|
||||
Long getMaxId();
|
||||
|
||||
String findMaterialsListByHeaderId(
|
||||
@Param("id") Long id);
|
||||
|
||||
@@ -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 = "";
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user