@ -102,7 +102,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
@Override
public R saveCustom ( TaskQuestDTO taskQuest ) {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient . getMyCurrentWarehouse ( ) ;
if ( null = = myCurrentWarehouse ) {
if ( null = = myCurrentWarehouse ) {
return R . fail ( "请选择仓库后操作" ) ;
}
Long id = myCurrentWarehouse . getId ( ) ;
@ -112,7 +112,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
taskQuest . setQuestNum ( questNum ) ;
boolean save = this . save ( taskQuest ) ;
//存入子表
if ( taskQuest . getList ( ) . size ( ) > 0 ) {
if ( taskQuest . getList ( ) . size ( ) > 0 ) {
List < TaskQuestChildEntity > list = taskQuest . getList ( ) ;
for ( TaskQuestChildEntity taskQuestChildEntity : list ) {
taskQuestChildEntity . setWarehouseId ( id ) ;
@ -120,14 +120,14 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
}
taskQuestChildService . saveBatch ( list ) ;
}
return save ? R . success ( "添加成功" ) : R . fail ( "添加失败" ) ;
return save ? R . success ( "添加成功" ) : R . fail ( "添加失败" ) ;
}
@Override
public TaskQuestVO getOneCustom ( Long id ) {
TaskQuestVO taskQuestVO = new TaskQuestVO ( ) ;
TaskQuestEntity taskQuestEntity = baseMapper . selectById ( id ) ;
Func . copy ( taskQuestEntity , taskQuestVO ) ;
Func . copy ( taskQuestEntity , taskQuestVO ) ;
//查询子表
List < TaskQuestChildVO > list = taskQuestChildService . selectlistByMasterId ( id ) ;
taskQuestVO . setList ( list ) ;
@ -138,8 +138,8 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
public Boolean deleteLogicCustom ( List < Long > toLongList ) {
//删除子表
boolean remove = taskQuestChildService . remove ( new QueryWrapper < TaskQuestChildEntity > ( ) . lambda ( )
. eq ( TaskQuestChildEntity : : getIsDeleted , 0 )
. in ( TaskQuestChildEntity : : getQuestId , toLongList )
. eq ( TaskQuestChildEntity : : getIsDeleted , 0 )
. in ( TaskQuestChildEntity : : getQuestId , toLongList )
) ;
return this . deleteLogic ( toLongList ) ;
}
@ -149,11 +149,11 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
Long id = taskQuest . getId ( ) ;
//删除子表
boolean remove = taskQuestChildService . remove ( new QueryWrapper < TaskQuestChildEntity > ( ) . lambda ( )
. eq ( TaskQuestChildEntity : : getIsDeleted , 0 )
. eq ( TaskQuestChildEntity : : getQuestId , id )
. eq ( TaskQuestChildEntity : : getIsDeleted , 0 )
. eq ( TaskQuestChildEntity : : getQuestId , id )
) ;
//存入子表
if ( taskQuest . getList ( ) . size ( ) > 0 ) {
if ( taskQuest . getList ( ) . size ( ) > 0 ) {
List < TaskQuestChildEntity > list = taskQuest . getList ( ) ;
for ( TaskQuestChildEntity taskQuestChildEntity : list ) {
taskQuestChildEntity . setWarehouseId ( id ) ;
@ -168,7 +168,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
@Override
public IPage < TaskQuestApiVO > selectTaskQuestApiPage ( IPage < TaskQuestApiVO > page , TaskQuestApiVO taskQuest ) {
List < Long > collect = this . getmyWarehouseList ( ) ;
List < Long > collect = this . getmyWarehouseList ( ) ;
List < TaskQuestApiVO > taskQuestVOS = baseMapper . selectTaskQuestApiPage ( page , taskQuest , collect ) ;
for ( TaskQuestApiVO taskQuestVO : taskQuestVOS ) {
//查询子表
@ -188,9 +188,9 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
@Override
public IPage < TaskallocationVO > selectallocationList ( IPage < TaskallocationVO > page , TaskSearchDTO taskSearchDTO ) {
List < Long > collect = this . getmyWarehouseList ( ) ;
List < TaskallocationVO > list = baseMapper . selectallocationList ( page , taskSearchDTO , collect ) ;
if ( ! list . isEmpty ( ) ) {
List < Long > collect = this . getmyWarehouseList ( ) ;
List < TaskallocationVO > list = baseMapper . selectallocationList ( page , taskSearchDTO , collect ) ;
if ( ! list . isEmpty ( ) ) {
for ( TaskallocationVO taskallocationVO : list ) {
Long allocationId = taskallocationVO . getAllocationId ( ) ;
Integer i = warehouseUpdownGoodsMapper . selectCountSumByallocation ( allocationId ) ;
@ -202,23 +202,23 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
@Override
public IPage < TaskContractVO > selectcontractList ( IPage < TaskContractVO > page , TaskSearchDTO taskSearchDTO ) {
List < Long > collect = this . getmyWarehouseList ( ) ;
List < Long > collect = this . getmyWarehouseList ( ) ;
baseMapper . setSqlMode ( ) ;
List < TaskContractVO > list = baseMapper . selectcontractList ( page , taskSearchDTO , collect ) ;
if ( ! list . isEmpty ( ) ) {
List < TaskContractVO > list = baseMapper . selectcontractList ( page , taskSearchDTO , collect ) ;
if ( ! list . isEmpty ( ) ) {
for ( TaskContractVO taskContractVO : list ) {
Long orderId = taskContractVO . getOrderId ( ) ;
String orderCode = taskContractVO . getOrderCode ( ) ;
//查询该订单,如果是零担直接用在库数量
DistributionStockArticleEntity entityByStockArticle = distributionStockArticleClient . findEntityByStockArticleId ( orderId ) ;
if ( entityByStockArticle . getIsZero ( ) . equals ( "1" ) ) {
if ( entityByStockArticle . getGenre ( ) = = 1 ) {
if ( entityByStockArticle . getIsZero ( ) . equals ( "1" ) ) {
if ( entityByStockArticle . getGenre ( ) = = 1 ) {
taskContractVO . setTotal ( entityByStockArticle . getTotalNumber ( ) ) ;
taskContractVO . setZktotal ( entityByStockArticle . getTotalNumber ( ) ) ;
}
} else if ( entityByStockArticle . getIsZero ( ) . equals ( "0" ) ) {
} else if ( entityByStockArticle . getIsZero ( ) . equals ( "0" ) ) {
//包条
if ( entityByStockArticle . getGenre ( ) = = 1 ) {
if ( entityByStockArticle . getGenre ( ) = = 1 ) {
//查询该订单下包条的所有数量
Integer integer = distributionParcelListClient . SumEntityByOrderId ( orderId , null ) ;
Integer integer1 = distributionParcelListClient . SumEntityByOrderId ( orderId , collect . get ( 0 ) ) ;
@ -235,10 +235,10 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
@Override
public IPage < TaskTrayVO > selecttrayList ( IPage < TaskTrayVO > page , TaskSearchDTO taskSearchDTO ) {
List < Long > collect = this . getmyWarehouseList ( ) ;
List < Long > collect = this . getmyWarehouseList ( ) ;
baseMapper . setSqlMode ( ) ;
List < TaskTrayVO > list = baseMapper . selecttrayList ( page , taskSearchDTO , collect ) ;
if ( ! list . isEmpty ( ) ) {
List < TaskTrayVO > list = baseMapper . selecttrayList ( page , taskSearchDTO , collect ) ;
if ( ! list . isEmpty ( ) ) {
for ( TaskTrayVO taskTrayVO : list ) {
//查询托盘
Integer i = warehouseTrayGoodsMapper . SumByTrayId ( taskTrayVO . getTrayId ( ) ) ;
@ -251,7 +251,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
@Override
public IPage < TaskStripApiVO > selectallocationDetailByStrip ( IPage < TaskStripApiVO > page , TaskSearchDTO taskSearchDTO ) {
//查询货位上的所有包条
List < TaskStripApiVO > list = warehouseUpdownGoodsMapper . selectListByTaskStrip ( page , taskSearchDTO ) ;
List < TaskStripApiVO > list = warehouseUpdownGoodsMapper . selectListByTaskStrip ( page , taskSearchDTO ) ;
for ( TaskStripApiVO taskStripApiVO : list ) {
}
@ -260,7 +260,7 @@ public class TaskQuestServiceImpl extends BaseServiceImpl<TaskQuestMapper, TaskQ
private String getQuestNum ( String warehouseCode ) {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat ( "yyyyMMddHHmmss" ) ;
return "PDRW-" + warehouseCode + "-" + simpleDateFormat . format ( new Date ( ) ) + new Random ( ) . nextInt ( 900 ) + 100 ;
return "PDRW-" + warehouseCode + "-" + simpleDateFormat . format ( new Date ( ) ) + new Random ( ) . nextInt ( 900 ) + 100 ;
}
}