解决单据查询的时候仓库参数bug
This commit is contained in:
@@ -27,7 +27,7 @@ public interface DepotHeadMapperEx {
|
|||||||
@Param("beginTime") String beginTime,
|
@Param("beginTime") String beginTime,
|
||||||
@Param("endTime") String endTime,
|
@Param("endTime") String endTime,
|
||||||
@Param("materialParam") String materialParam,
|
@Param("materialParam") String materialParam,
|
||||||
@Param("depotIds") String depotIds,
|
@Param("depotArray") String[] depotArray,
|
||||||
@Param("offset") Integer offset,
|
@Param("offset") Integer offset,
|
||||||
@Param("rows") Integer rows);
|
@Param("rows") Integer rows);
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@ public interface DepotHeadMapperEx {
|
|||||||
@Param("beginTime") String beginTime,
|
@Param("beginTime") String beginTime,
|
||||||
@Param("endTime") String endTime,
|
@Param("endTime") String endTime,
|
||||||
@Param("materialParam") String materialParam,
|
@Param("materialParam") String materialParam,
|
||||||
@Param("depotIds") String depotIds);
|
@Param("depotArray") String[] depotArray);
|
||||||
|
|
||||||
String findMaterialsListByHeaderId(
|
String findMaterialsListByHeaderId(
|
||||||
@Param("id") Long id);
|
@Param("id") Long id);
|
||||||
|
|||||||
@@ -99,12 +99,13 @@ public class DepotHeadService {
|
|||||||
List<DepotHeadVo4List> list=new ArrayList<>();
|
List<DepotHeadVo4List> list=new ArrayList<>();
|
||||||
try{
|
try{
|
||||||
String depotIds = depotService.findDepotStrByCurrentUser();
|
String depotIds = depotService.findDepotStrByCurrentUser();
|
||||||
|
String [] depotArray=depotIds.split(",");
|
||||||
String [] creatorArray = getCreatorArray(roleType);
|
String [] creatorArray = getCreatorArray(roleType);
|
||||||
Map<Long,String> personMap = personService.getPersonMap();
|
Map<Long,String> personMap = personService.getPersonMap();
|
||||||
Map<Long,String> accountMap = accountService.getAccountMap();
|
Map<Long,String> accountMap = accountService.getAccountMap();
|
||||||
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=depotHeadMapperEx.selectByConditionDepotHead(type, subType, creatorArray, status, number, beginTime, endTime, materialParam, depotIds, offset, rows);
|
list=depotHeadMapperEx.selectByConditionDepotHead(type, subType, creatorArray, status, number, beginTime, endTime, materialParam, depotArray, offset, rows);
|
||||||
if (null != list) {
|
if (null != list) {
|
||||||
for (DepotHeadVo4List dh : list) {
|
for (DepotHeadVo4List dh : list) {
|
||||||
if(accountMap!=null && StringUtil.isNotEmpty(dh.getAccountIdList()) && StringUtil.isNotEmpty(dh.getAccountMoneyList())) {
|
if(accountMap!=null && StringUtil.isNotEmpty(dh.getAccountIdList()) && StringUtil.isNotEmpty(dh.getAccountMoneyList())) {
|
||||||
@@ -146,10 +147,11 @@ public class DepotHeadService {
|
|||||||
Long result=null;
|
Long result=null;
|
||||||
try{
|
try{
|
||||||
String depotIds = depotService.findDepotStrByCurrentUser();
|
String depotIds = depotService.findDepotStrByCurrentUser();
|
||||||
|
String [] depotArray=depotIds.split(",");
|
||||||
String [] creatorArray = getCreatorArray(roleType);
|
String [] creatorArray = getCreatorArray(roleType);
|
||||||
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);
|
||||||
result=depotHeadMapperEx.countsByDepotHead(type, subType, creatorArray, status, number, beginTime, endTime, materialParam, depotIds);
|
result=depotHeadMapperEx.countsByDepotHead(type, subType, creatorArray, status, number, beginTime, endTime, materialParam, depotArray);
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
JshException.readFail(logger, e);
|
JshException.readFail(logger, e);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,8 +74,12 @@
|
|||||||
<bind name="bindKey" value="'%'+materialParam+'%'"/>
|
<bind name="bindKey" value="'%'+materialParam+'%'"/>
|
||||||
and (m.name like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey})
|
and (m.name like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey})
|
||||||
</if>
|
</if>
|
||||||
<if test="depotIds != null and depotIds !=''">
|
<if test="depotArray != null and depotArray !=''">
|
||||||
and di.depot_id in (#{depotIds})
|
and di.depot_id in (
|
||||||
|
<foreach collection="depotArray" item="depotId" separator=",">
|
||||||
|
#{depotId}
|
||||||
|
</foreach>
|
||||||
|
)
|
||||||
</if>
|
</if>
|
||||||
<if test="creatorArray != null">
|
<if test="creatorArray != null">
|
||||||
and dh.creator in (
|
and dh.creator in (
|
||||||
@@ -120,8 +124,12 @@
|
|||||||
<bind name="bindKey" value="'%'+materialParam+'%'"/>
|
<bind name="bindKey" value="'%'+materialParam+'%'"/>
|
||||||
and (m.name like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey})
|
and (m.name like #{bindKey} or m.standard like #{bindKey} or m.model like #{bindKey})
|
||||||
</if>
|
</if>
|
||||||
<if test="depotIds != null and depotIds !=''">
|
<if test="depotArray != null and depotArray !=''">
|
||||||
and di.depot_id in (#{depotIds})
|
and di.depot_id in (
|
||||||
|
<foreach collection="depotArray" item="depotId" separator=",">
|
||||||
|
#{depotId}
|
||||||
|
</foreach>
|
||||||
|
)
|
||||||
</if>
|
</if>
|
||||||
<if test="creatorArray != null">
|
<if test="creatorArray != null">
|
||||||
and dh.creator in (
|
and dh.creator in (
|
||||||
|
|||||||
Reference in New Issue
Block a user