|
|
|
@ -8,6 +8,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
|
|
import com.glxp.udi.admin.constant.ConstantStatus;
|
|
|
|
|
import com.glxp.udi.admin.constant.ConstantType;
|
|
|
|
|
import com.glxp.udi.admin.dao.inout.CodesDao;
|
|
|
|
|
import com.glxp.udi.admin.dao.inout.CodesTempDao;
|
|
|
|
|
import com.glxp.udi.admin.dao.inout.OrderDao;
|
|
|
|
|
import com.glxp.udi.admin.entity.inout.*;
|
|
|
|
|
import com.glxp.udi.admin.req.inout.*;
|
|
|
|
|
import com.glxp.udi.admin.req.inventory.FilterInvProductRequest;
|
|
|
|
@ -35,6 +37,10 @@ public class WarehouseService {
|
|
|
|
|
private OrderDetailService orderDetailService;
|
|
|
|
|
@Resource
|
|
|
|
|
private CodesDao codesDao;
|
|
|
|
|
@Resource
|
|
|
|
|
private CodesTempDao codesTempDao;
|
|
|
|
|
@Resource
|
|
|
|
|
private OrderDao orderDao;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public IPage<WarehouseEntity> filterWarehouseByPage(WarehouseQueryRequest warehouseQueryRequest) {
|
|
|
|
@ -196,6 +202,11 @@ public class WarehouseService {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 更新码数量
|
|
|
|
|
*
|
|
|
|
|
* @param warehouseEntity
|
|
|
|
|
*/
|
|
|
|
|
public void updateCode(WarehouseEntity warehouseEntity) {
|
|
|
|
|
codesDao.updateCount(warehouseEntity.getCount(), warehouseEntity.getId());
|
|
|
|
|
}
|
|
|
|
@ -204,4 +215,20 @@ public class WarehouseService {
|
|
|
|
|
codesDao.deleteById(id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 根据单据号,更新码创建时间
|
|
|
|
|
*
|
|
|
|
|
* @param codeEditRequest
|
|
|
|
|
*/
|
|
|
|
|
public void updateCodesTime(CodeEditRequest codeEditRequest) {
|
|
|
|
|
for (String orderId : codeEditRequest.getOrderIds()) {
|
|
|
|
|
//根据单据状态,判断是更新码表还是临时码表
|
|
|
|
|
int status = orderDao.selectStatusByOrderId(orderId);
|
|
|
|
|
if (ConstantStatus.ORDER_STATUS_SUCCESS == status) {
|
|
|
|
|
codesDao.updateActDateByOrderId(codeEditRequest.getActDate(), orderId);
|
|
|
|
|
} else {
|
|
|
|
|
codesTempDao.updateActDateByOrderId(codeEditRequest.getActDate(), orderId);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|