@ -192,9 +192,7 @@ public class SendMaterialTask extends AbstractAcsTask {
throw new BadRequestException ( "载具不能为空!" ) ;
}
//判断起点有没有未完成的指令
JSONObject beforTaskObj = taskTable .
query ( "is_delete='0' and start_point_code='" + start_point_code + "' and task_status <>'" + TaskStatusEnum . FINISHED . getCode ( ) + "'" )
. uniqueResult ( 0 ) ;
JSONObject beforTaskObj = taskTable . query ( "is_delete='0' and start_point_code='" + start_point_code + "' and task_status <>'" + TaskStatusEnum . FINISHED . getCode ( ) + "'" ) . uniqueResult ( 0 ) ;
if ( ObjectUtil . isNotEmpty ( beforTaskObj ) ) {
throw new BadRequestException ( "存在指令号为'" + beforTaskObj . getString ( "task_code" ) + "' 未完成!" ) ;
}
@ -232,8 +230,7 @@ public class SendMaterialTask extends AbstractAcsTask {
if ( StrUtil . isEmpty ( is_full ) ) {
throw new BadRequestException ( "是否满托不能为空!" ) ;
}
JSONObject workInfo = WQL . getWO ( "QSTRUCT_RULE" ) . addParam ( "flag" , "1" ) . addParam ( "code" , start_point_code )
. process ( ) . uniqueResult ( 0 ) ;
JSONObject workInfo = WQL . getWO ( "QSTRUCT_RULE" ) . addParam ( "flag" , "1" ) . addParam ( "code" , start_point_code ) . process ( ) . uniqueResult ( 0 ) ;
String workprocedure_id = workInfo . getString ( "workprocedure_id" ) ;
WorkProcedureEnum workProcedureEnum = WorkProcedureEnum . get ( workprocedure_id ) ;
String vehilce_type = "" ;
@ -263,9 +260,12 @@ public class SendMaterialTask extends AbstractAcsTask {
qty_unit_id = BussConstant . HN_IN_QTY_UNIT_ID ;
bill_type = BillTypeEnum . FJRK . getCode ( ) ;
endArea_type = AreaEnum . BZZC . getCode ( ) ;
vehicle_code = startPoint . getVehicle_code ( ) ;
if ( StrUtil . equals ( is_full , "1" ) ) {
next_point_code = "BZX01" ;
if ( StrUtil . equals ( vehicle_code , "0" ) ) {
vehicle_code = startPoint . getVehicle_code ( ) ;
}
}
break ;
@ -288,11 +288,7 @@ public class SendMaterialTask extends AbstractAcsTask {
//创建入库单据
//假如静置时间为空,则取物料表上的静置时间
if ( StrUtil . isEmpty ( stewing_time ) ) {
stewing_time = WQLObject
. getWQLObject ( "md_me_material" )
. query ( "material_id ='" + material_id + "'" )
. uniqueResult ( 0 )
. getString ( "stewing_time" ) ;
stewing_time = WQLObject . getWQLObject ( "md_me_material" ) . query ( "material_id ='" + material_id + "'" ) . uniqueResult ( 0 ) . getString ( "stewing_time" ) ;
}
JSONObject iosObj = new JSONObject ( ) ;
iosObj . put ( "iostorinv_id" , IdUtil . getSnowflake ( 1 , 1 ) . nextId ( ) ) ;
@ -330,9 +326,7 @@ public class SendMaterialTask extends AbstractAcsTask {
//终点点加锁
HashMap lock_map = new HashMap ( ) ;
lock_map . put ( "lock_type" , "01" ) ;
WQLObject
. getWQLObject ( "sch_base_point" )
. update ( lock_map , "point_code = '" + next_point_code + "'" ) ;
WQLObject . getWQLObject ( "sch_base_point" ) . update ( lock_map , "point_code = '" + next_point_code + "'" ) ;
CodeUtil . getNewCode ( "TASK_CODE" ) ;
JSONObject taskObj = new JSONObject ( ) ;
taskObj . put ( "task_id" , task_id ) ;