给入库和出库明细增加角色类型字段

This commit is contained in:
季圣华 2022-08-05 00:15:29 +08:00
parent b9c7ee357a
commit 95d6cc3428
4 changed files with 60 additions and 15 deletions

View File

@ -108,6 +108,7 @@ public class DepotHeadController {
@RequestParam(value = "depotId", required = false) Long depotId,
@RequestParam("beginTime") String beginTime,
@RequestParam("endTime") String endTime,
@RequestParam(value = "roleType", required = false) String roleType,
@RequestParam("type") String type,
@RequestParam("remark") String remark,
HttpServletRequest request)throws Exception {
@ -126,11 +127,13 @@ public class DepotHeadController {
}
}
List<DepotHeadVo4InDetail> resList = new ArrayList<DepotHeadVo4InDetail>();
String [] creatorArray = depotHeadService.getCreatorArray(roleType);
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, remark, (currentPage-1)*pageSize, pageSize);
int total = depotHeadService.findByAllCount(beginTime, endTime, type, materialParam, depotList, oId, number, remark);
List<DepotHeadVo4InDetail> list = depotHeadService.findByAll(beginTime, endTime, type, creatorArray,
materialParam, depotList, oId, number, remark, (currentPage-1)*pageSize, pageSize);
int total = depotHeadService.findByAllCount(beginTime, endTime, type, creatorArray,
materialParam, depotList, oId, number, remark);
map.put("total", total);
//存放数据json数组
if (null != list) {
@ -229,6 +232,7 @@ public class DepotHeadController {
@RequestParam("beginTime") String beginTime,
@RequestParam("endTime") String endTime,
@RequestParam("subType") String subType,
@RequestParam(value = "roleType", required = false) String roleType,
@RequestParam("remark") String remark,
HttpServletRequest request)throws Exception {
BaseResponseInfo res = new BaseResponseInfo();
@ -256,11 +260,13 @@ public class DepotHeadController {
depotFList.add(object.getLong("id"));
}
}
String [] creatorArray = depotHeadService.getCreatorArray(roleType);
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, remark, (currentPage-1)*pageSize, pageSize);
int total = depotHeadService.findAllocationDetailCount(beginTime, endTime, subType, number, materialParam, depotList, depotFList, remark);
List<DepotHeadVo4InDetail> list = depotHeadService.findAllocationDetail(beginTime, endTime, subType, number,
creatorArray, materialParam, depotList, depotFList, remark, (currentPage-1)*pageSize, pageSize);
int total = depotHeadService.findAllocationDetailCount(beginTime, endTime, subType, number,
creatorArray, materialParam, depotList, depotFList, remark);
map.put("rows", list);
map.put("total", total);
res.code = 200;

View File

@ -63,6 +63,7 @@ public interface DepotHeadMapperEx {
@Param("beginTime") String beginTime,
@Param("endTime") String endTime,
@Param("type") String type,
@Param("creatorArray") String[] creatorArray,
@Param("materialParam") String materialParam,
@Param("depotList") List<Long> depotList,
@Param("oId") Integer oId,
@ -75,6 +76,7 @@ public interface DepotHeadMapperEx {
@Param("beginTime") String beginTime,
@Param("endTime") String endTime,
@Param("type") String type,
@Param("creatorArray") String[] creatorArray,
@Param("materialParam") String materialParam,
@Param("depotList") List<Long> depotList,
@Param("oId") Integer oId,
@ -104,6 +106,7 @@ public interface DepotHeadMapperEx {
@Param("endTime") String endTime,
@Param("subType") String subType,
@Param("number") String number,
@Param("creatorArray") String[] creatorArray,
@Param("materialParam") String materialParam,
@Param("depotList") List<Long> depotList,
@Param("depotFList") List<Long> depotFList,
@ -116,6 +119,7 @@ public interface DepotHeadMapperEx {
@Param("endTime") String endTime,
@Param("subType") String subType,
@Param("number") String number,
@Param("creatorArray") String[] creatorArray,
@Param("materialParam") String materialParam,
@Param("depotList") List<Long> depotList,
@Param("depotFList") List<Long> depotFList,

View File

@ -447,21 +447,24 @@ public class DepotHeadService {
return result;
}
public List<DepotHeadVo4InDetail> findByAll(String beginTime, String endTime, String type, String materialParam,
List<Long> depotList, Integer oId, String number, String remark, Integer offset, Integer rows) throws Exception{
public List<DepotHeadVo4InDetail> findByAll(String beginTime, String endTime, String type, String [] creatorArray,
String materialParam, 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, remark, offset, rows);
list =depotHeadMapperEx.findByAll(beginTime, endTime, type, creatorArray, 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, String remark) throws Exception{
public int findByAllCount(String beginTime, String endTime, String type, String [] creatorArray,
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, remark);
result =depotHeadMapperEx.findByAllCount(beginTime, endTime, type, creatorArray, materialParam, depotList, oId, number, remark);
}catch(Exception e){
JshException.readFail(logger, e);
}
@ -490,10 +493,12 @@ public class DepotHeadService {
}
public List<DepotHeadVo4InDetail> findAllocationDetail(String beginTime, String endTime, String subType, String number,
String materialParam, List<Long> depotList, List<Long> depotFList, String remark, Integer offset, Integer rows) throws Exception{
String [] creatorArray, 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, remark, offset, rows);
list =depotHeadMapperEx.findAllocationDetail(beginTime, endTime, subType, number, creatorArray,
materialParam, depotList, depotFList, remark, offset, rows);
}catch(Exception e){
JshException.readFail(logger, e);
}
@ -501,10 +506,12 @@ public class DepotHeadService {
}
public int findAllocationDetailCount(String beginTime, String endTime, String subType, String number,
String materialParam, List<Long> depotList, List<Long> depotFList, String remark) throws Exception{
String [] creatorArray, 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, remark);
result =depotHeadMapperEx.findAllocationDetailCount(beginTime, endTime, subType, number, creatorArray,
materialParam, depotList, depotFList, remark);
}catch(Exception e){
JshException.readFail(logger, e);
}

View File

@ -244,6 +244,13 @@
<if test="type != null">
and dh.type=#{type}
</if>
<if test="creatorArray != null">
and dh.creator in (
<foreach collection="creatorArray" item="creator" separator=",">
#{creator}
</foreach>
)
</if>
<if test="number != null and number !=''">
<bind name="bindNumber" value="'%'+number+'%'"/>
and dh.number like #{bindNumber}
@ -285,6 +292,13 @@
<if test="type != null">
and dh.type=#{type}
</if>
<if test="creatorArray != null">
and dh.creator in (
<foreach collection="creatorArray" item="creator" separator=",">
#{creator}
</foreach>
)
</if>
<if test="number != null and number !=''">
<bind name="bindNumber" value="'%'+number+'%'"/>
and dh.number like #{bindNumber}
@ -419,6 +433,13 @@
<bind name="bindNumber" value="'%'+number+'%'"/>
and dh.number like #{bindNumber}
</if>
<if test="creatorArray != null">
and dh.creator in (
<foreach collection="creatorArray" item="creator" separator=",">
#{creator}
</foreach>
)
</if>
<if test="materialParam != null and 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})
@ -461,6 +482,13 @@
<bind name="bindNumber" value="'%'+number+'%'"/>
and dh.number like #{bindNumber}
</if>
<if test="creatorArray != null">
and dh.creator in (
<foreach collection="creatorArray" item="creator" separator=",">
#{creator}
</foreach>
)
</if>
<if test="materialParam != null and 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})