给入库明细和出库明细接口增加备注的查询接口

This commit is contained in:
季圣华 2022-03-03 14:18:35 +08:00
parent 9f865aa3df
commit 6d9b4f5ad2
4 changed files with 42 additions and 16 deletions

View File

@ -109,6 +109,7 @@ public class DepotHeadController {
@RequestParam("beginTime") String beginTime,
@RequestParam("endTime") String endTime,
@RequestParam("type") String type,
@RequestParam("remark") String remark,
HttpServletRequest request)throws Exception {
BaseResponseInfo res = new BaseResponseInfo();
Map<String, Object> map = new HashMap<String, Object>();
@ -127,8 +128,9 @@ public class DepotHeadController {
List<DepotHeadVo4InDetail> resList = new ArrayList<DepotHeadVo4InDetail>();
beginTime = Tools.parseDayToTime(beginTime, BusinessConstants.DAY_FIRST_TIME);
endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME);
List<DepotHeadVo4InDetail> list = depotHeadService.findByAll(beginTime, endTime, type, materialParam, depotList, oId, number, (currentPage-1)*pageSize, pageSize);
int total = depotHeadService.findByAllCount(beginTime, endTime, type, materialParam, depotList, oId, number);
List<DepotHeadVo4InDetail> list = depotHeadService.findByAll(beginTime, endTime, type, materialParam,
depotList, oId, number, remark, (currentPage-1)*pageSize, pageSize);
int total = depotHeadService.findByAllCount(beginTime, endTime, type, materialParam, depotList, oId, number, remark);
map.put("total", total);
//存放数据json数组
if (null != list) {
@ -188,7 +190,8 @@ public class DepotHeadController {
List<DepotHeadVo4InOutMCount> resList = new ArrayList<>();
beginTime = Tools.parseDayToTime(beginTime,BusinessConstants.DAY_FIRST_TIME);
endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME);
List<DepotHeadVo4InOutMCount> list = depotHeadService.findInOutMaterialCount(beginTime, endTime, type, materialParam, depotList, oId, (currentPage-1)*pageSize, pageSize);
List<DepotHeadVo4InOutMCount> list = depotHeadService.findInOutMaterialCount(beginTime, endTime, type, materialParam,
depotList, oId, (currentPage-1)*pageSize, pageSize);
int total = depotHeadService.findInOutMaterialCountTotal(beginTime, endTime, type, materialParam, depotList, oId);
map.put("total", total);
//存放数据json数组
@ -233,6 +236,7 @@ public class DepotHeadController {
@RequestParam("beginTime") String beginTime,
@RequestParam("endTime") String endTime,
@RequestParam("subType") String subType,
@RequestParam("remark") String remark,
HttpServletRequest request)throws Exception {
BaseResponseInfo res = new BaseResponseInfo();
Map<String, Object> map = new HashMap<String, Object>();
@ -261,8 +265,9 @@ public class DepotHeadController {
}
beginTime = Tools.parseDayToTime(beginTime, BusinessConstants.DAY_FIRST_TIME);
endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME);
List<DepotHeadVo4InDetail> list = depotHeadService.findAllocationDetail(beginTime, endTime, subType, number, materialParam, depotList, depotFList, (currentPage-1)*pageSize, pageSize);
int total = depotHeadService.findAllocationDetailCount(beginTime, endTime, subType, number, materialParam, depotList, depotFList);
List<DepotHeadVo4InDetail> list = depotHeadService.findAllocationDetail(beginTime, endTime, subType, number, materialParam,
depotList, depotFList, remark, (currentPage-1)*pageSize, pageSize);
int total = depotHeadService.findAllocationDetailCount(beginTime, endTime, subType, number, materialParam, depotList, depotFList, remark);
map.put("rows", list);
map.put("total", total);
res.code = 200;

View File

@ -61,6 +61,7 @@ public interface DepotHeadMapperEx {
@Param("depotList") List<Long> depotList,
@Param("oId") Integer oId,
@Param("number") String number,
@Param("remark") String remark,
@Param("offset") Integer offset,
@Param("rows") Integer rows);
@ -71,7 +72,8 @@ public interface DepotHeadMapperEx {
@Param("materialParam") String materialParam,
@Param("depotList") List<Long> depotList,
@Param("oId") Integer oId,
@Param("number") String number);
@Param("number") String number,
@Param("remark") String remark);
List<DepotHeadVo4InOutMCount> findInOutMaterialCount(
@Param("beginTime") String beginTime,
@ -99,6 +101,7 @@ public interface DepotHeadMapperEx {
@Param("materialParam") String materialParam,
@Param("depotList") List<Long> depotList,
@Param("depotFList") List<Long> depotFList,
@Param("remark") String remark,
@Param("offset") Integer offset,
@Param("rows") Integer rows);
@ -109,7 +112,8 @@ public interface DepotHeadMapperEx {
@Param("number") String number,
@Param("materialParam") String materialParam,
@Param("depotList") List<Long> depotList,
@Param("depotFList") List<Long> depotFList);
@Param("depotFList") List<Long> depotFList,
@Param("remark") String remark);
List<DepotHeadVo4StatementAccount> findStatementAccount(
@Param("beginTime") String beginTime,

View File

@ -421,27 +421,28 @@ public class DepotHeadService {
}
public List<DepotHeadVo4InDetail> findByAll(String beginTime, String endTime, String type, String materialParam,
List<Long> depotList, Integer oId, String number,Integer offset, Integer rows) throws Exception{
List<Long> depotList, Integer oId, String number, String remark, Integer offset, Integer rows) throws Exception{
List<DepotHeadVo4InDetail> list = null;
try{
list =depotHeadMapperEx.findByAll(beginTime, endTime, type, materialParam, depotList, oId, number, offset, rows);
list =depotHeadMapperEx.findByAll(beginTime, endTime, type, materialParam, depotList, oId, number, remark, offset, rows);
}catch(Exception e){
JshException.readFail(logger, e);
}
return list;
}
public int findByAllCount(String beginTime, String endTime, String type, String materialParam, List<Long> depotList, Integer oId, String number) throws Exception{
public int findByAllCount(String beginTime, String endTime, String type, String materialParam, List<Long> depotList, Integer oId, String number, String remark) throws Exception{
int result = 0;
try{
result =depotHeadMapperEx.findByAllCount(beginTime, endTime, type, materialParam, depotList, oId, number);
result =depotHeadMapperEx.findByAllCount(beginTime, endTime, type, materialParam, depotList, oId, number, remark);
}catch(Exception e){
JshException.readFail(logger, e);
}
return result;
}
public List<DepotHeadVo4InOutMCount> findInOutMaterialCount(String beginTime, String endTime, String type, String materialParam, List<Long> depotList, Integer oId, Integer offset, Integer rows)throws Exception {
public List<DepotHeadVo4InOutMCount> findInOutMaterialCount(String beginTime, String endTime, String type, String materialParam,
List<Long> depotList, Integer oId, Integer offset, Integer rows)throws Exception {
List<DepotHeadVo4InOutMCount> list = null;
try{
list =depotHeadMapperEx.findInOutMaterialCount(beginTime, endTime, type, materialParam, depotList, oId, offset, rows);
@ -462,10 +463,10 @@ public class DepotHeadService {
}
public List<DepotHeadVo4InDetail> findAllocationDetail(String beginTime, String endTime, String subType, String number,
String materialParam, List<Long> depotList, List<Long> depotFList, Integer offset, Integer rows) throws Exception{
String materialParam, List<Long> depotList, List<Long> depotFList, String remark, Integer offset, Integer rows) throws Exception{
List<DepotHeadVo4InDetail> list = null;
try{
list =depotHeadMapperEx.findAllocationDetail(beginTime, endTime, subType, number, materialParam, depotList, depotFList, offset, rows);
list =depotHeadMapperEx.findAllocationDetail(beginTime, endTime, subType, number, materialParam, depotList, depotFList, remark, offset, rows);
}catch(Exception e){
JshException.readFail(logger, e);
}
@ -473,10 +474,10 @@ public class DepotHeadService {
}
public int findAllocationDetailCount(String beginTime, String endTime, String subType, String number,
String materialParam, List<Long> depotList, List<Long> depotFList) throws Exception{
String materialParam, List<Long> depotList, List<Long> depotFList, String remark) throws Exception{
int result = 0;
try{
result =depotHeadMapperEx.findAllocationDetailCount(beginTime, endTime, subType, number, materialParam, depotList, depotFList);
result =depotHeadMapperEx.findAllocationDetailCount(beginTime, endTime, subType, number, materialParam, depotList, depotFList, remark);
}catch(Exception e){
JshException.readFail(logger, e);
}

View File

@ -222,6 +222,10 @@
<bind name="bindKey" value="'%'+materialParam+'%'"/>
and (me.bar_code like #{bindKey} or m.name like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey})
</if>
<if test="remark != null and remark !=''">
<bind name="bindRemark" value="'%'+remark+'%'"/>
and (dh.remark like #{bindRemark} or di.remark like #{bindRemark})
</if>
and dh.sub_type!='调拨'
and ifnull(dh.delete_flag,'0') !='1'
ORDER BY oper_time DESC,number desc
@ -259,6 +263,10 @@
<bind name="bindKey" value="'%'+materialParam+'%'"/>
and (me.bar_code like #{bindKey} or m.name like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey})
</if>
<if test="remark != null and remark !=''">
<bind name="bindRemark" value="'%'+remark+'%'"/>
and (dh.remark like #{bindRemark} or di.remark like #{bindRemark})
</if>
and dh.sub_type!='调拨'
and ifnull(dh.delete_flag,'0') !='1'
ORDER BY oper_time DESC,number desc
@ -390,6 +398,10 @@
<bind name="bindKey" value="'%'+materialParam+'%'"/>
and (me.bar_code like #{bindKey} or m.name like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey} or dh.remark like #{bindKey})
</if>
<if test="remark != null and remark !=''">
<bind name="bindRemark" value="'%'+remark+'%'"/>
and (dh.remark like #{bindRemark} or di.remark like #{bindRemark})
</if>
and ifnull(dh.delete_flag,'0') !='1'
ORDER BY oper_time DESC,number desc
<if test="offset != null and rows != null">
@ -428,6 +440,10 @@
<bind name="bindKey" value="'%'+materialParam+'%'"/>
and (me.bar_code like #{bindKey} or m.name like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey} or dh.remark like #{bindKey})
</if>
<if test="remark != null and remark !=''">
<bind name="bindRemark" value="'%'+remark+'%'"/>
and (dh.remark like #{bindRemark} or di.remark like #{bindRemark})
</if>
and ifnull(dh.delete_flag,'0') !='1'
ORDER BY oper_time DESC,number desc
</select>