@ -59,11 +59,15 @@ public class StructFindUtil {
if ( StrUtil . isEmpty ( workprocedure_id ) ) {
throw new BadRequestException ( "工序不能为空!" ) ;
}
JSONObject result = WQL . getWO ( "QSTRUCT_RULE" ) . addParam ( "flag" , "3" )
. addParam ( "material_id" , material_id ) . addParam ( "area_type" , area_type )
JSONObject result = WQL
. getWO ( "QSTRUCT_RULE" )
. addParam ( "flag" , "3" )
. addParam ( "material_id" , material_id )
. addParam ( "area_type" , area_type )
. addParam ( "vehicle_type" , vehicle_type )
. addParam ( "is_full" , is_full ) . addParam ( "workprocedure_id" , workprocedure_id )
. process ( ) . uniqueResult ( 0 ) ;
. process ( )
. uniqueResult ( 0 ) ;
return result ;
}
@ -74,12 +78,20 @@ public class StructFindUtil {
if ( StrUtil . isEmpty ( vehicle_code ) ) {
throw new BadRequestException ( "托盘不能为空!" ) ;
}
if ( StrUtil . equals ( point_code , "KGTPDDW05" ) ) {
JSONArray pointarr = WQL . getWO ( "ACSTOMES_001" ) . addParam ( "area_type" , AreaEnum . KGTCPQ . getCode ( ) ) . addParam ( "flag" , "2" ) . process ( ) . getResultJSONArray ( 0 ) ;
if ( StrUtil . equals ( point_code , "KGTDDW05" ) ) {
JSONArray pointarr = WQL
. getWO ( "ACSTOMES_001" )
. addParam ( "area_type" , AreaEnum . KGTCPQ . getCode ( ) )
. addParam ( "flag" , "2" )
. process ( )
. getResultJSONArray ( 0 ) ;
PointUpdateUtil . updatePoint ( pointarr ) ;
}
//根据托盘找托盘类型,
JSONObject vehicleObj = WQLObject . getWQLObject ( "md_pb_vehicle" ) . query ( "vehicle_code='" + vehicle_code + "'" ) . uniqueResult ( 0 ) ;
JSONObject vehicleObj = WQLObject
. getWQLObject ( "md_pb_vehicle" )
. query ( "vehicle_code='" + vehicle_code + "'" )
. uniqueResult ( 0 ) ;
if ( ObjectUtil . isEmpty ( vehicleObj ) ) {
throw new BadRequestException ( "未找到托盘号为'" + vehicle_code + "' 托盘信息!" ) ;
}
@ -87,11 +99,14 @@ public class StructFindUtil {
throw new BadRequestException ( "区域不能为空!" ) ;
}
String vehice_type = vehicleObj . getString ( "vehicle_type" ) ;
JSONObject result = WQL . getWO ( "QSTRUCT_RULE" ) . addParam ( "flag" , "4" )
JSONObject result = WQL
. getWO ( "QSTRUCT_RULE" )
. addParam ( "flag" , "4" )
. addParam ( "area_type" , area_type )
. addParam ( "vehice_type" , vehice_type )
. addParam ( "point_code" , point_code )
. process ( ) . uniqueResult ( 0 ) ;
. process ( )
. uniqueResult ( 0 ) ;
return result ;
}
@ -101,9 +116,12 @@ public class StructFindUtil {
String point_code = jsonObject . getString ( "point_code" ) ;
//如果是堆叠位5 需要更新 设备状态
if ( StrUtil . equals ( point_code , "KGTDDW05" ) ) {
JSONArray pointarr = WQL . getWO ( "ACSTOMES_001" )
JSONArray pointarr = WQL
. getWO ( "ACSTOMES_001" )
. addParam ( "area_type" , AreaEnum . KGTCPQ . getCode ( ) )
. addParam ( "flag" , "2" ) . process ( ) . getResultJSONArray ( 0 ) ;
. addParam ( "flag" , "2" )
. process ( )
. getResultJSONArray ( 0 ) ;
PointUpdateUtil . updatePoint ( pointarr ) ;
}
@ -113,19 +131,23 @@ public class StructFindUtil {
JSONObject result = new JSONObject ( ) ;
//如果是堆叠位5 需要更新 设备状态
if ( StrUtil . equals ( point_code , "KGTDDW05" ) ) {
JSONArray pointarr = WQL . getWO ( "ACSTOMES_001" ) . addParam ( "area_type" , AreaEnum . KGTCPQ . getCode ( ) ) . addParam ( "flag" , "2" ) . process ( ) . getResultJSONArray ( 0 ) ;
PointUpdateUtil . updatePoint ( pointarr ) ;
result = WQL . getWO ( "QSTRUCT_RULE" ) . addParam ( "flag" , "6" )
result = WQL
. getWO ( "QSTRUCT_RULE" )
. addParam ( "flag" , "6" )
. addParam ( "area_type" , area_type )
. addParam ( "vehicle_type" , vehicle_type )
. addParam ( "point_code" , point_code )
. process ( ) . uniqueResult ( 0 ) ;
. process ( )
. uniqueResult ( 0 ) ;
} else {
result = WQL . getWO ( "QSTRUCT_RULE" ) . addParam ( "flag" , "5" )
result = WQL
. getWO ( "QSTRUCT_RULE" )
. addParam ( "flag" , "5" )
. addParam ( "area_type" , area_type )
. addParam ( "vehicle_type" , vehicle_type )
. addParam ( "point_code" , point_code )
. process ( ) . uniqueResult ( 0 ) ;
. process ( )
. uniqueResult ( 0 ) ;
}
return result ;