给出入库明细等增加单据号

This commit is contained in:
季圣华
2021-11-20 00:03:33 +08:00
parent e4d2a5b7fb
commit 3db0519479
4 changed files with 39 additions and 18 deletions

View File

@@ -85,6 +85,7 @@ public class DepotHeadController {
* @param currentPage * @param currentPage
* @param pageSize * @param pageSize
* @param oId * @param oId
* @param number
* @param materialParam * @param materialParam
* @param depotId * @param depotId
* @param beginTime * @param beginTime
@@ -98,6 +99,7 @@ public class DepotHeadController {
public BaseResponseInfo findInDetail(@RequestParam("currentPage") Integer currentPage, public BaseResponseInfo findInDetail(@RequestParam("currentPage") Integer currentPage,
@RequestParam("pageSize") Integer pageSize, @RequestParam("pageSize") Integer pageSize,
@RequestParam(value = "organId", required = false) Integer oId, @RequestParam(value = "organId", required = false) Integer oId,
@RequestParam("number") String number,
@RequestParam("materialParam") String materialParam, @RequestParam("materialParam") String materialParam,
@RequestParam(value = "depotId", required = false) Integer depotId, @RequestParam(value = "depotId", required = false) Integer depotId,
@RequestParam("beginTime") String beginTime, @RequestParam("beginTime") String beginTime,
@@ -110,8 +112,8 @@ public class DepotHeadController {
List<DepotHeadVo4InDetail> resList = new ArrayList<DepotHeadVo4InDetail>(); List<DepotHeadVo4InDetail> resList = new ArrayList<DepotHeadVo4InDetail>();
beginTime = Tools.parseDayToTime(beginTime, BusinessConstants.DAY_FIRST_TIME); beginTime = Tools.parseDayToTime(beginTime, BusinessConstants.DAY_FIRST_TIME);
endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME); endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME);
List<DepotHeadVo4InDetail> list = depotHeadService.findByAll(beginTime, endTime, type, materialParam, depotId, oId, (currentPage-1)*pageSize, pageSize); List<DepotHeadVo4InDetail> list = depotHeadService.findByAll(beginTime, endTime, type, materialParam, depotId, oId, number, (currentPage-1)*pageSize, pageSize);
int total = depotHeadService.findByAllCount(beginTime, endTime, type, materialParam, depotId, oId); int total = depotHeadService.findByAllCount(beginTime, endTime, type, materialParam, depotId, oId, number);
map.put("total", total); map.put("total", total);
//存放数据json数组 //存放数据json数组
if (null != list) { if (null != list) {
@@ -184,7 +186,7 @@ public class DepotHeadController {
* 调拨明细统计 * 调拨明细统计
* @param currentPage * @param currentPage
* @param pageSize * @param pageSize
* @param oId * @param number
* @param materialParam * @param materialParam
* @param depotIdF 调出仓库 * @param depotIdF 调出仓库
* @param depotId 调入仓库 * @param depotId 调入仓库
@@ -198,7 +200,7 @@ public class DepotHeadController {
@ApiOperation(value = "调拨明细统计") @ApiOperation(value = "调拨明细统计")
public BaseResponseInfo findallocationDetail(@RequestParam("currentPage") Integer currentPage, public BaseResponseInfo findallocationDetail(@RequestParam("currentPage") Integer currentPage,
@RequestParam("pageSize") Integer pageSize, @RequestParam("pageSize") Integer pageSize,
@RequestParam(value = "organId", required = false) Integer oId, @RequestParam("number") String number,
@RequestParam("materialParam") String materialParam, @RequestParam("materialParam") String materialParam,
@RequestParam(value = "depotId", required = false) Integer depotId, @RequestParam(value = "depotId", required = false) Integer depotId,
@RequestParam(value = "depotIdF", required = false) Integer depotIdF, @RequestParam(value = "depotIdF", required = false) Integer depotIdF,
@@ -211,8 +213,8 @@ public class DepotHeadController {
try { try {
beginTime = Tools.parseDayToTime(beginTime, BusinessConstants.DAY_FIRST_TIME); beginTime = Tools.parseDayToTime(beginTime, BusinessConstants.DAY_FIRST_TIME);
endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME); endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME);
List<DepotHeadVo4InDetail> list = depotHeadService.findAllocationDetail(beginTime, endTime, subType, materialParam, depotId, depotIdF, oId, (currentPage-1)*pageSize, pageSize); List<DepotHeadVo4InDetail> list = depotHeadService.findAllocationDetail(beginTime, endTime, subType, number, materialParam, depotId, depotIdF, (currentPage-1)*pageSize, pageSize);
int total = depotHeadService.findAllocationDetailCount(beginTime, endTime, subType, materialParam, depotId, depotIdF,oId); int total = depotHeadService.findAllocationDetailCount(beginTime, endTime, subType, number, materialParam, depotId, depotIdF);
map.put("rows", list); map.put("rows", list);
map.put("total", total); map.put("total", total);
res.code = 200; res.code = 200;

View File

@@ -60,6 +60,7 @@ public interface DepotHeadMapperEx {
@Param("materialParam") String materialParam, @Param("materialParam") String materialParam,
@Param("depotId") Integer depotId, @Param("depotId") Integer depotId,
@Param("oId") Integer oId, @Param("oId") Integer oId,
@Param("number") String number,
@Param("offset") Integer offset, @Param("offset") Integer offset,
@Param("rows") Integer rows); @Param("rows") Integer rows);
@@ -69,7 +70,8 @@ public interface DepotHeadMapperEx {
@Param("type") String type, @Param("type") String type,
@Param("materialParam") String materialParam, @Param("materialParam") String materialParam,
@Param("depotId") Integer depotId, @Param("depotId") Integer depotId,
@Param("oId") Integer oId); @Param("oId") Integer oId,
@Param("number") String number);
List<DepotHeadVo4InOutMCount> findInOutMaterialCount( List<DepotHeadVo4InOutMCount> findInOutMaterialCount(
@Param("beginTime") String beginTime, @Param("beginTime") String beginTime,
@@ -93,10 +95,10 @@ public interface DepotHeadMapperEx {
@Param("beginTime") String beginTime, @Param("beginTime") String beginTime,
@Param("endTime") String endTime, @Param("endTime") String endTime,
@Param("subType") String subType, @Param("subType") String subType,
@Param("number") String number,
@Param("materialParam") String materialParam, @Param("materialParam") String materialParam,
@Param("depotId") Integer depotId, @Param("depotId") Integer depotId,
@Param("depotIdF") Integer depotIdF, @Param("depotIdF") Integer depotIdF,
@Param("oId") Integer oId,
@Param("offset") Integer offset, @Param("offset") Integer offset,
@Param("rows") Integer rows); @Param("rows") Integer rows);
@@ -104,10 +106,10 @@ public interface DepotHeadMapperEx {
@Param("beginTime") String beginTime, @Param("beginTime") String beginTime,
@Param("endTime") String endTime, @Param("endTime") String endTime,
@Param("subType") String subType, @Param("subType") String subType,
@Param("number") String number,
@Param("materialParam") String materialParam, @Param("materialParam") String materialParam,
@Param("depotId") Integer depotId, @Param("depotId") Integer depotId,
@Param("depotIdF") Integer depotIdF, @Param("depotIdF") Integer depotIdF);
@Param("oId") Integer oId);
List<DepotHeadVo4StatementAccount> findStatementAccount( List<DepotHeadVo4StatementAccount> findStatementAccount(
@Param("beginTime") String beginTime, @Param("beginTime") String beginTime,

View File

@@ -420,20 +420,21 @@ public class DepotHeadService {
return result; return result;
} }
public List<DepotHeadVo4InDetail> findByAll(String beginTime, String endTime, String type, String materialParam, Integer depotId, Integer oId, Integer offset, Integer rows) throws Exception{ public List<DepotHeadVo4InDetail> findByAll(String beginTime, String endTime, String type, String materialParam,
Integer depotId, Integer oId, String number,Integer offset, Integer rows) throws Exception{
List<DepotHeadVo4InDetail> list = null; List<DepotHeadVo4InDetail> list = null;
try{ try{
list =depotHeadMapperEx.findByAll(beginTime, endTime, type, materialParam, depotId, oId, offset, rows); list =depotHeadMapperEx.findByAll(beginTime, endTime, type, materialParam, depotId, oId, number, offset, rows);
}catch(Exception e){ }catch(Exception e){
JshException.readFail(logger, e); JshException.readFail(logger, e);
} }
return list; return list;
} }
public int findByAllCount(String beginTime, String endTime, String type, String materialParam, Integer depotId, Integer oId) throws Exception{ public int findByAllCount(String beginTime, String endTime, String type, String materialParam, Integer depotId, Integer oId, String number) throws Exception{
int result = 0; int result = 0;
try{ try{
result =depotHeadMapperEx.findByAllCount(beginTime, endTime, type, materialParam, depotId, oId); result =depotHeadMapperEx.findByAllCount(beginTime, endTime, type, materialParam, depotId, oId, number);
}catch(Exception e){ }catch(Exception e){
JshException.readFail(logger, e); JshException.readFail(logger, e);
} }
@@ -460,20 +461,20 @@ public class DepotHeadService {
return result; return result;
} }
public List<DepotHeadVo4InDetail> findAllocationDetail(String beginTime, String endTime, String subType, String materialParam, Integer depotId, Integer depotIdF, Integer oId, Integer offset, Integer rows) throws Exception{ public List<DepotHeadVo4InDetail> findAllocationDetail(String beginTime, String endTime, String subType, String number, String materialParam, Integer depotId, Integer depotIdF, Integer offset, Integer rows) throws Exception{
List<DepotHeadVo4InDetail> list = null; List<DepotHeadVo4InDetail> list = null;
try{ try{
list =depotHeadMapperEx.findAllocationDetail(beginTime, endTime, subType, materialParam, depotId, depotIdF, oId, offset, rows); list =depotHeadMapperEx.findAllocationDetail(beginTime, endTime, subType, number, materialParam, depotId, depotIdF, offset, rows);
}catch(Exception e){ }catch(Exception e){
JshException.readFail(logger, e); JshException.readFail(logger, e);
} }
return list; return list;
} }
public int findAllocationDetailCount(String beginTime, String endTime, String subType, String materialParam, Integer depotId, Integer depotIdF,Integer oId) throws Exception{ public int findAllocationDetailCount(String beginTime, String endTime, String subType, String number, String materialParam, Integer depotId, Integer depotIdF) throws Exception{
int result = 0; int result = 0;
try{ try{
result =depotHeadMapperEx.findAllocationDetailCount(beginTime, endTime, subType, materialParam, depotId,depotIdF, oId); result =depotHeadMapperEx.findAllocationDetailCount(beginTime, endTime, subType, number, materialParam, depotId,depotIdF);
}catch(Exception e){ }catch(Exception e){
JshException.readFail(logger, e); JshException.readFail(logger, e);
} }

View File

@@ -208,6 +208,10 @@
<if test="type != null"> <if test="type != null">
and dh.type=#{type} and dh.type=#{type}
</if> </if>
<if test="number != null and number !=''">
<bind name="bindNumber" value="'%'+number+'%'"/>
and dh.number like #{bindNumber}
</if>
<if test="materialParam != null and materialParam !=''"> <if test="materialParam != null and materialParam !=''">
<bind name="bindKey" value="'%'+materialParam+'%'"/> <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}) and (me.bar_code like #{bindKey} or m.name like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey})
@@ -238,6 +242,10 @@
<if test="type != null"> <if test="type != null">
and dh.type=#{type} and dh.type=#{type}
</if> </if>
<if test="number != null and number !=''">
<bind name="bindNumber" value="'%'+number+'%'"/>
and dh.number like #{bindNumber}
</if>
<if test="materialParam != null and materialParam !=''"> <if test="materialParam != null and materialParam !=''">
<bind name="bindKey" value="'%'+materialParam+'%'"/> <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}) and (me.bar_code like #{bindKey} or m.name like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey})
@@ -333,6 +341,10 @@
<if test="subType != null"> <if test="subType != null">
and dh.sub_type=#{subType} and dh.sub_type=#{subType}
</if> </if>
<if test="number != null and number !=''">
<bind name="bindNumber" value="'%'+number+'%'"/>
and dh.number like #{bindNumber}
</if>
<if test="materialParam != null and materialParam !=''"> <if test="materialParam != null and materialParam !=''">
<bind name="bindKey" value="'%'+materialParam+'%'"/> <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}) 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})
@@ -361,6 +373,10 @@
<if test="subType != null"> <if test="subType != null">
and dh.sub_type=#{subType} and dh.sub_type=#{subType}
</if> </if>
<if test="number != null and number !=''">
<bind name="bindNumber" value="'%'+number+'%'"/>
and dh.number like #{bindNumber}
</if>
<if test="materialParam != null and materialParam !=''"> <if test="materialParam != null and materialParam !=''">
<bind name="bindKey" value="'%'+materialParam+'%'"/> <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}) 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})