@ -23,6 +23,8 @@ import org.nl.modules.wql.WQL;
import org.nl.modules.wql.core.bean.WQLObject ;
import org.nl.modules.wql.core.bean.WQLObject ;
import org.nl.modules.wql.util.SpringContextHolder ;
import org.nl.modules.wql.util.SpringContextHolder ;
import org.nl.modules.wql.util.WqlUtil ;
import org.nl.modules.wql.util.WqlUtil ;
import org.nl.wms.basedata.master.structattr.service.dao.Structattr ;
import org.nl.wms.basedata.master.structattr.service.dao.mapper.StructattrMapper ;
import org.nl.wms.basedata.st.service.impl.UserStorServiceImpl ;
import org.nl.wms.basedata.st.service.impl.UserStorServiceImpl ;
import org.nl.wms.pda.mps.eum.RegionTypeEnum ;
import org.nl.wms.pda.mps.eum.RegionTypeEnum ;
import org.nl.wms.sch.manage.TaskStatusEnum ;
import org.nl.wms.sch.manage.TaskStatusEnum ;
@ -34,6 +36,7 @@ import org.nl.wms.st.instor.movestor.service.dao.MoveStor;
import org.nl.wms.st.instor.movestor.service.dao.MoveStorDtl ;
import org.nl.wms.st.instor.movestor.service.dao.MoveStorDtl ;
import org.nl.wms.st.instor.movestor.service.dao.mapper.MoveStorDtlMapper ;
import org.nl.wms.st.instor.movestor.service.dao.mapper.MoveStorDtlMapper ;
import org.nl.wms.st.instor.movestor.service.dao.mapper.MoveStorMapper ;
import org.nl.wms.st.instor.movestor.service.dao.mapper.MoveStorMapper ;
import org.nl.wms.st.instor.movestor.service.dto.BoxIvt ;
import org.nl.wms.st.instor.movestor.service.dto.MoveStorDtlDto ;
import org.nl.wms.st.instor.movestor.service.dto.MoveStorDtlDto ;
import org.nl.wms.st.instor.movestor.service.dto.MoveStorDtlQuery ;
import org.nl.wms.st.instor.movestor.service.dto.MoveStorDtlQuery ;
import org.nl.wms.st.instor.movestor.service.dto.MoveStorQuery ;
import org.nl.wms.st.instor.movestor.service.dto.MoveStorQuery ;
@ -45,7 +48,6 @@ import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service ;
import org.springframework.stereotype.Service ;
import org.springframework.transaction.annotation.Transactional ;
import org.springframework.transaction.annotation.Transactional ;
import java.util.* ;
import java.util.* ;
import java.util.stream.Collectors ;
/ * *
/ * *
* PC端出入库新增
* PC端出入库新增
@ -67,6 +69,9 @@ public class HandMoveStorServiceImpl extends ServiceImpl<MoveStorMapper, MoveSto
private MoveStorMapper moveStorMapper ;
private MoveStorMapper moveStorMapper ;
@Autowired
@Autowired
private MoveStorDtlMapper moveStorDtlMapper ;
private MoveStorDtlMapper moveStorDtlMapper ;
@Autowired
private StructattrMapper structattrMapper ;
@Override
@Override
public IPage < MoveStor > pageQuery ( MoveStorQuery whereJson , PageQuery page ) {
public IPage < MoveStor > pageQuery ( MoveStorQuery whereJson , PageQuery page ) {
@ -358,13 +363,10 @@ public class HandMoveStorServiceImpl extends ServiceImpl<MoveStorMapper, MoveSto
if ( ObjectUtil . isEmpty ( jsonMove ) ) {
if ( ObjectUtil . isEmpty ( jsonMove ) ) {
throw new BadRequestException ( "没有可用暂存位" ) ;
throw new BadRequestException ( "没有可用暂存位" ) ;
}
}
List < BoxIvt > jsonIvt = moveStorDtlMapper . getStoragevehicleIvtByPackageBoxSn ( json . getString ( "storagevehicle_code" ) ) ;
// 组织明细
jsonIvt . forEach ( boxIvt - > {
JSONObject row = ( JSONObject ) JSONObject . toJSON ( boxIvt ) ;
JSONArray jsonIvt = WQL . getWO ( "QST_IVT_HANDMOVESTOR" ) . addParam ( "flag" , "35" ) . addParam ( "package_box_sn" , json . getString ( "storagevehicle_code" ) ) . process ( ) . getResultJSONArray ( 0 ) ;
row . put ( "wrok_status" , "01" ) ;
List < JSONObject > collect = jsonIvt . stream ( ) . map ( row - > ( JSONObject ) row ) . collect ( Collectors . toList ( ) ) ;
collect . forEach ( row - > {
row . put ( "wrok_status" , "10" ) ;
row . put ( "turnin_sect_id" , jsonMove . getString ( "sect_id" ) ) ;
row . put ( "turnin_sect_id" , jsonMove . getString ( "sect_id" ) ) ;
row . put ( "turnin_sect_code" , jsonMove . getString ( "sect_code" ) ) ;
row . put ( "turnin_sect_code" , jsonMove . getString ( "sect_code" ) ) ;
row . put ( "turnin_sect_name" , jsonMove . getString ( "sect_name" ) ) ;
row . put ( "turnin_sect_name" , jsonMove . getString ( "sect_name" ) ) ;
@ -473,34 +475,26 @@ public class HandMoveStorServiceImpl extends ServiceImpl<MoveStorMapper, MoveSto
String now = DateUtil . now ( ) ;
String now = DateUtil . now ( ) ;
//定义需要需要插入的库存集合
//定义需要需要插入的库存集合
HashMap < String , JSONObject > Struct_map = new HashMap < String , JSONObject > ( ) ;
HashMap < String , JSONObject > Struct_map = new HashMap < String , JSONObject > ( ) ;
StringBuffer ids = new StringBuffer ( ) ;
for ( int i = 0 ; i < rows . size ( ) ; i + + ) {
for ( int i = 0 ; i < rows . size ( ) ; i + + ) {
JSONObject row = rows . getJSONObject ( i ) ;
JSONObject row = rows . getJSONObject ( i ) ;
String storagevehicle_code = row . getString ( "storagevehicle_code" ) ;
String storagevehicle_code = row . getString ( "storagevehicle_code" ) ;
if ( i = = 0 ) {
ids . append ( "'" ) ;
}
if ( ! Struct_map . containsKey ( storagevehicle_code ) ) {
if ( ! Struct_map . containsKey ( storagevehicle_code ) ) {
Struct_map . put ( storagevehicle_code , row ) ;
Struct_map . put ( storagevehicle_code , row ) ;
}
}
if ( i ! = 0 ) {
ids . append ( "','" ) ;
}
ids . append ( storagevehicle_code ) ;
}
}
ids . append ( "'" ) ;
Set < String > set = Struct_map . keySet ( ) ;
if ( set . size ( ) = = 0 ) {
throw new BadRequestException ( "当前移库明细载具集合为空!" ) ;
}
//查询所有载具的库存
//查询所有载具的库存
JSONArray ja = WQL . getWO ( "QST_IVT_HANDMOVESTOR" )
List < BoxIvt > ja = moveStorDtlMapper . getStoragevehicleIvt ( new ArrayList < String > ( set ) ) ;
. addParam ( "flag" , "33" )
. addParam ( "ids" , ids . toString ( ) )
. process ( ) . getResultJSONArray ( 0 ) ;
if ( ja . size ( ) = = 0 ) {
if ( ja . size ( ) = = 0 ) {
throw new BadRequestException ( "当前所有载具无可移库库存!" ) ;
throw new BadRequestException ( "当前所有载具无可移库库存!" ) ;
}
}
double total_qty = 0 ;
double total_qty = 0 ;
for ( int i = 0 ; i < ja . size ( ) ; i + + ) {
for ( int i = 0 ; i < ja . size ( ) ; i + + ) {
MoveStorDtl jo = new MoveStorDtl ( ) ;
MoveStorDtl jo = new MoveStorDtl ( ) ;
jo . copyFrom ( ja . getJSONObject ( i ) ) ;
jo . copyFrom ( ja . get ( i ) ) ;
//累加明细数量
//累加明细数量
total_qty = total_qty + jo . getQty ( ) ;
total_qty = total_qty + jo . getQty ( ) ;
@ -525,7 +519,7 @@ public class HandMoveStorServiceImpl extends ServiceImpl<MoveStorMapper, MoveSto
throw new BadRequestException ( row . getString ( "turnin_struct_code" ) + "仓位数据异常,找不到对应点位!" ) ;
throw new BadRequestException ( row . getString ( "turnin_struct_code" ) + "仓位数据异常,找不到对应点位!" ) ;
}
}
//判断是否已生成过了任务,未生成则插入任务
//判断是否已生成过了任务,未生成则插入任务
JSONObject task = wo_Task . query ( "is_delete = '0' and task_status<'05' and point_code1='" + ja . getJSONObject ( i ) . getString ( "start_point_code" ) + "'" ) . uniqueResult ( 0 ) ;
JSONObject task = wo_Task . query ( "is_delete = '0' and task_status<'05' and point_code1='" + ja . get ( i ) . getStart_point_code ( ) + "'" ) . uniqueResult ( 0 ) ;
if ( task ! = null ) {
if ( task ! = null ) {
jo . setTask_id ( task . getString ( "task_id" ) ) ;
jo . setTask_id ( task . getString ( "task_id" ) ) ;
} else {
} else {
@ -539,7 +533,7 @@ public class HandMoveStorServiceImpl extends ServiceImpl<MoveStorMapper, MoveSto
task . put ( "task_type" , "010505" ) ;
task . put ( "task_type" , "010505" ) ;
task . put ( "acs_task_type" , "7" ) ;
task . put ( "acs_task_type" , "7" ) ;
task . put ( "task_status" , TaskStatusEnum . SURE_START . getCode ( ) ) ;
task . put ( "task_status" , TaskStatusEnum . SURE_START . getCode ( ) ) ;
task . put ( "point_code1" , ja . getJSONObject ( i ) . getString ( "start_point_code" ) ) ;
task . put ( "point_code1" , ja . get ( i ) . getStart_point_code ( ) ) ;
task . put ( "point_code2" , point . getString ( "point_code" ) ) ;
task . put ( "point_code2" , point . getString ( "point_code" ) ) ;
task . put ( "vehicle_code" , jo . getStoragevehicle_code ( ) ) ;
task . put ( "vehicle_code" , jo . getStoragevehicle_code ( ) ) ;
task . put ( "handle_class" , HandMoveStorAcsTask . class . getName ( ) ) ;
task . put ( "handle_class" , HandMoveStorAcsTask . class . getName ( ) ) ;
@ -644,34 +638,26 @@ public class HandMoveStorServiceImpl extends ServiceImpl<MoveStorMapper, MoveSto
String now = DateUtil . now ( ) ;
String now = DateUtil . now ( ) ;
//定义需要需要插入的库存集合
//定义需要需要插入的库存集合
HashMap < String , JSONObject > Struct_map = new HashMap < String , JSONObject > ( ) ;
HashMap < String , JSONObject > Struct_map = new HashMap < String , JSONObject > ( ) ;
StringBuffer ids = new StringBuffer ( ) ;
for ( int i = 0 ; i < rows . size ( ) ; i + + ) {
for ( int i = 0 ; i < rows . size ( ) ; i + + ) {
JSONObject row = rows . getJSONObject ( i ) ;
JSONObject row = rows . getJSONObject ( i ) ;
String storagevehicle_code = row . getString ( "storagevehicle_code" ) ;
String storagevehicle_code = row . getString ( "storagevehicle_code" ) ;
if ( i = = 0 ) {
ids . append ( "'" ) ;
}
if ( ! Struct_map . containsKey ( storagevehicle_code ) ) {
if ( ! Struct_map . containsKey ( storagevehicle_code ) ) {
Struct_map . put ( storagevehicle_code , row ) ;
Struct_map . put ( storagevehicle_code , row ) ;
}
}
if ( i ! = 0 ) {
ids . append ( "','" ) ;
}
ids . append ( storagevehicle_code ) ;
}
}
ids . append ( "'" ) ;
Set < String > set = Struct_map . keySet ( ) ;
if ( set . size ( ) = = 0 ) {
throw new BadRequestException ( "当前移库明细载具集合为空!" ) ;
}
//查询所有载具的库存
//查询所有载具的库存
JSONArray ja = WQL . getWO ( "QST_IVT_HANDMOVESTOR" )
List < BoxIvt > ja = moveStorDtlMapper . getStoragevehicleIvt ( new ArrayList < String > ( set ) ) ;
. addParam ( "flag" , "33" )
. addParam ( "ids" , ids . toString ( ) )
. process ( ) . getResultJSONArray ( 0 ) ;
if ( ja . size ( ) = = 0 ) {
if ( ja . size ( ) = = 0 ) {
throw new BadRequestException ( "当前所有载具无可移库库存!" ) ;
throw new BadRequestException ( "当前所有载具无可移库库存!" ) ;
}
}
double total_qty = 0 ;
double total_qty = 0 ;
for ( int i = 0 ; i < ja . size ( ) ; i + + ) {
for ( int i = 0 ; i < ja . size ( ) ; i + + ) {
MoveStorDtl jodtl = new MoveStorDtl ( ) ;
MoveStorDtl jodtl = new MoveStorDtl ( ) ;
jodtl . copyFrom ( ja . getJSONObject ( i ) ) ;
jodtl . copyFrom ( ja . get ( i ) ) ;
//累加数量
//累加数量
total_qty = total_qty + jodtl . getQty ( ) ;
total_qty = total_qty + jodtl . getQty ( ) ;
@ -921,12 +907,12 @@ public class HandMoveStorServiceImpl extends ServiceImpl<MoveStorMapper, MoveSto
}
}
@Override
@Override
public JSONArray getBoxIvt ( JSONArray whereJson ) {
public List < BoxIvt > getBoxIvt ( JSONArray whereJson ) {
HashSet < String > set = new HashSet < > ( ) ;
HashSet < String > set = new HashSet < > ( ) ;
for ( int i = 0 ; i < whereJson . size ( ) ; i + + ) {
for ( int i = 0 ; i < whereJson . size ( ) ; i + + ) {
set . add ( whereJson . getJSONObject ( i ) . getString ( "storagevehicle_code" ) ) ;
set . add ( whereJson . getJSONObject ( i ) . getString ( "storagevehicle_code" ) ) ;
}
}
return moveStorDtlMapper . getBoxIvt ( set ) ;
return moveStorDtlMapper . getBoxIvt ( new ArrayList < String > ( set ) ) ;
}
}
@Override
@Override
@ -1152,49 +1138,51 @@ public class HandMoveStorServiceImpl extends ServiceImpl<MoveStorMapper, MoveSto
/ *
/ *
* 将所有盘点位上的木箱生成移库单并下发任务
* 将所有盘点位上的木箱生成移库单并下发任务
* /
* /
WQLObject attrTab = WQLObject . getWQLObject ( "st_ivt_structattr" ) ; // 仓位表
LambdaQueryWrapper < Structattr > queryWrapper = new LambdaQueryWrapper < Structattr > ( ) ;
queryWrapper . eq ( ObjectUtil . isNotEmpty ( RegionTypeEnum . PD01 . getId ( ) ) , Structattr : : getSect_id , RegionTypeEnum . PD01 . getId ( ) )
. eq ( Structattr : : getIs_used , "1" )
. gt ( Structattr : : getIs_delete , "0" )
. ne ( Structattr : : getStoragevehicle_code , "" )
. isNotNull ( Structattr : : getStoragevehicle_code )
. orderByAsc ( Structattr : : getBlock_num )
. orderByDesc ( Structattr : : getBlock_num ) ; //neededit out_order_seq DESC
List < Structattr > boxArr = structattrMapper . selectList ( queryWrapper ) ;
// 1.找出所有需要盘点的移库的木箱
// 1.找出所有需要盘点的移库的木箱
JSONArray boxArr = attrTab . query ( "sect_id = '" + RegionTypeEnum . PD01 . getId ( ) + "' and IFNULL(storagevehicle_code,'') <> '' and is_used = '1' and is_delete = '0' order by block_num ASC,out_order_seq DESC" ) . getResultJSONArray ( 0 ) ;
//JSONArray boxArr = attrTab.query("sect_id = '" + RegionTypeEnum.PD01.getId() + "' and IFNULL(storagevehicle_code,'') <> '' and is_used = '1' and is_delete = '0' order by block_num ASC,out_order_seq DESC").getResultJSONArray(0);
if ( ObjectUtil . isEmpty ( boxArr ) ) {
if ( boxArr . size ( ) = = 0 ) {
throw new BadRequestException ( "没有需要盘点回库的木箱!" ) ;
throw new BadRequestException ( "没有需要盘点回库的木箱!" ) ;
}
}
// 2.判断是否有被锁定的木箱
// 2.判断是否有被锁定的木箱
boolean is_lock = boxArr . stream ( ) . map ( row - > ( JSONObject ) row )
queryWrapper . ne ( Structattr : : getLock_type , "1" ) ;
. anyMatch ( row - > ! StrUtil . equals ( row . getString ( "lock_type" ) , "1" ) ) ;
Integer lock_size = structattrMapper . selectCount ( queryWrapper ) ;
//boolean is_lock = boxArr.stream().map(row -> (JSONObject) row).anyMatch(row -> !StrUtil.equals(row.getString("lock_type"), "1"));
if ( is_lock ) {
if ( lock_size > 0 ) {
throw new BadRequestException ( "木箱存在被锁定,请检查!" ) ;
throw new BadRequestException ( "木箱存在被锁定,请检查!" ) ;
}
}
/ * for ( int i = 0 ; i < boxArr . size ( ) ; i + + ) {
JSONObject json = boxArr . getJSONObject ( i ) ;
// 3.判断木箱是否存在未完成的盘点单
WQL . getWO ( "QST_IVT_HANDMOVESTOR" ) . addParam ( "flag" , "8" ) . addParam ( "storagevehicle_code" , json . getString ( "storagevehicle_code" ) ) ;
} * /
// 3.判断木箱是否存在未完成的盘点单
// 3.判断木箱是否存在未完成的盘点单
boxArr . forEach ( row - > {
HashSet < String > set = new HashSet < > ( ) ;
JSONObject json = WQL . getWO ( "QST_IVT_HANDMOVESTOR" ) . addParam ( "flag" , "8" ) . addParam ( "storagevehicle_code" , ( ( JSONObject ) row ) . getString ( "storagevehicle_code" ) ) . process ( ) . uniqueResult ( 0 ) ;
for ( int i = 0 ; i < boxArr . size ( ) ; i + + ) {
if ( ObjectUtil . isNotEmpty ( json ) ) {
set . add ( boxArr . get ( i ) . getStoragevehicle_code ( ) ) ;
throw new BadRequestException ( "此木箱的盘点单据未完成:" + json . getString ( "storagevehicle_code" ) ) ;
}
}
JSONObject checkDtl = moveStorDtlMapper . getUnFinishCheckDtl ( new ArrayList < > ( set ) ) ;
} ) ;
if ( ObjectUtil . isNotEmpty ( checkDtl ) ) {
throw new BadRequestException ( "此木箱的盘点单据未完成:" + checkDtl . getString ( "storagevehicle_code" ) ) ;
}
// 4.生成移库单
// 4.生成移库单
for ( int i = 0 ; i < boxArr . size ( ) ; i + + ) {
for ( int i = 0 ; i < boxArr . size ( ) ; i + + ) {
JSONObject json = boxArr . getJSONObject ( i ) ;
Structattr json = boxArr . get ( i ) ;
// 找一个移入仓位
// 找一个移入仓位
RawAssistIStorService rawAssistIStorService = SpringContextHolder . getBean ( RawAssistIStorService . class ) ;
RawAssistIStorService rawAssistIStorService = SpringContextHolder . getBean ( RawAssistIStorService . class ) ;
JSONObject moveParamIn = new JSONObject ( ) ;
JSONObject moveParamIn = new JSONObject ( ) ;
moveParamIn . put ( "box_no" , json . getString ( "storagevehicle_code" ) ) ;
moveParamIn . put ( "box_no" , json . getStoragevehicle_code ( ) ) ;
moveParamIn . put ( "sect_id" , RegionTypeEnum . ZC01 . getId ( ) ) ;
moveParamIn . put ( "sect_id" , RegionTypeEnum . ZC01 . getId ( ) ) ;
moveParamIn . put ( "layer_num" , json . getString ( "layer_num" ) ) ;
moveParamIn . put ( "layer_num" , json . getLayer_num ( ) ) ;
JSONObject jsonMoveIn = rawAssistIStorService . autoDisMove ( moveParamIn ) ;
JSONObject jsonMoveIn = rawAssistIStorService . autoDisMove ( moveParamIn ) ;
if ( ObjectUtil . isEmpty ( jsonMoveIn ) ) {
if ( ObjectUtil . isEmpty ( jsonMoveIn ) ) {
@ -1212,17 +1200,17 @@ public class HandMoveStorServiceImpl extends ServiceImpl<MoveStorMapper, MoveSto
jsonMst . put ( "is_task" , "1" ) ;
jsonMst . put ( "is_task" , "1" ) ;
JSONArray dtlArr = new JSONArray ( ) ; // 明细
JSONArray dtlArr = new JSONArray ( ) ; // 明细
// 组织明细
// 组织明细
JSONArray jsonIvt = WQL . getWO ( "QST_IVT_HANDMOVESTOR" ) . addParam ( "flag" , "35" ) . addParam ( "package_box_sn" , json . getString ( "storagevehicle_code" ) ) . process ( ) . getResultJSONArray ( 0 ) ;
List < BoxIvt > jsonIvt = moveStorDtlMapper . getStoragevehicleIvtByPackageBoxSn ( json . getStoragevehicle_code ( ) ) ;
jsonIvt . forEach ( row - > {
jsonIvt . forEach ( boxIvt - > {
( ( JSONObject ) row ) . put ( "wrok_status" , "10" ) ;
JSONObject row = ( JSONObject ) JSONObject . toJSON ( boxIvt ) ;
( ( JSONObject ) row ) . put ( "turnin_sect_id" , jsonMoveIn . getString ( "sect_id" ) ) ;
row . put ( "wrok_status" , "01" ) ;
( ( JSONObject ) row ) . put ( "turnin_sect_code" , jsonMoveIn . getString ( "sect_code" ) ) ;
row . put ( "turnin_sect_id" , jsonMoveIn . getString ( "sect_id" ) ) ;
( ( JSONObject ) row ) . put ( "turnin_sect_name" , jsonMoveIn . getString ( "sect_name" ) ) ;
row . put ( "turnin_sect_code" , jsonMoveIn . getString ( "sect_code" ) ) ;
( ( JSONObject ) row ) . put ( "turnin_struct_id" , jsonMoveIn . getString ( "struct_id" ) ) ;
row . put ( "turnin_sect_name" , jsonMoveIn . getString ( "sect_name" ) ) ;
( ( JSONObject ) row ) . put ( "turnin_struct_code" , jsonMoveIn . getString ( "struct_code" ) ) ;
row . put ( "turnin_struct_id" , jsonMoveIn . getString ( "struct_id" ) ) ;
( ( JSONObject ) row ) . put ( "turnin_struct_name" , jsonMoveIn . getString ( "struct_name" ) ) ;
row . put ( "turnin_struct_code" , jsonMoveIn . getString ( "struct_code" ) ) ;
row . put ( "turnin_struct_name" , jsonMoveIn . getString ( "struct_name" ) ) ;
dtlArr . add ( row ) ;
dtlArr . add ( row ) ;
} ) ;
} ) ;
@ -1243,8 +1231,8 @@ public class HandMoveStorServiceImpl extends ServiceImpl<MoveStorMapper, MoveSto
String placement_type = whereJson . getString ( "placement_type" ) ;
String placement_type = whereJson . getString ( "placement_type" ) ;
CheckOutBillServiceImpl bean = SpringContextHolder . getBean ( CheckOutBillServiceImpl . class ) ;
CheckOutBillServiceImpl bean = SpringContextHolder . getBean ( CheckOutBillServiceImpl . class ) ;
JSONArray jsonLockArr = new JSONArray ( ) ;
//JSONArray jsonLockArr = new JSONArray();
List < Structattr > jsonLockArr = new ArrayList < > ( ) ;
if ( StrUtil . equals ( placement_type , "01" ) ) {
if ( StrUtil . equals ( placement_type , "01" ) ) {
/ *
/ *
* 双通
* 双通
@ -1290,9 +1278,20 @@ public class HandMoveStorServiceImpl extends ServiceImpl<MoveStorMapper, MoveSto
throw new BadRequestException ( "仓位:" + error + "被锁定且未下发任务,无法生成任务!" ) ;
throw new BadRequestException ( "仓位:" + error + "被锁定且未下发任务,无法生成任务!" ) ;
}
}
// 查询被阻挡需要移库的货位
// 查询被阻挡需要移库的货位structattrMapper
isNumMap . put ( "flag" , "6" ) ;
//isNumMap.put("block_num", whereJson.getString("block_num"));
jsonLockArr = WQL . getWO ( "QST_IVT_HANDMOVESTOR" ) . addParamMap ( isNumMap ) . process ( ) . getResultJSONArray ( 0 ) ;
//isNumMap.put("row_num", whereJson.getString("row_num"));
//isNumMap.put("out_order_seq", whereJson.getString("out_order_seq"));
LambdaQueryWrapper < Structattr > queryWrapper = new LambdaQueryWrapper < Structattr > ( ) ;
queryWrapper . eq ( ObjectUtil . isNotEmpty ( whereJson . getString ( "block_num" ) ) , Structattr : : getBlock_num , whereJson . getString ( "block_num" ) )
. eq ( ObjectUtil . isNotEmpty ( whereJson . getString ( "row_num" ) ) , Structattr : : getBlock_num , whereJson . getString ( "row_num" ) ) //neededit
. gt ( ObjectUtil . isNotEmpty ( whereJson . getString ( "out_order_seq" ) ) , Structattr : : getBlock_num , whereJson . getString ( "out_order_seq" ) ) //neededit
. ne ( Structattr : : getStoragevehicle_code , "" )
. isNotNull ( Structattr : : getStoragevehicle_code )
. orderByDesc ( Structattr : : getBlock_num ) ; //neededit out_order_seq
jsonLockArr = structattrMapper . selectList ( queryWrapper ) ;
//isNumMap.put("flag", "6");
//jsonLockArr = WQL.getWO("QST_IVT_HANDMOVESTOR").addParamMap(isNumMap).process().getResultJSONArray(0);
} else if ( rightNumArr . size ( ) < leftNumArr . size ( ) ) {
} else if ( rightNumArr . size ( ) < leftNumArr . size ( ) ) {
/ *
/ *
@ -1317,9 +1316,17 @@ public class HandMoveStorServiceImpl extends ServiceImpl<MoveStorMapper, MoveSto
}
}
// 查询被阻挡需要移库的货位
// 查询被阻挡需要移库的货位
isNumMap . put ( "flag" , "7" ) ;
//isNumMap.put("flag", "7");
jsonLockArr = WQL . getWO ( "QST_IVT_HANDMOVESTOR" ) . addParamMap ( isNumMap ) . process ( ) . getResultJSONArray ( 0 ) ;
//jsonLockArr = WQL.getWO("QST_IVT_HANDMOVESTOR").addParamMap(isNumMap).process().getResultJSONArray(0);
LambdaQueryWrapper < Structattr > queryWrapper = new LambdaQueryWrapper < Structattr > ( ) ;
queryWrapper . eq ( ObjectUtil . isNotEmpty ( whereJson . getString ( "block_num" ) ) , Structattr : : getBlock_num , whereJson . getString ( "block_num" ) )
. eq ( ObjectUtil . isNotEmpty ( whereJson . getString ( "row_num" ) ) , Structattr : : getBlock_num , whereJson . getString ( "row_num" ) ) //neededit
. lt ( ObjectUtil . isNotEmpty ( whereJson . getString ( "out_order_seq" ) ) , Structattr : : getBlock_num , whereJson . getString ( "out_order_seq" ) ) //neededit
. ne ( Structattr : : getStoragevehicle_code , "" )
. isNotNull ( Structattr : : getStoragevehicle_code )
. orderByAsc ( Structattr : : getBlock_num ) ; //neededit out_order_seq
jsonLockArr = structattrMapper . selectList ( queryWrapper ) ;
} else {
} else {
/ *
/ *
* 默认从右边开始
* 默认从右边开始
@ -1343,8 +1350,17 @@ public class HandMoveStorServiceImpl extends ServiceImpl<MoveStorMapper, MoveSto
}
}
// 查询被阻挡需要移库的货位
// 查询被阻挡需要移库的货位
isNumMap . put ( "flag" , "7" ) ;
//isNumMap.put("flag", "7");
jsonLockArr = WQL . getWO ( "QST_IVT_HANDMOVESTOR" ) . addParamMap ( isNumMap ) . process ( ) . getResultJSONArray ( 0 ) ;
//jsonLockArr = WQL.getWO("QST_IVT_HANDMOVESTOR").addParamMap(isNumMap).process().getResultJSONArray(0);
LambdaQueryWrapper < Structattr > queryWrapper = new LambdaQueryWrapper < Structattr > ( ) ;
queryWrapper . eq ( ObjectUtil . isNotEmpty ( whereJson . getString ( "block_num" ) ) , Structattr : : getBlock_num , whereJson . getString ( "block_num" ) )
. eq ( ObjectUtil . isNotEmpty ( whereJson . getString ( "row_num" ) ) , Structattr : : getBlock_num , whereJson . getString ( "row_num" ) ) //neededit
. lt ( ObjectUtil . isNotEmpty ( whereJson . getString ( "out_order_seq" ) ) , Structattr : : getBlock_num , whereJson . getString ( "out_order_seq" ) ) //neededit
. ne ( Structattr : : getStoragevehicle_code , "" )
. isNotNull ( Structattr : : getStoragevehicle_code )
. orderByAsc ( Structattr : : getBlock_num ) ; //neededit out_order_seq
jsonLockArr = structattrMapper . selectList ( queryWrapper ) ;
}
}
} else if ( StrUtil . equals ( placement_type , "02" ) ) {
} else if ( StrUtil . equals ( placement_type , "02" ) ) {
@ -1373,8 +1389,16 @@ public class HandMoveStorServiceImpl extends ServiceImpl<MoveStorMapper, MoveSto
}
}
// 查询被阻挡需要移库的货位
// 查询被阻挡需要移库的货位
isNumMap . put ( "flag" , "6" ) ;
//isNumMap.put("flag", "6");
jsonLockArr = WQL . getWO ( "QST_IVT_HANDMOVESTOR" ) . addParamMap ( isNumMap ) . process ( ) . getResultJSONArray ( 0 ) ;
//jsonLockArr = WQL.getWO("QST_IVT_HANDMOVESTOR").addParamMap(isNumMap).process().getResultJSONArray(0);
LambdaQueryWrapper < Structattr > queryWrapper = new LambdaQueryWrapper < Structattr > ( ) ;
queryWrapper . eq ( ObjectUtil . isNotEmpty ( whereJson . getString ( "block_num" ) ) , Structattr : : getBlock_num , whereJson . getString ( "block_num" ) )
. eq ( ObjectUtil . isNotEmpty ( whereJson . getString ( "row_num" ) ) , Structattr : : getBlock_num , whereJson . getString ( "row_num" ) ) //neededit
. gt ( ObjectUtil . isNotEmpty ( whereJson . getString ( "out_order_seq" ) ) , Structattr : : getBlock_num , whereJson . getString ( "out_order_seq" ) ) //neededit
. ne ( Structattr : : getStoragevehicle_code , "" )
. isNotNull ( Structattr : : getStoragevehicle_code )
. orderByDesc ( Structattr : : getBlock_num ) ; //neededit out_order_seq
jsonLockArr = structattrMapper . selectList ( queryWrapper ) ;
} else if ( StrUtil . equals ( placement_type , "03" ) ) {
} else if ( StrUtil . equals ( placement_type , "03" ) ) {
/ *
/ *
@ -1404,8 +1428,17 @@ public class HandMoveStorServiceImpl extends ServiceImpl<MoveStorMapper, MoveSto
}
}
// 查询被阻挡需要移库的货位
// 查询被阻挡需要移库的货位
isNumMap . put ( "flag" , "7" ) ;
//isNumMap.put("flag", "7");
jsonLockArr = WQL . getWO ( "QST_IVT_HANDMOVESTOR" ) . addParamMap ( isNumMap ) . process ( ) . getResultJSONArray ( 0 ) ;
//jsonLockArr = WQL.getWO("QST_IVT_HANDMOVESTOR").addParamMap(isNumMap).process().getResultJSONArray(0);
LambdaQueryWrapper < Structattr > queryWrapper = new LambdaQueryWrapper < Structattr > ( ) ;
queryWrapper . eq ( ObjectUtil . isNotEmpty ( whereJson . getString ( "block_num" ) ) , Structattr : : getBlock_num , whereJson . getString ( "block_num" ) )
. eq ( ObjectUtil . isNotEmpty ( whereJson . getString ( "row_num" ) ) , Structattr : : getBlock_num , whereJson . getString ( "row_num" ) ) //neededit
. lt ( ObjectUtil . isNotEmpty ( whereJson . getString ( "out_order_seq" ) ) , Structattr : : getBlock_num , whereJson . getString ( "out_order_seq" ) ) //neededit
. ne ( Structattr : : getStoragevehicle_code , "" )
. isNotNull ( Structattr : : getStoragevehicle_code )
. orderByAsc ( Structattr : : getBlock_num ) ; //neededit out_order_seq
jsonLockArr = structattrMapper . selectList ( queryWrapper ) ;
}
}
/ *
/ *